/**
 * @license RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/i18n for details
 */

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010-2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/

/**
 * @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors:  IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Andy Clement (vmware) - bug 344614
 *******************************************************************************/

/*******************************************************************************
 * @license Copyright (c) 2013 IBM Corporation and others. All rights
 *          reserved. This program and the accompanying materials are made
 *          available under the terms of the Eclipse Public License v1.0
 *          (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 *          Distribution License v1.0
 *          (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - _initial API and implementation
 *******************************************************************************/

/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 *
 * Contributors:  IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     Anton McConville (IBM Corporation) - initial API and implementation
 *
 *******************************************************************************/

/*

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010-2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
 RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/text for details

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010,2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010,2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2011,2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:  IBM Corporation - initial API and implementation

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
 Andy Clement (vmware) - bug 344614

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation
 Copyright (c) 2013 IBM Corporation and others. All rights
 reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse
 Distribution License v1.0
 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - _initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 


 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2009, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).

 Contributors:  IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 Anton McConville (IBM Corporation) - initial API and implementation

 RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/i18n for details

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation
*/
(function(){function h(e,c,b,a,d,i){c[e]&&(b.push(e),(c[e]===!0||c[e]===1)&&a.push(d+e+"/"+i))}function j(c,f,b,a,d){f=a+f+"/"+d;require._fileExists(c.toUrl(f+".js"))&&b.push(f)}function g(c,f,b){for(var a in f)f.hasOwnProperty(a)&&(!c.hasOwnProperty(a)||b)?c[a]=f[a]:typeof f[a]==="object"&&g(c[a],f[a],b)}var c=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(e){var f=e.config?e.config():{};return{version:"2.0.1+",load:function(b,a,d,i){i=i||{};if(i.locale)f.locale=i.locale;
var e=c.exec(b),l=e[1],m=e[4],o=e[5],s=m.split("-"),p=[],n={},q,t="";if(e[5])l=e[1],b=l+o;else{o=e[4];m=f.locale;if(!m)m=f.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();s=m.split("-")}if(i.isBuild){p.push(b);j(a,"root",p,l,o);for(q=0;q<s.length;q++)i=s[q],t+=(t?"-":"")+i,j(a,t,p,l,o);a(p,function(){d()})}else a([b],function(i){var b=[],c;h("root",i,b,p,l,o);for(q=0;q<s.length;q++)c=s[q],t+=(t?"-":"")+c,h(t,i,b,p,l,o);a(p,function(){var c,
e,k;for(c=b.length-1;c>-1&&b[c];c--){k=b[c];e=i[k];if(e===!0||e===1)e=a(l+k+"/"+o);g(n,e)}d(n)})})}}})})();
define("orion/i18n",[],function(){return{load:function(h,j,g,c){var c=c||{},e=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,f=e.exec(h);if(f){if(!j.defined||j.defined(h))try{g(j(h));return}catch(b){}if(c.isBuild||c.isTest)g({});else{var a=f[1],d=f[3]?f[2]:"",i=f[3]||f[2];j(["orion/bootstrap"],function(b){b.startup().then(function(b){var k=b.serviceRegistry,b=k.getServiceReferences("orion.i18n.message");if(d)b.some(function(a){return h===a.getProperty("name")?(k.getService(a).getMessageBundle().then(function(a){g(a)},
function(){g({})}),!0):!1})||g({});else{var o={},s;b.forEach(function(b){var l=b.getProperty("name");if((f=e.exec(l))&&a===f[1]&&i===(f[3]||f[2]))if(d=f[3]?f[2]:""){if((b=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&b.toLowerCase().indexOf(d.toLowerCase())===0)o[d]=!0,(!j.specified||!j.specified(l))&&define(l,["orion/i18n!"+l],function(a){return a})}else s=b});!j.specified||!j.specified(h)?s?k.getService(s).getMessageBundle().then(function(a){Object.keys(o).forEach(function(d){typeof a[d]===
"undefined"&&(a[d]=o[d])});define(h,[],a);g(a)},function(){define(h,[],o);g(o)}):(define(h,[],o),g(o)):g(o)}})})}}else g(null)}}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile","Git Settings":"Git Settings",General:"General",Navigation:"Navigation",Links:"Links","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",Color:"Color",
Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address","Email Confirmed":"Email Confirmed",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",
Password:"Password",OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git User Settings":"Update Git User Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.",
"Git user data successfully updated.":"Git user data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.","Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL",
"Plugin URL:":"Plugin URL:",Disable:"Disable",DisableTooltip:"Disable the plugin",Enable:"Enable",EnableTooltip:"Enable the plugin","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin","Find More Orion Plugins":"Find More Orion Plugins","Get Plugins":"Get Plugins",Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration",
"Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value","JavaScript Object":"JavaScript Object","click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item",
"Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",general:"General",validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}",Editor:"Editor",editorSettings:"Settings",
EditorThemes:"Themes",Import:"Import","Import a theme":"Import a theme",fileManagement:"File Management",typing:"Typing",autoSave:"Auto Save",autoSaveTimeout:"Save interval (ms)",autoLoad:"Auto Load",saveDiffs:"Save file as diffs",trimTrailingWhiteSpace:"Trim Trailing Whitespace on Save",Restore:"Restore Defaults",Default:"Default",keys:"Keys",tabs:"Tabs",tabSize:"Tab Size",expandTab:"Insert spaces for tabs",smoothScrolling:"Smooth Scrolling",scrollAnimation:"Scrolling Animation",scrollAnimationTimeout:"Scrolling Duration (ms)",
keyBindings:"Key Bindings",rulers:"Rulers",annotationRuler:"Show Annotation Ruler",lineNumberRuler:"Show Line Number Ruler",foldingRuler:"Show Folding Ruler",overviewRuler:"Show Overview Ruler",whitespaces:"White Spaces",wrapping:"Wrapping",wordWrap:"Word Wrap",showMargin:"Show Margin",marginOffset:"Margin Column",showTabs:"Show Tabs",showSpaces:"Show Spaces",autoSaveTimeoutInvalid:"Invalid save interval.",scrollAnimationTimeoutInvalid:"Invalid scrolling duration.",tabSizeInvalid:"Invalid tab size.",
localSettingsTooltip:"Toggle whether this setting is shown in local editor settings drop down.",autoPairParentheses:"Autopair (Parentheses)",autoPairBraces:"Autopair {Braces}",autoPairSquareBrackets:"Autopair [Square] Brackets",autoPairAngleBrackets:"Autopair <Angle> Brackets",autoPairQuotations:'Autopair "Strings"',autoCompleteComments:"Autocomplete /** Block Comments */",smartIndentation:"Smart Indentation",sourceControl:"Source Control",showBlame:"Show Blame","Editor preferences updated":"Editor preferences updated",
"Editor defaults restored":"Editor defaults restored",Theme:"Theme","Font Size":"Font Size","New Theme Name:":"New Theme Name:","Font Size:":"Font Size:","UI Theme":"UI Theme","Navigation Bar":"Navigation Bar","Navigation Text":"Navigation Text","Search Box":"Search Box","Tool Panel":"Tool Panel","Selection Bar":"Selection Bar",Location:"Location",Content:"Content","Main Panel":"Main Panel",Button:"Button","Button Text":"Button Text","Section Text":"Section Text","Side Panel":"Side Panel","Line Color":"Line Color",
"Line Numbers":"Line Numbers",Foreground:"Foreground","Current Line":"Current Line","HTML Attribute":"HTML Attribute","Overview Ruler":"Overview Ruler","HTML Tag":"HTML Tag","Annotation Ruler":"Annotation Ruler","Show Guide":"Show Guide","Check Guide":"Check Guide",Cancel:"Cancel","Revert Theme":"Revert Theme","Update Theme":"Update Theme","Theme:":"Theme:",clickDiagram:"Click diagram to style.",clickUpdate:"Click Update button to save preview.","CSS Class Name":"CSS Class Name","CSS Attribute":"CSS Attribute",
"CSS Value":"CSS Value","CSS Text":"CSS Text","COLOR:":"Color:","NEW COLOR:":"New Color:",Ok:"Ok","OR HEX:":"Or Hex: "});define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
(function(){function h(){for(var c=navigator.userAgent,f={browser:!1,version:!1},b=[{name:"Chrome/Chromium",regExp:/(?:chrome|crios|chromium)\/(\d+)/i,minVersion:24},{name:"Firefox",regExp:/firefox\/(\d+)/i,minVersion:17},{name:"Microsoft Internet Explorer",regExp:/msie\s(\d+)/i,minVersion:10},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:5}],a=0;a<b.length;a++){var d=b[a],i=c.match(d.regExp);if(i){f.browser=!0;f.version=i[1]>=d.minVersion;f.name=d.name;break}}return f}function j(){try{return"localStorage"in
window&&window.localStorage!==null}catch(c){return!1}}function g(c){alert(c);throw Error("unsupported browser");}var c=h();if(c.browser)c.version||g("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+c.name+".\n");else if(j()&&!localStorage.skipBrowserCheck)if(confirm("Sorry, your browser is not supported. The latest version of Chrome, Firefox or Safari web browser is recommended.\nContinue anyway?"))localStorage.skipBrowserCheck=1;else throw"unsupported browser";
else j()||g("Sorry, your browser is not supported.\n\nTo use Orion, the latest version of the Chrome, Firefox, or Safari web browser is recommended.\n");return{isSupportedBrowser:h,supportsLocalStorage:j,throwBrowserAlert:g}})();define("orion/browserCompatibility",function(){});
(function(h,j){typeof define==="function"&&define.amd?define("orion/Deferred",j):typeof exports==="object"?module.exports=j():(h.orion=h.orion||{},h.orion.Deferred=j())})(this,function(){function h(){for(var b;b=e.shift();)b();f=!1}function j(b){e.push(b);f||(f=!0,setTimeout(h,0))}function g(b){return function(){b.apply(void 0,arguments)}}function c(){function b(){for(var a;a=m.shift();){var d=a.deferred,i=l==="fulfilled"?"resolve":"reject";if(typeof a[i]==="function")try{var b=(0,a[i])(k),c=b&&(typeof b===
"object"||typeof b==="function")&&b.then;if(typeof c==="function")if(b===d.promise)d.reject(new TypeError);else{var f=b.cancel;typeof f==="function"?d._protected(e).parentCancel=f.bind(b):delete d._protected(e).parentCancel;c.call(b,g(d.resolve),g(d.reject),g(d.progress))}else d.resolve(b)}catch(h){d.reject(h)}else d[i](k)}}function a(a){delete h.parentCancel;l="rejected";k=a;m.length&&j(b)}function d(i){function e(a){return function(d){g||(g=!0,a(d))}}var g=!1;delete h.parentCancel;try{var t=i&&
(typeof i==="object"||typeof i==="function")&&i.then;if(typeof t==="function")if(i===f)a(new TypeError);else{l="assumed";var w=i&&i.cancel;if(typeof w!=="function"){var r=new c,i=r.promise;try{t(r.resolve,r.reject,r.progress)}catch(z){r.reject(z)}w=i.cancel;t=i.then}k=i;t.call(i,e(d),e(a));h.parentCancel=w.bind(i)}else l="fulfilled",k=i,m.length&&j(b)}catch(x){e(a)(x)}}function i(){var d=h.parentCancel;if(d)delete h.parentCancel,d();else if(!l)d=Error("Cancel"),d.name="Cancel",a(d)}var k,l,m=[],f=
this,h={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==e)throw Error("protected");return h}});this.resolve=function(a){l||d(a);return f};this.reject=function(d){l||a(d);return f};this.progress=function(a){l||m.forEach(function(d){if(d.progress)try{d.progress(a)}catch(i){}});return f.promise};this.cancel=function(){h.parentCancel?setTimeout(i,0):i();return f};this.then=function(a,d,i){a={resolve:a,reject:d,progress:i,deferred:new c};m.push(a);a.deferred._protected(e).parentCancel=
f.promise.cancel.bind(f);(l==="fulfilled"||l==="rejected")&&j(b);return a.deferred.promise};this.promise={then:f.then,cancel:f.cancel}}var e=[],f=!1;c.all=function(b,a){function d(a,d){m||(l[a]=d,--e===0&&f.resolve(l))}function i(i,b){if(!m){if(a)try{d(i,a(b));return}catch(c){b=c}f.reject(b)}}var e=b.length,l=[],m=!1,f=new c;f.then(void 0,function(){m=!0;b.forEach(function(a){a.cancel&&a.cancel()})});e===0?f.resolve(l):b.forEach(function(a,b){a.then(d.bind(void 0,b),i.bind(void 0,b))});return f.promise};
c.when=function(b,a,d,i){var e;if(!(b&&typeof b.then==="function"))e=new c,e.resolve(b),b=e.promise;return b.then(a,d,i)};return c});
define("orion/EventTarget",[],function(){function h(){this._namedListeners={}}h.prototype={dispatchEvent:function(h){if(!h.type)throw Error("unspecified type");var g=this._namedListeners[h.type];g&&g.forEach(function(c){try{typeof c==="function"?c(h):c.handleEvent(h)}catch(e){typeof console!=="undefined"&&console.log(e)}});return!h.defaultPrevented},addEventListener:function(h,g){if(typeof g==="function"||g.handleEvent)this._namedListeners[h]=this._namedListeners[h]||[],this._namedListeners[h].push(g)},
removeEventListener:function(h,g){var c=this._namedListeners[h];if(c)for(var e=0;e<c.length;e++)if(c[e]===g){c.length===1?delete this._namedListeners[h]:c.splice(e,1);break}}};h.prototype.constructor=h;h.attach=function(j){var g=new h;j.dispatchEvent=g.dispatchEvent.bind(g);j.addEventListener=g.addEventListener.bind(g);j.removeEventListener=g.removeEventListener.bind(g)};return h});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(h,j){function g(a,d,i){this._properties=i||{};this._properties["service.id"]=a;this._properties.objectClass=d;this._properties["service.names"]=d}function c(a,d,i){this._serviceId=a;this._serviceReference=d;this._internalRegistry=i}function e(a,d){function i(i){return function(){var b;try{if(!d())throw Error("Service was unregistered");var c=a[i].apply(a,Array.prototype.slice.call(arguments));if(c&&typeof c.then==="function")return c;
else b=new h,b.resolve(c)}catch(e){b=new h,b.reject(e)}return b.promise}}for(var b in a)typeof a[b]==="function"&&(this[b]=i(b))}function f(a,d){this.type=a;this.serviceReference=d}function b(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new j;var a=this;this._internalRegistry={isRegistered:function(d){return a._entries[d]?!0:!1},unregisterService:function(d){var i=a._entries[d];if(!i)throw Error("Service has already been unregistered: "+d);var b=i.reference;a._serviceEventTarget.dispatchEvent(new f("unregistering",
b));a._entries[d]=null;b.getProperty("objectClass").forEach(function(d){for(var i=a._namedReferences[d],c=0;c<i.length;c++)if(i[c]===b){i.length===1?delete a._namedReferences[d]:i.splice(c,1);break}})},modifyService:function(d){var i=a._entries[d];if(!i)throw Error("Service not found while trying to send modified event: "+d);a._serviceEventTarget.dispatchEvent(new f("modified",i.reference))}}}g.prototype={getPropertyKeys:function(){var a=[],d;for(d in this._properties)this._properties.hasOwnProperty(d)&&
a.push(d);return a},getProperty:function(a){return this._properties[a]}};g.prototype.constructor=g;c.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("Service has already been unregistered: "+this._serviceId);return this._serviceReference},setProperties:function(a){var d=this._serviceReference._properties;this._serviceReference._properties=a||{};a["service.id"]=this._serviceId;
a.objectClass=d.objectClass;a["service.names"]=d["service.names"];this._internalRegistry.modifyService(this._serviceId)}};c.prototype.constructor=c;b.prototype={getService:function(a){var d;if(typeof a==="string")(a=this._namedReferences[a])&&a.some(function(a){d=this._entries[a.getProperty("service.id")].service;return!!d},this);else if(a=this._entries[a.getProperty("service.id")])d=a.service;return d||null},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:
[];var d=[];this._entries.forEach(function(a){a&&d.push(a.reference)});return d},registerService:function(a,d,b){if(typeof d==="undefined"||d===null)throw Error("invalid service");typeof a==="string"?a=[a]:Array.isArray(a)||(a=[]);var k=this._entries.length,l=new g(k,a,b),m=this._namedReferences;a.forEach(function(a){m[a]=m[a]||[];m[a].push(l)});a=new e(d,this._internalRegistry.isRegistered.bind(null,k));this._entries.push({reference:l,service:a});a=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new f("registered",
l));return new c(k,l,a)},addEventListener:function(a,d){this._serviceEventTarget.addEventListener(a,d)},removeEventListener:function(a,d){this._serviceEventTarget.removeEventListener(a,d)}};b.prototype.constructor=b;return{ServiceRegistry:b}});
define("orion/xhr",["orion/Deferred"],function(h){function j(g,c,e,f){var b=typeof e.response!=="undefined"?e.response:e.responseText,a;try{a=e.status}catch(d){a=0}g={args:c,response:b,responseText:typeof b==="string"?b:null,status:a,url:g,xhr:e};if(typeof f!=="undefined")g.error=f;return g}return function(g,c,e){var e=e||{},f=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,b=new h,a=e.headers||{},d=e.log||!1,i;typeof a["X-Requested-With"]==="undefined"&&(a["X-Requested-With"]="XMLHttpRequest");
if(typeof e.data!=="undefined"&&(g==="POST"||g==="PUT"))i=e.data;var k=!1,l=!1;b.promise.then(void 0,function(a){k=!0;!l&&a instanceof Error&&a.name==="Cancel"&&f.abort()});f.onabort=function(){l=!0;if(!k){var a=Error("Cancel");a.name="Cancel";b.reject(a)}};f.onload=function(){var a=j(c,e,f);200<=f.status&&f.status<400?b.resolve(a):(b.reject(a),d&&typeof console!=="undefined"&&console.log(Error(f.statusText)))};f.onerror=function(){var a=j(c,e,f);b.reject(a);d&&typeof console!=="undefined"&&console.log(Error(f.statusText))};
f.onprogress=function(a){a.xhr=f;b.progress(a)};try{f.open(g,c,!0);if(typeof e.responseType==="string")f.responseType=e.responseType;if(typeof e.timeout==="number")if(typeof f.timeout==="number")f.timeout=e.timeout,f.addEventListener("timeout",function(){b.reject(j(c,e,f,"Timeout exceeded"))});else{var m=setTimeout(function(){b.reject(j(c,e,f,"Timeout exceeded"))},e.timeout);b.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(a).forEach(function(d){f.setRequestHeader(d,
a[d])});f.send(i||null)}catch(o){b.reject(j(c,e,f,o))}return b.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,j,g){function c(a,d){this._name=a;this._providers=d;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function e(a,d){return{get:function(b,c){if(d===0)return null;var e=localStorage.getItem(a+b);if(e===null)return null;e=JSON.parse(e);return c||d===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(b,c){if(d!==0){if(d!==-1)c._expires=(new Date).getTime()+
1E3*d;if(Object.keys(c).length===0)localStorage.removeItem(a+b);else{var e=JSON.stringify(c);localStorage.setItem(a+b,e);delete c._expires}}},remove:function(d){localStorage.removeItem(a+d)}}}function f(a){this._currentPromises={};this._cache=new e("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var d=a.getServiceReferences("orion.core.preference.provider");if(d.length>0)this._service=a.getService(d[0])}return!!this._service}}function b(a){this._location=
a;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function a(){this._cache=new e("/orion/preferences/local",-1)}function d(d,c){this._userProvider=new f(d);this._localProvider=new a;c=c||"defaults.pref";c.indexOf("://")===-1&&(c=h.toUrl(c));this._defaultsProvider=new b(c);this._serviceRegistration=d.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var a=[],d=0;d<this._stores.length;++d){var b=this._stores[d];this._dirty.indexOf(b)!==-1&&
a.push(this._providers[d].put(this._name,b));if(this._pendingDeletes[d]&&this._pendingDeletes[d].length>0){for(b=0;b<this._pendingDeletes[d].length;b++)a.push(this._providers[d].remove(this._name,this._pendingDeletes[d][b]));delete this._pendingDeletes[d]}}this._dirty=[];return j.all(a)},_scheduleFlush:function(a){a&&this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),
0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var d=this._stores[a],b;for(b in d)d.hasOwnProperty(b)&&typeof this._cached[b]==="undefined"&&(this._cached[b]=d[b])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,d){if(this._stores.length!==0){var b=this._stores[0];if(b[a]!==d)b[a]=d,this._cached=null,this._scheduleFlush(b)}},remove:function(a){for(var d=0;d<
this._stores.length;++d){var b=this._stores[d];if(b.hasOwnProperty(a))return delete b[a],this._pendingDeletes[d]||(this._pendingDeletes[d]=[]),this._pendingDeletes[d].push(a),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]={},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var d=this,b=[],c=0;c<this._providers.length;++c)b.push(this._providers[c].get(this._name,
a).then(function(a){return function(b){d._stores[a]=b}}(c)));return j.all(b).then(function(){d._cached=null;d._getCached()})},flush:function(){this._flush()}};f.prototype={get:function(a,d){if(this._currentPromises[a])return this._currentPromises[a];var b=new j,c=null;d?this._cache.remove(a):c=this._cache.get(a);if(c!==null)b.resolve(c);else{this._currentPromises[a]=b;var e=this;this._service.get(a).then(function(d){e._cache.set(a,d);delete e._currentPromises[a];b.resolve(d)},function(d){d.status===
404?(d={},e._cache.set(a,d),delete e._currentPromises[a],b.resolve(d)):(delete e._currentPromises[a],b.resolve(e._cache.get(a,!0)||{}))})}return b},put:function(a,d){this._cache.set(a,d);return this._service.put(a,d)},remove:function(a,d){var b=this._cache.get(a);delete b[d];this._cache.set(a,b);return this._service.remove(a,d)}};b.prototype={get:function(a,d){if(this._currentPromise)return this._currentPromise;var b=new j,c=null;d?this._cache.remove(a):c=this._cache.get(a);if(c!==null)b.resolve(c);
else{this._currentPromise=b;var e=this;g("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(d){d=JSON.parse(d.response);e._cache.set(a,d[a]||{});e._currentPromise=null;b.resolve(d[a]||{})},function(d){d.xhr.status===401||d.xhr.status===404?(e._cache.set(a,{}),e._currentPromise=null,b.resolve({})):(e._currentPromise=null,d=e._cache.get(a,!0),d!==null?b.resolve(d[a]||{}):b.resolve({}))})}return b},put:function(){var a=new j;a.resolve();return a},remove:function(a,d){var b=
this._cache.get(a);delete b[d];this.put(a,b)}};a.prototype={get:function(a){var d=new j,a=this._cache.get(a);a!==null?d.resolve(a):d.resolve({});return d},put:function(a,d){var b=new j;this._cache.set(a,d);b.resolve();return b},remove:function(a,d){var b=this._cache.get(a);delete b[d];this.put(a,b)}};d.DEFAULT_SCOPE=1;d.LOCAL_SCOPE=2;d.USER_SCOPE=4;d.prototype={listenForChangedSettings:function(a,b,c){if(!b||typeof b!=="number"||b>7||b<1)c=b,b=d.DEFAULT_SCOPE|d.LOCAL_SCOPE|d.USER_SCOPE;window.addEventListener("storage",
c,!1);if((d.USER_SCOPE&b)!==0)return"/orion/preferences/user"+a;else if((d.LOCAL_SCOPE&b)!==0)return"/orion/preferences/local"+a;return"/orion/preferences/default"+a},getPreferences:function(a,b){if(!b||typeof b!=="number"||b>7||b<1)b=d.DEFAULT_SCOPE|d.LOCAL_SCOPE|d.USER_SCOPE;var e=[];d.USER_SCOPE&b&&this._userProvider.available()&&e.push(this._userProvider);d.LOCAL_SCOPE&b&&e.push(this._localProvider);d.DEFAULT_SCOPE&b&&e.push(this._defaultsProvider);var m=new c(a,e);return m.sync().then(function(){return m})},
getSetting:function(a,d,b){for(var c,e=0;e<a.length;e++)if(a[e].label===d)for(var f=0;f<a[e].data.length;f++)if(a[e].data[f].label===b){c=a[e].data[f].value;break}return c}};return{PreferencesService:d}});
(function(){function h(a){if(typeof a!=="string")throw new TypeError;}function j(a){return a?a.split("&"):[]}function g(a){return a.length===0?"":a.join("&")}function c(a){var d=/([^=]*)(?:=?)(.*)/.exec(a),a=d[1]?decodeURIComponent(d[1]):"",d=d[2]?decodeURIComponent(d[2]):"";return[a,d]}function e(a){var d=encodeURIComponent(a[0]);a[1]&&(d+="="+encodeURIComponent(a[1]));return d}function f(a,d){var b="",e=[],i=0;return{next:function(){if(b!==a.query)b=a.query,e=j(b);if(i<e.length){var l=c(e[i++]);
switch(d){case "keys":return l[0];case "values":return l[1];case "keys+values":return[l[0],l[1]];default:throw new TypeError;}}throw y;}}}function b(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function a(a){var d=[];a.split("/").forEach(function(a){a===".."?d.pop():a!=="."&&d.push(a)});return d.join("/")}function d(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function i(b,c){if(typeof b!=="string")throw new TypeError;var b=d(b),e=o.exec(b);
if(!e)return null;var i={};i.scheme=e[1]||"";if(i.scheme&&!p.test(i.scheme))return null;var l=e[2];if(l&&(l=s.exec(l),i.userinfo=l[1],i.host=l[2],i.port=l[3],i.port&&!n.test(i.port)))return null;i.path=e[3];i.query=e[4];i.fragment=e[5];if(!i.scheme&&c&&(i.scheme=c.scheme,!i.host&&c.host))i.userinfo=c.userinfo,i.host=c.host,i.port=c.port,i.pathRelative=!0;if(i.pathRelative)if(i.path){if(i.path[0]!=="/")e=/^(.*\/)[^\/]*$/.exec(c.path)[1]||"/",i.path=e+i.path}else i.path=c.path;if(i.scheme)i.scheme=
i.scheme.toLowerCase();if(i.port)i.port=/[1-9]\d*$/.exec(i.port)[0];if(i.host&&i.path)i.path=a(i.path);return i}function k(a,d){var c;if(d){d=d.href||d;c=i(d);if(!c||!c.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:c})}c=i(a,c);if(!c)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:c,writable:!0});var e=new b(this);Object.defineProperty(this,"query",{get:function(){return this._url?e:null},enumerable:!0})}
try{var l;if(typeof window.URL==="function"&&window.URL.length!==0&&(l=new window.URL("http://www.w3.org?q")).protocol==="http:"&&l.query)return}catch(m){}var o=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,s=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,p=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,n=/^\d*$/,q=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,t=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,w=/^([^?#\s]*)$/,r=/^([^\s]*)$/,z=/^\S*$/,x=/([^:]*):?(.*)/,y=typeof StopIteration!=="undefined"?
StopIteration:Error("Stop Iteration"),G={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(b.prototype,{get:{value:function(a){h(a);var d;j(this._url.query).some(function(b){b=c(b);if(b[0]===a)return d=b[1],!0});return d},enumerable:!0},set:{value:function(a,d){h(a);h(d);var b=j(this._url.query);b.some(function(i,l){var k=c(i);if(k[0]===a)return k[1]=d,b[l]=e(k),!0})||b.push(e([a,d]));this._url.query=g(b)},enumerable:!0},has:{value:function(a){h(a);
return j(this._url.query).some(function(d){if(c(d)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var d=j(this._url.query),b=d.filter(function(d){return c(d)[0]!==a});return b.length!==d.length?(this._url.query=g(b),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,d){if(typeof a!=="function")throw new TypeError;var b=f(this._url,"keys+values");try{for(;;){var c=b.next();a.call(d,c[1],c[0],this)}}catch(e){if(e!==y)throw e;
}},enumerable:!0},keys:{value:function(){return f(this._url,"keys")},enumerable:!0},values:{value:function(){return f(this._url,"values")},enumerable:!0},items:{value:function(){return f(this._url,"keys+values")}},size:{get:function(){return j(this._url.query).length},enumerable:!0},getAll:{value:function(a){h(a);var d=[];j(this._url.query).forEach(function(b){b=c(b);b[0]===a&&d.push(b[1])});return d},enumerable:!0},append:{value:function(a,d){h(a);h(d);var b=j(this._url.query);b.push(e([a,d]));this._url.query=
g(b)},enumerable:!0}});Object.defineProperties(k.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var d=a.scheme?a.scheme+":":"";a.host&&(d+="//",a.userinfo&&(d+=a.userinfo+"@"),d+=a.host,a.port&&(d+=":"+a.port));d+=a.path;a.query&&(d+="?"+a.query);a.fragment&&(d+="#"+a.fragment);a=d}else a=this._input;return a},set:function(a){h(a);this._input=a;this._url=i(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:
""},enumerable:!0},protocol:{get:function(){return this._url?this._url.scheme+":":":"},set:function(a){h(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,p.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){h(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=x.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);if(this._url){var d=
x.exec(this._userinfo),a=[encodeURIComponent(a||"")];d[2]&&a.push(d[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=x.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);if(this._url){var d=[x.exec(this._userinfo)[1]||""];a&&d.push(encodeURIComponent(a));this._userinfo=d.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},
set:function(a){h(a);if(this._url&&(a=t.exec(a)))this._url.host=a[1],this._url.port=/[1-9]\d*$/.exec(a[2])[0]},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){h(a);if(this._url&&q.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===G[this.protocol]&&(a="");return a},set:function(a){h(a);if(this._url&&n.exec(a))this._url.port=/[1-9]\d*$/.exec(a)[0]},enumerable:!0},pathname:{get:function(){return this._url?
this._url.path:""},set:function(d){h(d);if(this._url&&w.exec(d))this._url.host&&d&&d[0]!=="/"&&(d="/"+d),this._url.path=d?a(d):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),r.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),z.exec(a)))this._url.fragment=
a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(k,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(k,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=k})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(h,j){function g(a,d){var b=Object.keys(a),c=Object.keys(d);if(b.length!==c.length)return!1;b.sort();c.sort();for(var e=0,i=b.length;e<i;e++){var k=b[e];if(k!==c[e])return!1;var f=a[k],k=d[k];if(f!==k&&JSON.stringify(f)!==JSON.stringify(k))return!1}return!0}function c(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(d){}return a}function e(a){var d=null,b={key:function(b){return(d=
d||Object.keys(a))[b]},getItem:function(d){return a[d]},setItem:function(b,c){a[b]=c;d=null},removeItem:function(b){delete a[b];d=null},clear:function(){(d=d||Object.keys(a)).forEach(function(d){delete a[d]}.bind(this));d=null}};Object.defineProperty(b,"length",{get:function(){return(d=d||Object.keys(a)).length}});return b}function f(a,d){if(d&&d instanceof XMLHttpRequest){var b,c;try{b=d.status,c=d.statusText}catch(e){b=0,c=""}return{status:b||0,statusText:c}}return d}function b(a){var d=a?JSON.parse(JSON.stringify(a,
f)):a;if(a instanceof Error)d.__isError=!0,d.message=d.message||a.message,d.name=d.name||a.name;return d}function a(a,d){this.type=a;this.plugin=d}function d(a,d){this.__objectId=a;this.__methods=d}function i(c,e,i){function k(a){C&&i.postMessage(a,C)}function f(a){if(!C)return(new h).reject(Error("plugin not connected"));a.id=String(R++);var b=new h;O[a.id]=b;b.then(null,function(d){v==="active"&&d instanceof Error&&d.name==="Cancel"&&k({requestId:a.id,method:"cancel",params:d.message?[d.message]:
[]})});var c=Object.prototype.toString;a.params.forEach(function(e,i){if(c.call(e)==="[object Object]"&&!(e instanceof d)){var l,k;for(l in e)c.call(e[l])==="[object Function]"&&(k=k||[],k.push(l));if(k){var f=K++;M[f]=e;l=function(){delete M[f]};b.then(l,l);a.params[i]=new d(f,k)}}});i.postMessage(a,C);return b.promise}function n(a,d){a||a===0?k({id:a,result:null,error:d}):console.log(d)}function q(a,d,c,e){e.forEach(function(a,d){if(a&&typeof a.__objectId!=="undefined"){var b={};a.__methods.forEach(function(d){b[d]=
function(){return f({objectId:a.__objectId,method:d,params:Array.prototype.slice.call(arguments)})}});e[d]=b}});var i=typeof a===void 0?null:{id:a,result:null,error:null};try{var l=c.apply(d,e);if(i)l&&typeof l.then==="function"?(I[a]=l,l.then(function(d){delete I[a];i.result=d;k(i)},function(d){if(I[a])delete I[a],i.error=b(d),k(i)},function(){k({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(i.result=l,k(i))}catch(m){if(i)i.error=b(m),k(i)}}function t(a){try{if(a.method){var d=
a.method,b=a.params||[];if("serviceId"in a){var c=Q[a.serviceId];c||n(a.id,"service not found");d in c?q(a.id,c,c[d],b):n(a.id,"method not found")}else if("objectId"in a){var e=M[a.objectId];e||n(a.id,"object not found");d in e?q(a.id,e,e[d],b):n(a.id,"method not found")}else if("requestId"in a){var l=I[a.requestId];l&&d==="cancel"&&l.cancel&&l.cancel.apply(l,b)}else if("responseId"in a){var k=O[a.responseId];k&&d==="progress"&&k.progress&&k.progress.apply(k,b)}else if("plugin"===a.method){var f=
a.params[0];N({headers:f.headers,services:f.services}).then(function(){D.resolve(y)})}else if("timeout"===a.method)D&&D.reject(a.error);else throw Error("Bad method: "+a.method);}else{var m=O[String(a.id)];delete O[String(a.id)];if(a.error){var g=i.handleServiceError(y,a.error);m.reject(g)}else m.resolve(a.result)}}catch(p){console.log("Plugin._messageHandler "+p)}}function w(a){var b={};if(a.methods&&(a.methods.forEach(function(d){b[d]=function(){var b={serviceId:a.serviceId,method:d,params:Array.prototype.slice.call(arguments)};
return v==="active"?f(b):y.start({"transient":!0}).then(function(){return f(b)})}}),b.addEventListener&&b.removeEventListener)){var c=new j,e=K++;M[e]={handleEvent:c.dispatchEvent.bind(c)};var i=new d(e,["handleEvent"]),l=b.addEventListener;b.addEventListener=function(a,d){c._namedListeners[a]||l(a,i);c.addEventListener(a,d)};var k=b.removeEventListener;b.removeEventListener=function(a,d){c.removeEventListener(a,d);c._namedListeners[a]||k(a,i)}}return b}function r(a){var d=JSON.parse(JSON.stringify(a.properties));
d.__plugin__=c;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);d.objectClass=a;return d}function z(a){var d=w(a),b=r(a),b=i.registerService(a.names||a.type,d,b);H[a.serviceId]={registration:b,proxy:d}}function x(){i.persist(c,{created:G,headers:F,services:E,autostart:u,lastModified:A})}var y=this,e=e||{},G=e.created||(new Date).getTime(),F=e.headers||{},E=e.services||[],u=e.autostart,A=e.lastModified||0,v="installed",B,D,C,H={},R=0,K=0,I={},O={},M={},Q={},N;this._persist=x;this._resolve=function(){v=
"resolved";i.dispatchEvent(new a("resolved",y))};this._getAutostart=function(){return u};this._getCreated=function(){return G};this.getLocation=function(){return c};this.getHeaders=function(){return JSON.parse(JSON.stringify(F))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return A};this.getServiceReferences=function(){var a=[];Object.keys(H).forEach(function(d){a.push(H[d].registration.getReference())});
return a};this.getState=function(){return v};this.start=function(d){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(B)return B.promise.then(this.start.bind(this,d));if(v==="active")return(new h).resolve();if(!d||!d.transient){var b=d&&d.lazy?"lazy":"started";b!==u&&(u=b,x())}b=i.getState();if(b!=="starting"&&b!=="active")return d.transient?(new h).reject(Error("start transient error")):(new h).resolve();if(v==="installed")try{this._resolve()}catch(e){return(new h).reject(e)}v===
"resolved"&&E.forEach(function(a){z(a)});if(d&&d.lazy)return v!=="starting"&&(v="starting",i.dispatchEvent(new a("lazy activation",y))),(new h).resolve();var k=new h;B=k;v="starting";i.dispatchEvent(new a("starting",y));D=new h;C=i.connect(c,t);D.then(function(){D=null;v="active";i.dispatchEvent(new a("started",y));B=null;k.resolve()},function(){D=null;v="stopping";i.dispatchEvent(new a("stopping",y));Object.keys(H).forEach(function(a){H[a].registration.unregister();delete H[a]});i.disconnect(C);
C=null;v="resolved";B=null;i.dispatchEvent(new a("stopped",y));k.reject(Error("plugin activation error"))});return k.promise};this.stop=function(d){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(B)return B.promise.then(this.stop.bind(this,d));if((!d||!d.transient)&&"stopped"!==u)u="stopped",x();if(v!=="active"&&v!=="starting")return(new h).resolve();B=d=new h;v="stopping";i.dispatchEvent(new a("stopping",y));Object.keys(H).forEach(function(a){H[a].registration.unregister();
delete H[a]});C&&(i.disconnect(C),C=null);v="resolved";B=null;i.dispatchEvent(new a("stopped",y));d.resolve();return d.promise};N=function(d){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!d)return A===0&&(A=(new Date).getTime(),x()),i.loadManifest(c).then(N);var b=F,e=E,k=u;F=d.headers||{};E=d.services||{};u=d.autostart||u;d.lastModified?A=d.lastModified:(A=(new Date).getTime(),x());if(g(F,b)&&g(E,e)&&u===k)return(new h).resolve();if(v==="active"||v==="starting"){var f=
[];Object.keys(E).forEach(function(a){var d=E[a];f.push(a);var b=H[a];if(b){if(g(d.methods,Object.keys(b.proxy))){var a=r(d),c=b.registration.getReference(),e={};c.getPropertyKeys().forEach(function(a){e[a]=c.getProperty(a)});g(a,e)||b.registration.setProperties(a);return}b.registration.unregister();delete H[a]}z(d)});Object.keys(H).forEach(function(a){f.indexOf(a)===-1&&(H[a].registration.unregister(),delete H[a])})}v==="active"&&(i.disconnect(C),D=new h,C=i.connect(c,t),D.then(function(){D=null},
function(){D=null;v="stopping";i.dispatchEvent(new a("stopping"),y);Object.keys(H).forEach(function(a){H[a].registration.unregister();delete H[a]});i.disconnect(C);C=null;v="resolved";i.dispatchEvent(new a("stopped",y))}));return(new h).resolve()};this.update=function(d){return N(d).then(function(){i.dispatchEvent(new a("updated",y))})};this.uninstall=function(){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),
this.uninstall.bind(this));i.removePlugin(this);v="uninstalled";i.dispatchEvent(new a("uninstalled",y));return(new h).resolve()}}var k=/^http[s]?/i;return{Plugin:i,PluginRegistry:function(d,b){function f(a){var d=a.source;q.some(function(b){if(d===b.target){try{var c;if(typeof b.useStructuredClone==="undefined"){var e=typeof a.data!=="string";c=e?a.data:JSON.parse(a.data);b.useStructuredClone=e}else c=b.useStructuredClone?a.data:JSON.parse(a.data);b.handler(c)}catch(i){}return!0}})}var b=b||{},g=
b.storage||localStorage;g.getItem||(g=e(g));var p="installed",n=[],q=[],t=new j,w={},r={registerService:d.registerService.bind(d),connect:function(a,d,c){function e(a){a=Error(a);a.name="timeout";d({method:"timeout",error:a})}var i={handler:d,url:a},l=setTimeout(e.bind(null,"Load timeout for: "+a),c||15E3),k=document.createElement("iframe");k.name=a+"_"+(new Date).getTime();if(!b.visible)k.style.display="none",k.style.visibility="hidden";k.src=a;k.onload=function(){clearTimeout(l);setTimeout(e.bind(null,
"Plugin handshake timeout for: "+a),5E3)};k.sandbox="allow-scripts allow-same-origin";document.body.appendChild(k);i.target=k.contentWindow;i.close=function(){k&&(document.body.removeChild(k),k=null)};q.push(i);return i},disconnect:function(a){for(var d=0;d<q.length;d++)if(a===q[d]){q.splice(d,1);try{a.close()}catch(b){}break}},removePlugin:function(a){for(var d=0;d<n.length;d++)if(a===n[d]){n.splice(d,1);break}g.removeItem("plugin."+a.getLocation())},persist:function(a,d){g.setItem("plugin."+a,JSON.stringify(d))},
postMessage:function(a,d){d.target.postMessage(d.useStructuredClone?a:JSON.stringify(a),d.url)},dispatchEvent:function(a){try{t.dispatchEvent(a)}catch(d){console&&console.log("PluginRegistry.dispatchEvent "+d)}},loadManifest:function(a){var d=new h,b=r.connect(a,function(a){b&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],r.disconnect(b),b=null,d.resolve(a)):"timeout"===a.method&&(r.disconnect(b),b=null,d.reject(a.error)))});return d.promise},getState:function(){return p},handleServiceError:function(a,
d){if(d&&d.status===401){var b=a.getHeaders(),c=a.getName()||a.getLocation(),e=document.createElement("span");e.appendChild(document.createTextNode("Authentication required for: "+c+"."));if(b.login)e.appendChild(document.createTextNode(" ")),c=document.createElement("a"),c.target="_blank",c.textContent="Login",c.href=b.login,k.test(c.href)?(e.appendChild(c),e.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+b.login);return{Severity:"Error",HTML:!0,
Message:(new XMLSerializer).serializeToString(e)}}if(d.__isError){var i=d,d=Error(i.message);Object.keys(i).forEach(function(a){d[a]=i[a]});delete d.__isError}return d}};this.getLocation=function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=r.getState;this.init=function(){if(!(p==="starting"||p==="active"||p==="stopping")){addEventListener("message",f,
!1);for(var a=[],d=0,e=g.length;d<e;d++)a.push(g.key(d));a.forEach(function(a){if(a.indexOf("plugin.")===0){var d=a.substring(7),a=JSON.parse(g.getItem(a));a.created&&n.push(new i(d,a,r))}});n.sort(function(a,d){return a._getCreated()<d._getCreated()?-1:1});b.plugins&&Object.keys(b.plugins).forEach(function(a){a=c(a);if(!this.getPlugin(a)){var d=b.plugins[a],d=typeof d==="object"||{};d.autostart=d.autostart||b.defaultAutostart||"lazy";n.push(new i(a,d,r))}}.bind(this));p="starting"}};this.start=function(){p!==
"starting"&&this.init();if(p!=="starting")return(new h).reject("Cannot start framework. Framework is already "+p+".");var a=[],d=(new Date).getTime();n.forEach(function(b){var c=b._getAutostart();b.getLastModified()===0?a.push(b.update().then(function(){if("started"===c)return b.start({"transient":!0});if("lazy"===c)return b.start({lazy:!0,"transient":!0});b._resolve()})):"started"===c?a.push(b.start({"transient":!0})):"lazy"===c?(a.push(b.start({lazy:!0,"transient":!0})),d>b.getLastModified()+864E5&&
b.update()):b._resolve()});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){p="active"})};this.stop=function(){if(p!=="starting"&&p!=="active")return(new h).reject("Cannot stop registry. Registry is already "+p+".");p="stopping";var a=[];n.forEach(function(d){a.push(d.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",f);p="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};
this.uninstall=function(){return(new h).reject("Cannot uninstall registry")};this.installPlugin=function(d,b){var d=c(d),e=this.getPlugin(d);if(e)return(new h).resolve(e);if(w[d])return w[d];if(b)return e=new i(d,b,r),n.push(e),e._persist(),r.dispatchEvent(new a("installed",e)),(new h).resolve(e);var k=r.loadManifest(d).then(function(b){e=new i(d,b,r);n.push(e);e._persist();delete w[d];r.dispatchEvent(new a("installed",e));return e},function(a){delete w[d];throw a;});return w[d]=k};this.getPlugins=
function(){return n.slice()};this.getPlugin=function(a){var d=null,a=c(a);n.some(function(b){if(a===b.getLocation())return d=b,!0});return d};this.addEventListener=t.addEventListener.bind(t);this.removeEventListener=t.removeEventListener.bind(t);this.resolvePlugins=function(){var a=!0;n.forEach(function(d){a=a&&d._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(c,e){function f(b){var c=b.getProperty("service.id"),e=this.addingService(b);e&&(a[c]=b,d[c]=e)}function b(b){var c=b.getProperty("service.id"),e=d[c];delete a[c];delete d[c];this.removedService(b,e)}this.serviceRegistry=c;var a={},d={},i=j,k,l;this.close=function(){if(i!==g)throw"Already closed";i=j;c.removeEventListener("registered",k);c.removeEventListener("unregistering",l);l=k=null;var a=this;this.getServiceReferences().forEach(function(d){b.call(a,
d)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var d=Object.keys(a);return!d.length?null:d.map(function(d){return a[d]})};this.open=function(){if(i!==j)throw"Already open";i=g;var a=this;k=function(d){if(d.serviceReference.getProperty("objectClass").indexOf(e)!==-1&&(f.call(a,d.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(d.serviceReference,a.serviceRegistry.getService(d.serviceReference))};l=function(d){d.serviceReference.getProperty("objectClass").indexOf(e)!==
-1&&b.call(a,d.serviceReference)};c.addEventListener("registered",k);c.addEventListener("unregistering",l);c.getServiceReferences(e).forEach(function(d){f.call(a,d)});if(typeof this.onOpen==="function")this.onOpen()}}var j=0,g=1;h.prototype={addingService:function(c){return this.serviceRegistry.getService(c)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return h});
define("orion/objects",[],function(){function h(h){for(var g=1;g<arguments.length;g++){var c=arguments[g],e;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(h[e]=c[e])}return h}return{clone:function(j){if(Array.isArray(j))return Array.prototype.slice.call(j);var g=Object.create(Object.getPrototypeOf(j));h(g,j);return g},mixin:h,toArray:function(h){return Array.isArray(h)?h:[h]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(h,j,g){var c,e,f,b,a,d="pid";c=function(a,b,c){function e(a,d,c){d.forEach(function(e,i){try{var k=a[i].getProperty("__plugin__"),f=k&&b.getPlugin(k);(!k||f&&f.getState()==="active")&&d[i].updated(c)}catch(g){typeof console!=="undefined"&&console.log(g)}})}j.call(this,a,"orion.cm.managedservice");var i={},f={},g=function(b){var e=[];b.plugin.getServiceReferences().forEach(function(b){if(b.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var i=b.getProperty(d),b=a.getService(b);i&&b&&(i=(i=c._find(i))&&i.getProperties(),e.push(b.updated(i)))}});return h.all(e)};this.addingService=function(b){var c=b.getProperty(d),e=a.getService(b);if(!c||!e)return null;i[c]||(i[c]=[]);f[c]||(f[c]=[]);i[c].push(b);f[c].push(e);return e};this.onServiceAdded=function(a,b){var i=a.getProperty(d),i=c._find(i);e([a],[b],i&&i.getProperties())};this.onOpen=function(){b.addEventListener("started",g)};this.onClose=function(){b.removeEventListener("started",
g)};this.notifyUpdated=function(a){var d=a.getPid();e(i[d]||[],f[d]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();e(i[a]||[],f[a]||[],null)};this.removedService=function(a,b){var c=a.getProperty(d),e=i[c],k=f[c];e.length>1?e.splice(e.indexOf(a),1):delete i[c];k.length>1?k.splice(k.indexOf(b),1):delete f[c]}};e=function(){function a(d,e,i){this.store=new f(this,i);this.configAdmin=new b(this,this.store);this.tracker=new c(d,e,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(d){a.tracker.open();return d})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();b=function(){function a(d,b){this.factory=d;this.store=b}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var i="/cm/configurations";
f=function(){function b(c,e){this.factory=c;this.prefsService=e;this.configs=Object.create(null);this.pref=null;var k=this;this.initPromise=this.prefsService.getPreferences(i).then(function(b){k.pref=b;b.keys().forEach(function(c){if(!k.configs[c]){var e=b.get(c);typeof e==="object"&&e!==null&&Object.keys(e).length>0&&(e[d]=c,k.configs[c]=new a(k.factory,k,e))}})})}b.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(d){var b=this._find(d);
b||(b=new a(this.factory,this,d),this.configs[d]=b);return b},list:function(){var a=this,d=[];this.pref.keys().forEach(function(b){(b=a._find(b))&&b.getProperties()!==null&&d.push(b)});return d},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,d){this.pref.put(a,d.getProperties(!0)||{})}};return b}();a=function(){function a(b,c){c=g.clone(c);delete c[d];b.properties=c}function b(c,e,i){this.factory=c;this.store=e;if(i!==null&&typeof i==="object")this.pid=i[d],a(this,
i);else if(typeof i==="string")this.pid=i,this.properties=null;else throw Error("Invalid pid/properties "+i);}b.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(a){this._checkRemoved();var b=null;if(this.properties&&(b=g.clone(this.properties),!a))b[d]=this.pid;return b},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(d){this._checkRemoved();a(this,d);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return b}();return{ConfigurationAdminFactory:e}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(h,j,g,c,e,f){var b;return{startup:function(){if(b)return b;b=new j;var a=new g.ServiceRegistry,d=new c.PreferencesService(a);return d.getPreferences("/plugins").then(function(c){var k={plugins:{}};c.keys().forEach(function(a){var d=h.toUrl(a);k.plugins[d]=c[a]});var l=new e.PluginRegistry(a,k);return l.start().then(function(){if(a.getServiceReferences("orion.core.preference.provider").length>
0)return d.getPreferences("/plugins",d.USER_SCOPE).then(function(a){var d=[];a.keys().forEach(function(a){a=h.toUrl(a);l.getPlugin(a)||d.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return j.all(d,function(a){console.log(a)})})}).then(function(){return(new f.ConfigurationAdminFactory(a,l,d)).getConfigurationAdmin().then(a.registerService.bind(a,"orion.cm.configadmin"))}).then(function(){var d=a.getService("orion.core.auth");
if(d){var b=d.getUser().then(function(a){if(a)localStorage.setItem("lastLogin",(new Date).getTime());else return d.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),c=localStorage.getItem("lastLogin");if(!c||c<(new Date).getTime()-9E5)return b}}).then(function(){var c={serviceRegistry:a,preferences:d,pluginRegistry:l};b.resolve(c);return c})})}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer",
"Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it","Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown",
"Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was ",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy","Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"I20131030-1703","LOG: ":"LOG: ",View:"View","no parent":"no parent",
"no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?",Operations:"Operations","Operations running":"Operations running","Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry",
Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Regular expression":"Regular expression","Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",
"Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Sidebar":"Toggle Sidebar","Sample HTML5 Site":"Sample HTML5 Site","Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin",
"Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion.",Raw:"Raw","Open the raw file or folder in the browser":"Open the raw file or folder in the browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred."});
define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/util",[],function(){var h=navigator.userAgent,j=h.indexOf("MSIE")!==-1||h.indexOf("Trident")!==-1?document.documentMode:void 0,g=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,c=h.indexOf("Opera")!==-1,e=parseFloat(h.split("Chrome/")[1])||void 0,f=h.indexOf("Safari")!==-1&&!e,b=parseFloat(h.split("WebKit/")[1])||void 0,a=h.indexOf("Android")!==-1,d=h.indexOf("iPad")!==-1,h=h.indexOf("iPhone")!==-1,i=d||h,k=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==
-1,m=navigator.platform.indexOf("Linux")!==-1;return{formatMessage:function(a){var d=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,b){return d[(b<<0)+1]})},createElement:function(a,d){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",d):a.createElement(d)},isIE:j,isFirefox:g,isOpera:c,isChrome:e,isSafari:f,isWebkit:b,isAndroid:a,isIPad:d,isIPhone:h,isIOS:i,isMac:k,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(h){function j(a,d){d||(d=document);return d.querySelectorAll(a)}function g(a){if(a.tabIndex>=0)return a;if(a.hasChildNodes())for(var d=0;d<a.childNodes.length;d++){var b=g(a.childNodes[d]);if(b)return b}return null}function c(a){if(a.tabIndex>=0)return a;if(a.hasChildNodes())for(var d=a.childNodes.length-1;d>=0;d--){var b=c(a.childNodes[d]);if(b)return b}return null}function e(a,d){if(a.nodeType===3){var b=f.exec(a.nodeValue);b&&b.length>1&&d(a,
b)}if(a.hasChildNodes())for(b=0;b<a.childNodes.length;b++)e(a.childNodes[b],d)}var f=/\$\{([^\}]+)\}/,b=null;return{$:function(a,d){d||(d=document);return d.querySelector(a)},$$:j,$$array:function(a,d){return Array.prototype.slice.call(j(a,d))},node:function(a){var d=a;typeof a==="string"&&(d=document.getElementById(a));return d},contains:function(a,d){if(!a||!d)return!1;if(a===d)return!0;var b=a.compareDocumentPosition(d);return Boolean(b&16)},bounds:function(a){a=a.getBoundingClientRect();return{left:a.left+
document.body.scrollLeft,top:a.top+document.body.scrollTop,width:a.width,height:a.height}},empty:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)},firstTabbable:g,lastTabbable:c,stop:function(a){if(window.document.all)a.keyCode=0;a.preventDefault&&(a.preventDefault(),a.stopPropagation())},processTextNodes:function(a,d){e(a,function(a,b){a.parentNode.replaceChild(document.createTextNode(d[b[1]]||b[1]),a)})},processDOMNodes:function(a,d){e(a,function(a,b){var c=d[b[1]];if(c){var e=document.createRange(),
f=b.index;e.setStart(a,f);e.setEnd(a,f+b[0].length);e.deleteContents();e.insertNode(c)}})},addAutoDismiss:function(a,d){function c(a){b.forEach(function(d){var b=!1,c=d.excludeNodes.some(function(d){return document.body.contains(d)?(b=!0,d.contains(a.target)):!1});if(b&&!c)try{d.dismiss()}catch(e){typeof console!=="undefined"&&console&&console.error(e&&e.message)}});b=b.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}b===null&&(b=[],document.addEventListener("click",
c,!0),h.isIOS&&document.addEventListener("touchend",function(a){function d(){a.target.removeEventListener("click",d)}a.touches.length===0&&a.target.addEventListener("click",d)},!1));b.push({excludeNodes:a,dismiss:d})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("text",["module"],function(h){var j,g,c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],e=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,f=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,b=typeof location!=="undefined"&&location.href,a=b&&location.protocol&&location.protocol.replace(/\:/,""),d=b&&location.hostname,i=b&&(location.port||void 0),k=[],l=h.config&&h.config()||{};j={version:"2.0.5",strip:function(a){if(a){var a=a.replace(e,""),d=a.match(f);d&&(a=d[1])}else a="";return a},
jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:l.createXhr||function(){var a,d,b;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(d=0;d<3;d+=1){b=c[d];try{a=new ActiveXObject(b)}catch(e){}if(a){c=[b];break}}return a},parseName:function(a){var d,
b,c=!1,e=a.indexOf(".");d=a.indexOf("./")===0||a.indexOf("../")===0;e!==-1&&(!d||e>1)?(d=a.substring(0,e),b=a.substring(e+1,a.length)):d=a;a=b||d;e=a.indexOf("!");e!==-1&&(c=a.substring(e+1)==="strip",a=a.substring(0,e),b?b=a:d=a);return{moduleName:d,ext:b,strip:c}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,d,b,c){var e,i;e=j.xdRegExp.exec(a);if(!e)return!0;a=e[2];e=e[3];e=e.split(":");i=e[1];e=e[0];return(!a||a===d)&&(!e||e.toLowerCase()===b.toLowerCase())&&(!i&&!e||i===c)},finishLoad:function(a,
d,b,c){b=d?j.strip(b):b;l.isBuild&&(k[a]=b);c(b)},load:function(c,e,k,f){if(f.isBuild&&!f.inlineText)k();else{l.isBuild=f.isBuild;var g=j.parseName(c),f=g.moduleName+(g.ext?"."+g.ext:""),h=e.toUrl(f),t=l.useXhr||j.useXhr;!b||t(h,a,d,i)?j.get(h,function(a){j.finishLoad(c,g.strip,a,k)},function(a){k.error&&k.error(a)}):e([f],function(a){j.finishLoad(g.moduleName+"."+g.ext,g.strip,a,k)})}},write:function(a,d,b){if(k.hasOwnProperty(d)){var c=j.jsEscape(k[d]);b.asModule(a+"!"+d,"define(function () { return '"+
c+"';});\n")}},writeFile:function(a,d,b,c,e){var d=j.parseName(d),i=d.ext?"."+d.ext:"",k=d.moduleName+i,l=b.toUrl(d.moduleName+i)+".js";j.load(k,b,function(){var d=function(a){return c(l,a)};d.asModule=function(a,d){return c.asModule(a,l,d)};j.write(a,k,d,e)},e)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)g=require.nodeRequire("fs"),j.get=function(a,d){var b=g.readFileSync(a,"utf8");b.indexOf("\ufeff")===0&&(b=b.substring(1));d(b)};else if(l.env===
"xhr"||!l.env&&j.createXhr())j.get=function(a,d,b,c){var e=j.createXhr(),i;e.open("GET",a,!0);if(c)for(i in c)c.hasOwnProperty(i)&&e.setRequestHeader(i.toLowerCase(),c[i]);if(l.onXhr)l.onXhr(e,a);e.onreadystatechange=function(){var c;if(e.readyState===4)c=e.status,c>399&&c<600?(c=Error(a+" HTTP status: "+c),c.xhr=e,b(c)):d(e.responseText)};e.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")j.get=function(a,d){var b,c,e=new java.io.File(a),i=java.lang.System.getProperty("line.separator"),
e=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(e),"utf-8")),k="";try{b=new java.lang.StringBuffer;(c=e.readLine())&&c.length()&&c.charAt(0)===65279&&(c=c.substring(1));for(b.append(c);(c=e.readLine())!==null;)b.append(i),b.append(c);k=String(b.toString())}finally{e.close()}d(k)};return j});define("text!orion/banner/slideout.html",[],function(){return'<div id="slideContainer" class="slideParameters slideContainer">\n\t<span id="pageCommandParameters" class="layoutLeft parameters"></span>\n\t<span id="pageCommandDismiss" class="layoutRight parametersDismiss"></span>\n</div>'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(h,j,g){return{slideoutHTMLFragment:function(c){var e=document.createElement("div");e.innerHTML=g;var f=j.$("#slideContainer",e);f.id=c+f.id;f=j.$("#pageCommandParameters",e);f.id=c+f.id;f=j.$("#pageCommandDismiss",e);f.id=c+f.id;return e.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(h){function j(c,e,f,b,a,d){this.type=d||"keydown";this.keyCode=typeof c==="string"&&this.type==="keydown"?c.toUpperCase().charCodeAt(0):c;this.mod1=e!==void 0&&e!==null?e:!1;this.mod2=f!==void 0&&f!==null?f:!1;this.mod3=b!==void 0&&b!==null?b:!1;this.mod4=a!==void 0&&a!==null?a:!1}function g(c){this.keys=c}j.prototype={getKeys:function(){return[this]},match:function(c,e){if(e!==void 0){if(e!==0)return!1}else if(c instanceof Array){if(c.length>1)return!1;
c=c[0]}return c.type!==this.type?!1:this.keyCode===c.keyCode||this.keyCode===String.fromCharCode(h.isOpera?c.which:c.charCode!==void 0?c.charCode:c.keyCode)?this.mod1!==(h.isMac?c.metaKey:c.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==c.shiftKey?!1:this.mod3!==c.altKey?!1:h.isMac&&this.mod4!==c.ctrlKey?!1:!0:!1},equals:function(c){return!c?!1:this.keyCode!==c.keyCode?!1:this.mod1!==c.mod1?!1:this.mod2!==c.mod2?!1:this.mod3!==c.mod3?!1:this.mod4!==c.mod4?!1:this.type!==c.type?!1:!0}};g.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(c,e){var f=this.keys;if(e!==void 0)return e>f.length?!1:f[e].match(c)?e===f.length-1?!0:e+1:!1;else{c instanceof Array||(c=[c]);if(c.length>f.length)return!1;var b;for(b=0;b<c.length;b++)if(!f[b].match(c[b]))return!1;return b===f.length?!0:b}},equals:function(c){if(!c.keys)return!1;if(c.keys.length!==this.keys.length)return!1;for(var e=0;e<c.keys.length;e++)if(!c.keys[e].equals(this.keys[e]))return!1;return!0}};return{KeyBinding:j,KeyStroke:j,
KeySequence:g}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(h,j){function g(c){this._init(c)}g.prototype={_init:function(c){this._dropdownNode=j.node(c.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=j.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=c.populate;this._selectionClass=c.selectionClass;var e=this;this._triggerNode.addEventListener("click",function(c){e.toggle()&&
j.stop(c)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(c){if(c.keyCode===j.KEY.ENTER||c.keyCode===j.KEY.SPACE)e.toggle(),j.stop(c)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this.isVisible()?this.close():this.open()},isVisible:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")},open:function(){if(!this.isVisible()){this._populate&&(this.empty(),
this._populate(this._dropdownNode));var c=this.getItems();if(c.length>0){if(!this._hookedAutoDismiss){var e=j.$$(".dropdownSubMenu",this._dropdownNode);j.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(e)),function(){if(this.isVisible()){this.close();for(var c=this._dropdownNode.parentNode;c;)c.dropdown&&typeof c.dropdown.close==="function"&&c.dropdown.close(),c=c.parentNode}}.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._selectionClass&&
this._triggerNode.classList.add(this._selectionClass);this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();c[0].focus();return!0}return!1}},_positionDropdown:function(){this._dropdownNode.style.left="";var c=j.bounds(this._dropdownNode),e=j.bounds(document.body);if(c.left+c.width>e.left+e.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-c.width+"px";else{var e=j.bounds(this._boundingNode(this._triggerNode)),f=j.bounds(this._triggerNode);
this._dropdownNode.style.left=f.left-e.left-c.width+f.width+"px"}},_boundingNode:function(c){var e=window.getComputedStyle(c,null);return e===null?c:e.getPropertyValue("position")==="absolute"||!c.parentNode||c===document.body?c:this._boundingNode(c.parentNode)},close:function(c){if(this.isVisible())return this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),
c&&this._triggerNode.focus(),!0},getItems:function(){var c=[],e=this;j.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(f){f.parentNode.parentNode===e._dropdownNode&&c.push(f)});return c},empty:function(){var c=this;j.$$array("li",this._dropdownNode).forEach(function(e){e.parentNode===c._dropdownNode&&e.parentNode.removeChild(e)})},_dropdownKeyDown:function(c){if(c.keyCode===j.KEY.UP||c.keyCode===j.KEY.DOWN||c.keyCode===j.KEY.RIGHT||c.keyCode===j.KEY.ENTER||
c.keyCode===j.KEY.LEFT){var e=this.getItems(),f=document.activeElement;if(e.length&&e.length>0&&f){var b=e.indexOf(f);b<0&&(b=e.indexOf(f.parentNode));b>=0&&(c.keyCode===j.KEY.UP&&b>0?(b--,e[b].focus()):c.keyCode===j.KEY.DOWN&&b<e.length-1?(b++,e[b].focus()):c.keyCode===j.KEY.ENTER||c.keyCode===j.KEY.RIGHT?f.classList.contains("dropdownTrigger")&&f.dropdown&&f.dropdown.open():c.keyCode===j.KEY.LEFT&&f.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),j.stop(c))}}else c.keyCode===
j.KEY.ESCAPE&&(this.close(!0),j.stop(c))}};g.prototype.constructor=g;return{Dropdown:g}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<span class="dropdownArrowDown core-sprite-downarrow"></span></button><ul class="dropdownMenu"></ul>'});define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0">${ButtonText}<span class="dropdownArrowRight core-sprite-closedarrow"></span></span><ul class="dropdownMenu"></ul></li>'});
define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(h,j){function g(c){this._init(c)}g.prototype={_init:function(c){this._node=j.node(c.node);if(!this._node)throw"no dom node for tooltip found";this._position=c.position||["right","above","below","left"];this._text=c.text;this._hideDelay=c.hideDelay===void 0?200:c.hideDelay;this._tailSize=c.tailSize||10;this._trigger=c.trigger||"mouseover";this._afterShowing=c.afterShowing;this._afterHiding=c.afterHiding;var e=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(b){b.target===e._node&&(e.show(),j.stop(b))},!1);else if(this._trigger==="mouseover"){this._showDelay=c.showDelay===void 0?500:c.showDelay;c=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(b){j.contains(e._node,b.target)&&(e.show(),j.stop(b))},!1);this._leaveHandler=function(b){j.contains(e._node,b.target)&&e.hide()};for(var f=0;f<c.length;f++)this._node.addEventListener(c[f],
this._leaveHandler,!1)}},_makeTipNode:function(){if(!this._tip){this._tip=document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("div");this._tipInner.classList.add("tooltip");if(this._text)this._tipTextContent=document.createElement("div"),this._tipTextContent.classList.add("textContent"),this._tipInner.appendChild(this._tipTextContent),this._tipTextContent.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var c=this;j.addAutoDismiss([this._tip,this._node],function(){c.hide()});if(this._trigger==="mouseover")this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(){if(c._timeout)window.clearTimeout(c._timeout),c._timeout=null;c._tip.addEventListener("mouseout",function(e){j.contains(c._tip,e.target)&&(c.hide(),j.stop(e))},
!1)},!1)}return this._tip},_positionTip:function(c,e){this._makeTipNode();c==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,b;for(b=j.bounds(f);f&&!b.width&&!b.height;f=f.parentNode)b=j.bounds(f);var f=j.bounds(this._tipInner),a;switch(c){case "above":a=b.top-f.height-this._tailSize-1;b=b.left-this._tailSize;break;case "below":a=b.top+b.height+this._tailSize+1;b=b.left-this._tailSize;break;case "left":a=b.top-this._tailSize/2;b=b.left-f.width-
this._tailSize-1;break;default:a=b.top-this._tailSize/2,b=b.left+b.width+this._tailSize+1}var d=j.bounds(document.documentElement);if(a+f.height>d.height)if(e)a=d.height-f.height-1;else return!1;if(b+f.width>d.width)if(e)b=d.width-f.width-1;else return!1;if(b<0)if(e)b=4;else return!1;if(a<0)if(e)a=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+c),c==="above"||c==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,
this._tipInner),c==="left"))this._tail.style.left=f.width+"px";this._tip.style.top=a+"px";this._tip.style.left=b+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var c=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var e=!1,f=0;!e&&f<c._position.length;)e=c._positionTip(c._position[f]),f++;e||c._positionTip(c._position[0],
!0);c._tip.classList.add("tooltipShowing");c._afterShowing&&c._afterShowing()},this._showDelay)}},hide:function(c){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(c===void 0)c=this._hideDelay;var e=this;this._timeout=window.setTimeout(function(){e._tip.classList.remove("tooltipShowing");e._tip.removeAttribute("style");e._afterHiding&&e._afterHiding()},c)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),
this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tail=this._tipTextContent=this._tipInner=this._tip=null;if(this._node){this._node.removeEventListener("click",this._clickHandler,!1);this._node.removeEventListener("mouseover",this._mouseoverHandler,!1);for(var c=["mouseout","click"],e=0;e<c.length;e++)this._node.removeEventListener(c[e],this._leaveHandler,!1)}}};g.prototype.constructor=g;return{Tooltip:g}});
define("orion/commands","require,orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(h,j,g,c,e,f,b,a){function d(a){var d=a.invocation;if(d){var b=a.command;if(b.hrefCallback)return a=b.hrefCallback.call(d.handler||window,d),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;else if(d.commandRegistry)return d.commandRegistry._invoke(d),
!0;else if(b.onClick||b.callback)return window.setTimeout(function(){(b.onClick||b.callback).call(d.handler||window,d)},0),!0}return!1}function i(a,b){for(var c in b)if(b[c]&&b[c].keyBinding&&b[c].command&&b[c].keyBinding.match(a)){var e=b[c],i=e.keyBinding;if((!i.domScope||g.contains(g.node(i.domScope),a.target))&&d(e)){g.stop(a);break}}}function k(a,d,b){d.classList.add("commandImage");var c;a.imageClass?a.addImageClassToElement?d.classList.add(a.imageClass):(c=document.createElement("span"),d.appendChild(c),
c.classList.add(a.spriteClass),c.classList.add(a.imageClass)):(c=new Image,c.alt=a.name,c.name=b,c.id=b,c.src=a.image,d.appendChild(c));return c}function l(a,d,b,c,e){this.commandRegistry=e;this.handler=a;this.items=d;this.userData=b;this.command=c;if(c.parameters)this.parameters=c.parameters.makeCopy();this.id=c.id}function m(a){this._init(a)}var o=null,s={};window.document.addEventListener("keydown",function(a){a=a||window.event;if(function(a){if(j.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&
!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;else if(a.charCode||a.keyCode)switch(a=a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable==="true")return;
var d=a.target.nodeName.toLowerCase();if(d==="input")switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(d==="textarea")return}d={};if(o){var b,c,e;c=Object.keys(s);for(b=0;b<c.length;b++)e=c[b],d[e]=s[e];var k=o();c=Object.keys(k);for(b=0;b<c.length;b++)e=c[b],d[e]=k[e]}else d=s;i(a,d)},!1);l.prototype=
{collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var d=new l(this.handler,this.items,this.userData,this.command,this.commandRegistry);d.domNode=this.domNode;d.domParent=this.domParent;if(a)d.parameters=a.makeCopy();else if(this.parameters)d.parameters=this.parameters.makeCopy();return d}};l.prototype.constructor=l;m.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;
this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||h.toUrl("images/none.png");this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.selectionClass=a.selectionClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},populateChoicesMenu:function(a,d,b,c,e){this.getChoices(d,b,c).forEach(function(b){if(b.name){var c=document.createElement("li");a.appendChild(c);var i=document.createElement("span");
i.tabIndex=0;i.role="menuitem";i.classList.add("dropdownMenuItem");var k=document.createTextNode(b.name);i.appendChild(k);c.appendChild(i);i.choice=b;i.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,d)},!1);i.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,d)},!1)}else e._generateMenuSeparator(a)})},getChoices:function(a,d,b){return this.choiceCallback?
this.choiceCallback.call(d,a,b):null},makeChoiceCallback:function(a,d){return function(b){a.callback&&a.callback.call(a,d,b)}},hasImage:function(){return this.imageClass||this.image!==h.toUrl("images/none.png")}};m.prototype.constructor=m;return{Command:m,CommandInvocation:l,createDropdownMenu:function(a,d,b,i,l,f,h){a=g.node(a);if(!a)throw"no parent node was specified";var m=document.createRange();m.selectNode(a);m=m.createContextualFragment(e);g.processTextNodes(m,{ButtonText:d});a.appendChild(m);
a=a.lastChild;m=a.previousSibling;i?m.classList.add(i):(m.classList.add("orionButton"),m.classList.add("commandButton"));if(l){if(!f)m.textContent="",m.setAttribute("aria-label",d);k({spriteClass:"commandSprite",imageClass:l},m,d);m.classList.add("orionButton")}m.dropdown=new c.Dropdown({dropdown:a,populate:b,selectionClass:h});a.dropdown=m.dropdown;return{menuButton:m,menu:a,dropdown:m.dropdown}},createCheckedMenuItem:function(a,d,c,e){a=g.node(a);if(!a)throw"no parent node was specified";var i=
document.createRange();i.selectNode(a);i=i.createContextualFragment(b);g.processTextNodes(i,{ItemText:d});a.appendChild(i);a=g.$(".checkedMenuItem",a.lastChild);a.checked=c;a.addEventListener("change",e,!1);return a},createCommandItem:function(d,b,c,e,i,l,f){var g,l=l||!b.name&&b.hasImage();if(b.hrefCallback)g=document.createElement("a"),g.id=e,l&&b.hasImage()?k(b,g,e):(g.className="commandLink",g.appendChild(document.createTextNode(b.name))),f=b.hrefCallback.call(c.handler,c),f.then?f.then(function(a){g.href=
a}):g.href=f?f:"#";else{g=document.createElement("button");g.className="orionButton";l?b.hasImage()?(k(b,g,e),b.name&&g.setAttribute("aria-label",b.name)):(g.classList.add("commandButton"),g.classList.add("commandMissingImageButton"),g.appendChild(document.createTextNode(b.name))):(g.classList.add("commandButton"),e=document.createTextNode(b.name),g.appendChild(e));var h=f||b.callback;if(h)b.onClick=h,g.addEventListener("click",function(){h.call(c.handler,c)},!1)}d.nodeName.toLowerCase()==="ul"?(f=
document.createElement("li"),d.appendChild(f),d=f):g.classList.add("commandMargins");d.appendChild(g);if(b.tooltip)g.commandTooltip=new a.Tooltip({node:g,text:b.tooltip,position:["above","below","right","left"]});i&&(s[b.id]={keyBinding:i,command:b,invocation:c});return g},createCommandMenuItem:function(d,b,c,e,i){var k,l=d.dropdown;if(b.hrefCallback)k=document.createElement("a"),k.appendChild(document.createTextNode(b.name)),i=b.hrefCallback.call(c.handler,c),i.then?i.then(function(a){k.href=a}):
k.href=i?i:"#",k.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&k.click()},!1);else{k=document.createElement("span");k.tabIndex=0;k.appendChild(document.createTextNode(b.name));var f=i||b.callback;if(f)b.onClick=f,k.addEventListener("click",function(){l.close(!0);f.call(c.handler,c)},!1),k.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)a.preventDefault(),k.click()},!1)}if(b.tooltip)k.commandTooltip=new a.Tooltip({node:k,
text:b.tooltip,position:["right","left","above","below"]});k.className="dropdownMenuItem";k.role="menuitem";i=document.createElement("li");d.appendChild(i);i.appendChild(k);e&&(s[b.id]={keyBinding:e,command:b,invocation:c});return k},executeBinding:d,setKeyBindingProvider:function(a){o=a},localKeyBindings:s,_testMethodProcessKey:i}});
define("orion/explorers/navigationUtils",[],function(){function h(g,c){if(!j&&g)g.push({domNode:c}),c.tabIndex=-1,c.style.outline="none"}var j=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(g,c,e){g&&(g=g.getGridNavHolder(c,!0))&&h(g,e)},generateNavGrid:h,removeNavGrid:function(g,c){if(g)for(var e=0;e<g.length;e++)if(g[e].domNode===c){g.splice(e,1);break}}}});
define("orion/PageUtil",[],function(){var h=/^http[s]?/i;return{hash:function(){var h=window.location.href.split("#")[1];return h?"#"+h:""},matchResourceParameters:function(h){var h=h||window.location.toString(),g={resource:""},c=h.indexOf("#");if(c!==-1&&(h=h.substring(c+1),h.length!==0)){h=h.split(",");g.resource=decodeURIComponent(h[0]);for(c=1;c<h.length;c++){var e=/([^=]*)(=?)(.*)/.exec(h[c]),f=decodeURIComponent(e[1]||""),e=decodeURIComponent(e[3]||"");f!==""&&f!=="resource"&&(g[f]=e)}}return g},
validateURLScheme:function(j,g){var c=j;if(j.indexOf("://")===-1){var e=document.createElement("a");e.href=j;c=e.href}e=!1;return(e=g?g.some(function(e){return RegExp("^"+e+":","i").test(c)}):h.test(c))?j:(console.log("Illegal URL Scheme: '"+j+"'"),"")}}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,j){function g(c){var f="",b=navigator.platform.indexOf("Mac")!==-1;c.mod1&&(f+=b?"Cmd+":"Ctrl+");c.mod2&&(f+="Shift+");c.mod3&&(f+="Alt+");c.mod4&&b&&(f+="Ctrl+");if(c.alphaKey)return f+c.alphaKey;if(c.type==="keypress")return f+c.keyCode;for(var a in j.KEY)if(typeof(j.KEY[a]==="number")&&j.KEY[a]===c.keyCode)return f+a;var d;switch(c.keyCode){case 59:d=c.mod2?":":";";break;case 61:d=c.mod2?"+":"=";break;case 188:d=
c.mod2?"<":",";break;case 190:d=c.mod2?">":".";break;case 191:d=c.mod2?"?":"/";break;case 192:d=c.mod2?"~":"`";break;case 219:d=c.mod2?"{":"[";break;case 220:d=c.mod2?"|":"\\";break;case 221:d=c.mod2?"}":"]";break;case 222:d=c.mod2?'"':"'"}return d?f+d:c.keyCode>=112&&c.keyCode<=123?f+"F"+(c.keyCode-111):f+String.fromCharCode(c.keyCode)}function c(c){var f=window.navigator.platform.indexOf("Mac")!==-1;return f&&c.metaKey||!f&&c.ctrlKey}return{getUserKeyString:function(c){for(var f="",c=c.getKeys(),
b=0;b<c.length;b++)b!==0&&(f+=" "),f+=g(c[b]);return f},getUserText:function(c,f,b,a,d,i,k,l,g){var h=!1,k=function(k){return function(l){if(!h){var s=j.node(c),t=s.value;if(s)if(k&&l.keyCode===j.KEY.ESCAPE){if(b)f.style.display="inline";h=!0;s.parentNode.removeChild(s);i&&i()}else if(!(k&&l.keyCode!==j.KEY.ENTER)){if(t.length===0||!g&&t===a){if(b)f.style.display="inline"}else if(d(t),b&&f.parentNode)f.style.display="inline";h=!0;s.parentNode&&s.parentNode.removeChild(s);i&&i()}}}},s=document.createElement("input");
s.id=c;s.value=a||"";f.parentNode.insertBefore(s,f.nextSibling);s.classList.add("userEditBoxPrompt");if(b)f.style.display="none";s.addEventListener("keydown",k(!0),!1);s.addEventListener("blur",k(!1),!1);window.setTimeout(function(){s.focus();if(a){var d=j.node(c),b=l?a.indexOf(l):-1;if(b>0)if(d.createTextRange)d=d.createTextRange(),d.collapse(!0),d.moveStart("character",0),d.moveEnd("character",b),d.select();else if(d.setSelectionRange)d.setSelectionRange(0,b);else{if(d.selectionStart!==void 0)d.selectionStart=
0,d.selectionEnd=b}else d.select()}},0)},openInNewWindow:c,followLink:function(e,f){f&&c(f)?window.open(e):window.location=e},createButton:function(c,f){var b=document.createElement("button");b.className="orionButton commandButton commandMargins";b.addEventListener("click",function(a){f();j.stop(a)},!1);c&&b.appendChild(document.createTextNode(c));return b},createDropdownButton:function(){},isFormElement:function(c){switch(c.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","require,orion/commands,orion/explorers/navigationUtils,orion/PageUtil,orion/uiUtils,orion/webui/littlelib,orion/webui/dropdown,orion/webui/tooltip,text!orion/webui/checkedmenuitem.html,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html".split(","),function(h,j,g,c,e,f,b,a,d,i,k){function l(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function m(a,d){this.token=a;this.parameterName=d}function o(a,d,b,c,e){this.name=a;this.type=d;this.label=b;this.value=c;this.lines=e||1}function s(a,d,b){this._storeParameters(a);this._hasOptionalParameters=d&&d.hasOptionalParameters;this._options=d;this.optionsRequested=!1;this.getParameters=b;this.clientCollect=d&&d.clientCollect}l.prototype={_init:function(a){this._selectionService=a.selection;var d=this;j.setKeyBindingProvider(function(){return d._activeBindings})},processURL:function(a){for(var d in this._urlBindings)if(this._urlBindings[d]&&
this._urlBindings[d].urlBinding&&this._urlBindings[d].command){var b=this._urlBindings[d].urlBinding.match(a);if(b){var c=this._urlBindings[d],e=c.command,i=c.invocation;if(i&&i.parameters&&e.callback){i.parameters.setValue(b.parameterName,b.parameterValue);var k=this;window.setTimeout(function(){k._invoke(i)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,d,b,c){d?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(d):1)&&a.callback&&this._invoke(new j.CommandInvocation(b,
d,null,a,this),c):(d=this._urlBindings[a])&&d.command&&d.command.callback&&this._invoke(d.invocation,c)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,d,b){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,d,b))},confirm:function(a,d,b,c,e,i){var k=!1;if(this._parameterCollector&&!e){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,e){var i=document.createElement("span");i.classList.add("parameterPrompt");i.textContent=d;a.appendChild(i);i=document.createElement("button");i.addEventListener("click",function(){k=!0;l._parameterCollector.close()},!1);e.appendChild(i);i.appendChild(document.createTextNode(b));i.className="dismissButton";var f=document.createElement("button");f.addEventListener("click",function(){k=!1;l._parameterCollector.close()},!1);e.appendChild(f);f.appendChild(document.createTextNode(c));f.className=
"dismissButton";return i},function(){i(k)}))return}k=window.confirm(d);i(k)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,d){return this._collectAndInvoke(a.makeCopy(d),!1)},_collectAndInvoke:function(d,b){if(d)if(this._parameterCollector&&d.parameters&&d.parameters.hasParameters()&&(b||d.parameters.shouldCollectParameters())){var c=!1;d.parameters.updateParameters(d);
if(d.parameters.shouldCollectParameters()&&(c=this._parameterCollector.collectParameters(d),!c)){var e=new a.Tooltip({node:d.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),c=e.contentContainer();c.classList.add("parameterPopup");var i=window.document.activeElement,k=this._parameterCollector.getFillFunction(d,function(){i&&i.focus();e.destroy()})(c);e.show();window.setTimeout(function(){k.focus();k.select()},0);c=!0}c||d.command.callback.call(d.handler||
window,d)}else d.command.callback.call(d.handler||window,d);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){function d(a){return function(){j.executeBinding(a)}}var b={},c,i,k=[],l;for(l in this._activeBindings)(i=this._activeBindings[l])&&i.keyBinding&&i.command&&(i.command.name||i.command.tooltip)&&k.push(i);k.sort(function(a,d){return(a.command.name||
a.command.tooltip).localeCompare(d.command.name||d.command.tooltip)});for(l=0;l<k.length;l++)i=k[l],i.keyBinding.scopeName?(b[i.keyBinding.scopeName]||(b[i.keyBinding.scopeName]=[]),b[i.keyBinding.scopeName].push(i)):(c=e.getUserKeyString(i.keyBinding),a.createItem(c,i.command.name||i.command.tooltip,d(i)));for(var f in b)b[f].length&&b[f].length>0&&(a.createHeader(f),b[f].forEach(function(b){c=e.getUserKeyString(b.keyBinding);a.createItem(c,b.command.name||b.command.tooltip,d(b))}))},addCommand:function(a){this._commandList[a.id]=
a;var d=this._pendingBindings[a.id];if(d){var b=this;d.forEach(function(d){b._addBinding(a,d.type,d.binding,d.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,d,b,c,e,i,k,l,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));if(a[d]){if(c)a[d].title=c;if(b)a[d].position=b;if(k)a[d].imageClass=k;if(l)a[d].tooltip=l;if(f)a[d].selectionClass=f;a[d].emptyGroupMessage=i}else a[d]={title:c,
position:b,emptyGroupMessage:i,imageClass:k,tooltip:l,selectionClass:f,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,d){d&&d.split("/").forEach(function(d){if(d.length>1)a[d]||(a[d]={position:0,children:{}}),a=a[d].children});return a},registerSelectionService:function(a,d){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=d},registerCommandContribution:function(a,d,b,c,e,i,k){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];c&&(a=this._createEntryForPath(a,c));a[d]={position:b};i&&((b=this._commandList[d])?this._addBinding(b,"key",i,e):this._addPendingBinding(d,"key",i,e));k&&((b=this._commandList[d])?this._addBinding(b,"url",k,e):this._addPendingBinding(d,"url",k,e));a.sortedContributions=null},_addBinding:function(a,d,b,c){if(!a.id)throw Error("No command id: "+a);d==="key"?this._activeBindings[a.id]={command:a,keyBinding:b,bindingOnly:c}:d==="url"&&
(this._urlBindings[a.id]={command:a,urlBinding:b,bindingOnly:c})},_addPendingBinding:function(a,d,b,c){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:d,binding:b,bindingOnly:c})},_checkForTrailingSeparator:function(a,d,b){var c;if(d==="tool"||d==="button")if((c=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&c.classList.contains("commandSeparator"))return b?(a.removeChild(c),!1):!0;if(d==="menu"&&(a=f.$$array("li > *",a),a.length>0&&a[a.length-
1].classList.contains("dropdownSeparator")))if(c=a[a.length-1],b)c.parentNode.parentNode.removeChild(c.parentNode);else return!0;return!1},renderCommands:function(a,d,b,c,e,i,k){if(typeof a!=="string")throw"a scope id for rendering must be specified";d=f.node(d);if(!d)throw"no parent";var l=this._contributionsByScopeId[a];if(!b&&l){var b=l.localSelectionService||this._selectionService,g=this;b&&b.getSelections(function(b){g.renderCommands(a,d,b,c,e,i)})}else l&&(this._render(this._contributionsByScopeId[a],
d,b,c,e||"button",i,k),this._checkForTrailingSeparator(d,e,!0))},destroy:function(a){a=f.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var d=a.firstChild;d.commandTooltip&&d.commandTooltip.destroy();d.emptyGroupTooltip&&d.emptyGroupTooltip.destroy();this.destroy(d);a.removeChild(d)}},_render:function(d,b,c,e,i,k,l){var f=d.sortedContributions;if(!f){var f=[],h=!1,m;for(m in d)if(Object.prototype.hasOwnProperty.call(d,m)){var o=d[m];if(o&&typeof o.position==="number")o.id=m,f.push(o),h=!0}if(h)f.sort(function(a,
d){return a.position-d.position}),d.sortedContributions=f}var s=0,u=this;f.forEach(function(d){var f,h;if(!d.imageClass)d.imageClass=null;if(d.children&&Object.getOwnPropertyNames(d.children).length>0){f=d.children;var m;if(i==="tool"||i==="button")if(d.title)m=u._createDropdownMenu(b,d.title,null,null,d.imageClass,d.tooltip,d.selectionClass),l&&g.generateNavGrid(l,m.menuButton),window.setTimeout(function(){u._render(d.children,m.menu,c,e,"menu",k,l);u._checkForTrailingSeparator(m.menu,"menu",!0);
if(m.menu.childNodes.length===0)if(d.emptyGroupMessage){if(!m.menuButton.emptyGroupTooltip)m.menuButton.emptyGroupTooltip=new a.Tooltip({node:m.menuButton,text:d.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else l&&g.removeNavGrid(l,m.menuButton),m.menu.parentNode&&m.menu.parentNode.removeChild(m.menu),m.destroyButton&&m.destroyButton.parentNode&&m.destroyButton.parentNode.removeChild(m.destroyButton);else m.menuButton.style.visibility="visible"},0);else{var o;b.childNodes.length>
0&&!u._checkForTrailingSeparator(b,i)&&(o=u.generateSeparatorImage(b));u._render(f,b,c,e,i,k,l);b.childNodes.length>0&&b.childNodes[b.childNodes.length-1]!==o&&(o=u.generateSeparatorImage(b))}else if(d.title){if(o=u._createDropdownMenu(b,d.title,!0,null,null,d.imageClass))u._render(f,o.menu,c,e,"menu",k,l),o.menu.childNodes.length===0&&o.destroyButton&&b.removeChild(o.destroyButton)}else b.childNodes.length>0&&u._generateMenuSeparator(b),u._render(f,b,c,e,i,k,l),u._generateMenuSeparator(b)}else{var p=
u._commandList[d.id];f=p?!0:!1;var x=null,x=null;if(p){h=new j.CommandInvocation(e,c,k,p,u);h.domParent=b;o=f&&(p.visibleWhen?p.visibleWhen(c):!0);if(u._activeBindings[p.id]&&u._activeBindings[p.id].keyBinding)x=u._activeBindings[p.id],x.invocation=o?h:null,x.bindingOnly&&(f=!1);if(u._urlBindings[p.id]&&u._urlBindings[p.id].urlBinding)x=u._urlBindings[p.id],x.invocation=o?h:null,x.bindingOnly&&(f=!1);f=f&&o}if(f)p.choiceCallback?(i==="tool"||i==="button"?(f=b,o=!1,b.nodeName.toLowerCase()==="ul"&&
(f=document.createElement("li"),b.appendChild(f))):(f=b,o=!0),u._createDropdownMenu(f,p.name,o,function(a){p.populateChoicesMenu(a,c,e,k,u)}.bind(p),p.imageClass,p.tooltip||p.title,p.selectionClass)):(h.handler=h.handler||this,h.domParent=b,o=function(){u._invoke(h)},i==="menu"?f=j.createCommandMenuItem(b,p,h,null,o):(f=i+p.id+s,f=j.createCommandItem(b,p,h,f,null,i==="tool",o)),g.generateNavGrid(l,f),h.domNode=f,s++)}})},_createDropdownMenu:function(d,c,e,i,l,g,h){d=f.node(d);if(!d||!f.contains(document.body,
d))return null;var m,o=d;if(e)g=document.createRange(),g.selectNode(d),g=g.createContextualFragment(k),f.processTextNodes(g,{ButtonText:c}),d.appendChild(g),m=d.lastChild,d=m.lastChild,c=d.previousSibling,c.dropdown=new b.Dropdown({dropdown:d,populate:i}),d.dropdown=c.dropdown;else if(d.nodeName.toLowerCase()==="ul"&&(o=document.createElement("li"),d.appendChild(o),m=o),d=null,l&&(d="dropdownButtonWithIcon",g=g||c),g=l?g||c:g,i=j.createDropdownMenu(o,c,i,d,l,!1,h),c=i.menuButton,d=i.menu,g)c.commandTooltip=
new a.Tooltip({node:c,text:g,position:["above","below","right","left"]});return{menuButton:c,menu:d,dropdown:c.dropdown,destroyButton:m}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var d=document.createElement("li");d.classList.add("dropdownSeparator");var b=document.createElement("span");b.classList.add("dropdownSeparator");d.appendChild(b);a.appendChild(d)}},generateSeparatorImage:function(a){var d;d=a.nodeName.toLowerCase()==="ul"?document.createElement("li"):
document.createElement("span");a.appendChild(d);d.classList.add("core-sprite-sep");d.classList.add("imageSprite");d.classList.add("commandSeparator");return d}};l.prototype.constructor=l;m.prototype={match:function(a){a=c.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;o.prototype={optionsRequested:function(){return this.optionsRequested}};o.prototype.constructor=o;s.prototype={_storeParameters:function(a){this.parameterTable=
null;if(a){var d=this.parameterTable={};a.forEach(function(a){d[a.name]=a})}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,d){var b=this.parameterTable[a];
if(b)b.value=d},forEach:function(a){for(var d in this.parameterTable)this.parameterTable[d].type&&this.parameterTable[d].name&&a(this.parameterTable[d])},makeCopy:function(){var a=[];this.forEach(function(d){d=new o(d.name,d.type,d.label,d.value,d.lines);a.push(d)});var d=new s(a,this._options,this.getParameters);d.clientCollect=this.clientCollect;return d},hasOptionalParameters:function(){return this._hasOptionalParameters}};s.prototype.constructor=s;return{CommandRegistry:l,URLBinding:m,ParametersDescription:s,
CommandParameter:o}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,j,g){function c(c,f){this._activeContainer=null;this._getElementsFunction=c;this._toolbarLayoutFunction=f}c.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&g.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&g.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(c,f,b){typeof c==="string"&&(c=g.node(c));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===c)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(c))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=b;var a=f(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!a)return!1;this._activeElements.focusNode=a;c=g.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(c.length===0){f=this._activeElements.dismissArea||
this._activeElements.parameterArea;c=document.createElement("button");c.id="closebox";c.className="imageSprite core-sprite-close dismissButton";c.title=h.Close;f.appendChild(c);var d=this;c.addEventListener("click",function(){d.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(a)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){a.focus();a.select&&a.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(c,f){g.$$array("input",f).forEach(function(b){b.type==="checkbox"?c.parameters.setValue(b.parameterName,b.checked):b.type!=="button"&&c.parameters.setValue(b.parameterName,b.value.trim())});g.$$array("textArea",f).forEach(function(b){c.parameters.setValue(b.parameterName,b.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?
(c.domNode&&c.domNode.classList.add("commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(c,f){var b=this;return function(a,d){var i=null,k=function(){f&&f();b.close()},l=function(d){d.keyCode===g.KEY.ENTER&&b._collectAndCall(c,a);if(d.keyCode===g.KEY.ESCAPE||d.keyCode===g.KEY.ENTER)k(),g.stop(d)};c.parameters.forEach(function(d){var b=null;if(d.label)b=document.createElement("label"),b.classList.add("parameterInput"),b.setAttribute("for",d.name+
"parameterCollector"),b.textContent=d.label,a.appendChild(b);var c=d.name+"parameterCollector",e=b||a;if(d.type==="text"&&typeof d.lines==="number"&&d.lines>1)b=document.createElement("textarea"),b.rows=d.lines,b.type="textarea",b.id=c,e.appendChild(b),l=function(a){a.keyCode===g.KEY.ESCAPE&&(k(),g.stop(a))};else if(d.type==="boolean"){if(b=document.createElement("input"),b.type="checkbox",b.id=c,e.appendChild(b),d.value)b.checked=!0}else if(b=document.createElement("input"),b.type=d.type,b.id=c,
e.appendChild(b),d.value)b.value=d.value;b.classList.add("parameterInput");b.setAttribute("speech","speech");b.setAttribute("x-webkit-speech","x-webkit-speech");b.parameterName=d.name;i||(i=b);b.addEventListener("keydown",l,!1)});var m=d;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),a.appendChild(m));var j=function(a,d){var b=document.createElement("button");d.appendChild(b);a&&b.appendChild(document.createTextNode(a));b.classList.add("dismissButton");
return b};if(c.parameters.hasOptionalParameters())c.parameters.optionsRequested=!1,j(h.More,m).addEventListener("click",function(){c.parameters.optionsRequested=!0;b._collectAndCall(c,a);k()},!1);j(h.Submit,m).addEventListener("click",function(){b._collectAndCall(c,a);k()},!1);m=j(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=h.Close;m.addEventListener("click",function(){k()},!1);return i}}};c.prototype.constructor=c;return{CommandParameterCollector:c}});
define("orion/regex",[],function(){return{escape:function(h){return h.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(h){return(h=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(h))?{pattern:h[1],flags:h[2]}:null}}});
define("orion/contentTypes",[],function(){function h(c,b){function a(a,d,b,c){var b=d.filename.indexOf(b)>=0,e;e=c.toLowerCase();e=d.extension.indexOf(e)!==-1;if(b||e){if(!(e=!a))b&&(c=c.toLowerCase(),b=a.extension.indexOf(c)!==-1),e=b;if(e)return d}return a}if(typeof c!=="string")return null;for(var d=c&&c.split(".").pop(),i=null,e=0;e<b.length;e++){var l=b[e];a(i,l,c,d)===l&&(i=l)}return i}function j(f){this.serviceRegistry=f;this.map=function(b){function a(a){return a===null||typeof a==="undefined"?
[]:Array.isArray(a)?a:[a]}function d(d){return a(d).map(function(a){return String.prototype.toLowerCase.call(a)})}for(var b=b.getServiceReferences(c).concat(b.getServiceReferences(e)),i={},k=0;k<b.length;k++)for(var l=a(b[k].getProperty("contentTypes")),f=0;f<l.length;f++){var g=l[f];i[g.id]||(i[g.id]={id:g.id,name:g.name,image:g.image,"extends":g["extends"],extension:d(g.extension),filename:a(g.filename)})}return i}(f);f.registerService(g,this)}var g="orion.core.contentTypeRegistry",c="orion.core.contenttype",
e="orion.file.contenttype";j.prototype={getContentTypes:function(){var c=this.getContentTypesMap(),b=[],a;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&b.push(c[a]);return b},getContentTypesMap:function(){return this.map},getFileContentType:function(c){return h(c.Name,this.getContentTypes())},getFilenameContentType:function(c){return h(c,this.getContentTypes())},getContentType:function(c){return this.map[c]||null},isExtensionOf:function(c,b){c=typeof c==="string"?this.getContentType(c):c;
b=typeof b==="string"?this.getContentType(b):b;if(!c||!b)return!1;if(c.id===b.id)return!0;else for(var a=c,d={};a&&(a=this.getContentType(a["extends"]));){if(a.id===b.id)return!0;if(d[a.id])throw Error("Cycle: "+a.id);d[a.id]=!0}return!1},isSomeExtensionOf:function(c,b){for(var a=0;a<b.length;a++)if(this.isExtensionOf(c,b[a]))return!0;return!1}};return{ContentTypeRegistry:j,getFilenameContentType:h}});
define("orion/URITemplate",[],function(){function h(a){this._text=a}function j(a){return a.replace("%25","%")}function g(a,d){if(d==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(d==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(i,j);if(d==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+d);}function c(a,d,b){for(var c=
[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&c.push(g(a[e],d));return c.join(b)}function e(a,d,b,c){for(var e=Object.keys(a),i=[],f=0;f<e.length;f++)typeof a[e[f]]!=="undefined"&&i.push(g(e[f],d)+b+g(a[e[f]],d));return i.join(c)}function f(b){if(b.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=a[b[0]])?b=b.substring(1):this._operator=a.NUL;for(var c=[],e=b.split(","),i=0;i<e.length;i++){var f=e[i].match(d);if(f===null)throw Error("Bad VarSpec: "+b);c.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=c}function b(a){for(var d=[],b=0,c=a.indexOf("{",b);c!==-1;){d.push(new h(a.substring(b,c)));b=a.indexOf("}",c+1);if(b===-1)throw Error("Invalid template: "+a);d.push(new f(a.substring(c+1,b)));b+=1;c=a.indexOf("{",b)}d.push(new h(a.substring(b)));this._templateComponents=d}var a={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},
"/":{first:"/",sep:"/",named:!1,ifemp:"",allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:!0,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:!0,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},d=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,i=/%25[0-9A-F][0-9A-F]/g;h.prototype={expand:function(){return encodeURI(this._text)}};
f.prototype={expand:function(a){for(var d=[],b=0;b<this._varSpecList.length;b++){var i=this._varSpecList[b],f=i.name,h=a[f],j=typeof h;if(j!=="undefined"&&h!==null){var q=d.length===0?this._operator.first:this._operator.sep;if(j==="string")this._operator.named&&(q+=g(f,"U+R"),q+=h.length===0?this._operator.ifemp:"="),i.prefix!==-1&&i.prefix<h.length&&(h=h.substring(0,i.prefix)),q+=g(h,this._operator.allow);else if(Array.isArray(h))i.explode?q+=c(h,this._operator.allow,this._operator.sep):(this._operator.named&&
(q+=g(f,"U+R"),q+=h.length===0?this._operator.ifemp:"="),q+=c(h,this._operator.allow,","));else if(j==="object")i.explode?q+=e(h,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(q+=g(f,"U+R"),q+=Object.keys(h).length===0?this._operator.ifemp:"="),q+=e(h,this._operator.allow,",",","));else throw Error("bad param type: "+f+" : "+j);d.push(q)}}return d.join("")}};b.prototype={expand:function(a){for(var d=[],b=0;b<this._templateComponents.length;b++)d.push(this._templateComponents[b].expand(a));
return d.join("")}};return b});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,j){function g(c){if(c=localStorage.getItem("orion/messageBundle/"+c))if(c=JSON.parse(c),c._expires&&c._expires>(new Date).getTime())return delete c._expires,c;return null}var c={};return{getMessageBundle:function(e){function f(){h(["i18n!"+e],function(a){if(a){var d=e;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+d,JSON.stringify(a));delete a._expires}b.resolve(a)})}if(c[e])return c[e];var b=new j;c[e]=
b;var a=g(e);if(a)return b.resolve(a),b;try{h([e],f)}catch(d){h(["orion/i18n!"+e],f)}return b},formatMessage:function(c){var f=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(b,a){return f[(a<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(h,j,g,c,e){function f(){return(new URL(h.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function b(a,d){var b=a.getServiceReferences(d||"orion.page.link"),k=g.matchResourceParameters(window.location.href),l={OrionHome:f(),Location:k.resource},h=[];b.forEach(function(a){var d={};a.getPropertyKeys().forEach(function(b){d[b]=a.getProperty(b)});if(d.uriTemplate&&
d.nls&&(d.name||d.nameKey)){var b=new j;e.getMessageBundle(d.nls).then(function(a){var e=(new c(d.uriTemplate)).expand(l),e=g.validateURLScheme(e);d.href=e;d.textContent=d.nameKey?a[d.nameKey]:d.name;b.resolve(d)});h.push(b)}else if(d.uriTemplate&&d.name){var i=(new c(d.uriTemplate)).expand(l),i=g.validateURLScheme(i);d.href=i;d.textContent=d.name;h.push((new j).resolve(d))}});return j.all(h)}return{createPageLinks:function(a,d){return b(a,d).then(function(a){a.sort(function(a,d){var b=a.textContent&&
a.textContent.toLowerCase(),c=d.textContent&&d.textContent.toLowerCase();return b<c?-1:b>c?1:0});return a.map(function(a){var d=a.href,a=a.textContent,b=document.createElement("a");b.href=d;b.target="_self";b.classList.add("targetSelector");b.textContent=a;return b})})},getPageLinksInfo:b,getOrionHome:f}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks".split(","),function(h,j,g,c,e,f,b,a,d){var i={},k=d.getOrionHome();i._cloneItemWithoutChildren=function o(a){if(a===null||typeof a!=="object")return a;var d=a.constructor(),b;for(b in a)b!=="children"&&b!=="Children"&&(d[b]=o(a[b]));return d};i._getOpenWithNavCommandExtensions=function(a){function d(a,b){for(var c=a.getServiceReferences("orion.navigate.openWith"),
e=[],i=0;i<c.length;i++){var k=c[i];k.getProperty("editor")===b.id&&(k=k.getProperty("contentType"),k instanceof Array?e=e.concat(k):k!==null&&typeof k!=="undefined"&&e.push(k))}return e}for(var b=function(){for(var d=a.getServiceReferences("orion.edit.editor"),b=[],c=0;c<d.length;c++){var e=d[c],i=e.getProperty("id");b.push({id:i,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||e.getProperty("uriTemplate"),validationProperties:e.getProperty("validationProperties")||
[]})}return b}(),c=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],i=0;i<b.length;i++){var k=b[i],f=c&&c.editor===k.id,l=d(a,k);l.length&&e.push({properties:{name:k.name||k.id,nameKey:k.nameKey,id:"eclipse.openWithCommand."+k.id,tooltip:k.name,tooltipKey:k.nameKey,contentType:l,uriTemplate:k.uriTemplate,nls:k.nls,forceSingleItem:!0,isEditor:f?"default":"editor",validationProperties:k.validationProperties},
service:{}})}return e};i._makeValidator=function(a,d,b,c){function i(a,d,b,c){var e=b.match,k;if(d.indexOf("[")===0){if(d.indexOf("]")<0)return!1;if(!Array.isArray(a))return!1;k=d.replace("[","").replace("]","");for(d=0;d<a.length;d++)if(i(a[d],k,b,c))return!0}else if(d.indexOf("|")>=0)return k=d.substring(0,d.indexOf("|")),d=d.substring(d.indexOf("|")+1),i(a,k,b,c)?!0:i(a,d,b,c);else if(d.indexOf(":")>=0)return k=d.substring(0,d.indexOf(":")),d=d.substring(d.indexOf(":")+1),a[k]?i(a[k],d,b,c):!1;
else{a:{k=!1;var f;if(d.charAt(0)==="!")b=typeof a[d.substring(1)]==="undefined";else if(typeof a[d]!=="undefined"){if(typeof e==="undefined")f=a[d],k=!0;else if(typeof e==="string"){if(!typeof(a[d]==="string")){b=!1;break a}if(b.variableName){if(e=RegExp(e).exec(a[d]))k=e[0],f=b.variableMatchPosition==="before"?a[d].substring(0,e.index):b.variableMatchPosition==="after"?a[d].substring(e.index+k.length):b.variableMatchPosition==="only"?k:a[d],k=!0}else{b=RegExp(e).test(a[d]);break a}}else a[d]===
e&&(f=a[d],k=!0);if(k&&b.variableName&&(c[b.variableName]=f,c.itemCached=a,b.replacements))for(a=0;a<b.replacements.length;a++)d=!1,b.replacements[a].pattern?c[b.variableName]=c[b.variableName].replace(RegExp(b.replacements[a].pattern),b.replacements[a].replacement||""):d=!0,d&&window.console.log("Invalid replacements specified in validation property.  "+b.replacements[a]);b=k}else b=!1}return b}}return{info:a,validationFunction:function(d){typeof c==="function"&&(d=c.call(this,d));if(d){if(Array.isArray(d)){if((this.info.forceSingleItem||
this.info.uriTemplate)&&d.length!==1)return!1;if(d.length<1)return!1}else d=[d];for(var k=0;k<d.length;k++){var f;a:{var l=d[k],g=b;if(this.info.validationProperties)for(f=0;f<this.info.validationProperties.length;f++){var h=this.info.validationProperties[f];if(typeof h.source!=="undefined"){if(!i(l,h.source,h,this)){f=!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");f=!1;break a}}if(this.info.contentType&&g){h=!1;if(l=e.getFilenameContentType(l.Name,
g))for(f=0;f<this.info.contentType.length;f++)if(l.id===this.info.contentType[f]){h=!0;break}f=h}else f=!0}if(!f)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var d={},b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&(d[b]=a[b]);if(this.info.validationProperties)for(b=0;b<this.info.validationProperties.length;b++){var c=this.info.validationProperties[b];c.source&&c.variableName&&(this.itemCached===a&&this[c.variableName]||
i(a,c.source,c,this),a[c.variableName]?window.console.log("Variable name "+c.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):d[c.variableName]=this[c.variableName])}d.OrionHome=k;return(new f(this.info.uriTemplate)).expand(d)}return null}}};i._createCommandOptions=function(a,d,c,e,k,f){function l(b,g){var h=i._makeValidator(a,c,e,f);b.visibleWhen=h.validationFunction.bind(h);if(k)if(h.generatesURI.bind(h)())b.hrefCallback=function(a){a=
Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var j=a;b.callback=function(a){var e;if(j.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,e=i._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){e=[];for(var k=0;k<a.items.length;k++)e.push(i._cloneItemWithoutChildren(a.items[k]))}else e=i._cloneItemWithoutChildren(a.items);if(c)var f=c.getService("orion.page.progress");d.run?f?f.progress(d.run(e),"Running command: "+b.name):d.run(e):c&&(f?f.progress(c.getService(d).run(e),
"Running command: "+b.name):c.getService(d).run(e))}}g.resolve(b)}var g=new j;a.nls?b.getMessageBundle(a.nls).then(function(d){l({name:a.nameKey?d[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?d[a.tooltipKey]:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},g)}):l({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},g);return g};i.getOpenWithCommands=function(a){var d=[],b;for(b in a._commandList){var c=a._commandList[b];
c.isEditor&&d.push(c)}return d};var l;i.createAndPlaceFileCommandsExtension=function(a,d,b,c,e,k){var f=!!k;return i.createFileCommands(a,null,k?"all":void 0,f).then(function(a){d._addedOpenWithCommands=f;var i=!1,k=!1;a.forEach(function(a){d.addCommand(a);e&&!i&&(i=!0,d.addCommandGroup(b,"eclipse.fileCommandExtensions",1E3,null,e));e&&!k&&(k=!0,d.addCommandGroup(b,"eclipse.openWith",1E3,"Open With",e+"/eclipse.fileCommandExtensions"));this.isEditor?d.registerCommandContribution(b,a.id,c+this.index,
e?e+"/eclipse.fileCommandExtensions/eclipse.openWith":null):d.registerCommandContribution(b,a.id,c+this.index,e?e+"/eclipse.fileCommandExtensions":null)});return{}})};i.createFileCommands=function(a,d,b,c){var b=b===void 0?"global":b,c=c===void 0?!0:c,e=a.getServiceReferences("orion.navigate.command"),k=[];if(b==="all"||b==="global")for(var f=0;f<e.length;f++)if(e[f].getProperty("id")!=="orion.navigateFromMetadata"){for(var h=a.getService(e[f]),z={},x=e[f].getPropertyKeys(),y=0;y<x.length;y++)z[x[y]]=
e[f].getProperty(x[y]);(b==="all"||z.forceSingleItem&&z.showGlobally)&&k.push({properties:z,service:h})}return j.when(function(){var b=a.getService("orion.core.contentTypeRegistry")||d;return l||j.when(b.getContentTypes(),function(a){return l=a})}(),function(){k=c?k.concat(i._getOpenWithNavCommandExtensions(a,l)):k;var d=k.map(function(d){var b=d.properties;return i._createCommandOptions(b,d.service,a,l,!0).then(function(a){a=new g.Command(a);if(b.isEditor)a.isEditor=b.isEditor;return a})});return j.all(d,
function(a){return{_error:a}}).then(function(a){return a})})};i.createOpenWithCommands=function(a,d,b){return b&&b._addedOpenWithCommands?(new j).resolve(i.getOpenWithCommands(b)):i.createFileCommands(a,d,"none",!0)};return i});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,j){function g(c){this._init(c)}g.prototype={_init:function(c){var e=j.node(c.container);if(!e)throw"no parent container";this._container=e;e.classList.remove("currentLocation");this._id=c.id||"eclipse.breadcrumbs";this._resource=c.resource||null;this._rootSegmentName=c.rootSegmentName;this._workspaceRootSegmentName=c.workspaceRootSegmentName;this._workspaceRootURL=c.workspaceRootURL;this._makeHref=c.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var c;if(this._resource&&this._resource.Parents){c=document.createElement("a");var e=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(c,e):c.href=h.toUrl("edit/edit.html")+"#"+e}else c=document.createElement("span");j.empty(c);c.appendChild(document.createTextNode(this._workspaceRootSegmentName));return c}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(c){var e=
document.createElement("a");e.classList.add("breadcrumb");e.appendChild(document.createTextNode(c));return e},addSegmentHref:function(c,e){this._makeHref?this._makeHref(c,e.Location,e):c.href=h.toUrl("edit/edit.html")+"#"+e.ChildrenLocation},buildSegments:function(c,e){if(this._resource.Parents){var f=this._resource.Parents.slice(0),b,a;f&&(f=f.slice(0),e==="reverse"&&(f=f.reverse().slice(0)),f.forEach(function(d){c?(a=c,c=null):a=d.Name;b=this.buildSegment(a);this.path+=d.Name;this.addSegmentHref(b,
d);b.include=!1;this.segments.push(b)}.bind(this)))}},addDivider:function(){var c=document.createElement("span");c.appendChild(document.createTextNode(" / "));this.path+="/";c.classList.add("breadcrumbSeparator");this.append(c)},refresh:function(){(this.crumbs=j.node(this._id))?j.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),this.dirty=document.createElement("span"),this.dirty.id="dirty",this.dirty.className="modifiedFileMarker",
this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(c){this.crumbs.appendChild(c)},addTitle:function(c,e){var f=e||document.title;this.crumbs.childNodes.length===0&&(c=document.createElement("span"),c.appendChild(document.createTextNode(f)),c.classList.add("breadcrumb"),c.classList.add("currentLocation"),this.append(c))},finalSegment:function(c,
e){c=document.createElement("span");e?c.appendChild(document.createTextNode(e)):c.appendChild(document.createTextNode(this._resource.Name));c.classList.add("currentLocation");this.path+=this._resource.Name;this.append(c)},firstSegment:function(c){if(c)this.append(c),this._resource&&this._resource.Parents?(c.classList.add("breadcrumb"),this.addDivider()):(c.href="",c.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(c){c.include===
!0&&(this.append(c),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var c=this.segments.slice(0).reverse();c.forEach(function(c){this.append(c);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?c.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=c.reverse()}},measure:function(){var c=document.getElementById("location");c.style.width="auto";this.MAX_LENGTH=c.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility=
"hidden";var c=this.getNavigatorWorkspaceRootSegment(),e=this._rootSegmentName;if(e)this.addTitle(c,e);else if(this.finalSegment(c,e),this._resource&&this._resource.Parents&&(this.buildSegments(e,"reverse"),this.measureSegments(),this.firstSegment(c)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var c=this.getNavigatorWorkspaceRootSegment(),e=this._rootSegmentName;e?this.addTitle(c,e):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(c),
this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(c,e)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};g.prototype.constructor=g;return{BreadCrumbs:g}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(h,j,g){function c(c){j.attach(this);this._init(c)}c.prototype={_init:function(c){this._tracking=null;this._animationDelay=501;this.$node=g.node(c.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=g.node(c.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=g.node(c.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=
c.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(c.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add(this._vertical?"splitVerticalThumbLayout":"splitThumbLayout");this._closeByDefault=this.$node.getAttribute("data-initial-state")==="closed";if(typeof c.closeByDefault!=="undefined")this._closeByDefault=c.closeByDefault;this._initializeFromStoredSettings();this._closed?
(this._closed=!1,this._thumbDown(!0,!0)):this._adjustToSplitPosition();this.$node.style.visibility="visible";this.$mainNode.style.display="block";this.$sideNode.style.display="block";this.$node.addEventListener("mousedown",this._mouseDown.bind(this),!1);window.addEventListener("mouseup",this._mouseUp.bind(this),!1);window.addEventListener("resize",this._resize.bind(this),!1)},isClosed:function(){return this._closed},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||
this._thumbDown()},addResizeListener:function(c){this.addEventListener("resize",function(f){c(f.node)})},_initializeFromStoredSettings:function(){var c=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof c==="string"?c==="closed":this._closeByDefault;if(this._vertical)if(c=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(c,10);else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(c=localStorage.getItem(this._prefix+
"/xPosition"))this._splitLeft=parseInt(c,10);else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var c=g.bounds(this.$node),f=g.bounds(this.$node.parentNode);return this.vertical?c.top-f.top:c.left-f.left},_adjustToSplitPosition:function(c){var f=g.bounds(this.$node),b=g.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=f.height;if(c||!this._splitTop)this._splitTop=f.top,localStorage.setItem(this._prefix+"/yPosition",
this._splitTop);c=this._splitTop;this.$node.parentNode.style.position==="relative"&&(c=this._splitTop-b.top);this.$sideNode.style.height=c+"px";this.$sideNode.style.display="block";this.$node.style.top=c+"px"}else{this._splitWidth=f.width;if(c||!this._splitLeft)this._splitLeft=f.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);c=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(c=this._splitLeft-b.left);this.$sideNode.style.width=c+"px";this.$sideNode.style.display=
"block";this.$node.style.left=c+"px"}this._resize()},_resize:function(c,f,b){var c=c||0,a=g.bounds(this.$node.parentNode),d=g.bounds(this.$node);if(this._vertical){if(b===void 0)b=d.top,this.$node.parentNode.style.position==="relative"&&(b-=a.top);b+=d.height;this.$mainNode.style.top=b+"px"}else{if(f===void 0)f=d.left,this.$node.parentNode.style.position==="relative"&&(f-=a.left);f+=d.width;this.$mainNode.style.left=f+"px"}var i=this;window.setTimeout(function(){i._notifyResizeListeners(i.$mainNode);
i._notifyResizeListeners(i.$sideNode)},c)},_notifyResizeListeners:function(c){this.dispatchEvent({type:"resize",node:c})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(c,f){c||this._addAnimation();var b=this._splitTop,a=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")b=a=this._initialSplit}else this._closed=!0,b=a=0;this._vertical?(this.$sideNode.style.height=
b+"px",this.$node.style.top=b+"px"):(this.$sideNode.style.width=a+"px",this.$node.style.left=a+"px");this._resize(this._animationDelay,a,b);c||this._removeAnimation();f||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var d=this;window.setTimeout(function(){d._notifyToggleListeners()},this._animationDelay)},_removeAnimation:function(){var c=this;window.setTimeout(function(){c.$sideNode.classList.remove(c._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");
c.$mainNode.classList.remove(c._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");c.$node.classList.remove(c._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add(this._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");this.$mainNode.classList.add(this._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");this.$node.classList.add(this._vertical?"splitVerticalLayoutAnimation":
"splitLayoutAnimation")},_mouseDown:function(c){if(c.target===this._thumb)return g.stop(c),this._thumbDown();if(!this._tracking)this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),window.addEventListener("mousemove",this._tracking),g.stop(c)},_mouseMove:function(c){if(this._tracking){var f=g.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=c.clientY;if(this._splitTop<
f.top+5)this._splitTop=f.top+5;else if(this._splitTop>f.top+f.height-5)this._splitTop=f.top+f.height-5;var b=this._splitTop;this.$node.parentNode.style.position==="relative"&&(b=this._splitTop-f.top);this.$node.style.top=b+"px"}else{this._splitLeft=c.clientX;if(this._splitLeft<f.left+5)this._splitLeft=f.left+5;else if(this._splitLeft>f.left+f.width-5)this._splitLeft=f.left+f.width-5;b=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(b=this._splitLeft-f.left);this.$node.style.left=
b+"px"}this._adjustToSplitPosition(!0);g.stop(c)}},_mouseUp:function(c){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),g.stop(c)}};c.prototype.constructor=c;return{Splitter:c}});
define("orion/widgets/themes/ThemePreferences",[],function(){function h(h,g){this._preferences=h;this._themeData=g;var c=g.getThemeStorageInfo(),e=h.listenForChangedSettings(c.storage,2,function(c){c.key===e&&this.apply()}.bind(this))}h.prototype={_initialize:function(h,g,c){var e=c.get(h.styleset);e||(e=g.getStyles(),c.put(h.styleset,JSON.stringify(e)));(g=c.get("selected"))&&(g=JSON.parse(g));if(!g||g[h.selectedKey]===void 0)g=g||{},g[h.selectedKey]=h.defaultTheme,c.put("selected",JSON.stringify(g))},
apply:function(){this.setTheme()},getTheme:function(h){var g=this._themeData,c=g.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(e){this._initialize(c,g,e);var f=JSON.parse(e.get("selected")),e=JSON.parse(e.get(c.styleset)),b;if(e)for(var a=0;a<e.length;a++)if(e[a].name===f[c.selectedKey]){b=e[a];break}h({style:b,styles:e})}.bind(this))},setTheme:function(h,g){var c=this._themeData,e=c.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(f){this._initialize(e,
c,f);var b=JSON.parse(f.get("selected"));h||(h=b[e.selectedKey]);b[e.selectedKey]=h;f.put("selected",JSON.stringify(b));g?f.put(e.styleset,JSON.stringify(g)):g=JSON.parse(f.get(e.styleset));for(f=0;f<g.length;f++)if(g[f].name===b[e.selectedKey]){c.processSettings(g[f]);break}}.bind(this))},setFontSize:function(h){var g=this._themeData,c=g.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(e){this._initialize(c,g,e);var f=JSON.parse(e.get("selected")),b=JSON.parse(e.get(c.styleset)),
a;if(b)for(var d=0;d<b.length;d++)b[d].fontSize=h,b[d].name===f[c.selectedKey]&&(a=b[d]);e.put(c.styleset,JSON.stringify(b));g.processSettings(a)}.bind(this))}};return{ThemePreferences:h}});
define("orion/editor/eventTarget",[],function(){function h(){}h.addMixin=function(j){var g=h.prototype,c;for(c in g)g.hasOwnProperty(c)&&(j[c]=g[c])};h.prototype={addEventListener:function(h,g,c){if(!this._eventTypes)this._eventTypes={};var e=this._eventTypes[h];e||(e=this._eventTypes[h]={level:0,listeners:[]});e.listeners.push({listener:g,useCapture:c})},dispatchEvent:function(h){var g=h.type;this._dispatchEvent("pre"+g,h);this._dispatchEvent(g,h);this._dispatchEvent("post"+g,h)},_dispatchEvent:function(h,
g){var c=this._eventTypes?this._eventTypes[h]:null;if(c){var e=c.listeners;try{if(c.level++,e)for(var f=0,b=e.length;f<b;f++)if(e[f]){var a=e[f].listener;typeof a==="function"?a.call(this,g):a.handleEvent&&typeof a.handleEvent==="function"&&a.handleEvent(g)}}finally{if(c.level--,c.compact&&c.level===0){for(f=e.length-1;f>=0;f--)e[f]||e.splice(f,1);e.length===0&&delete this._eventTypes[h];c.compact=!1}}}},isListening:function(h){return!this._eventTypes?!1:this._eventTypes[h]!==void 0},removeEventListener:function(h,
g,c){if(this._eventTypes){var e=this._eventTypes[h];if(e){for(var f=e.listeners,b=0,a=f.length;b<a;b++){var d=f[b];if(d&&d.listener===g&&d.useCapture===c){e.level!==0?(f[b]=null,e.compact=!0):f.splice(b,1);break}}f.length===0&&delete this._eventTypes[h]}}}};return{EventTarget:h}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(h,j,g){function c(c){c=c||{};this._document=c.document||document}var e={};c.getTheme=function(f){var f=f||"default",b=e[f];b||(b=e[f]=new c);return b};c.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(c,b){var a=this,d=a._themeClass;a._themeClass=c;this._load(c,b,function(){a.onThemeChanged({type:"ThemeChanged",oldValue:d,newValue:a.getThemeClass()})})},onThemeChanged:function(c){return this.dispatchEvent(c)},
buildStyleSheet:function(c,b){function a(a,b,e){b&&(d.push("."+c+" ."+a+" {"),d.push("\t"+(e?"background-color":"color")+": "+b+";"),d.push("}"))}var d=[];d.push("");d.push("."+c+" {");b.fontFamily&&d.push("\tfont-family: "+b.fontFamily+";");b.fontSize&&d.push("\tfont-size: "+b.fontSize+";");b.fontSize&&d.push("\tcolor: "+b.text+";");d.push("}");d.push("."+c+".textview {");b.background&&d.push("\tbackground-color: "+b.background+";");d.push("}");a("ruler.annotations",b.annotationRuler,!0);a("ruler.lines",
b.annotationRuler,!0);a("ruler.folding",b.annotationRuler,!0);a("ruler.overview",b.overviewRuler,!0);a("rulerLines",b.lineNumber,!1);a("rulerLines.even",b.lineNumberEven,!1);a("rulerLines.odd",b.lineNumberOdd,!1);a("annotationLine.currentLine",b.currentLine,!0);a("entity-name-tag",b.keyword,!1);a("entity-other-attribute-name",b.attribute,!1);a("string-quoted",b.string,!1);a("line_caret",b.currentLine,!0);a("token_keyword",b.keyword,!1);a("token_string",b.string,!1);a("token_singleline_comment",b.comment,
!1);a("token_multiline_comment",b.comment,!1);a("token_doc_comment",b.comment,!1);a("token_doc_html_markup",b.comment,!1);return d.join("\n")},_createStyle:function(c,b,a,d){var i=this._document,c="orion-theme-"+c,e=i.getElementById(c);if(e){if(d||e.firstChild.data===b)return;e.removeChild(e.firstChild);e.appendChild(i.createTextNode(b))}else d?(e=g.createElement(i,"link"),e.rel="stylesheet",e.type="text/css",e.href=b,e.addEventListener("load",function(){a()})):(e=g.createElement(i,"style"),e.appendChild(i.createTextNode(b))),
e.id=c,(i.getElementsByTagName("head")[0]||i.documentElement).appendChild(e);d||a()},_load:function(c,b,a){if(c)if(typeof b==="string")this._createStyle(c,b,a);else if(b=b.href,b.substring(b.length-4)!==".css"&&(b+=".css"),/^\//.test(b)||/[a-zA-Z0-9]+:\/\//i.test(b)||!h.toUrl)this._createStyle(c,b,a,!0);else{var d=this;h(["text!"+b],function(b){d._createStyle(c,b,a,!1)})}else a()}};j.EventTarget.addMixin(c.prototype);return{TextTheme:c}});
define("orion/widgets/themes/ThemeClass",[],function(){function h(h){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=h;this.classString="."+h+"{ "}h.prototype.className=null;h.prototype.classString=void 0;h.prototype.style=void 0;h.prototype.closeString=" }\n";h.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:h}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(h){function j(){}j.prototype.navbar="#333";j.prototype.button="#777777";j.prototype.location="#EFEFEF";j.prototype.selection="FEC";j.prototype.sidepanel="#FBFBFB";j.prototype.mainpanel="white";j.prototype.navtext="#bfbfbf";j.prototype.content="#3087B3";j.prototype.search="#444";j.prototype.toolpanel="white";j.prototype.writeNavigationStyle=function(){var g="",c=[],e=new h.ThemeClass("orionPage");
e.style.backgroundColor="#fdfdfd";e.style.width="100%";e.style.height="100%";c.push(e);e=new h.ThemeClass("topRowBanner");e.style.margin="0";e.style.border="0";e.style.backgroundColor=this.navbar;e.style.height="16px";e.style.padding="10px";e.style.paddingLeft="6px";e.style.paddingRight="2px";c.push(e);e=new h.ThemeClass("a");e.style.textDecoration="none";e.style.color=this.content;c.push(e);e=new h.ThemeClass("navlink");e.style.display="inline-block";e.style.padding="2px";e.style.color=this.content;
c.push(e);e=new h.ThemeClass("primaryNav");e.style.color=this.navtext;e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.paddingTop="0";e.style.verticalAlign="baseline";c.push(e);e=new h.ThemeClass("primaryNav a");e.style.fontSize="8pt";e.style.color=this.navtext;e.style.marginRight="6px";e.style.marginLeft="6px";e.style.verticalAlign="baseline";e.style.textDecoration="none";c.push(e);e=new h.ThemeClass("primaryNav a:hover");e.style.color="#bfbfbf";e.style.cursor="hand";e.style.color="white";
e.style.fontWeight="normal";c.push(e);for(var f in c)g+=c[f].toString();return g};j.prototype.writeLocationStyle=function(){var g="",c=[],e=new h.ThemeClass("titleArea");e.style.margin="0";e.style.paddingTop="5px";e.style.border="0";e.style.background=this.location;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+"), color-stop(100%,"+this.location+"))";e.style.borderBottom="1px solid "+this.location;e.style.minHeight="20px";c.push(e);e=new h.ThemeClass("breadcrumb");
e.style.fontSize="8pt";e.style.textDecoration="none";e.style.color="#f1f1f2;";e.style.paddingTop="2px";c.push(e);e=new h.ThemeClass("a.breadcrumb:hover");e.style.textDecoration="none";e.style.borderBottom="1px dotted";e.style.color="#F58B0F";e.style.cursor="pointer";c.push(e);e=new h.ThemeClass("breadcrumbSeparator");e.style.fontSize="8pt";e.style.textDecoration="none";e.style.color="#f1f1f2";e.style.fontWeight="bold";c.push(e);e=new h.ThemeClass("currentLocation");e.style.fontWeight="bold";e.style.fontSize=
"8pt";e.style.color="#f1f1f2";e.style.textDecoration="none";e.style.textWrap="normal";e.style.lineHeight="10pt";c.push(e);e=new h.ThemeClass("a.currentLocation:hover");e.style.fontWeight="bold";e.style.fontSize="10pt";e.style.color="#666666";e.style.textDecoration="none";e.style.borderBottom="0";c.push(e);e=new h.ThemeClass("navlinkonpage");e.style.color=this.content;c.push(e);e=new h.ThemeClass("progressPane_running");e.style.background="url(../images/progress_running_dark.gif) no-repeat center";
e.style.width="16px";e.style.height="16px";c.push(e);for(var f in c)g+=c[f].toString();return g};j.prototype.writeButtonStyle=function(){var g="",c=[],e=new h.ThemeClass("commandButton");e.style.color="#666";e.style.border="1px solid #dedede";e.style.backgroundColor="#ddd";e.style.textAlign="center";e.style.verticalAlign="baseline";e.style.cursor="pointer";e.style.display="inline-block";e.style.padding="4px 6px";e.style.borderRadius="3px";e.style.lineHeight="12px";e.style.fontSize="8pt";e.style.userSelect=
"none";c.push(e);e=new h.ThemeClass("commandButton:over");e.style.backgroundColor="#e6e6e6";e.style.border="1px solid #808080";c.push(e);e=new h.ThemeClass("commandMenu");e.style.color="#222";e.style.display="inline-block";e.style.verticalAlign="baseline";e.style.margin="0";e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.border="1px solid #dedede";e.style.backgroundColor="#efefef";e.style.cursor="pointer";e.style.borderRadius="1px";c.push(e);e=new h.ThemeClass("commandMenuItem");e.style.border=
"0";e.style.padding="0";e.style.margin="0";c.push(e);for(var f in c)g+=c[f].toString();return g};j.prototype.writeMainStyle=function(){var g="",c=[],e=new h.ThemeClass("searchbox");e.style.backgroundImage="url(../images/core_sprites.png)";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="4px -297px";e.style.width="12px";e.style.height="12px";e.style.backgroundColor=this.search;e.style.border="1px solid "+this.search;e.style.fontSize="11px";e.style.width="15em";e.style.height="16px";
e.style.borderRadius="10px";e.style.color="#999";e.style.padding="0";e.style.paddingLeft="20px";e.style.marginLeft="5px";e.style.marginTop="6px !important";e.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";c.push(e);e=new h.ThemeClass("searchbox:focus");e.style.color="white";e.style.outline="none";c.push(e);e=new h.ThemeClass("checkedRow");e.style.cssText="background-color:"+this.selection+" !important;";c.push(e);e=new h.ThemeClass("navbar-item-selected");
e.style.background=this.selection;e.style.color=this.content;c.push(e);e=new h.ThemeClass("auxpane");e.style.border="0";e.style.background=this.sidepanel;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";e.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";c.push(e);e=new h.ThemeClass("mainpane");e.style.background=this.mainpanel;e.style.border=0;c.push(e);e=new h.ThemeClass("mainToolbar");
e.style.background=this.toolpanel;e.style.height="32px";e.style.borderBottom="1px solid #ebebeb";e.style.paddingTop="3px";c.push(e);for(var f in c)g+=c[f].toString();return g};j.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};j.prototype.getSheet=function(g){g.navbar.value?(this.navbar=g.navbar.value,this.button=g.button.value,this.location=g.location.value,this.selection=
g.selection.value,this.sidepanel=g.sidepanel.value,this.mainpanel=g.mainpanel.value,this.navtext=g.navtext.value,this.search=g.search.value,this.content=g.content.value,this.toolpanel=g.toolpanel.value):(this.navbar=g.navbar,this.button=g.button,this.location=g.location,this.selection=g.selection,this.sidepanel=g.sidepanel,this.mainpanel=g.mainpanel,this.navtext=g.navtext,this.search=g.search,this.content=g.content,this.toolpanel=g.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+
this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:j}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(h,j,g){function c(){}function e(){this.styles=[];var b=new c;b.name="Orion";b.navbar="#404648";b.button="#EFEFEF";b.location="#efefef";b.selection="FEC";b.sidepanel="#FBFBFB";b.mainpanel="white";b.toolpanel="white";b.navtext="#bfbfbf";b.content="#3087B3";b.search="#444";b.breadcrumb="#3087B3";b.separator="#333";this.styles.push(b);
b=new c;b.name="Green Zone";b.navbar="seagreen";b.button="lavender";b.location="darkseagreen";b.selection="moccasin";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="darkgreen";b.search="darkgreen";b.breadcrumb="#3087B3";b.separator="seagreen";this.styles.push(b);b=new c;b.name="Pretty In Pink";b.navbar="plum";b.button="lavender";b.location="pink";b.selection="lavender";b.sidepanel="seashell";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";
b.content="mediumorchid";b.search="violet";b.breadcrumb="#3087B3";b.separator="plum";this.styles.push(b);b=new c;b.name="Blue Monday";b.navbar="cornflowerblue";b.button="lavender";b.location="skyblue";b.selection="lavender";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="royalblue";b.search="royalblue";b.breadcrumb="#3087B3";b.separator="cornflowerblue";this.styles.push(b);b=new c;b.name="Vanilla Skies";b.navbar="sandybrown";b.button="lemmonchiffon";
b.location="cornsilk";b.selection="lemonchiffon";b.sidepanel="white";b.mainpanel="white";b.toolpanel="white";b.navtext="lemonchiffon";b.content="chocolate";b.search="moccasin";b.breadcrumb="#3087B3";b.separator="sandybrown";this.styles.push(b);b=new c;b.name="Beetlejuice";b.navbar="indigo";b.button="slateblue";b.location="darkslateblue";b.selection="silver";b.sidepanel="lavender";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumslateblue";b.search="#444";b.breadcrumb="#3087B3";
b.separator="indigo";this.styles.push(b);b=new c;b.name="Red";b.navbar="#CD2127";b.button="#777777";b.location="#D85F56";b.selection="lightcoral";b.sidepanel="#EFDAB2";b.mainpanel="#FDFADD";b.toolpanel="#FDFADD";b.navtext="#FBFBFB";b.content="darkred";b.search="#D85F56";b.breadcrumb="darkred";b.separator="#CD2127";this.styles.push(b)}function f(){return this.styles}c.prototype.name="Orion";c.prototype.navbar="#404648";c.prototype.button="#EFEFEF";c.prototype.location="#333";c.prototype.breadcrumb=
"#3087B3";c.prototype.separator="#333";c.prototype.selection="FEC";c.prototype.sidepanel="#FBFBFB";c.prototype.mainpanel="white";c.prototype.toolpanel="white";c.prototype.navtext="#bfbfbf";c.prototype.content="#3087B3";c.prototype.search="#444";e.prototype.styles=[];e.prototype.getStyles=f;e.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};e.prototype.getViewData=function(){var b={top:10,left:10,width:350,height:350};
b.shapes=[{type:"RECTANGLE",name:h["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:h["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:h["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:h["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:h["Selection Bar"],
x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:h.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:h["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:h.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:h.Content,label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",
order:9},{type:"TEXT",name:h.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:h["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:h.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:h["Button Text"],label:"Button",x:158,y:90,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,
y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:h["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:h["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:h["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:h["Line Color"],x1:20,y1:100,x2:140,
y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:h["Side Panel"],x:10,y:71,width:140,height:289,family:"sidepanel",fill:"#FBFBFB",order:12},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:h["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TRIANGLE",
name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"}];for(var a=0;a<3;a++)b.shapes.push({type:"TEXT",name:h.Content,label:"org.eclipse.orion.content",x:170,y:127+20*a,fill:"#3087B3",family:"content"});for(a=0;a<3;a++)b.shapes.push({type:"TEXT",name:h.Content,label:"Item",x:25,y:115+20*a,fill:"#3087B3",family:"content"});for(a=0;a<3;a++)b.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+a*20,x2:165,y2:124+a*20,x3:160,y3:127+a*20,family:"navbar",fill:"#333"});b.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return b};e.prototype.processSettings=function(b){var a=new g.ThemeSheetWriter;(new j.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",a.getSheet(b))};return{ThemeData:e,getStyles:f}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",
test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:","Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination",
"Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'.","Main Pages":"Main Pages","Related Links":"Related Links"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(h){function j(g,c,e){this.elements=e;this.taskPanel=document.createElement("div");this.taskPanel.className="UAContainer";this.taskPanel.innerHTML='<header class="UAHeader">Develop software from within the cloud</header>';this.elementNode=document.createElement("div");this.switchesContainer=document.createElement("div");this.switches=document.createElement("span");this.radioButtons=[];this.elementNode.className="UAContainer-body";
this.taskPanel.appendChild(this.elementNode);this.switchesContainer.className="UAContainer-switch-body";this.switches.className="UAContainer-switches";this.switchesContainer.innerHTML="";this.switchesContainer.appendChild(this.switches);this.taskPanel.appendChild(this.switchesContainer);c===!0?(this.container=document.createElement("div"),this.container.className="UAModal",this.container.appendChild(this.taskPanel),this.backdrop=document.createElement("div"),this.backdrop.className="UAModalBackground",
document.body.appendChild(this.backdrop),document.body.appendChild(this.container),h.addAutoDismiss([this.container],this.destroy.bind(this))):g.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}j.prototype.elementNode=null;j.prototype.switchesContainer=null;j.prototype.switches=null;j.prototype.radioButtons=null;j.prototype.chosenSwitch=null;j.prototype.addElement=
function(g){var c=document.createElement("span");c.className="UAContainer-icon";c.innerHTML='<span class="workingSpan"><img src="'+g.image+'" id="'+g.label+'ImageNode" alt="'+g.alt+'" height="64" width="64"></span><span class="UAIcon-label"><span class="UALabel" id="'+g.label+'LabelNode" >'+g.label+"</span></span>";c.onmouseover=function(){document.getElementById(g.label+"ImageNode").src=g.secondaryImage;document.getElementById(g.label+"LabelNode").className="UALabel-live";c.className="UAContainer-icon-live"};
c.onmouseout=function(){document.getElementById(g.label+"ImageNode").src=g.image;document.getElementById(g.label+"LabelNode").className="UALabel";c.className="UAContainer-icon"};var e=this;c.onclick=function(){e.showMedia(g)};this.elementNode.appendChild(c)};j.prototype.clearElements=function(){this.elementNode.innerHTML=""};j.prototype.showMedia=function(g){this.clearElements();this.addElement(g);var c=document.createElement("span");c.className="UAContainer-media";c.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
g.media+'" alt="'+g.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(c);setTimeout(function(){c.style.opacity=1},100);g=document.getElementById(g.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=g.parentNode;g.className="chosenCircle"};j.prototype.createSwitch=function(g){var c;c=g?g.label+"switch":"indexSwitch";var e=document.createElement("span");e.className="workingSpan";e.innerHTML='<div class="circle" id ="'+c+'"></div>';var f=this;e.onclick=
g?function(){f.showMedia(g)}:function(){f.initialize();f.chosenSwitch.firstChild.className="circle";f.chosenSwitch=e;f.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(e);return this.radioButtons[this.radioButtons.length]=e};j.prototype.initialize=function(){this.clearElements();this.elements.forEach(this.addElement.bind(this))};j.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return j});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,j,g,c){function e(){}e.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" id="closeDialog"></button></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',
_initialize:function(){var c=document.body;this.$frameParent=c;this.$$modalExclusions=this.$$modalExclusions||[];var b=document.createRange();b.selectNode(c);b=b.createContextualFragment(this.CONTAINERTEMPLATE);c.appendChild(b);this.$frame=c.lastChild;this.title&&g.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=g.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(){a.hide()},!1);this.$parent=g.$(".dialogContent",this.$frame);
b=document.createRange();b.selectNode(this.$parent);c=b.createContextualFragment(this.TEMPLATE);this.messages&&g.processTextNodes(c,this.messages);this.$parent.appendChild(c);this.$buttonContainer=g.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(d){d.keyCode===g.KEY.ESCAPE?a.hide():d.keyCode===g.KEY.ENTER&&typeof a._defaultCallback==="function"&&a._defaultCallback()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);
this.modal&&this._makeModal()},_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var e=this;this.buttons.forEach(function(b){var a=c.createButton(b.text,b.callback);if(b.id)a.id=b.id,e["$"+a.id]=a;if(b.isDefault)e._defaultCallback=b.callback,e._defaultButton=a;e.$buttonContainer.appendChild(a)})}},_makeModal:function(){var c=this;this.$frame.addEventListener("blur",function(a){c.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var d=!g.contains(c.$frame,
a.target);if(d)for(var b=0;b<c.$$modalExclusions.length;b++)if(g.contains(c.$$modalExclusions[b],a.target)){d=!1;break}d&&(window.setTimeout(function(){(c.$lastFocusedElement||c.$parent).focus()},0),g.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var b=this.$frameParent.childNodes,a=!1;this._addedBackdrop=[];for(var d=0;d<b.length;d++){for(var e=0;e<this.$$modalExclusions.length;e++)if(g.contains(this.$$modalExclusions[e],
b[d])){a=!0;break}!a&&b[d]!==c.$frame&&b[d].classList&&!b[d].classList.contains("tooltipContainer")&&(e=b[d],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(b=g.lastTabbable(this.$buttonContainer)||g.lastTabbable(this.$parent))&&b.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.TAB){var d=c._getFirstFocusField();d&&d!==a.target&&d.focus();g.stop(a)}},!1)},_addChildDialog:function(c){this.$$modalExclusions.push(c.$frame||c.$parent)},
_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var a=c.childNodes[b];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding==="function"&&this._afterHiding();var c=this;this.keepAlive||
window.setTimeout(function(){c.destroy()},0)},show:function(c){typeof this._beforeShowing==="function"&&this._beforeShowing();var b=g.bounds(this.$frame),a=g.bounds(document.documentElement),d;c?(d=g.bounds(c),c=d.top+d.height+4,d=d.left+4,c+b.height>a.height&&(c=Math.max(0,a.height-b.height-4)),d+b.width>a.width&&(d=Math.max(0,a.width-b.width-4))):(d=Math.max(0,(a.width-b.width)/2),c=Math.max(0,(a.height-b.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=c+"px";this.$frame.style.left=
d+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return g.firstTabbable(this.$parent)||this._defaultButton||g.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(c){c.classList.remove("modalBackdrop")});this.$frameParent.removeEventListener("focus",
this._modalListener,!0);this.$frameParent.removeEventListener("click",this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};e.prototype.constructor=e;return{Dialog:e}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,orion/webui/littlelib,orion/PageLinks,orion/widgets/userAssistance/UATaskPanel,orion/webui/dialog".split(","),function(h,j,g,c,e){function f(b){this._displaySignOut=!0;this._init(b)}f.prototype={_init:function(b){this._dropdownNode=g.node(b.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=b.dropdown;this._serviceRegistry=b.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=b.noSeparator;this._dropDownItemClass=b.dropDownItemClass;this._keyAssistClass=b.keyAssistClass;if(b.signOut!==void 0)this._displaySignOut=b.signOut},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(b){var a=0,d;for(d in b)b.hasOwnProperty(d)&&a++;return a},_makeMenuItem:function(b,
a){var d=document.createElement("span");d.role="menuitem";d.tabIndex=0;var c=document.createTextNode(b);d.appendChild(c);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&d.classList.add(this._dropDownItemClass):d.classList.add("dropdownMenuItem");d.addEventListener("click",a,!1);d.addEventListener("keydown",function(d){(d.keyCode===g.KEY.ENTER||d.keyCode===g.KEY.SPACE)&&a()},!1);return d},_renderAuthenticatedService:function(b){var a=this,d=this.authenticatedServices[b].authService;
if(d&&d.logout&&this._displaySignOut){var c=document.createElement("li"),e=this._makeMenuItem(h["Sign Out"],function(){d.logout().then(function(){a.addUserItem(b,d,a.authenticatedServices[b].label);localStorage.removeItem(b);localStorage.removeItem("lastLogin");for(var c=localStorage.length-1;c>=0;c--){var e=localStorage.key(c);e&&e.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(e)}d.getAuthForm(window.location.href).then(function(a){window.location=a})})});c.appendChild(e);this._dropdownNode.appendChild(c)}},
renderServices:function(){function b(b){d[b]||(d[b]=a.createDocumentFragment());return d[b]}var a=document,d=[],e=this._serviceRegistry;c.getPageLinksInfo(e,"orion.page.link.user").then(function(c){this._dropdown?this._dropdown.empty():this._dropdownNode&&g.empty(this._dropdownNode);c.forEach(function(d){var c=b(typeof d.category==="number"?d.category:1),e=a.createElement("li"),i=a.createElement("a");i.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&i.classList.add(this._dropDownItemClass):
i.classList.add("dropdownMenuItem");i.href=d.href;i.textContent=d.textContent;e.appendChild(i);c.appendChild(e);i.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&i.click()},!1)}.bind(this));if(this.keyAssistFunction){var c=document.createElement("li"),l=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&l.classList.add(this._keyAssistClass):l.classList.add("key-assist-menuitem");
c.appendChild(l);b(0).appendChild(c)}if(c=e.getServiceReferences("orion.page.getstarted")[0])l=c.getProperty("data"),c=document.createElement("li"),l=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,l)),c.appendChild(l),b(0).appendChild(c);var f=this;d.sort(function(a,d){return a-d}).forEach(function(a,b){if(b<d.length-1&&!this._noSeparator){var c=document.createElement("li");c.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");
c.appendChild(e);a.appendChild(c)}f._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var j in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(j)&&this._renderAuthenticatedService(j,0)}.bind(this))},getStartedDialog:function(b){new e(null,!0,b)},setKeyAssist:function(b){this.keyAssistFunction=b;this.renderServices()},addUserItem:function(b,a,d,c){c?(this.unauthenticatedServices[b]&&delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:a,
label:d,data:c}):(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?{authService:a,label:d,pending:this.unauthenticatedServices[b].pending}:{authService:a,label:d});this.renderServices()}};f.prototype.constructor=f;return{UserMenu:f}});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?","Search cancelled by user":"Search cancelled by user",
Cancel:"Cancel"});define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(h,j,g,c,e,f){function b(a,b,c){var e="";c&&(e="^");if(e=g.parse("/"+e+a.searchStr+"/"))c=e.pattern,e=e.flags,e.indexOf("i")===-1&&!b.caseSensitive&&(e+="i"),a.regExp={pattern:c,flags:e},a.wildCard=!0}var a={ALL_FILE_TYPE:"*.*"};a.doSearch=function(d,b,c,e){if(d){var f=!0;c==="*"&&(c="");c===""&&(f=e&&e.type!==a.ALL_FILE_TYPE);if(f){c!==""&&a.addRecentSearch(b,
c,e?e.regEx:!1);var d=d.createSearchParams(c,!1,!1,e),g=a.generateSearchHref(d);a.getOpenSearchPref(b,function(a){a?window.open(g):window.location=g})}}else window.alert(h["Can't search: no search service is available"])};a.generateSearchHelper=function(d,c){var e=d.keyword,f=e,g={};d.fileType&&d.fileType!==a.ALL_FILE_TYPE&&e===""&&(f="*."+d.fileType);if(d.regEx)g.searchStr=e,b(g,d,c);else{var h=e.indexOf("*")>-1,j=e.indexOf("?")>-1;h&&(e=e.split("*").join(".*"));j&&(e=e.split("?").join("."));!h&&
!j&&!d.nameSearch?(g.searchStr=d.caseSensitive?e.split("\\").join(""):e.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=d.caseSensitive?e:e.toLowerCase(),b(g,d,c),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:d,inFileQuery:g,displayedSearchTerm:f}};a.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows,10);if(a.start!==void 0)a.start=parseInt(a.start,10);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive===
"string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};a.copySearchParams=function(a,b){var c={},e;for(e in a)if(a[e]!==void 0&&a[e]!==null&&(b||e!=="replace"))c[e]=a[e];return c};a.generateSearchHref=function(d){var b=j.toUrl("search/search.html"),d=a.copySearchParams(d,!0),c=d.resource;d.resource=void 0;return typeof d.keyword!=="undefined"?(new f(b+"#{,resource,params*}")).expand({resource:c,params:d}):
(new f(b+"#{,resource}")).expand({resource:c})};a.generateFindURLBinding=function(a,b,c,e,g){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof e==="string"?e:void 0,atLine:typeof c==="number"?c:void 0};return g?a:","+(new f("{,params*}")).expand({params:a})};a.convertFindURLBinding=function(a){if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()===
"true";if(typeof a.atLine==="string")a.atLine=parseInt(a.atLine,10)};a.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};a.replaceStringLiteral=function(d,b,c){b=g.parse("/"+b+"/gim");return a.replaceRegEx(d,b,c)};a.searchOnelineLiteral=function(a,b,c){var e;e=0;for(var f=!1,g=[];;)if(e=b.indexOf(a.searchStr,e),e<0)break;else{g.push({startIndex:e,length:a.searchStrLength});f=!0;if(c)break;e+=a.searchStrLength}return f?g:null};a.findRegExp=function(a,b,c,e){if(!b)return null;
c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var f=null;return(f=RegExp(b,c).exec(a.substring(e)))&&{startIndex:f.index+e,length:f[0].length}};a.searchOnelineRegEx=function(d,b,c){for(var e=0,f=!1,g=[];;)if(e=a.findRegExp(b,d.regExp.pattern,d.regExp.flags,e)){g.push(e);f=!0;if(c)break;e=e.startIndex+e.length}else break;return f?g:null};a.generateNewContents=function(d,b,c,e,f,g){if(e&&b){if(!d)c.contents=[];for(var h=0;h<b.length;h++){for(var j=b[h],n=!1,q=!1,t=[],w,r=0,z=
0;z<e.children.length;z++)if(e.children[z].lineNumber-1===h){r=z;for(n=0;n<e.children[z].matches.length;n++)e.children[z+n].checked!==!1&&t.push(n);q=t.length>0;w=e.children[z].matches;n=!0;break}if(n){if(q){t=a.replaceCheckedMatches(j,f,w,t,g);j=t.replacedStr;for(n=0;n<e.children[r].matches.length;n++)e.children[r+n].newMatches=t.newMatches}else for(n=0;n<e.children[r].matches.length;n++)e.children[r+n].newMatches=e.children[r+n].matches;d?c.contents[h]=j:c.contents.push(j)}else d||c.contents.push(j)}}};
a.generateMatchContext=function(a,b,c){var e=[],f=a*2+1,g;b.length<=f?(g=0,a=b.length-1):(g=c-a,g<0?(g=0,a=g+f-1):(a=c+a,a>b.length-1&&(a=b.length-1,g=a-f+1)));for(f=g;f<=a;f++)e.push({context:b[f],current:f===c});return e};a.splitFile=function(a){for(var b=0,c=0,e=0,f=0,g=[];;){b!==-1&&b<=e&&(b=a.indexOf("\r",e));c!==-1&&c<=e&&(c=a.indexOf("\n",e));if(c===-1&&b===-1){g.push(a.substring(f));break}var h=1;b!==-1&&c!==-1?b+1===c?(h=2,e=c+1):e=(b<c?b:c)+1:e=b!==-1?b+1:c+1;g.push(a.substring(f,e-h));
f=e}return g};a.searchWithinFile=function(d,b,c,e,f,g){c=a.splitFile(c);if(f)b.contents=c;if(b){b.children=[];for(var h=e=0;h<c.length;h++){var j=c[h];if(j&&j.length>0){var n=g?j:j.toLowerCase();if(n=d.wildCard?a.searchOnelineRegEx(d,n):a.searchOnelineLiteral(d,n)){var q,t=h+1;if(f)for(var w=0;w<n.length;w++)q=w+1,q={parent:b,checked:b.checked,type:"detail",matches:n,lineNumber:t,matchNumber:q,name:j,location:b.location+"-"+t+"-"+q},b.children.push(q);else q={parent:b,context:a.generateMatchContext(2,
c,h),checked:b.checked,type:"detail",matches:n,lineNumber:t,name:j,location:b.location+"-"+t},b.children.push(q);e+=n.length}}}b.totalMatches=e}};a.replaceCheckedMatches=function(a,b,c,e,f){for(var g=0,h="",j=[],n=0;n<c.length;n++){g!==c[n].startIndex&&(h+=a.substring(g,c[n].startIndex));if(c[n].length)f=c[n].length;for(var g=!1,q=0;q<e.length;q++)if(e[q]===n){g=!0;break}g?(j.push({startIndex:h.length,length:b.length}),h+=b):(j.push({startIndex:h.length,length:f}),h+=a.substring(c[n].startIndex,c[n].startIndex+
f));g=c[n].startIndex+f}g<a.length&&(h+=a.substring(g));return{replacedStr:h,newMatches:j}};a.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};a.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};a._storeRecentSearch=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);c&&window.setTimeout(function(){c.dispatchEvent({type:"recentSearchesChanged"})}.bind(this),
20)})};a.addRecentSearch=function(d,b,c){typeof b==="string"&&b&&d.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e){for(f in e)if(e[f].name===b)return;e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:b,regEx:c});a._storeRecentSearch(d,e)})};a.removeRecentSearch=function(d,b,c){typeof b==="string"&&b&&d.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,
e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e)for(f in e)if(e[f].name===b){e.splice(f,1);a._storeRecentSearch(d,e,c);break}})};a.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};a.getMixedSearches=function(d,b,c,e){d.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f=d.get("recentSearch");typeof f===
"string"&&(f=JSON.parse(f));b&&(d=d.get("search"),typeof d==="string"&&(d=JSON.parse(d)),d&&d.forEach(function(d){if(c){var b=a.parseQueryStr(d.query);f.some(function(a){return b.searchStrTitle===a.name})||f.push({name:b.searchStrTitle,label:d.name})}else f.push({name:null,label:d.name,value:d.query})}));f&&e&&e(f)})};a.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!=="undefined"?
a["links.newtab"]?!0:!1:!1)})};a.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return a});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,j,g,c,e,f){function b(a,d,b,e){this.registry=a;this.fileClient=d;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=e&&e.searchOnName;this._buildSkeletonOnly=e&&e.buildSkeletonOnly;this._fetchChildrenCallBack=e&&e.fetchChildrenCallBack;this._searchParams=b;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:c.generateSearchHelper(b);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location;this._cancelled=!1;this.registry.getService("orion.page.message").setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}b.prototype.search=function(a){var d=this.registry.getService("orion.core.contentTypeRegistry");this._onSearchComplete=a;this._cancelled=!1;this._deferredArray=[];d.getContentTypes().then(function(a){this.contentTypesCache=
a;this._visitRecursively(this._childrenLocation).then(function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}})}.bind(this))}.bind(this))};b.prototype.searchName=function(a,d){if(a)this.searchHelper=c.generateSearchHelper(a,!0);if(d)this.onSearchNameComplete=d;var b=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var e=0;e<this.fileSkeleton.length;e++){var f=
this.fileSkeleton[e].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(b.push(this.fileSkeleton[e]),b.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:b.length,docs:b}})}};b.prototype.buildSkeleton=function(a,d){this._buildingSkeleton=!0;var b=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=
[];var c=this;a();b.getContentTypes().then(function(a){c.contentTypesCache=a;c._visitRecursively(c._childrenLocation).then(function(){c._buildingSkeleton=!1;d();c.searchHelper&&!c._buildSkeletonOnly&&c.searchName()})})};b.prototype._searchCompleted=function(){console.log("Search Completed.")};b.prototype._searchFiles=function(){var a=[];if(this.fileLocations.length>0)for(var d=0;d<this.fileLocations.length;d++)a.push(this._sniffSearch(this.fileLocations[d]));return f.all(a)};b.prototype._sort=function(a){a.sort(function(a,
b){var c=a.Name&&a.Name.toLowerCase(),e=b.Name&&b.Name.toLowerCase();return c<e?-1:c>e?1:0})};b.prototype._onFileType=function(a){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===c.ALL_FILE_TYPE?!0:a.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};b.prototype._visitRecursively=function(a){var d=[],b=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(a);var c=b.registry.getService("orion.page.progress");return(c?c.progress(b.fileClient.fetchChildren(a),
"Crawling search for children of "+a):b.fileClient.fetchChildren(a)).then(function(a){for(var c=0;c<a.length;c++)if(a[c].Directory!==void 0&&a[c].Directory===!1)if(b._searchOnName)d.push(b._buildSingleSkeleton(a[c]));else if(b._buildSkeletonOnly)d.push(b._buildSingleSkeleton(a[c]));else{if(!b._cancelled){var g=e.getFilenameContentType(a[c].Name,b.contentTypesCache);if(g&&(g["extends"]==="text/plain"||g.id==="text/plain")&&b._onFileType(g))g=b._sniffSearch(a[c]),d.push(g),b._deferredArray.push(g)}}else if(a[c].Location)if(b._cancelled)break;
else g=b._visitRecursively(a[c].ChildrenLocation),d.push(g),b._deferredArray.push(g);return f.all(d)})};b.prototype._hitOnceWithinFile=function(a){a=this._searchParams.caseSensitive?a:a.toLowerCase();return this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,a,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,a,!0)};b.prototype._reportSingleHit=function(a){a.LastModified=a.LocalTimeStamp;this.fileLocations.push(a);this._hitCounter++;this._sort(this.fileLocations);
this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};b.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(a){a.cancel()});this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}});console.log("Crawling search cancelled. Deferred array length : "+this._deferredArray.length);this.registry.getService("orion.page.message").setProgressResult({Message:h["Search cancelled by user"],
Severity:"Warning"})};b.prototype._sniffSearch=function(a){this._totalCounter++;var d=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(a),this.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(d.fileClient.read(a.Location),"Reading file "+a.Location).then(function(b){d._hitOnceWithinFile(b)&&
d._reportSingleHit(a);d.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],d._hitCounter,d._totalCounter)},h.Cancel)},function(a){a&&a.message&&a.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+a.message)})};b.prototype._buildSingleSkeleton=function(a){this._totalCounter++;this.fileSkeleton.push(a);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();a=new f;a.resolve(this._totalCounter);
return a};b.prototype.constructor=b;return{SearchCrawler:b}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/util,orion/webui/dialog".split(","),function(h,j,g,c,e,f,b){function a(a){this._init(a)}a.prototype=new b.Dialog;a.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+c.toUrl("../../../images/progress_running.gif")+
'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';a.prototype._init=function(a){this.title=a.title||h["Find File Named"];this.modal=!0;this.messages=h;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new g.ContentTypeRegistry(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");
this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(h["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(h["Missing required argument: searchRenderer"]);this._initialize()};a.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===e.KEY.ENTER){var d=e.$("a",b.$results);
d&&(e.stop(a),window.open(d.href),b.hide())}},!1);a.addEventListener("keydown",function(a){var d,c,f;if(a.keyCode===e.KEY.DOWN||a.keyCode===e.KEY.UP)d=e.$$array("a",b.$results),c=document.activeElement,f=d.indexOf(c),a.keyCode===e.KEY.DOWN?f>=0?(c.classList.remove("treeIterationCursor"),d=f<d.length-1?d[f+1]:d[0],d.focus(),d.classList.add("treeIterationCursor")):d.length>0&&(d=-1<d.length-1?d[0]:d[0],d.focus(),d.classList.add("treeIterationCursor")):f>=0?(c.classList.remove("treeIterationCursor"),
c=b.$fileName,d=f>0?d[f-1]:c,d.focus(),f>0&&d.classList.add("treeIterationCursor")):d.length>0&&(d[d.length-1].focus(),d[d.length-1].classList.add("treeIterationCursor")),e.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new j.SearchCrawler(b._searcher.registry,b._fileService,
"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),this.$fileNameMessage.appendChild(document.createTextNode(this._message)));if(this._initialText)this.$fileName.value=
this._initialText,this.doSearch()};a.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};a.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._searcher.createSearchParams(a,this._nameSearch,this._searchOnRoot),c=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));
this.currentSearch=c;var g=document.createElement("div");g.appendChild(document.createTextNode(this._nameSearch?h["Searching..."]:f.formatMessage(h["Searching for occurrences of"],a)));e.empty(this.$results);this.$results.appendChild(g);this._searcher.search(b,!1,function(){c===this.currentSearch&&c.apply(null,arguments)}.bind(this))}};a.prototype.decorateResult=function(a){for(var b=this,a=e.$$array("a",a),c=0;c<a.length;c++){var f=a[c];f.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&
!a.metaKey&&b.hide()},!1);f.addEventListener("keyup",function(a){a.keyCode===e.KEY.ENTER&&b.hide()},!1)}};a.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};a.prototype._afterHiding=function(){this._onHide&&this._onHide()};a.prototype.constructor=a;return{OpenResourceDialog:a}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\t\t<nav id="primaryNav" class="bannerLeftArea" role="navigation">\n\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\t\t<div class="bannerRightArea">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;">\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">\n\t\t\t\t\t<span class="dropdownArrowEmpty"></span>\n\t\t\t\t</span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\n\t<div class="logoFooter commandSprite core-sprite-orion-logo"></div>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<ul>\n\t\t\t<\!-- <li><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a></li --\>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=4.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\n\t</div>\n</footer>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility: hidden;"></div>\n<div class="layoutRight commandList pageActions" id="settingsActions"></div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(h,j){function g(c,e,f){if(c=j.node(c))this._parent=c;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;c=document.createElement("div");c.classList.add("dropDownContainer");c.id=this.navDropDownId;c.style.display="none";this._parent.appendChild(c);this._dropdownMenu=c;if(e=j.node(e))this._triggerNode=
e;else throw"Trigger node of dropdown menu not found";if(this._triggerNode.style.visibility==="hidden")this._triggerNode.style.visibility="visible";if(!f.noClick)this._triggerNode.onclick=this.click.bind(this);this._dropdownMenu.addEventListener("keydown",function(b){b.keyCode===j.KEY.ESCAPE&&this.clearPanel()}.bind(this))}h.mixin(g.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){this._dropdownMenu.style.display="";this._positionDropdown();
this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=j.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this));if(this.options.onShow)this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){if(this.isVisible()&&(this._dropdownMenu.style.display="none",this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},addContent:function(c){this._dropdownMenu.innerHTML=
c},getContentNode:function(){return this._dropdownMenu},updateContent:function(c,e){e()},_positionDropdown:function(){this._dropdownMenu.style.left="";var c=j.bounds(this._dropdownMenu),e=j.bounds(this._boundingNode(this._parent));if(c.left+c.width>e.left+e.width)this._dropdownMenu.style.right=0},_boundingNode:function(c){return c.style.right!==""||c.style.position==="absolute"||!c.parentNode||!c.parentNode.style?c:this._boundingNode(c.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},
isVisible:function(){return this._dropdownMenu.style.display!=="none"&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){if(this._parent)j.empty(this._parent),this._parent=this.select=null}});return g});
define("orion/widgets/input/GroupedContent",["i18n!orion/widgets/nls/messages","orion/objects","orion/webui/littlelib"],function(h,j){function g(){}j.mixin(g.prototype,{templateString:'<div style="float:left;"><section><span style="color:#333;padding:15px;">'+h["Main Pages"]+'</span><nav><ul id="navigationlinks"></ul></nav></section></div><div class="groupedContentDivider"></div><div style="float:left;"><section><span style="color:#333;padding:15px;">'+h["Related Links"]+'</span><nav><ul id="relatedLinks"></ul></nav></section></div>',
getContentPane:function(){return this.templateString}});return g});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file",
"Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",
'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.",
"Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file","Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository",
"Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.","Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.",
"Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Go Into":"Go Into","Move into the selected folder":"Move into the selected folder","Import local file...":"Import local file...","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection",
"Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}","Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location",
"Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system",
"Create new content":"Create new content","Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.",
"Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,j,g){function c(b,a,d){if(!b[a])throw a+h[" is not supported in this file system"];return b[a].apply(b,d)}function e(b,a,d,i){if(!b.readBlob)throw h["source file service does not support binary read"];if(!d.writeBlob)throw h["target file service does not support binary write"];if(a[a.length-1]!=="/")return c(b,"readBlob",[a]).then(function(a){return c(d,"writeBlob",[i,a])});var f=i.substring(0,
i.length-1),g=decodeURIComponent(f.substring(f.lastIndexOf("/")+1)),f=f.substring(0,f.lastIndexOf("/")+1);return c(d,"createFolder",[f,g]).then(function(){},function(){}).then(function(){return c(b,"fetchChildren",[a]).then(function(a){for(var c=[],f=0;f<a.length;++f){var g=a[f].Location,h=g;a[f].Directory&&(h=g.substring(0,g.length-1));h=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=i+encodeURIComponent(h);a[f].Directory&&(h+="/");c[f]=e(b,g,d,h)}return j.all(c)})})}function f(b,a){function d(a){var d=
new j;d.reject(h["No Matching FileService for location:"]+a);return d}var c=b.getServiceReferences("orion.core.file"),e=c;if(a)for(var e=[],f=0;f<c.length;++f)a(c[f])&&e.push(c[f]);for(var m=[],o=[],s=[],p=[],n={fetchChildren:function(){var a=new j;a.resolve(p);return a},createWorkspace:function(){var a=new j;a.reject(h["no file service"]);return a},loadWorkspaces:function(){var a=new j;a.reject(h["no file service"]);return a},loadWorkspace:function(){var a=new j;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:h["File Servers"],Location:"/",Children:p,ChildrenLocation:"/"})},100);return a},search:d,createProject:d,createFolder:d,createFile:d,deleteFile:d,moveFile:d,copyFile:d,read:d,write:d},c=0;c<e.length;++c)p[c]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[c].getProperty("top"),ChildrenLocation:e[c].getProperty("top"),Name:e[c].getProperty("Name")},f=e[c].getProperty("pattern")||".*",f[0]!=="^"&&(f="^"+f),m[c]=RegExp(f),o[c]=b.getService(e[c]),s[c]=e[c].getProperty("Name"),
e[c].getProperty("NameKey")&&e[c].getProperty("nls")&&g.getMessageBundle(e[c].getProperty("nls")).then(function(a,d){p[a].Name=d[e[a].getProperty("NameKey")];s[a]=d[e[a].getProperty("NameKey")]}.bind(this,c));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return o[0]?0:-1;for(var d=0;d<m.length;++d)if(m[d].test(a))return d;throw h["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?n:o[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?n.Name:s[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?n.Location:p[a].Location}}f.prototype={getService:function(b){return this._getService(b)},fileServiceName:function(b){return this._getServiceName(b)},fileServiceRootURL:function(b){return this._getServiceRootURL(b)},fetchChildren:function(b){return c(this._getService(b),"fetchChildren",arguments)},createWorkspace:function(b){return c(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return c(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return c(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,a,d,e){return c(this._getService(b),"createProject",arguments)},createFolder:function(b,a){return c(this._getService(b),"createFolder",arguments)},createFile:function(b,a){return c(this._getService(b),"createFile",arguments)},deleteFile:function(b){return c(this._getService(b),"deleteFile",arguments)},
moveFile:function(b,a,d){var i=this._getService(b),f=this._getService(a);if(i===f)return c(i,"moveFile",arguments);var g=b[b.length-1]==="/",h=a;h[h.length-1]!=="/"&&(h+="/");if(d)h+=encodeURIComponent(d);else{var j=b;g&&(j=j.substring(0,j.length-1));h+=j.substring(j.lastIndexOf("/")+1)}g&&h[h.length-1]!=="/"&&(h+="/");return e(i,b,f,h).then(function(){return c(i,"deleteFile",[b])})},copyFile:function(b,a,d){var i=this._getService(b),f=this._getService(a);if(i===f)return c(i,"copyFile",arguments);
var g=b[b.length-1]==="/",h=a;h[h.length-1]!=="/"&&(h+="/");if(d)h+=encodeURIComponent(d);else{var j=b;g&&(j=j.substring(0,j.length-1));h+=j.substring(j.lastIndexOf("/")+1)}g&&h[h.length-1]!=="/"&&(h+="/");return e(i,b,f,h)},read:function(b,a){return c(this._getService(b),"read",arguments)},write:function(b,a,d){return c(this._getService(b),"write",arguments)},remoteImport:function(b,a){return c(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,a){return c(this._getService(b),
"remoteExport",arguments)},search:function(b){return c(this._getService(b.resource),"search",arguments)}};f.prototype.constructor=f;return{FileClient:f}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html,orion/widgets/input/DropDownMenu,orion/widgets/input/GroupedContent,orion/util,orion/customGlobalCommands,orion/fileClient".split(","),function(h,
j,g,c,e,f,b,a,d,i,k,l,m,o,s,p,n,q,t,w,r,z,x,y,G,F,E,u,A,v,B,D){function C(a,d){if(a.getLabel)return a.getLabel();else{var b=new r;b.resolve(d.properties.name);return b}}function H(a){l.node("progressPane").setAttribute("aria-label",h["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function R(a,d){var b=a.getServiceReferences("orion.core.auth");V=[];for(var c=L.createMenuGenerator.apply(this,arguments),e=0;e<b.length;e++){var i=
b[e],f=a.getService(i);C(f,i).then(function(a){f.getKey().then(function(d){V.push(d);f.getUser().then(function(b){c.addUserItem(d,f,a,b)},function(b,e){c.addUserItem(d,f,a,e)});window.addEventListener("storage",function(){T[d]!==localStorage.getItem(d)&&(T[d]=localStorage.getItem(d),f.getUser().then(function(b){c.addUserItem(d,f,a,b)},function(){c.addUserItem(d,f,a)}))},!1)})})}}function K(a){return a}function I(d,b,c,e,i){function g(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var d=new f.CommandInvocation(b,
b,null,a,e);return(new r).resolve([a,d])}else if(typeof i==="function")return l||(l=i()),r.when(l,function(d){if(d&&b===U&&(!a.visibleWhen||a.visibleWhen(d)))return d=new f.CommandInvocation(d,d,null,a,e),[a,d]});return(new r).resolve()}var h=arguments,k,l,j=d&&d.getServiceReferences("orion.page.link.related");j&&j.length!==0&&r.when(function(){if(k)return k;var a=d.getService("orion.core.contentTypeRegistry");a||(a=new p.ContentTypeRegistry(d),a=d.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return k=
a})}(),function(){if(L.beforeGenerateRelatedLinks.apply(this,h)){for(var b=[],i=0;i<j.length;i++){var l={},m,o=j[i].getPropertyKeys();for(m=0;m<o.length;m++)l[o[m]]=j[i].getProperty(o[m]);if(l.id&&(m=m=null,c.indexOf(l.id)<0))if((l.nls&&l.nameKey||l.name)&&l.uriTemplate)m=a._createCommandOptions(l,j[i],d,k,!0),b.push(m);else if(m=e.findCommand(l.id))b.push((new r).resolve(m));else{var t=d.getServiceReferences("orion.navigate.command");for(m=0;m<t.length;m++)if(t[m].getProperty("id")===l.id){for(var l=
{},o=t[m].getPropertyKeys(),C=0;C<o.length;C++)l[o[C]]=t[m].getProperty(o[C]);m=a._createCommandOptions(l,t[m],d,k,!0);b.push(m);break}}}r.all(b,K).then(function(a){a=a.map(function(a){return a instanceof f.Command?a:new f.Command(a)}).sort(function(a,d){return a.name.localeCompare(d.name)});return r.all(a.map(g),K).then(function(a){a.forEach(function(a){a&&L.addRelatedLinkCommand(a[0],a[1])});L.afterGenerateRelatedLinks.apply(this,h)})})}})}function O(a){var d=l.node("globalActions");d&&(a.destroy(d),
a.renderCommands(d.id,d,{},{},"tool"))}function M(a){var d=window.getComputedStyle(a,null);return d===null?a:d.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:M(a.parentNode)}function Q(a){var d={},b=null;typeof a==="string"&&(a=l.node(a));a||(a=l.node("pageActions"));for(var c=a;c&&c.classList;){if(c.classList.contains("toolComposite")){b=c;break}c=c.parentNode}if(a.classList.contains("commandMarker"))d.commandNode=a;if(b&&(d.slideContainer=l.$(".slideParameters",b),
d.parameterArea=l.$(".parameters",b),d.dismissArea=l.$(".parametersDismiss",b),d.notifications=l.$("#notificationArea",b),b.parentNode&&(d.toolbarTarget=l.$(".toolbarTarget",b.parentNode),d.toolbarTarget)))a=l.bounds(d.toolbarTarget),c=l.bounds(M(d.toolbarTarget.parentNode)),d.toolbarTargetY=a.top-c.top,d.toolbar=b;return d}function N(a){if(a.toolbarTarget&&a.toolbarTargetY){var d=0,b;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(b=l.bounds(a.notifications),d+=b.height);
a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(b=l.bounds(a.slideContainer),d+=b.height);d>0&&(d+=8);d?(a.toolbarTarget.style.top=a.toolbarTargetY+d+"px",a.toolbar.style.paddingBottom=d+"px"):a.toolbarTarget.style.top=a.toolbar.style.paddingBottom=""}}var e=function(a){var d=document.createElement("a");d.href=a;return d.href}(j.toUrl("auth/NotifyAuthentication.html")),T={},L={createMenuGenerator:B.createMenuGenerator||function(a,d){if(l.node("userMenu")){var b=l.node("userDropdown"),
c=new o.Dropdown({dropdown:b}),b=new z.UserMenu({dropdownNode:b,dropdown:c,serviceRegistry:a}),c=l.node("userTrigger");new s.Tooltip({node:c,text:h.Options,position:["below","left"]});var c=document.getElementById("userTrigger"),e=c.className;e+=" imageSprite core-sprite-silhouette";c.className=e;b.setKeyAssist(d);return b}},beforeGenerateRelatedLinks:B.beforeGenerateRelatedLinks||function(){var a=l.node("relatedLinks");l.empty(a);return!0},addRelatedLinkCommand:B.addRelatedLinkCommand||function(a,
d){var b=l.node("relatedLinks");f.createCommandMenuItem(b,a,d).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:B.afterGenerateRelatedLinks||function(){},afterSetPageTarget:B.afterSetPageTarget||function(){},generateNavigationMenu:B.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new s.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new u("primaryNav","centralNavigation"),d=new A;a.addContent(d.getContentPane())},afterGenerateBanner:B.afterGenerateBanner||
function(){}},V=[],U,S=[],J,P=null;return{generateBanner:function(a,e,i,k,r,o,C,p){function s(){this.create();this._filterString=""}function z(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",d=l.$$array(".targetSelector"),b=0;b<d.length;b++)d[b].target=a}},{pid:"nav.config"})}(new t.ThemePreferences(k,new w.ThemeData)).apply();var n=l.node(a);if(!n)throw h["could not find banner parent, id was "]+
a;var q=document.createRange();q.selectNode(n);q=q.createContextualFragment(G);l.processTextNodes(q,h);n.firstChild?n.insertBefore(q,n.firstChild):n.appendChild(q);n=l.node("home");n.href=j.toUrl("edit/edit.html");n.setAttribute("aria-label",h["Orion Home"]);l.node("progressPane").src=j.toUrl("images/none.png");if(n=l.node("pageToolbar"))n.classList.add("toolbarLayout"),n.innerHTML=E+g.slideoutHTMLFragment("mainToolbar");(n=l.node("closeNotifications"))&&n.setAttribute("aria-label",h["Close notification"]);
if(v.isFirefox<=17&&(n=l.node("staticBanner")))n.style.width="100%",n.style.MozBoxSizing="border-box";if(n=l.node("footer"))n.innerHTML=F,l.processTextNodes(n,h);i.setParameterCollector(new b.CommandParameterCollector(Q,N));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&(a=e.getService("orion.page.message"))&&a.setProgressMessage("")},!1);L.generateNavigationMenu.apply(this,arguments);var u=l.node("navigationlinks");u&&x.createPageLinks(e,"orion.page.link").then(function(a){a.forEach(function(a){var d=
document.createElement("li");d.appendChild(a);u.appendChild(d)})});if(n=l.$(".split")){var q=l.$(".sidePanelLayout"),I=l.$(".mainPanelLayout");if(q&&I)P={side:q,main:I},P.splitter=new m.Splitter({node:n,sidePanel:q,mainPanel:I,toggle:!0,closeByDefault:p}),n=new f.Command({name:h["Toggle side panel"],tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){P.splitter.toggleSidePanel()}}),i.addCommand(n),i.registerCommandContribution("pageActions","orion.toggleSidePane",
1,null,!0,new c.KeyBinding("o",!0)),C&&P.splitter.addResizeListener(function(a){C&&a===I&&C.resize()})}var K=!1,B=function(a,d,b){if(!K){var d=d.getService("orion.page.progress"),c=new y.OpenResourceDialog({searcher:a,progress:d,searchRenderer:a.defaultRenderer,onHide:function(){K=!1;b&&b.focus()}});window.setTimeout(function(){K=!0;c.show()},0)}},n=new f.Command({name:h["Find File Named..."],tooltip:h["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){B(r,
e,C)}});i.addCommand(n);i.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new c.KeyBinding("f",!0,!0));n=new f.Command({name:h["Toggle banner and footer"],tooltip:h["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=l.node("banner"),d=l.node("footer"),b=l.$(".content-fixedHeight");a.style.visibility==="hidden"?(a.style.visibility="visible",d.style.visibility="visible",b.classList.remove("content-fixedHeight-maximized")):(a.style.visibility=
"hidden",d.style.visibility="hidden",b.classList.add("content-fixedHeight-maximized"));C&&C.resize();return!0}});i.addCommand(n);i.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new c.KeyBinding("m",!0,!0));n=new f.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return j.toUrl("help/about.html")}});i.addCommand(n);i.registerCommandContribution("globalActions","orion.configDetailsPage",
100,null,!0,new c.KeyBinding(112,!0,!0));n=new f.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return j.toUrl("operations/list.html")}});i.addCommand(n);i.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new c.KeyBinding("o",!0,!0));s.prototype={create:function(){var a=this._keyAssistDiv=document.createElement("div");a.id="keyAssist";a.style.display="none";a.classList.add("keyAssistFloat");
a.setAttribute("role","menu");var d=this._keyAssistInput=document.createElement("input");d.classList.add("keyAssistInput");d.type="text";d.placeholder=h["Filter bindings"];a.appendChild(d);var b=this._keyAssistContents=document.createElement("div");b.classList.add("keyAssistContents");if(v.isIOS||v.isAndroid)b.style.overflowY="auto";a.appendChild(b);var c=this._keyAssistTable=document.createElement("table");c.tabIndex=0;c.classList.add("keyAssistList");b.appendChild(c);document.body.appendChild(a);
d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));c.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));d.addEventListener("input",function(){this.filterChanged()}.bind(this));b.addEventListener(v.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&this.hide()}.bind(this));l.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){l.empty(this._keyAssistTable);
this._selectedIndex=-1;this._selectedRow=null;this._idCount=this._keyAssistContents.scrollTop=0;if(C&&C.getTextView&&C.getTextView()){var a=C.getTextView(),b=a.getActions(!0).filter(function(d){return(d=a.getActionDescription(d))&&d.name});b.sort(function(d,b){return a.getActionDescription(d).name.localeCompare(a.getActionDescription(b).name)});this.createHeader(h.Editor);for(var c=function(d){return function(){a.focus();return a.invokeAction(d)}},e={},f,g=0;g<b.length;g++)for(var k=b[g],j=a.getActionDescription(k),
m=a.getKeyBindings(k),r=0;r<m.length;r++){f=m[r];var o=d.getUserKeyString(f);f.scopeName?(e[f.scopeName]||(e[f.scopeName]=[]),e[f.scopeName].push({bindingString:o,name:j.name,execute:c(k)})):this.createItem(o,j.name,c(k))}for(var t in e)if(e[t].length){this.createHeader(t);for(b=0;b<e[t].length;b++)f=e[t][b],this.createItem(f.bindingString,f.name,f.execute)}}this.createHeader(h.Global);i.showKeyBindings(this)},createItem:function(a,d,b){if(this._filterString){var c=this._filterString.toLowerCase(),
e;c!==this._filterString?(c=this._filterString,e=function(a){return a}):e=function(a){return a.toLowerCase()};if(e(d).indexOf(c)===-1&&e(a).indexOf(c)===-1&&e(this._lastHeader).indexOf(c)===-1)return}var i=this._keyAssistTable.insertRow(-1);i.id="keyAssist-keyBinding-"+this._idCount++;i.setAttribute("role","menuitem");i._execute=b;i.classList.add("keyAssistItem");i.addEventListener("click",function(a){this._selectedRow=i;this.execute();a.preventDefault()}.bind(this));b=i.insertCell(-1);b.classList.add("keyAssistName");
b.appendChild(document.createTextNode(d));b=i.insertCell(-1);b.classList.add("keyAssistAccel");b.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var d=this._keyAssistTable.insertRow(-1);d.classList.add("keyAssistSection");var d=d.insertCell(-1),b=document.createElement("h2");b.appendChild(document.createTextNode(a));d.appendChild(b)},execute:function(){window.setTimeout(function(){this.hide();var a=this._selectedRow;this._selectedRow=null;a&&a._execute&&a._execute()}.bind(this),
0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var a=this._keyAssistInput.value;if(this._filterString!==a)this._filterString=a,this.createContents()}.bind(this),100)},hide:function(){if(this.isVisible()){var a=document.activeElement,d=this._keyAssistDiv,a=d===a||(d.compareDocumentPosition(a)&16)!==0;d.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();
this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},select:function(a){var d=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(d.length===0)this._selectedIndex=-1;else{var b=this._selectedIndex;b+=a?1:-1;b%=d.length;b<0&&(b=d.length-1);if(this._selectedIndex!==-1)a=d[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=b;if(this._selectedIndex!==-1){this._selectedRow=a=d[this._selectedIndex];
a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();var d=a.getBoundingClientRect(),c=this._keyAssistContents,e=c.getBoundingClientRect();a.offsetTop<c.scrollTop?b===0?c.scrollTop=0:a.scrollIntoView(!0):d.bottom>e.bottom&&a.scrollIntoView(!1)}}},show:function(){if(!this.isVisible())this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*
0.75)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),this._keyAssistInput.select()},_keyDown:function(a){if(a.keyCode===40)this.select(!0);else if(a.keyCode===38)this.select(!1);else if(a.keyCode===13)this.execute();else return;a.preventDefault()},_scrollWheel:function(a){var d=0,d=v.isIE||v.isOpera?-a.wheelDelta:v.isFirefox?a.detail*40:-a.wheelDeltaY,b=this._keyAssistContents,c=b.scrollTop;b.scrollTop+=d;if(c!==b.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var A=new s,D=new f.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){A.isVisible()?A.hide():A.show();return!0}});i.addCommand(D);i.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new c.KeyBinding(191,!1,!0));n=function(){C.getTextView().setKeyBinding(new c.KeyBinding(191,!1,!0,!v.isMac,v.isMac),D.id);C.getTextView().setAction(D.id,D.callback,D)};C&&C.getTextView&&
(C.getTextView()?n():C.addEventListener("TextViewInstalled",n));O(i);R(e,D.callback);H(e);window.addEventListener("hashchange",function(){i.processURL(window.location.href)},!1);window.setTimeout(function(){z(e)},0);L.afterGenerateBanner.apply(this,arguments)},getToolbarElements:Q,getMainSplitter:function(){return P},layoutToolbarElements:N,setPageTarget:function(a){var d,b,c=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&
!a.breadcrumbTarget&&(b=c?c+" ":"",b+=a.fileService.fileServiceName(a.target.Location),c=null),d=a.name||a.target.Name,U=a.target,I(e,a.target,S,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(c=c||a.task||a.name),d=a.name,I(e,{NoTarget:""},S,a.commandService,a.makeAlternate));(J=a.title)||(J=d?d+" - "+a.task:a.task);window.document.title=J;L.afterSetPageTarget.apply(this,arguments);if(d=l.node("location")){l.empty(d);var i=e&&new D.FileClient(e),e=a.breadcrumbTarget||a.target,i=i&&e&&e.Location?
i.fileServiceRootURL(e.Location):null;new k.BreadCrumbs({container:d,resource:e,rootSegmentName:c,workspaceRootSegmentName:b,workspaceRootURL:i,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(J)J.charAt(0)==="*"&&!a&&(J=J.substring(1)),a&&J.charAt(0)!=="*"&&(J="*"+J),window.document.title=J;var d=l.node("dirty");if(d)d.textContent=a?"*":""},setPageCommandExclusions:function(a){S=a},notifyAuthenticationSite:e}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(h){return{detectValidURL:function(j){for(var g=/\[([^\]]*)\]\(([^\)]+)\)/g,c=g.exec(j),e=[],f=0;c;){if(c.length===3&&c[2].length>0){var b=new URL(c[2]);b.protocol!==":"&&h.validateURLScheme(b.href)&&(c.index>f&&e.push({segmentStr:j.substring(f,c.index)}),e.push({segmentStr:c[1].length>0?c[1]:c[2],urlStr:c[2]}),f=c.index+c[0].length)}c=g.exec(j)}if(f===0)return null;f<j.length-1&&e.push({segmentStr:j.substring(f)});return e},processURLSegments:function(h,
g){g.forEach(function(c){if(c.urlStr){var e=document.createElement("a");e.href=c.urlStr;e.appendChild(document.createTextNode(c.segmentStr))}else e=document.createElement("span"),e.textContent=c.segmentStr;h.appendChild(e)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(h,j,g,c){function e(b,a,d,c,e){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=a;this.notificationContainerDomId=e;this.domId=d;this.progressDomId=c||d;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var f;e.prototype={_init:function(){var b=j.node("closeNotifications");if(b&&
!this._hookedClose){b.style.cursor="pointer";this._hookedClose=!0;var a=j.node(this.notificationContainerDomId);j.addAutoDismiss([a],function(){this._clickToDisMiss&&this.close()}.bind(this));b.addEventListener("click",function(){this.close()}.bind(this));a.addEventListener("click",function(d){d&&d.target&&d.target.nodeName.toLowerCase()==="a"&&(d=j.$$("a",a))&&d.length&&d.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);this.setProgressMessage("");var b=j.node("closeNotifications");
if(this._cancelMsg&&this._cancelFunc&&b)b.innerHTML="",b.classList.remove("cancelButton"),b.classList.add("dismissButton"),b.classList.add("core-sprite-close"),b.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=g.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,a,d){this._init();this.currentMessage=b;var c=j.node(this.domId);if(typeof d==="boolean"){var e=
c.getAttribute("aria-live");c.setAttribute("aria-live",d?"polite":"off");window.setTimeout(function(){b===this.currentMessage&&(j.empty(c),c.appendChild(document.createTextNode(b)),window.setTimeout(function(){c.setAttribute("aria-live",e)},100))}.bind(this),100)}else j.empty(c),c.appendChild(document.createTextNode(b));typeof a==="number"&&window.setTimeout(function(){b===this.currentMessage&&(j.empty(c),c.appendChild(document.createTextNode("")))}.bind(this),a)},setErrorMessage:function(b){this._clickToDisMiss=
!0;this.currentMessage=b;this._init();var a=b.responseText||b.message||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(d){}var b=a.Message||a,c="red";if(a.Severity)switch(a.Severity){case "Warning":c="#FFCC00";break;case "Error":c="red";break;case "Info":case "Ok":c="green"}a=document.createElement("span");a.style.color=c;a.appendChild(document.createTextNode(b));b=j.node(this.domId);j.empty(b);b.appendChild(a)},setProgressMessage:function(b){this._clickToDisMiss=!1;this._init();this.currentMessage=
b;var a=document.createElement("span");a.classList.add("imageSprite");a.classList.add("progressIcon");a.classList.add("core-sprite-progress");var d=j.node(this.progressDomId);j.empty(d);d.appendChild(a);d.appendChild(document.createTextNode(b));a=j.node(this.notificationContainerDomId);a.classList.remove("notificationHide");if(b&&b.length>0)a.classList.add("progressNormal"),a.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();
else a.classList.remove("notificationShow"),a.classList.add("notificationHide")},setCancelFunction:function(b){this._cancelFunc=b},setProgressResult:function(b,a){this._clickToDisMiss=!1;this._cancelMsg=a;this.currentMessage=b;var d=b.responseText||b;if(typeof d==="string")try{d=JSON.parse(d)}catch(e){}this._init();var f=d.Message||d.toString(),g=h.UnknownError,m="core-sprite-information",o="progressNormal",s=document.createElement("span");s.classList.add("imageSprite");s.classList.add("progressIcon");
var p=[];if(d.Severity)switch(d.Severity){case "Warning":g=h.UnknownWarning;m="core-sprite-warning";o="progressWarning";p.push("progressInfo");p.push("progressError");p.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":m="core-sprite-error";o="progressError";p.push("progressWarning");p.push("progressInfo");p.push("progressNormal");this._clickToDisMiss=!0;break;default:o="progressNormal",p.push("progressWarning"),p.push("progressError"),p.push("progressNormal")}p.push("notificationHide");
s.classList.add(m);var n=j.node(this.progressDomId),m=j.node(this.notificationContainerDomId);j.empty(n);n.appendChild(s);f===Object.prototype.toString()&&(f=g);if(d.HTML)d=document.createElement("span"),d.innerHTML=f,n.appendChild(d);else{if(g=c.detectValidURL(f))f=document.createDocumentFragment(),c.processURLSegments(f,g),Array.prototype.forEach.call(j.$$("a",f),function(a){a.target="_blank"});else{if(d.Severity!=="Warning"&&d.Severity!=="Error"&&!a)this._timer&&window.clearTimeout(this._timer),
this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3);f=document.createTextNode(f)}n.appendChild(f)}if(o&&this.progressDomId!==this.domId){m.classList.add(o);for(o=0;o<p.length;o++)m.classList.remove(p[o])}m.classList.add("notificationShow");if((p=j.node("closeNotifications"))&&this._cancelMsg)p.classList.add("cancelButton"),p.classList.remove("dismissButton"),p.classList.remove("core-sprite-close"),p.classList.remove("imageSprite"),p.innerHTML=this._cancelMsg},
showWhile:function(b,a){var d=this;if(a){d.setProgressMessage(a);var c=function(){a===d.currentMessage&&d.setProgressMessage("")};b.then(c,c)}return b},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,a){return new f(this,++this._lastProgressId,b,a)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",a=!0,d;for(d in this._progressMonitors)this._progressMonitors[d].status&&(a||(b+=", "),b+=this._progressMonitors[d].status,a=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},
_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};e.prototype.constructor=e;f=function(b,a,d,c){this.statusService=b;this.progressId=
a;if(d){this.deferred=d;this.begin(c);var e=this;d.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}};f.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};f.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};f.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};f.prototype.constructor=f;return{StatusReportingService:e,ProgressMonitor:f}});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,j,g,c){function e(){}e.prototype={_initialize:function(e,b,a,d,i){this._tooltip=new c.Tooltip({node:e,hideDelay:i||0,afterShowing:this._afterShowingFunction(b).bind(this),afterHiding:a,trigger:d?d:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";e=document.createRange();e.selectNode(this.$parent);e=e.createContextualFragment(this.TEMPLATE);
this.messages&&g.processTextNodes(e,h);this.$parent.appendChild(e);var k=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&k.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var a=c.childNodes[b];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var b=
g.firstTabbable(this.$parent);b&&b.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};e.prototype.constructor=e;return{PopupDialog:e}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,j,g,c){var e={};(function(){var f=!1;e.updateNavTools=function(b,a,d,c,e,l){var j=g.node(c);if(j)a.destroy(j);else throw h["could not find toolbar "]+c;a.renderCommands(c,j,l,d,"button");if(e&&(c=g.node(e)))a.destroy(c),a.renderCommands(e,c,null,d,"button");f||(f=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",function(b){var c=g.node(e);
c&&(a.destroy(c),a.renderCommands(e,c,b.selections,d,"button"))}))};e.createOperationsCommands=function(b,a,d){function e(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new c.Command({name:h["Remove Completed"],tooltip:h["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){d.removeCompletedOperations().then(function(){a.loadOperations.bind(a)()})},visibleWhen:function(){return!0}});b.addCommand(f);
f=new c.Command({name:h.Remove,tooltip:h["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],c=0;c<b.length;c++){var e=b[c];d.removeOperation.bind(d)(e.Location).then(function(){a.loadOperations.bind(a)()},function(){a.loadOperations.bind(a)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!e(a);for(var d in a)if(e(a[d]))return!1;return!0}});b.addCommand(f);
f=new c.Command({name:h.Cancel,tooltip:h["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],d=0;d<a.length;d++){var b=a[d];b.deferred&&b.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return e(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var d in a)if(!e(a[d])||!a[d].operation||!a[d].operation.cancelable)return!1;return!0}});b.addCommand(f)}})();
return e});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,j,g,c,e){function f(b){this._options=b}f.prototype=new c.PopupDialog;f.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink" class="navlinkonpage">All Operations</a></td></tr></table><div id="operationsExist"><div style="padding-left: 7px" id="myOperationsListEmpty">No operations running on this page.</div><table id="myOperationsList" style="display: none;"></table></div><div style="padding-left: 7px" id="operationsDontExist">No operations running.</div>';f.prototype._init=
function(b){this._myOperations=[];this._operationsDeferreds=[];this._commandService=b.commandRegistry;e.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(b.triggerNode)};f.prototype._bindToDom=function(){this.$allOperationsLink.href=j.toUrl("operations/list.html");this._setOperationsVisibility()};f.prototype.setOperations=function(b,a){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(b)for(var d in b)this._myOperations.push(b[d]),this._operationsDeferreds.push(a[d]);this._renderOperations()};f.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(a){}var d={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==d.Message)d.DetailedMessage=b.DetailedMessage;return d};f.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};f.prototype._renderOperationsTable=function(b,a,d){g.empty(b);for(var c=0;c<a.length;c++){var e=a[c],f=document.createElement("tr"),j=document.createElement("td");j.style.paddingLeft="5px";j.style.paddingRight="5px";j.textContent=e.Name;f.appendChild(j);var o=document.createElement("div");j.appendChild(o);j=document.createElement("span");j.style.paddingRight="5px";j.classList.add("imageSprite");switch(e.type){case "Warning":j.classList.add("core-sprite-warning");j.setAttribute("aria-label",
h["Operation resulted in a warning."]);break;case "error":j.classList.add("core-sprite-error");j.setAttribute("aria-label",h["Operation resulted in an error."]);break;case "loadstart":case "progress":j.classList.add("core-sprite-start");j.setAttribute("aria-label",h["Operation is running."]);break;case "abort":j.classList.add("core-sprite-stop");j.setAttribute("aria-label",h["Operation is canceled."]);break;case "load":case "loadend":j.classList.add("core-sprite-ok"),j.setAttribute("aria-label","Operation ok.")}o.appendChild(j);
j=document.createElement("span");j.classList.add("operationStatus");j.textContent=e.Name;o.appendChild(j);if(e.error){var s=e.error.Message||e.error;e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(s+=": "+e.error.DetailedMessage);j.textContent=s;j.classList.remove("operationStatus");j.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",o,{operation:e,deferred:d[c]},this,"tool");b.appendChild(f)}this._setOperationsVisibility()};f.prototype._setOperationsVisibility=
function(){this.$myOperationsList.style.display=this._myOperations.length>0?"":"none";this.$myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.$operationsDontExist.style.display=this._myOperations.length>0?"none":"";this.$operationsExist.style.display=this._myOperations.length>0?"":"none"};f.prototype.constructor=f;return{OperationsDialog:f}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(h,j,g,c,e){function f(a,d){if(!this._progressPane){this._progressPane=c.node(a);this._operationsDialog=new e.OperationsDialog({triggerNode:this._progressPane,commandRegistry:d});var b=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===c.KEY.ENTER)&&b._operationsDialog.show()})}}function b(a,d,b,c){this._serviceRegistry=
a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._commandRegistry=b;this._operationsClient=d;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=c}f.prototype={_switchIconTo:function(a){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=a;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(a,d){var b=
{},c;for(c in a)a[c].progressMonitor||(b[c]=a[c]);if(this._isEmpty(b))this._switchIconTo("progressPane_empty"),this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(c in b){var f=b[c];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=h["Operations running"];this._progressPane.alt=h["Operations running"];
this._progressPane.setAttribute("aria-valuetext",h["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=h["Some operations finished with warning"];this._progressPane.alt=h["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=h["Some operations finished with error"];this._progressPane.alt=
h["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(b,d)},_isEmpty:function(a){for(var d in a)return!1;return!0}};
f.prototype.constructon=f;b.prototype={init:function(a){if(!this._progressMonitorClass)this._progressMonitorTool=new f(a,this._commandRegistry)},progress:function(a,d,b){var c=this,e=this._operationsIndex++;!b&&this._progressMonitorClass&&(b=new this._progressMonitorClass,b.begin(d));a.then(function(){if(c._operations[e]){var f=c._operations[e];if(d)f.Name=d;c._lastOperation=f;f.type="loadend";if(b)f.progressMonitor=b;c.writeOperation.bind(c)(e,f,a);f.Location||c._removeOperationFromTheList.bind(c)(e)}},
function(f){if(c._operations[e]){var g=c._operations[e];if(d)g.Name=d;if(b)g.progressMonitor=b;c._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;c.writeOperation.bind(c)(e,g,a);g.Location||c._removeOperationFromTheList.bind(c)(e)}},function(f){if(d)f.Name=d;if(b)f.progressMonitor=b;c.writeOperation.bind(c)(e,f,a)});return a},removeOperation:function(a){for(var d in this._operations)if(this._operations[d].Location&&this._operations[d].Location===a){this._removeOperationFromTheList(d);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(a)},_removeOperationFromTheList:function(a){var d=this._operations[a].progressMonitor;delete this._operations[a];delete this._operationDeferrds[a];d?d.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var a in this._operations){var d=this._operations[a];if(d.type&&d.type!=="loadstart"&&d.type!=="progress")(d=this._operations[a].progressMonitor)&&
d.done(),delete this._operations[a],delete this._operationDeferrds[a]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(a,d){d&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(d);var b=this;a.then(function(){b._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){b.setProgressResult.bind(b)(a);
return a});return this.progress(a,d)},writeOperation:function(a,d,b){this._operations[a]=d;this._operationDeferrds[a]=b;d.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(a){a.put(d.Location,{Name:d.Name,expires:d.expires})});d.progressMonitor?d.progressMonitor.progress(d.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};b.prototype.constructor=b;return{ProgressService:b}});
define("orion/profile/usersClient",[],function(){function h(h){this.serviceRegistry=h}h.prototype={getUserInfo:function(h,g){return this._doServiceCall("getUserInfo",arguments)},getUsersListSubset:function(h,g,c){return this._doServiceCall("getUsersListSubset",arguments)},getUsersList:function(h){return this._doServiceCall("getUsersList",arguments)},deleteUser:function(h,g){return this._doServiceCall("deleteUser",arguments)},createUser:function(h,g,c){return this._doServiceCall("createUser",arguments)},
updateUserInfo:function(h,g,c){return this._doServiceCall("updateUserInfo",arguments)},resetUserPassword:function(h,g,c){return this._doServiceCall("resetUserPassword",arguments)},initProfile:function(h,g,c){return this._doServiceCall("initProfile",arguments)},fire:function(h,g,c){return this._doServiceCall("fire",arguments)},getDivContent:function(){return this._doServiceCall("getDivContent",arguments)},_doServiceCall:function(h,g){var c=this.serviceRegistry.getService("orion.core.user");return c[h].apply(c,
g)}};h.prototype.constructor=h;return{UsersClient:h}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,j){function g(b,a,d){return b[a].apply(b,d)}function c(b){this._location=b}function e(){var b=new j;b.reject(h["No Matching OperationService for location:"]+this._location);return b}function f(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var a=b.getServiceReferences("orion.core.operation"),
d=0;d<a.length;d++){var e=b.getService(a[d]);this._services[d]=e;e=a[d].getProperty("pattern")||".*";e[0]!=="^"&&(e="^"+e);this._patterns[d]=RegExp(e)}this._getService=function(a){if(!a)return this._services[0];for(var d=0;d<this._patterns.length;++d)if(this._patterns[d].test(a))return this._services[d];this._operations.remove(a);return new c(a)}}c.prototype={getOperation:e,getOperations:e,removeCompletedOperations:e,removeOperation:e,cancelOperation:e};c.prototype.constructor=c;f.prototype={getOperations:function(){var b=
new j;if(this._operations)return b.resolve(this._operations),b;var a=this;this._preferenceService.getPreferences("/operations").then(function(d){a._operations=d;b.resolve(a._operations)});return b},getOperation:function(b){return g(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],a=this,d=0;d<this._services.length;d++){var c=this._patterns[d],e=new j;b[d]=e.promise;g(this._services[d],"removeCompletedOperations").then(function(d){return function(b){Array.isArray(b)&&
a.getOperations.bind(a)().then(function(a){for(var e=a.keys(),f=0;f<e.length;f++){var g=e[f];c.test(g)&&b.indexOf(g)<0&&a.remove(g)}d.resolve()})}}(e),function(a){return function(d){a.reject(d)}}(e))}return j.all(b)},removeOperation:function(b){var a=this;return g(this._getService(b),"removeOperation",arguments).then(function(){a.getOperations.bind(a)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};f.prototype.constructor=f;return{OperationsClient:f}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All","Search ${0}":"Search ${0}",
"Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results",
"Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.","Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",Save:"Save","Type a name for the search":"Type a name for the search",
"Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search","Open in Search page for this directory":"Open in Search page for this directory","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term","${0} matches":"${0} matches","Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.",
"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>."});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(h,j){var g={root:j};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,j){function g(c){this._init(c)}g.prototype={_init:function(c){var e=c.parent,f=this,e=j.node(e);if(!e)throw h["no parent"];if(!c.model)throw h["no tree model"];if(!c.renderer)throw h["no renderer"];this._parent=e;this._treeModel=c.model;this._renderer=c.renderer;this._showRoot=c.showRoot===void 0?!1:c.showRoot;this._indent=c.indent===void 0?16:c.indent;this._onCollapse=c.onCollapse;this._labelColumnIndex=
c.labelColumnIndex===void 0?0:c.labelColumnIndex;this._id=c.id===void 0?"treetable":c.id;this._tableStyle=c.tableStyle;this._tableElement=c.tableElement||"table";this._tableBodyElement=c.tableBodyElement||"tbody";this._tableRowElement=c.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){f._showRoot?(b._depth=0,f._generate([b],0)):f._treeModel.getChildren(b,function(a){f.destroyed||f._generate(a,0)})})},destroy:function(){this.destroyed=!0},_generate:function(c,e){j.empty(this._parent);
var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var b=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(b);b.id=this._id;this._tableStyle&&b.classList.add(this._tableStyle);this._renderer.initTable(b,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";c.length===
0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(c,e);b.appendChild(this._bodyElement);f.appendChild(b);this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(c,e,f){for(var b=0;b<c.length;b++){var a=document.createElement(this._tableRowElement);a.id=this._treeModel.getId(c[b]);this._renderer.rowCallback&&this._renderer.rowCallback(a);a._depth=e;a._item=c[b];this._renderer.render(c[b],a);a.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*e+"px";f?(this._bodyElement.insertBefore(a,f.nextSibling),f&&(f=a)):this._bodyElement.appendChild(a)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(c,e,f){var b=this._treeModel.getId(c),a;if(b===this._id)this._removeChildRows(b),this._generateChildren(e,0),this._rowsChanged();else{var d=j.node(b);d?(d._item=c,d&&(f||d._expanded)?(this._removeChildRows(b),this._renderer.updateExpandVisuals(d,
!0),e?(d._expanded=!0,this._generateChildren(e,d._depth+1,d),this._rowsChanged()):(a=this,e=this._treeModel.getChildren(d._item,function(b){if(!a.destroyed&&!d._expanded)d._expanded=!0,a._generateChildren(b,d._depth+1,d),a._rowsChanged()}))):this._renderer.updateExpandVisuals(d,!1)):console.log(h["could not find table row "]+b)}},getItem:function(c){var e=j.node(c);return e&&e._item?e._item:c},toggle:function(c){var e=j.node(c);e&&(e._expanded?(this.collapse(c),this._renderer.updateExpandVisuals(e,
!1)):(this.expand(c),this._renderer.updateExpandVisuals(e,!0)))},isExpanded:function(c){c=typeof c==="string"?c:this._treeModel.getId(c);return(c=j.node(c))?c._expanded:!1},expand:function(c,e,f){var c=typeof c==="string"?c:this._treeModel.getId(c),b=j.node(c);if(b&&!b._expanded){var a=this;this._renderer.updateExpandVisuals(b,!0);this._treeModel.getChildren(b._item,function(d){if(!a.destroyed){if(!b._expanded)b._expanded=!0,a._generateChildren(d,b._depth+1,b),a._rowsChanged();e&&e.apply(a,f)}})}},
_removeChildRows:function(c){for(var e=c===this._id,f=!1,b=-1,a=[],d=j.$$array(".treeTableRow",this._parent),i=0;i<d.length;i++){var g=d[i];if(f)break;if(e)g._depth>b?a.push(g):f=!0;else if(g.id===c)e=!0,b=g._depth}for(c=0;c<a.length;c++)e=a[c],e.parentNode.removeChild(e)},collapse:function(c){var c=typeof c==="string"?c:this._treeModel.getId(c),e=j.node(c);if(e){if(!e._expanded)return;e._expanded=!1;this._renderer.updateExpandVisuals(e,!1);this._removeChildRows(c);this._rowsChanged()}this._onCollapse&&
this._onCollapse(e._item)}};g.prototype.constructor=g;return{TableTree:g}});
define("orion/treeModelIterator",[],function(){var h={};h.TreeModelIterator=function(){function h(g,c){this.firstLevelChildren=g;this.reset();this._init(c)}h.prototype={_init:function(g){if(g)this.isExpanded=g.isExpanded,this.isExpandable=g.isExpandable,this.forceExpandFunc=g.forceExpandFunc,this.getChildrenFunc=g.getChildrenFunc},topLevel:function(g){return g.parent?g.parent===this.root:!0},_getChildren:function(g){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(g):g?g.children:
null},_expanded:function(g){if(!g)return!0;var c=this._getChildren(g),c=c&&c.length>0;this.isExpanded&&c&&(c=this.isExpanded(g));return c},_expandable:function(g){return!g?!0:this.isExpandable?this.isExpandable(g):!1},_diveIn:function(g){return this._expanded(g)?(this.setCursor(this._getChildren(g)[0]),this.cursor()):null},_drillToLast:function(g){return this._expanded(g)?(g=this._getChildren(g),this._drillToLast(g[g.length-1])):g},_forward:function(g){if(!this._cursor)return null;var c=this._diveIn(this._cursor);
if(!c){if(g&&this._expandable(this._cursor)&&this.forceExpandFunc){var e=this;return this.forceExpandFunc(this._cursor,"first",function(c){c&&e.setCursor(c)})}(c=this._findSibling(this._cursor,!0))&&this.setCursor(c)}return c},_backward:function(g){if(!this._cursor)return null;var c=this._findSibling(this._cursor,!1);c&&c!==this._cursor.parent&&(c=this._drillToLast(c));if(g&&c&&this._expandable(c)&&this.forceExpandFunc&&c!==this._cursor.parent){var e=this;return this.forceExpandFunc(c,"last",function(c){c&&
e.setCursor(c)})}c&&this.setCursor(c);return c},_findSibling:function(g,c){for(var e=this.topLevel(g),f=this._getChildren(g.parent),f=e?this.firstLevelChildren:f,b=0;b<f.length;b++)if(f[b]===g)return b===0&&!c?e?null:g.parent:b===f.length-1&&c?e?null:this._findSibling(g.parent,c):c?f[b+1]:f[b-1];return null},_inParentChain:function(g,c){for(var e=g.parent;e;){if(e===c)return!0;e=e.parent}return!1},_getTopLevelParent:function(g){if(this.topLevel(g))return g;for(g=g.parent;g;){if(this.topLevel(g))return g;
g=g.parent}return null},_onCollapse:function(g){return this._expanded(g.parent)?g:this._onCollapse(g.parent)},_scan:function(g,c,e){this.setCursor(c);var f=[];for(f.push(c);;){if(this.iterate(g))f.push(this.cursor());else break;if(e===this.cursor())return f}return null},setCursor:function(g){this._prevCursor=this._cursor;this._cursor=g},setTree:function(g){this.firstLevelChildren=g;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(g,c){var e=this.cursor(),
f=this._scan(!0,g,c);f||(f=this._scan(!1,g,c));this.setCursor(e);return f},iterate:function(g,c){return g?this._forward(c):this._backward(c)},iterateOnTop:function(g,c){var e=this._findSibling(this._getTopLevelParent(this.cursor()),g);e?this.setCursor(e):c&&this.firstLevelChildren.length>0&&this.setCursor(g?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(g){if(!this._cursor)return null;return this._inParentChain(this._cursor,g)?(this.setCursor(g),
this._cursor):null},reset:function(){this.root=this._prevCursor=this._cursor=null;if(this.firstLevelChildren.length>0)this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent},cursorMoved:function(){return this._cursor!==this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return h}();return h});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(h,j,g,c){var h={},e=navigator.userAgent.indexOf("iPad")!==-1,f=window.navigator.platform.indexOf("Mac")!==-1;h.ExplorerNavHandler=function(){function b(a,d,b){this.explorer=a;this.model=this.explorer.model;this._navDict=d;this._listeners=[];this._selections=[];this._currentColumn=0;a=this._getEventListeningDiv();a.tabIndex=0;a.classList.add("selectionModelContainer");
var e=this;this._modelIterator=new g.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:b.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return e.explorer.renderer.isExpandable(a)}:function(a){return e.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,d,b){return e.explorer.forceExpandFunc(a,d,b)}:void 0});this._init(b);(!b||b.setFocus!==!1)&&a.focus();b=function(a){if(c.isFormElement(a.target))return!0;if(e.explorer.preventDefaultFunc&&
e.explorer.preventDefaultFunc(a,e._modelIterator.cursor()))return!0;if(a.keyCode===j.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===j.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===j.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===j.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===j.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===j.KEY.ENTER)return e.onEnter(a)};a.addEventListener("keydown",b,!1);this._listeners.push({type:"keydown",listener:b});b=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);
else e.toggleCursor(null,!1)};a.addEventListener("blur",b,!1);this._listeners.push({type:"blur",listener:b});b=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};a.addEventListener("focus",b,!1);this._listeners.push({type:"focus",listener:b});this._parentDiv=a}b.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(a){this._linearGridMove=!1;if(a)this._selectionPolicy=a.selectionPolicy,this.gridClickSelectionPolicy=
a.gridClickSelectionPolicy||"none",this.preventDefaultFunc=a.preventDefaultFunc,this.postDefaultFunc=a.postDefaultFunc},_ctrlKeyOn:function(a){return f?a.metaKey:a.ctrlKey},removeListeners:function(){if(this._listeners)for(var a=0;a<this._listeners.length;a++)this._parentDiv.removeEventListener(this._listeners[a].type,this._listeners[a].listener,!1)},focus:function(){var a=this._getEventListeningDiv();a&&a.focus()},_getEventListeningDiv:function(a){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv===
"function"?this.explorer.keyEventListeningDiv(a):j.node(this.explorer._parentId)},isExpandable:function(a){return!a?!1:j.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)))?!0:!1},isExpanded:function(a){return!a?!1:this.explorer.myTree.isExpanded(this.model.getId(a))},refreshSelection:function(a){var d=this;this.explorer.selection&&this.explorer.selection.getSelections(function(b){d._clearSelection();for(var c=0;c<b.length;c++)d._selections.push(b[c]);d._selections.length>0?d.cursorOn(d._selections[0],
!0,!1,a):d.cursorOn();if(!(d._shiftSelectionAnchor&&d._inSelection(d._shiftSelectionAnchor)>=0))d._shiftSelectionAnchor=null})},refreshModel:function(a,d,b,c){this._currentColumn=0;this.topIterationNodes=[];this.model=d;this._navDict=a;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(b)this.topIterationNodes=b;this._modelIterator.setTree(this.topIterationNodes);!c&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),!1),this._modelIterator.reset());
this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(a){for(var a=this.model.getId(a),d=0;d<this._selections.length;d++)if(a===this.model.getId(this._selections[d]))return d;return-1},_clearSelection:function(a){if(a)for(a=0;a<this._selections.length;a++)this._checkRow(this._selections[a],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(a){if(this._selectionPolicy!==
a)this._selectionPolicy=a,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(a,d,b){if(this._selectionPolicy==="cursorOnly")d&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(a,!0);else if(this._isRowSelectable(a)){!d||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(a,!1),this._selections.push(a),this._lastSelection=a):(d=this._inSelection(a),d>=0?(this._checkRow(a,!0),this._selections.splice(d,1)):(this._checkRow(a,
!1),this._selections.push(a),this._lastSelection=a));if(b)this._shiftSelectionAnchor=this._lastSelection;this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(a,d){a||(a=this.currentModel());var b=this._getGridChildren(a);if(b&&b.length>1||d===0&&b){d!==0&&this.toggleCursor(a,!1);var c=this._currentColumn,e=!0;c+=d;c<0?(this._linearGridMove&&d!==0&&(this._modelIterator.iterate(!1)?a=this.currentModel():e=!1),
c=e?b.length-1:this._currentColumn):c>=b.length&&(this._linearGridMove&&d!==0&&(this._modelIterator.iterate(!0)?a=this.currentModel():e=!1),c=e?0:this._currentColumn);this._currentColumn=c;d!==0&&this.toggleCursor(a,!0);return!0}return!1},_getGridChildren:function(a){return this._navDict?this._navDict.getGridNavHolder(a):null},getCurrentGrid:function(a){a||(a=this.currentModel());return(a=this._getGridChildren(a))&&a.length>0?a[this._currentColumn]:null},getAriaContainerElement:function(a){for(var d=
this._parentDiv,b;a&&a!==d&&(b=a.getAttribute("role"))!=="grid"&&b!=="tree"&&b!=="treegrid";)a=a.parentNode;return a===d?null:a},toggleCursor:function(a,d){var b=this.getRowDiv(a),c=this.getCurrentGrid(a);c?(b&&(d?b.classList.add("treeIterationCursorRow"):b.classList.remove("treeIterationCursorRow")),c.domNode&&(b=this.getAriaContainerElement(c.domNode),d?(c.domNode.classList.add("treeIterationCursor"),b&&b.setAttribute("aria-activedescendant",c.domNode.id)):c.domNode.classList.remove("treeIterationCursor"))):
b&&(d?b.classList.add("treeIterationCursorRow_Dotted"):b.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(a,d,b,c){var e,f;if(a||d){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=a;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(e!==f||d)if(this.toggleCursor(e,!1),!d||f){this.moveColumn(null,0);this.toggleCursor(f,!0);if((a=this.getRowDiv())&&
!c){for(c=a.parentNode;c;){d=window.getComputedStyle(c,null);if(!d)break;d=d.getPropertyValue("overflow-y");if(d==="hidden"||d==="auto"||d==="scroll")break;c=c.parentNode}if(!c)c=document.body;d=!0;a.offsetTop<=c.scrollTop?(d=!1,b===void 0&&(b=!1)):a.offsetTop+a.offsetHeight>=c.scrollTop+c.clientHeight&&(d=!1,b===void 0&&(b=!0));d||a.scrollIntoView(!b)}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,f)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var a=
[],d=0;d<this._selections.length;d++)a.push(this.model.getId(this._selections[d]));return a},getRowDiv:function(a){a=a?a:this._modelIterator.cursor();if(!a)return null;var a=this.model.getId(a),d=this._navDict.getValue(a);return d&&d.rowDomNode?d.rowDomNode:j.node(a)},iterate:function(a,d,b){this.topIterationNodes.length!==0&&this._modelIterator.iterate(a,d)&&(this.cursorOn(null,!1,a),b&&(a=this._inSelection(this._modelIterator.prevCursor()),d=this._inSelection(this._modelIterator.cursor()),a>=0&&
d>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)))},_checkRow:function(a,d){if(this.explorer.renderer._useCheckboxSelection){var b=this.getRowDiv(a);if(b){var c=j.node(this.explorer.renderer.getCheckBoxId(b.id)),e=d?!c.checked:!0;if(e!==c.checked)this.explorer.renderer.onCheck(b,c,e,!0)}}else this._select(a,d)},_select:function(a){a||(a=this._modelIterator.cursor());var d=this.getRowDiv(a);d&&(this._inSelection(a)<0?d.classList.add("checkedRow"):
d.classList.remove("checkedRow"))},_onModelGrid:function(a,d){var b=this._getGridChildren(a);if(b)for(var c=0;c<b.length;c++)if(d.target===b[c].domNode)return!0;return!1},onClick:function(a,d){var b=j.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)));if(d.target!==b&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(a,d)))if(this.cursorOn(a,!0,!1,!0),e)this.setSelection(a,!0);else if(this._ctrlKeyOn(d))this.setSelection(a,!0,!0);else if(d.shiftKey&&this._shiftSelectionAnchor){if(b=
this._modelIterator.scan(this._shiftSelectionAnchor,a)){this._clearSelection(!0);for(var c=0;c<b.length;c++)this.setSelection(b[c],!0)}}else this.setSelection(a,!1,!0)},onCollapse:function(a){this._modelIterator.collapse(a)&&this.cursorOn()},onUpArrow:function(a){this.iterate(!1,!1,a.shiftKey);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1,!0);a.preventDefault();return!1},onDownArrow:function(a){this.iterate(!0,!1,a.shiftKey);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),
!1,!0);a.preventDefault();return!1},_shouldMoveColumn:function(a){var d=this.currentModel(),b=this._getGridChildren(d);return b&&b.length>1?this.isExpandable(d)?this._ctrlKeyOn(a):!0:!1},onLeftArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,-1),a.preventDefault(),!0;var d=this._modelIterator.cursor();if(!d)return!1;if(this.isExpandable(d)&&this.isExpanded(d))return this.explorer.myTree.collapse(d),a.preventDefault(),!0;this._modelIterator.topLevel(d)?this.explorer.scopeUp&&
typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(d.parent),this.setSelection(d.parent,!1,!0))},onRightArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,1),a.preventDefault(),!0;var d=this._modelIterator.cursor();if(!d)return!1;if(this.isExpandable(d)&&!this.isExpanded(d))return this.explorer.myTree.expand(d),a.preventDefault(),!1},_isRowSelectable:function(a){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(a):!0},onSpace:function(a){this.setSelection(this.currentModel(),
!0,!0);a.preventDefault()},onEnter:function(a){var d=this.getCurrentGrid(this._modelIterator.cursor());if(d)if(d.widget)if(typeof d.onClick==="function")d.onClick();else typeof d.widget.focus==="function"&&d.widget.focus();else{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(a),!1,!1,!1,0,null);d.domNode.dispatchEvent(b)}else if(this.explorer.renderer.getRowActionElement&&(d=this._modelIterator.cursor()))if(d=this.explorer.renderer.getRowActionElement(this.model.getId(d)),
d.href)this._ctrlKeyOn(a)?window.open(d.href):window.location.href=d.href}};return b}();h.ExplorerNavDict=function(){function b(a){this._dict={};this._model=a}b.prototype={addRow:function(a,d){this._dict[this._model.getId(a)]={model:a,rowDomNode:d}},getValue:function(a){return this._dict[a]},getGridNavHolder:function(a,d){if(!a)return null;var b=this._model.getId(a);if(this._dict[b]){if(!this._dict[b].gridChildren&&d)this._dict[b].gridChildren=[];return this._dict[b].gridChildren}return null},initGridNavHolder:function(a){if(!a)return null;
a=this._model.getId(a);if(this._dict[a])this._dict[a].gridChildren=null}};return b}();return h});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands,orion/commandRegistry".split(","),function(h,j,g,c,e,f){var b={};b.Explorer=function(){function a(a,b,c,e){this.registry=a;this.renderer=c;this.selection=b;this.commandService=e;this.myTree=null}a.prototype={destroy:function(){this.model&&this.model.destroy();this.myTree&&this.myTree.destroy();this.destroyed=!0},changedItem:function(a,b){this.myTree&&
this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},makeNewItemPlaceHolder:function(a,b,c){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),c=document.createElement("span"),c.id=b+"placeHolderRow",a.appendChild(c),{tempNode:c,refNode:c};if(a){c=document.createElement("tr");c.id=b+"placeHolderRow";var e=document.createElement("td");e.id=b+"placeHolderCol";
c.appendChild(e);a.appendChild(c);c=g.node(b+"placeHolderRow");a=g.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=this.model.getId(a))return g.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&
this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===void 0||a===null))for(var d=a.length,c=0;c<d;c++)b._expandRecursively(a[c])})})}},createTree:function(a,b,f){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var h=a+"innerTree",j=g.node(h);j&&g.empty(j);if(b)b.rootId=h;this.model=b;this._parentId=a;this._treeOptions=f;if(!f||f&&!f.noSelection)this.selectionPolicy=
f?f.selectionPolicy:"",this._navDict=new e.ExplorerNavDict(this.model);this.myTree=new c.TableTree({id:h,model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:f?!!f.showRoot:!1,indent:f?f.indent:void 0,onCollapse:f?f.onCollapse:void 0,navHandlerFactory:f?f.navHandlerFactory:void 0,tableElement:f?f.tableElement:void 0,tableBodyElement:f?f.tableBodyElement:void 0,tableRowElement:f?f.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy===
"cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];if(a&&this.getNavDict())for(var c=a.getSelection(),e=0;e<c.length;e++){var f=a.getRowDiv(c[e]);f&&f.parentNode&&(f=this.getNavDict().getValue(this.model.getId(c[e])),f.model&&b.push(f.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:
null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){if(!this.getNavHandler())this._navHandler=a&&a.navHandlerFactory&&typeof a.navHandlerFactory.createNavHandler==="function"?a.navHandlerFactory.createNavHandler(this,this._navDict,a):new e.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),
b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return a}();b.createExplorerCommands=function(a,b){function c(a){return typeof a.getItemCount==="function"?a.getItemCount()>0?b?b(a):!0:!1:!1}var e=new f.Command({tooltip:h["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},
callback:function(a){a.items.expandAll()}}),g=new f.Command({tooltip:h["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});a.addCommand(e);a.addCommand(g)};b.ExplorerModel=function(){function a(a,b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}a.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=
c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),b=this.idPrefix,c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return b}};return a}();b.ExplorerFlatModel=function(){function a(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}a.prototype=new b.ExplorerModel;
a.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};a.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return a}();b.ExplorerRenderer=function(){function a(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite"}a.prototype={_init:function(a){if(a){this._useCheckboxSelection=
a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=a.actionScopeId;if(!this.commandService)this.commandService=a.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?
1:0},initTable:function(a,b){this.tableTree=b;g.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,e,f){var c=c||"tool",g=document.createElement("td");g.id=b.id+"actionswrapper";e&&g.classList.add(e);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,g,a,this.explorer,c,null,f&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return g},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),e=document.createElement("span");e.id=this.getCheckBoxId(b.id);e.classList.add("core-sprite-check");e.classList.add("selectionCheckmarkSprite");e.rowId=b.id;if(this.getCheckedFunc)e.checked=this.getCheckedFunc(a),e.checked?(this._highlightSelection&&b.classList.add("checkedRow"),e.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),e.classList.remove("core-sprite-check_on"));c.appendChild(e);var f=this;e.addEventListener("click",function(a){f.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,e,f){(b.checked=c)?b.classList.add("core-sprite-check_on"):b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,e);this.explorer.getNavHandler()&&f&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){var b=this.explorer.getNavDict(),c=this.explorer.getNavHandler();if(c&&b&&c.getSelectionPolicy()!=="cursorOnly"&&(a=window.sessionStorage[a+"selection"],typeof a==="string"&&(a=a.length>0?JSON.parse(a):null),a)){for(var e=[],c=0;c<
a.length;c++){var f=b.getValue(a[c]);if(f&&f.rowDomNode&&f.model&&(e.push(f.model),this._highlightSelection&&f.rowDomNode.classList.add("checkedRow"),f=g.node(this.getCheckBoxId(f.rowDomNode.id))))f.checked=!0,f.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(e),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=
!1,c=window.sessionStorage[a+"expanded"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var e;if(c)for(e=0;e<c.length;e++)if(g.node(c[e])){this._expanded.push(c[e]);var f=this;this.tableTree.expand(c[e],function(){f._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+
"__expand"},updateExpandVisuals:function(a,b){var c=g.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,e){var f=document.createElement("span");f.id=this.expandCollapseImageId(a.id);b.appendChild(f);f.classList.add(this._twistieSpriteClass);f.classList.add(this._collapseImageClass);if(c){var g=document.createElement("span");b.appendChild(g);
g.classList.add(e||"imageSprite");g.classList.add(c)}var h=this;f.onclick=function(){h.tableTree.toggle(a.id);if(h.tableTree.isExpanded(a.id))h._expanded.push(a.id);else for(var b in h._expanded)if(h._expanded[b]===a.id){h._expanded.splice(b,1);break}(b=h._getUIStatePreferencePath())&&window.sessionStorage&&h._storeExpansions(b)};return f},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),
this.explorer.initNavHandler())},updateCommands:function(){if(this.commandService)for(var a=g.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],e=g.node(c.id+"actionswrapper");this.commandService.destroy(e);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,e,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return a}();
b.SelectionRenderer=function(){function a(a,b){this._init(a);this.explorer=b}a.prototype=new b.ExplorerRenderer;a.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var e=0,f=this.getCellHeaderElement(e);f;)f.innerHTML.length>0&&f.classList.add("navColumn"),c.appendChild(f),f=this.getCellHeaderElement(++e);b.appendChild(c);e>0&&a.appendChild(b)};
a.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=this.explorer.getNavDict();if(c){c.addRow(a,b);var e=this;b.addEventListener("click",function(b){if(e.explorer.getNavHandler())e.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,f=this.getCellElement(c,a,b);f;)b.appendChild(f),c===0?this.getPrimColumnStyle?f.classList.add(this.getPrimColumnStyle()):f.classList.add("navColumn"):
this.getSecondaryColumnStyle?f.classList.add(this.getSecondaryColumnStyle()):f.classList.add("secondaryColumn"),f=this.getCellElement(++c,a,b)};a.prototype.getCellHeaderElement=function(){};a.prototype.getCellElement=function(){};return a}();b.SimpleFlatModel=function(){function a(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}a.prototype=new b.ExplorerModel;a.prototype.getRoot=function(a){a(this.root)};a.prototype.getId=function(a){for(var a=this.getKey(a).replace(/[\\\/]/g,
""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return this.idPrefix+b};a.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return a}();return b});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages,orion/Deferred,orion/explorers/explorer,orion/explorers/navigationUtils,orion/extensionCommands,orion/objects,orion/URITemplate,orion/webui/littlelib".split(","),function(h,j,g,c,e,f,b,a){function d(a,c,d,g,h,i,q,t,w){var c=f.clone(c),r;if(c.Directory)r=document.createElement("a"),r.className="navlinkonpage",r.href=!a?k:(new b(a+"#{,resource,params*}")).expand({resource:c.ChildrenLocation}),c.Name&&r.appendChild(document.createTextNode(c.Name));
else{h||(h=e.getOpenWithCommands(d));if(!i)for(a=0;a<h.length;a++)h[a].isEditor==="default"&&(i=h[a]);r=document.createElement("a");r.className="navlink targetSelector";q&&typeof q==="object"&&Object.keys(q).forEach(function(a){r[a]=q[a]});var z=null,x=null;if(z=w?w.holderDom:r)x=document.createElement("span"),x.className="core-sprite-file modelDecorationSprite",z.appendChild(x);c.Name&&r.appendChild(document.createTextNode(c.Name));var y=!1,G=c.Location;if(t&&typeof t==="object")c.params={},f.mixin(c.params,
t);for(a=0;a<h.length;a++)if(t=h[a],t.visibleWhen(c)){G=t.hrefCallback({items:c});y=!0;break}j.when(g.getFileContentType(c),function(a){var b;if(b=!y)if(b=i){a:{switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":b=!0;break a}b=!1}b=!b}b&&(G=i.hrefCallback({items:c}));if(z){b=z;var d=c.Location,e=x,f;switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":f=document.createElement("img");
f.src=d;f.classList.add("thumbnail");break;default:if(a&&a.image)f=document.createElement("img"),f.src=a.image,f.classList.add("thumbnail")}f&&b.replaceChild(f,e)}r.href=G})}return r}function i(a,b,c,d){this.explorer=b;this.commandService=c;this.contentTypeService=d;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}var k=new b("#{,resource,params*}");i.prototype=new g.SelectionRenderer;i.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};
i.prototype.tableCallback=function(a){a.setAttribute("aria-label",h.Navigator);a.setAttribute("role","presentation")};i.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};i.prototype.emptyCallback=function(b){var c=document.createElement("tr"),d=document.createElement("td");d.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=h.NoFile;var f=document.createElement("span");f.classList.add("core-sprite-addcontent");f.classList.add("icon-inline");
f.classList.add("imageSprite");a.processDOMNodes(e,[f]);d.appendChild(e);c.appendChild(d);b.appendChild(c)};i.prototype.getCellHeaderElement=function(a){if(this.oneColumn&&a!==0)return null;switch(a){case 0:case 1:case 2:document.createElement("th").style.height="8px"}};i.prototype.setTarget=function(a){this.target=a};i.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};i.prototype.createFolderNode=
function(a){var b;this.showFolderLinks?(b=d(this.folderLink||"",a,this.commandService,this.contentTypeService),(a=this.getFolderImage(a))&&b.insertBefore(a,b.firstChild)):(b=document.createElement("span"),b.textContent=a.Name);return b};i.prototype.showFolderLinks=!0;i.prototype.getCellElement=function(a,b,f){switch(a){case 0:var a=document.createElement("td"),g=document.createElement("span");g.id=f.id+"MainCol";g.setAttribute("role","presentation");a.appendChild(g);a.setAttribute("role","presentation");
g.className="mainNavColumn";var h;if(b.Directory)this.getExpandImage(f,g),h=this.createFolderNode(b),g.appendChild(h),this.explorer._makeDropTarget(b,h),this.explorer._makeDropTarget(b,f);else{if(!this.openWithCommands){this.openWithCommands=e.getOpenWithCommands(this.commandService);for(h=0;h<this.openWithCommands.length;h++)if(this.openWithCommands[h].isEditor==="default")this.defaultEditor=this.openWithCommands[h]}h=d("",b,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,
{target:this.target});g.appendChild(h)}if(h)h.id=f.id+"NameLink",h.nodeType===1&&(c.addNavGrid(this.explorer.getNavDict(),b,h),h.setAttribute("role","link"),h.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,g,b,this.explorer,"tool",null,!0);return a;case 1:if(this.oneColumn)return null;f=document.createElement("td");if(b.LocalTimeStamp)f.textContent=(new Date(b.LocalTimeStamp)).toLocaleString();return f;case 2:if(this.oneColumn)return null;
f=document.createElement("td");if(!b.Directory&&typeof b.Length==="number")b=parseInt(b.Length,10)/1024,f.textContent=Math.ceil(b).toLocaleString()+" KB";f.style.textAlign="right";return f}};i.prototype.constructor=i;return{NavigatorRenderer:i,createLink:d}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler,orion/explorers/navigatorRenderer,orion/extensionCommands,orion/Deferred".split(","),function(h,j,g,c,e,f,b,a,d){function i(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function k(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new i(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}i.prototype.makeRenderFunction=function(f,i,k,s,p){var n=this.serviceRegistry,q=this.commandRegistry;this.openWithCommands=this.openWithCommands||a.createOpenWithCommands(n,f,q);var t=this;return function(a,r,n,x){d.when(t.openWithCommands,function(d){if(n)g.empty(i),d=document.createElement("div"),d.appendChild(document.createTextNode(h["Search failed."])),i.appendChild(d),typeof s==="function"&&s(i);else{var t=
function(){function a(b,c){var d=c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];typeof f==="function"&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),F=!1;g.empty(i);if(a&&a.length>0){var E=document.createElement("table");E.setAttribute("role","presentation");for(var u=0;u<a.length;u++){var A=
a[u],v;if(!F&&(F=!0,k))v=E.insertRow(0).insertCell(0),v.textContent=k;v=E.insertRow(-1).insertCell(0);v.colspan=2;p&&p(v);var B={Name:A.name,Directory:A.directory,Location:A.path||A.location},D=null;if(typeof A.LineNumber==="number")D={},D.line=A.LineNumber;if(x&&x.keyword&&!x.nameSearch){var C=e.generateSearchHelper(x),D=D||{};D.find=C.inFileQuery.searchStr;D.regEx=C.inFileQuery.wildCard?!0:void 0}B=b.createLink(j.toUrl("edit/edit.html"),B,q,f,d,null,{"aria-describedby":(A.folderName?A.folderName:
A.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}},D);A.LineNumber&&B.appendChild(document.createTextNode(" (Line "+A.LineNumber+")"));v.appendChild(B);t(v,A)}i.appendChild(E);typeof s==="function"&&s(i)}!F&&r&&(d=c.formatMessage(h["No matches found for ${0}"],r),g.empty(i),i.appendChild(document.createTextNode(d)),typeof s==="function"&&s(i))}})}};k.prototype={search:function(a,b,c){var d=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var d=a.response.docs[c];b.push({name:d.Name,
path:d.Location,folderName:e.path2FolderName(d.Path?d.Path:d.Location,d.Name),directory:d.Directory,lineNumber:d.LineNumber})}return b};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){c(d(b),a.keyword,null,a)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var e=a.keyword,e=e.substring(e.indexOf("}")+1),e=e.substring(e.indexOf(":")+1);c(d(b),e,null,a)},function(a){c(null,null,a,null)})}catch(g){typeof g===
"string"&&g.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(b){c(d(b),null,null,a)}):typeof g==="string"&&g.indexOf("search")>-1&&!a.nameSearch?(new f.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(b){c(d(b),null,null,a)}):this.registry.getService("orion.page.message").setErrorMessage(g)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(a,b){console.error(a);
g.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var d="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?e=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(e=a);if(e)this.setLocationbyURL(e.Location),d=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),d=this._fileService.fileServiceName(a.Location),
this._childrenLocation=a.ChildrenLocation;e=g.node("search");d||(d="");if(e&&e.placeholder){e.value="";var f=c.formatMessage(h["Search ${0}"],d);e.placeholder=f.length>30?f.substring(0,27)+"...":c.formatMessage(h["Search ${0}"],d)}if(e&&e.title)e.title=h["Type a keyword or wild card to search in "]+d},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation?
this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,
sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};k.prototype.constructor=k;return{Searcher:k}});define("orion/dialogs",[],function(){function h(h){this._serviceRegistry=h;this._serviceRegistration=h.registerService("orion.page.dialog",this)}h.prototype={confirm:function(h,g){g(window.confirm(h))},openFiles:function(){}};h.prototype.constructor=h;return{DialogService:h}});
define("orion/metatype",["orion/serviceTracker"],function(h){function j(a){function d(a,b,c){a=a.getProperty(b);a instanceof Array&&a.forEach(c)}var f=new h(a,e),j=this.ocdsMap={},l=this.pidsMap={};f.addingService=function(e){d(e,g,function(a){a=new b(a);j[a.getId()]=a});d(e,c,function(a){var b=a.pid,a=a.classId;b&&a&&(l[b]=j[a])});return a.getService(e)};f.removedService=function(a){d(a,g,function(a){delete j[a.id]});d(a,c,function(a){delete l[a.pid]})};f.open()}var g="classes",c="designates",e=
"orion.cm.metatype",f,b;j.prototype={getObjectClassDefinitionForPid:function(a){return this.pidsMap[a]||null},getObjectClassDefinition:function(a){return this.ocdsMap[a]||null}};b=function(a){this.id=a.id;this.name=a.name||null;this.nameKey=a.nameKey||null;this.nls=a.nls||null;var b=a.properties;if(!this.id)throw'Missing "id" property: '+JSON.stringify(a);if(!(b instanceof Array)||!b.length)throw'"properties" property is missing or empty: '+JSON.stringify(a);this.props=[];for(a=0;a<b.length;a++)this.props.push(new f(b[a]))};
b.prototype={getAttributeDefinitions:function(){return this.props},getId:function(){return this.id},getName:function(){return this.name},getNameKey:function(){return this.nameKey},getNls:function(){return this.nls}};f=function(a){this.id=a.id;this.name=a.name||null;this.nameKey=a.nameKey||null;this.options=a.options||null;this.type=a.type||"string";this.defaultValue=typeof a.defaultValue!=="undefined"?a.defaultValue:null;if(!this.id)throw'Missing "id" property: '+JSON.stringify(a);var b;switch(this.type){case "boolean":case "number":case "string":b=
!0}if(!b)throw'Invalid "type": '+this.type;this.options&&this.options.forEach(function(a){if(typeof a.value==="undefined")throw"Missing option value: "+JSON.stringify(a);})};f.prototype={getId:function(){return this.id},getName:function(){return this._nlsName||this.name},getNameKey:function(){return this.nameKey},getOptionLabels:function(){return this.options&&this.options.map(function(a){return a._nlsLabel||a.label})},getOptionLabelKeys:function(){return this.options&&this.options.map(function(a){return a.labelKey})},
getOptionValues:function(){return this.options&&this.options.map(function(a){return a.value})},getType:function(){return this.type},getDefaultValue:function(){return this.defaultValue},_setNlsName:function(a){this._nlsName=a},_setNlsOptionLabels:function(a){this.options&&this.options.forEach(function(b,c){b._nlsLabel=a[c]})}};return{MetaTypeRegistry:j}});
define("orion/settings/settingsRegistry",["orion/Deferred","orion/i18nUtil","orion/serviceTracker"],function(h,j,g){function c(a,b){return typeof a[b]==="string"?a[b]:null}function e(a){this.pid=a.pid;this.classId=(this.isRef=c(a,"classId"))?a.classId:this.pid+".type";this.name=c(a,"name");this.nameKey=c(a,"nameKey");this.nls=c(a,"nls");this.properties=null;this.category=a.category||null;this.categoryKey=a.categoryKey||null;this.tags=a.tags;if(!this.pid)throw Error('Missing "pid" property');}function f(b,
c,f,h){var j={};g.call(this,b,d);this.addingService=function(d){var q=d.getProperty(i);if(!q||!q.length)return null;for(var t=0;t<q.length;t++){var w=q[t],r=new e(w),z=r.getObjectClassDefinitionId(),x={designates:[{pid:r.getPid(),classId:z}]};if(!r.isRef&&!c.getObjectClassDefinition(z))x.classes=[{id:z,nameKey:r.getNameKey(),nls:r.getNls(),properties:w.properties}];j[r.getPid()]=b.registerService(a,{},x);w=c.getObjectClassDefinition(z);r.properties=w.getAttributeDefinitions();f[r.getPid()]=r;w=r.getCategory()||
k;Object.prototype.hasOwnProperty.call(h,w)||(h[w]=[]);h[w].push(r.getPid())}return g.prototype.addingService.call(this,d)};this.removedService=function(a){for(var a=a.getProperty(i),b=0;b<a.length;b++){var c=a[b].pid,d=a[b].category;j[c].unregister();delete j[c];delete f[c];var e=h[d||k];e.splice(e.indexOf(c),1);e.length||delete h[d]}}}function b(a,b){this.settingsMap=Object.create(null);this.categories=Object.create(null);this.categoryLabels=Object.create(null);(new f(a,b,this.settingsMap,this.categories)).open()}
var a="orion.cm.metatype",d="orion.core.setting",i="settings",k="unsorted";e.prototype={getName:function(){return this._nlsName||this.name},getNameKey:function(){return this.nameKey},getNls:function(){return this.nls},getPid:function(){return this.pid},getObjectClassDefinitionId:function(){return this.classId},getAttributeDefinitions:function(){return this.properties},getCategory:function(){return this.category},getCategoryLabel:function(){return this._nlsCategoryLabel},getCategoryKey:function(){return this.categoryKey},
getTags:function(){return this.tags||[]},isDefaults:function(a){return this.getAttributeDefinitions().every(function(b){var c=a[b.getId()],d=b.getDefaultValue(),e=c===d;b.getType()==="string"&&(e=e||c===""&&d===null);return e})},_setNlsName:function(a){this._nlsName=a},_setNlsCategory:function(a){this._nlsCategoryLabel=a}};b.prototype={getSettings:function(a){var b=this.settingsMap,a=typeof a==="string"?this.categories[a]:Object.keys(b);return!a?[]:a.map(function(a){return b[a]})},getCategories:function(){return Object.keys(this.categories)},
getCategoryLabel:function(a){return this.categoryLabels[a]||null},loadI18n:function(){function a(b,c){c._setNlsName(b[c.getNameKey()]);c._setNlsCategory(b[c.getCategoryKey()]);c.getAttributeDefinitions().forEach(function(a){a._setNlsName(b[a.getNameKey()]);var c=a.getOptionLabelKeys();c&&(c=c.map(function(a){return b[a]}),a._setNlsOptionLabels(c))})}var b=Object.create(null),c=Object.create(null),d=[];this.getSettings().forEach(function(a){var e=a.getNls();e&&(d.push(j.getMessageBundle(e).then(function(a){c[e]=
a})),b[e]=b[e]||[],b[e].push(a))});var e=this;return h.all(d,function(){return null}).then(function(){Object.keys(c).forEach(function(d){b[d].forEach(a.bind(null,c[d]))});e.getCategories().forEach(function(a){e.getSettings(a).some(function(b){b=b.getCategoryLabel();if(!b)return!1;e.categoryLabels[a]=b;return!0})})})}};return b});
define("orion/widgets/themes/ThemeComponent",[],function(){function h(){}function j(g,c,e,f,b,a,d,i,j){var l=new h;l.type="ELLIPSE";l.fill=j;l.width=i;l.x=c;l.y=e;l.radius=f;l.startangle=b;l.endangle=a;l.direction=d;l.render(g);return l}h.prototype.type=null;h.prototype.fill=null;h.prototype.stroke=null;h.prototype.width=0;h.prototype.height=0;h.prototype.font=null;h.prototype.text=null;h.prototype.radius=null;h.prototype.x=0;h.prototype.y=0;h.prototype.x2=0;h.prototype.y2=0;h.prototype.x3=0;h.prototype.y3=
0;h.prototype.context=null;h.prototype.description=null;h.prototype.over=!1;h.prototype.family=null;h.prototype.render=function(g){if(g)this.context=g;switch(this.type){case "TEXT":this.context.beginPath();this.context.font=this.font;this.context.fillStyle=this.fill;this.context.fillText(this.text,this.x+0.5,this.y+0.5);this.context.closePath();break;case "LINE":this.context.beginPath();this.context.strokeStyle=this.stroke;this.context.moveTo(this.x+0.5,this.y+0.5);this.context.lineTo(this.x2+0.5,
this.y2+0.5);this.context.lineWidth=this.width;this.context.stroke();this.context.closePath();break;case "RECTANGLE":this.context.beginPath();this.context.strokeStyle=this.stroke;if(this.fill)this.context.fillStyle=this.fill;this.context.rect(this.x+0.5,this.y+0.5,this.width,this.height);this.fill&&this.context.fill();this.stroke&&this.context.stroke();this.context.closePath();break;case "ROUNDRECTANGLE":this.context.beginPath();this.context.fillStyle=this.fill;this.context.strokeStyle=this.stroke;
this.context.moveTo(this.x+this.radius,this.y);this.context.lineTo(this.x+this.width-this.radius,this.y);this.context.quadraticCurveTo(this.x+this.width,this.y,this.x+this.width,this.y+this.radius);this.context.lineTo(this.x+this.width,this.y+this.height-this.radius);this.context.quadraticCurveTo(this.x+this.width,this.y+this.height,this.x+this.width-this.radius,this.y+this.height);this.context.lineTo(this.x+this.radius,this.y+this.height);this.context.quadraticCurveTo(this.x,this.y+this.height,this.x,
this.y+this.height-this.radius);this.context.lineTo(this.x,this.y+this.radius);this.context.quadraticCurveTo(this.x,this.y,this.x+this.radius,this.y);this.context.closePath();this.stroke&&this.context.stroke();this.fill&&this.context.fill();break;case "TRIANGLE":this.context.beginPath();this.context.moveTo(this.x+0.5,this.y+0.5);this.context.lineTo(this.x2+0.5,this.y2+0.5);this.context.lineTo(this.x3+0.5,this.y3+0.5);this.context.lineTo(this.x+0.5,this.y+0.5);this.context.fillStyle=this.fill;this.context.fill();
this.context.closePath();break;case "ELLIPSE":this.context.beginPath(),this.context.arc(this.x+0.5,this.y+0.5,this.radius,this.startangle,this.endangle,this.direction),this.context.fillStyle=this.fill,this.context.fill(),this.context.closePath()}};h.prototype.mouseOver=function(g,c){this.over=!1;switch(this.type){case "RECTANGLE":case "ROUNDRECTANGLE":if(g>this.x&&g<this.x+this.width&&c>this.y&&c<this.y+this.height)this.over=!0;break;case "TEXT":if(g>this.x&&g<this.x+this.width&&c>this.y-16&&c<this.y-
16+this.height)this.over=!0;break;case "ELLIPSE":if(g>this.x-5-this.radius&&g<this.x-5+this.radius&&c>this.y-5-this.radius&&c<this.y-5+this.radius)this.over=!0}return this.over};h.prototype.glow=function(g,c){var e=Math.floor(this.y-6+(this.height+12)/2);switch(this.type){case "TEXT":e-=8}var f=this.x-6+(this.width+12)*0.5;this.context.beginPath();this.context.moveTo(f+0.5,e+0.5);this.context.lineTo(g+30+0.5,e+0.5);this.context.lineTo(g+30+0.5,c+7+0.5);this.context.lineTo(g+45+0.5,c+7+0.5);this.context.strokeStyle=
"#cc0000";this.context.lineWidth=1;this.context.stroke();j(this.context,f,e,3,0,2*Math.PI,!1,null,"#cc0000");this.context.closePath()};return{Component:h,drawArc:j,drawLine:function(g,c,e,f,b,a,d){var i=new h;i.type="LINE";i.stroke=d;i.width=a;i.x=c;i.y=e;i.x2=f;i.y2=b;i.render(g);return i},drawText:function(g,c,e,f,b,a){var d=new h;d.type="TEXT";d.font=b;d.fill=a;d.text=c;d.x=e;d.y=f;d.render(g);d.width=g.measureText(c).width;d.height=15;return d},drawRectangle:function(g,c,e,f,b,a,d){var i=new h;
i.type="RECTANGLE";i.fill=a;i.stroke=d;i.x=c;i.y=e;i.width=f;i.height=b;i.render(g);return i},drawTriangle:function(g,c,e,f,b,a,d,i,j){var l=new h;l.type="TRIANGLE";l.fill=i;l.stroke=j;l.x=c;l.y=e;l.x2=f;l.y2=b;l.x3=a;l.y3=d;l.render(g);return l},roundRect:function(g,c,e,f,b,a,d,i){var j=new h;j.type="ROUNDRECTANGLE";j.fill=d;j.stroke=i;j.x=c;j.y=e;j.width=f;j.height=b;j.radius=a;j.render(g);return j}}});
define("orion/widgets/themes/editor/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme"],function(h,j){function g(){}function c(){this.styles=[];var a=new g;a.name="Eclipse";a.annotationRuler="white";a.background="white";a.comment="green";a.keyword="#7f0055";a.text="darkSlateGray";a.string="blue";a.overviewRuler="white";a.lineNumberOdd="#444";a.lineNumberEven="#444";a.lineNumber="#444";a.currentLine="#EAF2FE";a.tag="darkorange";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=
b;this.styles.push(a);a=new g;a.name="Prospecto";a.annotationRuler="white";a.background="white";a.comment="#3C802C";a.keyword="#CC4C07";a.text="#333";a.string="#446FBD";a.overviewRuler="white";a.lineNumberOdd="silver";a.lineNumberEven="silver";a.lineNumber="silver";a.currentLine="#EAF2FE";a.tag="#CC4C07";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=b;this.styles.push(a);a=new g;a.name="Blue";a.annotationRuler="lavender";a.background="aliceBlue";a.comment="indigo";a.keyword="cornFlowerBlue";a.text=
"navy";a.string="cornFlowerBlue";a.overviewRuler="lavender";a.lineNumberOdd="darkSlateGray";a.lineNumberEven="darkSlateGray";a.lineNumber="darkSlateGray";a.currentLine="white";a.tag="cornFlowerBlue";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=b;this.styles.push(a);a=new g;a.name="Ambience";a.annotationRuler="#3D3D3D";a.background="#202020";a.comment="mediumslateblue";a.keyword="cornFlowerBlue";a.text="darkseagreen";a.string="lightcoral";a.overviewRuler="white";a.lineNumberOdd="black";a.lineNumberEven=
"black";a.lineNumber="black";a.currentLine="lightcyan";a.tag="cornFlowerBlue";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=b;this.styles.push(a);a=new g;a.name="Tierra";a.annotationRuler="moccasin";a.background="lemonchiffon";a.comment="darkseagreen";a.keyword="darkred";a.text="#555555";a.string="orangered";a.overviewRuler="moccasin";a.lineNumberOdd="chocolate";a.lineNumberEven="chocolate";a.lineNumber="chocolate";a.currentLine="#baa289";a.tag="darkred";a.attribute="cadetBlue";a.fontFamily=f;
a.fontSize=b;this.styles.push(a);a=new g;a.name="Nimbus";a.annotationRuler="#444";a.background="dimgray";a.comment="darkseagreen";a.keyword="darkorange";a.text="white";a.string="cornflowerblue";a.overviewRuler="#444";a.lineNumberOdd="#aaa";a.lineNumberEven="#aaa";a.lineNumber="#aaa";a.currentLine="#aabfbb";a.tag="darkorange";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=b;this.styles.push(a);a=new g;a.name="Adelante";a.annotationRuler="#E2D2B2";a.background="#F1E7C8";a.comment="#5D774E";a.keyword=
"#AF473B";a.text="dimgray";a.string="#DE5D3B";a.overviewRuler="#E2D2B2";a.lineNumberOdd="#AF473B";a.lineNumberEven="#AF473B";a.lineNumber="#AF473B";a.currentLine="#9e937b";a.tag="#AF473B";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=b;this.styles.push(a);a=new g;a.name="Raspberry Pi";a.annotationRuler="seashell";a.background="seashell";a.comment="#66B32F";a.keyword="#E73E36";a.text="dimgray";a.string="darkorange";a.overviewRuler="seashell";a.lineNumberOdd="#E73E36";a.lineNumberEven="#E73E36";
a.lineNumber="#E73E36";a.currentLine="#F5B1AE";a.tag="#E73E36";a.attribute="cadetBlue";a.fontFamily=f;a.fontSize=b;this.styles.push(a)}function e(){return this.styles}var f='"Consolas", "Monaco", "Vera Mono", "monospace"',b="10pt";c.prototype.styles=[];c.prototype.getStyles=e;c.prototype.fontSettable=!0;c.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"editorstyles",defaultTheme:"Prospecto",selectedKey:"editorSelected"}};c.prototype.parseToXML=function(a){try{var b=null;
if(window.DOMParser){var b=(new DOMParser).parseFromString(a,"text/xml"),c=b.getElementsByTagName("parsererror");return!c||!c.length||!c[0].childNodes.length?b:null}else return b=new ActiveXObject("Microsoft.XMLDOM"),b.async=!1,b.loadXML(a),b}catch(e){}};c.prototype.selectFontSize=function(a){console.log("fontsize: "+a)};c.prototype.importTheme=function(a){console.log("import theme");console.log(a);var b=this.parseToXML(a.parameters.valueFor("name")),c=new g;c.name=b.getElementsByTagName("colorTheme")[0].attributes[1].value;
c.annotationRuler=b.getElementsByTagName("background")[0].attributes[0].value;c.background=b.getElementsByTagName("background")[0].attributes[0].value;c.comment=b.getElementsByTagName("singleLineComment")[0].attributes[0].value;c.keyword=b.getElementsByTagName("keyword")[0].attributes[0].value;c.text=b.getElementsByTagName("foreground")[0].attributes[0].value;c.string=b.getElementsByTagName("string")[0].attributes[0].value;c.overviewRuler=b.getElementsByTagName("background")[0].attributes[0].value;
c.lineNumberOdd=b.getElementsByTagName("lineNumber")[0].attributes[0].value;c.lineNumberEven=b.getElementsByTagName("lineNumber")[0].attributes[0].value;c.lineNumber=b.getElementsByTagName("lineNumber")[0].attributes[0].value;c.currentLine=b.getElementsByTagName("selectionBackground")[0].attributes[0].value;a.items.addTheme(c)};c.prototype.processSettings=function(a){var b=j.TextTheme.getTheme();b.setThemeClass("editorTheme",b.buildStyleSheet("editorTheme",a))};c.prototype.getViewData=function(){var a=
{top:10,left:10,width:400,height:350},b=a.left,c=a.top;a.shapes=[{type:"TEXT",name:h["Line Numbers"],label:"1",x:b+20,y:c+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"},{type:"RECTANGLE",name:h.Background,x:b+46,y:c,width:290,height:a.height,family:"background",fill:"white"},{type:"TEXT",name:h.Strings,label:"'text/javascript'",x:b+134,y:c+20,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"=",x:b+124,y:c+20,fill:"darkSlateGray",family:"text",
font:"9pt sans-serif"},{type:"RECTANGLE",name:h["Current Line"],x:b+46,y:c+87,width:290,height:18,family:"currentLine",fill:"#eaf2fd"},{type:"TEXT",name:h["HTML Attribute"],label:"type",x:b+98,y:c+20,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"RECTANGLE",name:h["Overview Ruler"],x:b+336,y:c,width:14,height:a.height,family:"overviewRuler",fill:"white"},{type:"TEXT",name:h.Comments,label:"/* comment */",x:b+75,y:c+40,fill:"darkSeaGreen",family:"comment",font:"9pt sans-serif"},{type:"TEXT",
name:h["HTML Tag"],label:"<script",x:b+55,y:c+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h["HTML Tag"],label:">",x:b+213,y:c+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h.Strings,label:"'Result'",x:b+164,y:c+80,fill:"cornflowerBlue",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"multiply(a,b){",x:b+120,y:c+60,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h.Keywords,label:"function",
x:b+75,y:c+60,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h.Keywords,label:"var",x:b+95,y:c+80,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"output = ",x:b+115,y:c+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:";",x:b+205,y:c+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h.Keywords,label:"var",x:b+95,y:c+100,fill:"darkorange",family:"keyword",
font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"result = a*b;",x:b+115,y:c+100,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h.Keywords,label:"return",x:b+95,y:c+120,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"output + result;",x:b+135,y:c+120,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"}",x:b+75,y:c+140,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},
{type:"TEXT",name:h["HTML Tag"],label:"<\/script>",x:b+55,y:c+160,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h["HTML Tag"],label:"<style",x:b+55,y:c+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h["HTML Attribute"],label:"type",x:b+95,y:c+200,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"TEXT",name:h.Foreground,label:"=",x:b+121,y:c+200,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h.Strings,
label:"'text/css'",x:b+131,y:c+200,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:h["HTML Tag"],label:">",x:b+180,y:c+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h["CSS Class Name"],label:".some-class",x:b+75,y:c+220,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:h["CSS Class Name"],label:"{",x:b+145,y:c+220,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h["CSS Attribute"],label:"color:",
x:b+95,y:c+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h["CSS Value"],label:"#123456",x:b+130,y:c+240,fill:"darkSlateGray",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:h["CSS Text"],label:";",x:b+180,y:c+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h["CSS Class Name"],label:"}",x:b+75,y:c+260,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:h["HTML Tag"],label:"</style>",x:b+55,y:c+280,fill:"darkorange",
family:"keyword",font:"9pt sans-serif"},{type:"RECTANGLE",name:h["Annotation Ruler"],x:b,y:c,width:46,height:a.height,family:"annotationRuler",fill:"white"}];for(var e=0;e<16;e++)a.shapes.push({type:"TEXT",name:h["Line Numbers"],label:e+1,x:b+20,y:c+20*e+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"});return a};return{ThemeData:c,getStyles:e}});
define("orion/widgets/input/Select",["orion/objects","orion/webui/littlelib"],function(h,j){function g(c,e){h.mixin(this,c);this.node=e||document.createElement("div");this.node.innerHTML=this.templateString;this.select=j.$(".setting-control",this.node)}h.mixin(g.prototype,{templateString:'<select class="setting-control" id="selection"></select>',addOptions:function(c){var e=document.createElement("option");e.value=c.value;e.appendChild(document.createTextNode(typeof c.label==="string"?c.label:c.value));
if(c.selected)e.selected="selected";this.select.appendChild(e)},show:function(){this.postCreate()},postCreate:function(){this.options.forEach(this.addOptions.bind(this));this.select.addEventListener("change",this.change.bind(this))},destroy:function(){if(this.node)j.empty(this.node),this.node=this.select=null},setStorageItem:function(){},getSelected:function(){return this.select.value},getSelectedIndex:function(){return this.select.selectedIndex},setSelectedIndex:function(c){this.select.selectedIndex=
c},getSelection:function(){return this.getSelected()},setSelection:function(c){for(var e=0;e<this.options.length;e++)if(this.options[e].value===c){this.setSelectedIndex(e);return}this.setSelectedIndex(0)},change:function(){var c=this.select.value;this.category?this.setStorageItem(this.category,this.item,this.element,c,this.ui):this.setStorageItem(c)}});return g});
define("orion/widgets/input/TextField",["orion/objects","orion/webui/littlelib"],function(h,j){function g(c,e){h.mixin(this,c);this.node=e||document.createElement("div");this.node.innerHTML=this.templateString;this.textfield=j.$(".setting-control",this.node)}h.mixin(g.prototype,{templateString:'<input type="text" class="setting-control" name="myname"/>',category:null,item:null,element:null,ui:null,show:function(){this.textfield.addEventListener("change",this.change.bind(this));this.postCreate()},
destroy:function(){if(this.node)j.empty(this.node),this.textfield=this.node=null},setStorageItem:function(){},width:function(c){this.textfield.style.width=c},getValue:function(){return this.inputType==="integer"?parseInt(this.textfield.value,10):this.textfield.value},setValue:function(c){this.textfield.value=c},getSelection:function(){return this.getValue()},setSelection:function(c){this.setValue(c)},postCreate:function(){if(this.inputType&&this.inputType==="password")this.textfield.type="password";
this.editmode&&this.editmode==="readonly"&&this.textfield.setAttribute("readonly","true")},change:function(){var c;if(this.selection&&this.selection.value)c=this.selection.value;this.setStorageItem(this.category,this.item,this.element,c,this.ui)}});return g});
define("orion/widgets/themes/ThemeBuilder","i18n!orion/settings/nls/messages,orion/commands,orion/commandRegistry,orion/globalCommands,orion/PageUtil,orion/webui/littlelib,orion/widgets/themes/ThemeComponent,orion/widgets/themes/editor/ThemeData,orion/widgets/input/Select,orion/widgets/input/TextField".split(","),function(h,j,g,c,e,f,b,a,d,i){function k(){x=null;E=G=!0;u=[];B=v=A=null}function l(a,b){this.name=a;this.value=b}function m(a){this.settings=[];this.themeData=a.themeData;this.toolbarId=
a.toolbarId;k();document.getElementById("pageActions").innerHTML='<div id="commandButtons"><div id="revertCommands" class="layoutRight sectionActions"></div><div id="userCommands" class="layoutRight sectionActions"></div></div>';this.commandService=a.commandService;this.preferences=a.preferences;var a=new j.Command({name:h.Cancel,tooltip:h["Revert Theme"],id:"orion.reverttheme",callback:function(a){this.revert(a.items)}.bind(this)}),b=new j.Command({name:h.Update,tooltip:h["Update Theme"],id:"orion.applytheme",
callback:function(a){this.apply(a.items)}.bind(this)});this.commandService.addCommand(new j.Command({name:h["Show Guide"],tooltip:h["Check Guide"],id:"orion.checkGuide",callback:function(a){this.guide(a.items)}.bind(this)}));this.commandService.registerCommandContribution("themeCommands","orion.checkGuide",1);this.commandService.addCommand(a);this.commandService.registerCommandContribution("themeCommands","orion.reverttheme",2);this.commandService.addCommand(b);this.commandService.registerCommandContribution("themeCommands",
"orion.applytheme",3)}function o(){if(v){v.clearRect(0,0,A.width,A.height);var a=A.height;A.width=A.width;A.height=a}}function s(a){var b=A.getBoundingClientRect();return{x:a.clientX-b.left,y:a.clientY-b.top}}function p(a){var b=s(a),a=b.x,b=b.y;B=[];for(var c=0;c<u.length;c++)if(u[c].mouseOver(a,b)){A.style.cursor="crosshair";u[c].id=c;B.push(u[c]);break}else A.style.cursor=""}function n(){A.style.cursor=""}function q(a,b){var c=!1;if(b)for(var d in a)if(a[d]===b){c=!0;break}return c}function t(a,
c){for(var d=z+40,e=[],f=0,g=0,i=0;i<c.length;i++){var j=c[i];if(q(e,j.family)===!1&&j.description){var f=w+10+g*28,k=Math.floor(j.x-6+(j.width+12)/2),l=Math.floor(j.y-6+(j.height+12)/2);switch(j.family){case "background":a.beginPath();a.moveTo(k+70+0.5,f-4+0.5);a.lineTo(z+50+0.5,f-4+0.5);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=1;a.stroke();b.drawArc(a,k+70,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;case "Side":a.beginPath();a.moveTo(k+30+0.5,f-4+0.5);a.lineTo(z+50+0.5,f-4+0.5);a.strokeStyle=
"rgba(187,0,0,0.7)";a.lineWidth=1;a.stroke();b.drawArc(a,k+30,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;default:a.moveTo(k+0.5,l+0.5),a.lineTo(k+0.5,f-4+0.5),a.lineTo(z+50+0.5,f-4+0.5),a.strokeStyle="rgba(187,0,0,0.7)",a.lineWidth=1,a.stroke(),b.drawArc(a,k,l,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)")}a.globalAlpha=1;b.drawText(a,j.description,r+5+d,f,"bold 8pt sans-serif","#333");j.family&&e.push(j.family);g++}}b.drawText(a,h.clickDiagram,r+5+d,f+50,"bold 8pt sans-serif","#cc0000");b.drawText(a,
h.clickUpdate,r+5+d,f+65,"bold 8pt sans-serif","#cc0000");document.getElementById("stringcontainer").style.display="none"}var w=10,r=10,z=350,x=null,y=!0,G=!0,F=!1,E=!0,u=[],A=null,v=null,B=null;l.prototype.name=void 0;l.prototype.value=void 0;m.prototype.applyColor=function(){var a=document.getElementById(this.themebuilder.colorFieldId).firstChild.value;if(this.themebuilder.validateHex(a))u[x.id].fill=a,this.themebuilder.updateFamily(u[x.id].family,a),y=!1,this.themebuilder.refresh(),u[x.id].glow(z,
w),this.themebuilder.drawPicker(v,u[x.id]),f.node("pickercontainer").style.display="none",f.node("savecontainer").style.display="",f.node("stringcontainer").style.display=""};m.prototype.colorFieldId=void 0;m.prototype.settings=[];m.prototype.AUTONAME=!1;m.prototype.template='<div id="themeContainer"><canvas id="orionui" width="800" height="380""></canvas><div id="pickercontainer" style="display:block;"><span class="settingsLabel">'+h["Theme:"]+'</span><div id="themepicker" class="themepicker"></div></div><div id="savecontainer" style="display:none;"><span class="settingsLabel">'+
h["New Theme Name:"]+'</span><div id="themesaver" class="themesaver"></div></div><div id="sizecontainer"><span class="settingsLabel">'+h["Font Size:"]+'</span><div id="fontsizepicker" class="fontsizepicker"></div></div><div id="stringcontainer" style="position:relative;left:400px;top:-140px;display:none;"><span>'+h["OR HEX:"]+'</span><div id="colorstring" class="colorfield"></div><button class="commandButton" style="padding:5px;font-size:9pt;" type="button" id="colorButton">'+h.Ok+"</button></div></div>";
var D=["white,seashell,cornsilk,lemonchiffon,lightyellow,palegreen,paleturquoise,aliceblue,lavender,plum".split(","),"lightgray,pink,bisque,moccasin,khaki,lightgreen,lightseagreen,lightcyan,cornflowerblue,violet".split(","),"silver,lightcoral,sandybrown,orange,palegoldenrod,chartreuse,mediumturquoise,skyblue,mediumslateblue,orchid".split(","),"gray,red,orangered,darkorange,yellow,limegreen,darkseagreen,royalblue,slateblue,mediumorchid".split(","),"dimgray,crimson,chocolate,coral,gold,forestgreen,seagreen,blue,blueviolet,darkorchid".split(","),
"darkslategray,firebrick,saddlebrown,sienna,olive,green,darkcyan,mediumblue,darkslateblue,darkmagenta".split(","),"black,darkred,maroon,brown,darkolivegreen,darkgreen,midnightblue,navy,indigo,purple".split(",")];m.prototype.colornames=D;m.prototype.addAdditionalCommand=function(a){var b=new g.ParametersDescription([new g.CommandParameter("name","text",h["Commit message:"],"",4)],{hasOptionalParameters:!1});this.commandService.addCommand(new j.Command({name:a.name,tooltip:a.tip,parameters:b,id:a.id,
callback:function(b){a.callback(b)}.bind(this)}));this.commandService.registerCommandContribution("themeCommands",a.id,4)};m.prototype.validateHex=function(a){var b=!0;/^(#)?([0-9a-fA-F]{3})([0-9a-fA-F]{3})?$/.test(a)===!1&&(b=!1);return b};m.prototype.clear=o;m.prototype.refresh=function(){this.clear();F===!0&&this.drawOutlineData()};m.prototype.updateFamily=function(a,b){for(var c=0;c<u.length;c++)if(u[c].family){if(u[c].family===a)u[c].fill=b;for(var d in this.settings)if(this.settings[d].name===
a){this.settings[d].value=b;break}}};m.prototype.drawPicker=function(a,c){var d=z+40;b.drawText(a,c.description,r+d,w+10,"bold 9pt sans-serif","#555");b.drawText(a,h["COLOR:"],r+d,w+50,"8pt sans-serif","#555");b.drawRectangle(a,r+d+5,w+60,40,15,c.fill,null);b.drawText(a,c.fill,r+d+5+40+5,w+70,"8pt sans-serif","#555");b.drawLine(a,r+d,w+25,r+d+190,w+25,10,"#555");b.drawLine(a,r+d,w+85,r+d+190,w+85,5,"#555");b.drawText(a,h["NEW COLOR:"],r+d,w+115,"bold 8pt sans-serif","#555");if(E===!0){for(d=0;d<7;d++)for(var e=
1;e<11;e++){var f=b.drawArc(a,r+z+e*20+25,w+90+d*20+50,7,0,2*Math.PI,!1,null,D[d][e-1]);f.paintchip=!0;u.push(f)}E=!1}else for(d=0;d<u.length;d++)u[d].paintchip&&u[d].render();d=document.getElementById("stringcontainer");d.style.display="";d.zIndex=1;d=document.getElementById(this.colorFieldId);if(!this.colfld)this.colfld=new i({},d),this.colfld.show(),this.colfld.width("100px");d=document.getElementById("colorButton");d.themebuilder=this;d.onclick=this.applyColor};m.prototype.colfld=void 0;m.prototype.mouseDown=
function(a){y=!1;for(var b=s(a),a=b.x,b=b.y,c=0;c<u.length;c++)if(u[c].mouseOver(a,b))u[c].id=c,B=[],this.refresh(),B.push(u[c]);if(B.length>0){for(b=a=0;b<B.length;b++)B[b].width<B[a].width&&(a=b);y=B.length>0?!0:!1;switch(B[a].type){case "ELLIPSE":u[x.id].fill=B[a].fill;this.updateFamily(u[x.id].family,B[a].fill);y=!1;this.refresh();u[x.id].glow(z,w);this.drawPicker(v,u[x.id]);f.node("pickercontainer").style.display="none";f.node("savecontainer").style.display="";if(this.AUTONAME===!1)this.themeSaver.setValue(this.themeSelect.getSelected()),
this.AUTONAME=!0;break;case "RECTANGLE":case "ROUNDRECTANGLE":case "TEXT":B[a].glow(z,w),this.drawPicker(v,B[a]),x=B[a]}}};m.prototype.familyShown=q;m.prototype.overview=t;m.prototype.getCurrentSettings=function(){return this.settings};m.prototype.addData=function(a){this.settings=[];var b;F=!0;if(a){this.dataset=a;for(var c=0;c<a.shapes.length;c++)b=a.shapes[c].fill?a.shapes[c].fill:a.shapes[c].line,this.settings[a.shapes[c].family]=new l(a.shapes[c].family,b)}};m.prototype.drawShape=function(a,
c){var d;switch(a.type){case "RECTANGLE":d=b.drawRectangle(v,a.x,a.y,a.width,a.height,c,"#CCC");break;case "TEXT":d=b.drawText(v,a.label,a.x,a.y,a.font,c);break;case "ROUNDRECTANGLE":d=b.roundRect(v,a.x,a.y,a.width,a.height,5,c,"#CCC");break;case "LINE":b.drawLine(v,a.x1,a.y1,a.x2,a.y2,a.linewidth,c);break;case "TRIANGLE":b.drawTriangle(v,a.x1,a.y1,a.x2,a.y2,a.x3,a.y3,c);break;case "IMAGE":var e=new Image;e.onload=function(){v.drawImage(e,a.x,a.y)};e.src=a.source}if(d)d.description=a.name,d.family=
a.family,d.paintchip=!1,u.push(d)};m.prototype.drawOutlineData=function(a){a&&this.addData(a);A||(A=document.getElementById("orionui"),v=A.getContext("2d"),A.addEventListener("mousedown",this.mouseDown.bind(this),!1),A.addEventListener("mousemove",p,!1),A.addEventListener("mouseup",n,!1));if(G===!0){for(var b in this.dataset.shapes){if(this.settings&&this.settings[this.dataset.shapes[b].family])a=this.settings[this.dataset.shapes[b].family].value,this.dataset.shapes[b].fill?this.dataset.shapes[b].fill=
a:this.dataset.shapes[b].line=a;this.drawShape(this.dataset.shapes[b],this.dataset.shapes[b].fill,this.dataset.shapes[b].line,this.dataset.shapes[b].font)}G=!1}else for(var c in u)u[c].paintchip||u[c].render();y&&t(v,u)};m.prototype.apply=function(){this.preferences.getTheme(function(a){var b=this.settings.name,a=a.styles,c=f.node("themesaver"),d=c.firstChild.value;if(d.length>0){b=!1;if(a)for(var e=0;e<a.length;e++)if(a[e].name===d){b=!0;break}if(!b){b={};b.name=d;for(var g in this.settings)if(e=
this.settings[g].name,e!=="name")b[e]=this.settings[g].value;a.push(b)}b=d;c.firstChild.value=""}this.preferences.setTheme(b,a);this.settings.fontSize&&this.preferences.setFontSize(this.settings.fontSize.value);f.node("savecontainer").style.display="none";f.node("pickercontainer").style.display="";this.updateThemePicker(b,a);this.AUTONAME=!1}.bind(this))};m.prototype.revert=function(){this.guide();f.node("pickercontainer").style.display="";f.node("savecontainer").style.display="none";this.AUTONAME=
!1};m.prototype.guide=function(a){this.refresh();y=!0;a=this.themeData.getViewData();this.drawOutlineData(a);f.node("stringcontainer").style.display="none"};m.prototype.select=function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(d.name===a){this.settings.name=a;for(var e in this.settings)if(e!=="name")this.settings[e].value=d[this.settings[e].name];break}}o();k();this.refresh()};m.prototype.selectFontSize=function(a){this.settings.fontSize={value:a}};m.prototype.updateFontSizePicker=function(a){for(var b=
[],c=8;c<19;c++){var e={value:c+"pt",label:c+"pt"};if(c===a)e.selected="true";b.push(e)}this.sizeSelect.destroy();a=document.createElement("div");a.id="fontsizepicker";document.getElementById("sizecontainer").appendChild(a);this.sizeSelect=new d({options:b},a);this.sizeSelect.setStorageItem=this.selectFontSize.bind(this);this.sizeSelect.show()};m.prototype.addFontSizePicker=function(a){a=a.style.fontSize;document.getElementById("sizecontainer");for(var b=document.getElementById("fontsizepicker"),
c=[],e=8;e<19;e++){var f={value:e+"pt",label:e+"pt"};if(f.value===a)f.selected="true";c.push(f)}if(!this.sizeSelect)this.sizeSelect=new d({options:c},b),this.sizeSelect.setStorageItem=this.selectFontSize.bind(this),this.sizeSelect.show()};m.prototype.addThemePicker=function(a){for(var b=[],c=a.style.name,a=a.styles,e=0;e<a.length;e++){var f={value:a[e].name,label:a[e].name};if(a[e].name===c)f.selected=!0;b.push(f)}this.select(c,a);c=document.getElementById("themepicker");if(!this.themeSelect)this.themeSelect=
new d({options:b},c),this.themeSelect.setStorageItem=this.selectTheme.bind(this),this.themeSelect.show(),b=document.getElementById("themesaver"),this.themeSaver=new i({},b),this.themeSaver.show()};m.prototype.updateThemePicker=function(a,b){var c=[],e;for(e in b){var f={value:b[e].name,label:b[e].name};if(a&&b[e].name===a)f.selected=!0;c.push(f);this.themeSelect.destroy();f=document.createElement("div");f.id="themepicker";for(var g=document.getElementById("themepicker"),h=g.firstChild;h;)g.removeChild(h),
h=g.firstChild;g.appendChild(f);this.themeSelect=new d({options:c},f);this.themeSelect.setStorageItem=this.selectTheme.bind(this);this.themeSelect.show()}};m.prototype.renderData=function(a,b){var c=this.themeData.getViewData();b&&b==="INITIALIZE"&&(G=!0);a.innerHTML=this.template;var d=this.themeData.getThemeStorageInfo(),e=document.getElementById("colorstring");this.colorFieldId=d.styleset+"colorField";e.id=this.colorFieldId;f.node("sizecontainer").style.display=this.themeData.fontSettable?"block":
"none";this.drawOutlineData(c);this.preferences.getTheme(function(a){this.addFontSizePicker(a);this.addThemePicker(a)}.bind(this));this.commandService.renderCommands("themeCommands",document.getElementById(this.toolbarId||"revertCommands"),this,this,"button")};m.prototype.selectTheme=function(a){this.preferences.getTheme(function(b){this.select(a,b.styles)}.bind(this))};m.prototype.addTheme=function(a){this.preferences.getTheme(function(b){var c=a.name;b.styles.push(a);this.preferences.setTheme(c,
b.styles);this.select(c,b.styles);this.updateThemePicker(c,b.styles)}.bind(this))};m.prototype.destroy=function(){var a=this.themeSelect;a&&a.destroy();(a=this.themeSaver)&&a.destroy();(a=this.colfld)&&a.destroy();(a=this.fontsizepicker)&&a.destroy()};return m});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(h){function j(g,c){c||(c="orion.page.selection");this._serviceRegistry=g;h.attach(this);this._serviceRegistration=g.registerService(c,this);this._selections=null}j.prototype={getSelection:function(g){var c=this._getSingleSelection();typeof g==="function"&&g(c);return c},getSelections:function(g){var c=Array.isArray(this._selections)?this._selections.slice():[];typeof g==="function"&&g(c);return c},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(g){var c=this._selections;this._selections=Array.isArray(g)?g.length>0?g.slice():null:g?[g]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};j.prototype.constructor=j;return{Selection:j}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commandRegistry","orion/commonHTMLFragments"],function(h,j,g,c){function e(b,a){var d=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!a.id)throw Error("Missing required argument: id");this.id=a.id;if(!a.title)throw Error("Missing required argument: title");var e=a.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");b.appendChild(this.domNode);for(var f=0;f<e.length;f++)this.domNode.classList.add(e[f]);this.domNode.id=a.id;if(a.canHide)this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitle"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=0,this.domNode.addEventListener("click",
function(a){(a.target===d.titleNode||a.target===d.twistie)&&d._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(a){a.keyCode===h.KEY.ENTER&&(a.target===d.domNode||a.target===d.titleNode||a.target===d.twistie)&&d._changeExpandedState()},!1);if(a.iconClass){var g=document.createElement("span");g.classList.add("sectionIcon");this.domNode.appendChild(g);(Array.isArray(a.iconClass)?a.iconClass:[a.iconClass]).forEach(function(a){g.classList.add(a)})}this.titleNode=document.createElement("div");
this.titleNode.id=a.id+"Title";this.titleNode.classList.add("sectionAnchor");this.titleNode.classList.add("sectionTitle");this.titleNode.classList.add("layoutLeft");this.domNode.appendChild(this.titleNode);this.titleNode.textContent=a.title;if(typeof a.getItemCount==="function")e=document.createElement("div"),e.classList.add("layoutLeft"),e.classList.add("sectionItemCount"),this.domNode.appendChild(e),e.textContent=a.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=
a.id+"Progress";this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);e=document.createElement("div");e.id=a.id+"FilterSearchBox";this.domNode.appendChild(e);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=a.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");
this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("div");this.actionsNode.id=a.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("sectionActions");this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("div");this.selectionNode.id=a.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);a.slideout&&(e=c.slideoutHTMLFragment(a.id),f=document.createRange(),f.selectNode(this.domNode),e=f.createContextualFragment(e),this.domNode.appendChild(e));this._contentParent=document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);b.appendChild(this._contentParent);a.content&&this.setContent(a.content);
this.hidden=a.hidden;if(typeof a.onExpandCollapse==="function")this._onExpandCollapse=a.onExpandCollapse;this._preferenceService=a.preferenceService;this._contentParent.style.display="none";if(this._preferenceService){var j=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(j.id);if(a!==void 0)j.hidden=!a;if(!j.hidden)j._contentParent.style.display="block";j._updateExpandedState(!j.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=a.commandService;this._lastMonitor=0;this._loading={}}function f(b){this._section=b;this._id=++b._lastMonitor}e.prototype={setTitle:function(b){this.titleNode.textContent=b},setContent:function(b){typeof b==="string"?this._contentParent.innerHTML=b:(this._contentParent.innerHTML="",this._contentParent.appendChild(b))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new f(this)},_setMonitorMessage:function(b,a){this._progressNode.style.visibility=
"visible";this._loading[b]=a;var c="",e;for(e in this._loading)c!==""&&(c+="\n"),c+=this._loading[e];this._progressNode.title=c},_monitorDone:function(b){delete this._loading[b];var b="",a;for(a in this._loading)b!==""&&(b+="\n"),b+=this._loading[a];this._progressNode.title=b;if(b==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.hidden=!1):(this._contentParent.style.display="none",this.hidden=!0);this._updateExpandedState(!this.hidden,
!0)},_updateExpandedState:function(b,a){var c=this.twistie,e=this.id;c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass));this._preferenceService&&a&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(e,b)});this._onExpandCollapse&&this._onExpandCollapse(b,this)}};e.prototype.constructor=e;f.prototype={begin:function(b){this.status=b;this._section._setMonitorMessage(this.id,b)},worked:function(b){this.status=
b;this._section._setMonitorMessage(this.id,b)},done:function(b){this.status=b;this._section._monitorDone(this.id)}};f.prototype.constructor=f;return{Section:e}});
define("orion/widgets/input/Checkbox",["orion/objects","orion/webui/littlelib"],function(h,j){function g(c,e){h.mixin(this,c);this.node=e||document.createElement("div");this.node.innerHTML=this.templateString;this.checkbox=j.$(".setting-control",this.node)}h.mixin(g.prototype,{templateString:'<label><input class="setting-control settingsCheckbox" type="checkbox"/></label>',show:function(){this.checkbox.addEventListener("change",this.change.bind(this));this.postCreate()},destroy:function(){if(this.node)j.empty(this.node),
this.checkbox=this.node=null},setStorageItem:function(){},isChecked:function(){return this.checkbox.checked},setChecked:function(c){this.checkbox.checked=c},getSelection:function(){return this.isChecked()},setSelection:function(c){this.setChecked(c)},change:function(){this.setStorageItem(this.checkbox.value)},postCreate:function(){this.checkbox.style.width="20px";this.editmode&&this.editmode==="readonly"&&this.checkbox.setAttribute("disabled","disabled")}});return g});
define("orion/widgets/input/LabeledCheckbox",["orion/objects","orion/webui/littlelib","orion/widgets/input/Checkbox"],function(h,j,g){function c(c,f){g.apply(this,arguments);this.mylabel=j.$(".setting-label",this.node)}h.mixin(c.prototype,g.prototype,{templateString:'<label><span class="setting-label"></span><input class="setting-control settingsCheckbox" type="checkbox"/></label>',postCreate:function(){g.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){g.prototype.destroy.call(this);
if(this.mylabel)this.mylabel=null}});return c});
define("orion/widgets/input/LabeledTextfield",["orion/objects","orion/webui/littlelib","orion/widgets/input/TextField"],function(h,j,g){function c(c,f){g.apply(this,arguments);this.mylabel=j.$(".setting-label",this.node)}h.mixin(c.prototype,g.prototype,{templateString:'<div class="setting-property"><label><span class="setting-label"></span><input class="setting-control" type="text" /></label></div>',destroy:function(){g.prototype.destroy.call(this);if(this.mylabel)this.mylabel=null},postCreate:function(){g.prototype.postCreate.call(this);
this.mylabel.textContent=this.fieldlabel+":"}});return c});
define("orion/widgets/input/LabeledSelect",["orion/objects","orion/webui/littlelib","orion/widgets/input/Select"],function(h,j,g){function c(c,f){g.apply(this,arguments);this.mylabel=j.$(".setting-label",this.node)}h.mixin(c.prototype,g.prototype,{templateString:'<div class="setting-property"><label><span class="setting-label"></span><select class="setting-control"></select></label></div>',postCreate:function(){g.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){g.prototype.destroy.call(this);
if(this.mylabel)this.mylabel=null}});return c});
define("orion/settings/ui/PluginSettings","i18n!orion/settings/nls/messages,orion/explorers/explorer,orion/section,orion/i18nUtil,orion/Deferred,orion/objects,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledSelect".split(","),function(h,j,g,c,e,f,b,a,d){function i(a,b){this.serviceRegistry=b;this.childWidgets=[];o.call(this,{cachePrefix:"pluginSettings"},a)}function k(a,b){m.call(this,a,b,new i(this,a))}function l(a){var b=a.parent,c=a.serviceRegistry,
d=a.settings;if(!a.parent||!a.serviceRegistry||!a.settings||!a.title)throw Error("Missing required option");this.parent=typeof b==="string"?document.getElementById("parent"):b;this.render(b,c,d,a.title)}var m=j.Explorer,o=j.SelectionRenderer,s=g.Section,p=function(a){f.mixin(this,a);this.fieldlabel=this.property.getName()};f.mixin(p.prototype,{postCreate:function(){var a=this.property,b=this.configuration.getProperties(),a=b&&typeof b[a.getId()]!=="undefined"?b[a.getId()]:a.getDefaultValue();typeof this.updateField===
"function"&&this.updateField(a)},changeProperty:null,updateField:null});var n=function(b){p.apply(this,arguments);a.apply(this,arguments)};f.mixin(n.prototype,a.prototype,p.prototype,{postCreate:function(){a.prototype.postCreate.apply(this,arguments);p.prototype.postCreate.apply(this,arguments);this.textfield.type=this.property.getType()==="number"?"number":"text"},change:function(){this.changeProperty(this.textfield.value)},updateField:function(a){this.textfield.value=a}});var q=function(a){p.apply(this,
arguments);b.apply(this,arguments)};f.mixin(q.prototype,b.prototype,p.prototype,{change:function(a){this.changeProperty(a.target.checked)},postCreate:function(){p.prototype.postCreate.call(this);b.prototype.postCreate.call(this)},updateField:function(a){this.checkbox.checked=a}});var t=function(a){p.apply(this,arguments);d.apply(this,arguments)};f.mixin(t.prototype,d.prototype,p.prototype,{postCreate:function(){var a=this.property.getOptionValues(),b=this.property.getOptionLabels();this.options=a.map(function(a,
c){var d=typeof b[c]==="string"?b[c]:a;return{value:d,label:d}});d.prototype.postCreate.apply(this,arguments);p.prototype.postCreate.apply(this,arguments)},change:function(a){d.prototype.change.apply(this,arguments);var b=this.property.getOptionValues()[this.getSelectedIndex()];typeof b!=="undefined"&&this.changeProperty(b)},updateField:function(a){a=this.property.getOptionValues().indexOf(a);a!==-1&&this.setSelectedIndex(a)}});var w=function(a,b){f.mixin(this,a);if(!b)throw"parentNode is required";
this.node=b};f.mixin(w.prototype,{createElements:function(){var a=this.serviceRegistry,b=this;this.children=[];this.configAdmin=a.getService("orion.cm.configadmin");this.initConfiguration().then(function(a){b.createChildren(a)})},startup:function(){this.createElements()},destroy:function(){this.children&&this.children.forEach(function(a){a.destroy()})},addChild:function(a){this.children.push(a);this.node.appendChild(a.node);a.show()},initConfiguration:function(){var a=this.configuration;if(a)return(new e).resolve(a);
else{var b=this;return this.configPromise=this.configPromise||this.configAdmin.getConfiguration(this.setting.getPid()).then(function(a){return b.configuration=a})}},createChildren:function(a){var b=this;this.setting.getAttributeDefinitions().forEach(function(c){var d={property:c,configuration:a,serviceRegistry:b.serviceRegistry,changeProperty:b.changeProperty.bind(b,c)},e;if(c.getOptionValues())e=new t(d);else switch(c.getType()){case "boolean":e=new q(d);break;case "number":case "string":e=new n(d)}b.addChild(e)})},
changeProperty:function(a,b){this.initConfiguration().then(function(c){var d=this.setting,e=c.getProperties()||{};e[a.getId()]=b;d.isDefaults(e)?(c.remove(),this.configPromise=this.configuration=null):c.update(e)}.bind(this))}});i.prototype=new o;i.prototype.getCellElement=function(a,b,c){var d=b.getPid(),e=d+"header",a=document.createElement("section");a.id=d;a.className="setting-row";a.setAttribute("role","region");a.setAttribute("aria-labelledby",e);d=document.createElement("h3");d.id=e;d.className=
"setting-header";d.textContent=b.getName();e=document.createElement("div");e.className="setting-content";b=this.createPropertiesWidget(e,b);this.childWidgets.push(b);b.startup();a.appendChild(d);a.appendChild(e);c.appendChild(a)};i.prototype.createPropertiesWidget=function(a,b){return new w({serviceRegistry:this.serviceRegistry,setting:b},a)};i.prototype.renderTableHeader=function(){return document.createElement("div")};i.prototype.destroy=function(){this.childWidgets&&this.childWidgets.forEach(function(a){a.destroy()});
this.childWidgets=null};k.prototype=new m;k.prototype.destroy=function(){this.renderer&&this.renderer.destroy()};l.prototype={_makeSection:function(a,b,c,d){return new s(a,{id:b,title:d,useAuxStyle:!0,getItemCount:function(){return c.length}})},destroy:function(){this.explorer.destroy()},render:function(a,b,c,d){a=this._makeSection(a,"pluginsettings-section",c,d);this.explorer=new k(b);this.explorer.createTree(a.getContentElement().id,new j.SimpleFlatModel(c,"setting-",function(a){return a.getPid()}),
{tableElement:"div",tableBodyElement:"div",tableRowElement:"div"})}};return l});
define("orion/widgets/settings/SplitSelectionLayout",["i18n!orion/settings/nls/messages","require","orion/webui/littlelib","orion/objects"],function(h,j,g,c){function e(e,b,a){c.mixin(this,e);this.selectionNode=b;this.contentNode=a;this.itemToIndexMap=null;this.toolbar=g.node(this.pageActions);this.selectionNode.innerHTML=this.categoriesTemplateString;this.contentNode.innerHTML=this.contentTemplateString;this.navbar=g.$(".navbar",this.selectionNode);this.table=g.$(".split-selection-table",this.contentNode)}
c.mixin(e.prototype,{categoriesTemplateString:'<div id="categories" class="categories"><div id="categoryNode" class="sidePanelMargins"><ul class="navbar" role="tablist" aria-labelledby="content-title"></ul></div></div>',contentTemplateString:'<div class="settings" role="tabpanel">\t<div class="split-selection-table"></div></div>',show:function(){this.itemToIndexMap={};this.drawUserInterface()},updateToolbar:function(){this.toolbar&&g.empty(this.toolbar)},addCategory:function(c,b){var b=typeof b===
"undefined"?0:b,a=document.createElement("li");a.classList.add("navbar-item");a.setAttribute("role","tab");a.setAttribute("aria-selected","false");a.tabIndex=-1;a.textContent=c.textContent;Object.keys(c).forEach(function(b){b==="show"||b==="onclick"?a.addEventListener("click",c[b]):a.setAttribute(b,c[b])});this.navbar.appendChild(a);this.itemToIndexMap[c.id]=b},selectCategory:function(c){if(this.selectedCategory)this.selectedCategory.classList.remove("navbar-item-selected"),this.selectedCategory.setAttribute("aria-selected",
"false"),this.selectedCategory.tabIndex=-1;if(c)this.selectedCategory=g.node(c);this.selectedCategory.classList.add("navbar-item-selected");this.selectedCategory.setAttribute("aria-selected","true");this.contentNode.setAttribute("aria-labelledby",c);this.selectedCategory.tabIndex=0;this.selectedCategory.focus()},showSettings:function(c){this.selectCategory(c);this.updateToolbar(c)},drawUserInterface:function(){g.empty(this.navbar);var c=this,b;this.navbar.addEventListener("keydown",function(a){if(a.keyCode===
g.KEY.LEFT||a.keyCode===g.KEY.UP)c.selectedCategory.previousSibling&&(b=document.createEvent("MouseEvents"),b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c.selectedCategory.previousSibling.dispatchEvent(b));else if((a.keyCode===g.KEY.RIGHT||a.keyCode===g.KEY.DOWN)&&c.selectedCategory.nextSibling)b=document.createEvent("MouseEvents"),b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c.selectedCategory.nextSibling.dispatchEvent(b)})}});return e});
define("orion/widgets/plugin/ServiceCarousel",["i18n!orion/settings/nls/messages","orion/objects","orion/webui/littlelib"],function(h,j,g){function c(c,b){var a=c.style;a.left=b.left+"px";a.top=b.top+"px";a.width=b.width+"px";a.height=b.height+"px"}function e(c,b){j.mixin(this,c);this.node=document.createElement("div");if(!this.node)throw Error("parentNode is required");b.appendChild(this.node)}j.mixin(e.prototype,{serviceState:!1,pointer:0,box:null,closedIcon:"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46FewKfYYAAAF4SURBVCjPbZEvyFNhGMV/590ciANhjNs2nC66osHiJ8b9cdVgN4uKyWbRaDGZBIvwYRB2723WBUEEy5igYeZxYQzd7t2x7IUFn/bAOec55zxK05TxeEyWZZds3wEeAXeBP8An4I3tr5PJZJemKQLIsiyxfQ6c8f95V1XVw+l0utdsNrsInEsaA5akE6Btx/3Vfr9/HiTdOIIBKMsS29gGOCU/bTQanWD7QVQry1Lz+ZzFYsFutyOEgCQkGbhg+1Zd0vRIkG2KomC5XLJarej3+3S7XUII8dJZHehIihaQxHq9ZrvdUhQFzWaTdrvNEXO1DvwCrkSjh8OBJEnodrv0ej1arVZMD/CjLumj7SexoSRJGAwGdDodarVaBFqSbH9WlmU3gS9RHSCEgG1iw8fW/gLXAvDd9gfbhBAIIThmOf4hZnux2Wx+CyDP88tVVb2XdC9mOVUHXo9Go8eSCFmWMRwOC+A+cBt4C/y0/c32S+C6pGeSyPOcfyAyt4A7QPcNAAAAAElFTkSuQmCC",
openIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46NddkXU4AAAFuSURBVCjPXZG/q9NwFMU/5yYQOhVKoF1SDK9OOjl1URxcQl+G5/LgLeJf4K7wRjdBxMXRxcFR6TfZ3e3iUGe3DKXYQSEk10GjwbPdy+X8uEdVVVEUBVVVJcBt4MrdHwI3gG/u/lHSO3f/vNlsfoQQEEBd19O+799IunR3JAHg7gxw92Bmj4uiaLTdbifAe0nnkvDfl+IfxvMnSUUs6Q5wLom+7+m6TmMFSYrjeFjcdfd7MfBozLjb7WiaBjPD3ZlOp6zXa8VxPNh9YsCDgdTMmM/nHI9H9vs9TdOQpilRFI3cct+A7+PgWZaxXC5JkoQsy8jznP/w04Aw2JNEFEXkec5isWC1WjGZTIZvDrk+KIRwC/jyJzQAfd9zOByYzWZ/s42wNklfgZejXtzMSNMUMxsrALx1952G46qqnrr7tZklQ8EjhRZ40XXddVmWrdV1jSROp9Nz4MzdL4BX7h6A18ClpJtt2z4ry7INIfAL982ks01Z8EgAAAAASUVORK5CYII=",
templateString:'<div class="plugin-service-carousel" ><div class="serviceContainer"><div class="serviceContainerClosed" tabindex="0" role="button" aria-pressed="false">${Services}</div><div class="serviceCount">0</div></div><div class="serviceRails serviceRailsHidden" tabindex="0" role="group"><div class="leftButton leftButtonArea" role="presentation"><span class="leftCarousel carouselControl">&lt;</span></div><div class="listContainer" role="presentation"><ul class="serviceList"></ul></div><div class="rightButton rightButtonArea" role="presentation"><span class="rightCarousel carouselControl">&gt;</span></div></div></div>',
createElements:function(){this.node.innerHTML=this.templateString;g.processTextNodes(this.node,h);var c=this.serviceLabel=g.$(".serviceContainerClosed",this.node);this.serviceCount=g.$(".serviceCount",this.node);var b=this.rails=g.$(".serviceRails",this.node);this.leftbutton=g.$(".leftButton",this.node);this.listContainer=g.$(".listContainer",this.node);this.testlist=g.$(".serviceList",this.node);this.rightbutton=g.$(".rightButton",this.node);g.$(".leftCarousel",this.node).addEventListener("click",
this.slideLeft.bind(this));g.$(".rightCarousel",this.node).addEventListener("click",this.slideRight.bind(this));c.addEventListener("click",this.showServices.bind(this));c.addEventListener("keypress",this.onServiceClick.bind(this));b.addEventListener("mouseenter",this.showButtons.bind(this));b.addEventListener("mouseleave",this.hideButtons.bind(this));b.addEventListener("focus",this.showButtons.bind(this));b.addEventListener("blur",this.hideButtons.bind(this));b.addEventListener("keypress",this.handleKeypress.bind(this));
this.postCreate()},destroy:function(){if(this.node)this.node=this.serviceLabel=this.serviceCount=this.rails=this.leftbutton=this.listContainer=this.testlist=this.rightbutton=null},postCreate:function(){var c=g.bounds(this.node.parentNode);this.addData(this.serviceData);this.serviceLabel.textContent=h.Services;this.serviceCount.textContent=this.serviceData.length;this.node.style.width=c.width-63+"px"},show:function(){this.createElements()},expand:function(){this.rails.classList.remove("serviceRailsHidden");
this.rails.classList.add("serviceRailsVisible");this.serviceLabel.classList.remove("serviceContainerClosed");this.serviceLabel.classList.add("serviceContainerOpen");this.serviceState=!0},collapse:function(){this.serviceLabel.classList.remove("serviceContainerOpen");this.serviceLabel.classList.add("serviceContainerClosed");this.rails.classList.remove("serviceRailsVisible");this.rails.classList.add("serviceRailsHidden");this.serviceState=!1},showServices:function(){this.serviceState===!1?(this.expand(),
this.box?g.bounds(this.rails,this.box):this.box=g.bounds(this.rails)):(g.bounds(this.rails,{height:0}),this.collapse())},onServiceClick:function(c){if(c.keyCode===g.KEY.ENTER||c.charCode===g.KEY.SPACE)this.showServices(),this.serviceState===!1?c.target.setAttribute("aria-pressed","true"):c.target.setAttribute("aria-pressed","false"),c.preventDefault()},showButtons:function(){this.leftbutton.style.visibility=this.serviceData.length>1&&this.pointer>0?"visible":"hidden";this.rightbutton.style.visibility=
this.serviceData.length>1&&this.pointer<this.serviceData.length-1?"visible":"hidden";var c=g.bounds(this.rails),b=g.bounds(this.leftbutton.firstChild),c=Math.round(c.height/2)-Math.round(b.height)+"px";this.leftbutton.firstChild.style.top=c;this.rightbutton.firstChild.style.top=c},hideButtons:function(){this.leftbutton.style.visibility="hidden";this.rightbutton.style.visibility="hidden"},slideRight:function(){this.box=g.bounds(this.rails);if(this.pointer<this.serviceData.length-1){this.pointer+=1;
for(var e=0;e<this.pointer;e++)this.listContainer.childNodes[0].childNodes[e].style.display="none";c(this.rails,this.box)}this.showButtons()},slideLeft:function(){this.box=g.bounds(this.rails);if(this.pointer>0)this.pointer-=1,this.listContainer.childNodes[0].childNodes[this.pointer].style.display="";this.showButtons();c(this.rails,this.box)},consoleOutput:function(c){console.log("Service: "+c.title+" Element: "+c.item+":");console.dir(c.value)},createServiceTable:function(c,b){var a=document.createElement("li");
a.classList.add("serviceData");b.appendChild(a);var d=document.createElement("div");d.classList.add("listEntry");a.appendChild(d);a=document.createElement("div");a.classList.add("tablecontainer");d.appendChild(a);var e=document.createElement("table");a.classList.add("serviceTable");a.appendChild(e);e.innerHTML='<thead><tr><th scope="col">${Item}</th><th scope="col">${Value}</th></tr></thead>';g.processTextNodes(e,h);a=document.createElement("tbody");e.appendChild(a);for(e=0;e<c.items.length;e++){var j=
document.createElement("tr"),l=document.createElement("td");l.textContent=c.items[e].item;j.appendChild(l);a.appendChild(j);var m=c.items[e].value,l=document.createElement("td");j.appendChild(l);typeof m==="object"?(j={title:c.service,item:c.items[e].item,value:m},m=document.createElement("span"),m.classList.add("objectLink"),m.title=h["click here, then check javascript console to drill down"],m.addEventListener("click",this.consoleOutput.bind(this,j)),m.textContent=h["JavaScript Object"],l.appendChild(m)):
l.textContent=m}a=document.createElement("div");a.classList.add("listTitle");a.textContent=c.service;d.appendChild(a)},addData:function(c){var b;for(b=0;b<c.length;b++)this.createServiceTable(c[b],this.testlist)},handleKeypress:function(c){c.keyCode===g.KEY.LEFT&&this.leftbutton.style.visibility!=="hidden"?this.slideLeft():c.keyCode===g.KEY.RIGHT&&this.rightbutton.style.visibility!=="hidden"&&this.slideRight()}});return e});
define("orion/widgets/plugin/PluginEntry",["i18n!orion/settings/nls/messages","orion/PageUtil","orion/objects","orion/webui/littlelib","orion/widgets/plugin/ServiceCarousel"],function(h,j,g,c,e){function f(a){var b=a.split("/"),b=b[b.length-1],b=b.split(".html")[0],b=b.replace(/([a-z])([A-Z])/,"$1 $2"),b=function(a){return a.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})}(b),b=b.replace("plugin",""),b=b.replace("Plugin","");b===""&&(b=a);return b}function b(a){var b=[];a.getServiceReferences().forEach(function(a){var c=
{service:a.getProperty("objectClass").join(" "),items:[]};a.getPropertyKeys().forEach(function(b){b={item:b,value:a.getProperty(b)};c.items.push(b)});b.push(c)});return b}function a(a,b){g.mixin(this,a);this.node=b||document.createElement("div")}g.mixin(a.prototype,{iconSource:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBFxMFB6T1TK0AAAfOSURBVGjevZpLbFzlGYaf9x87DnZCyLUhCSSOY9PgmdwQdxrRVqhR1aYgpVXUTbvohgqRtrQCsWjFolSqBIUKCXXRsmkFCygiUpu2QgkFWkoIGOKZQIRj5yYSUifNhdiO7TlvF/+Mb4zt8bGTszmamXP+//2+7/2u/4gZulxgAYmWWl4kWG6zVGI+5gLQjziOOeYQzmgwOar19AMkpyEsTL+v0ryUAKEMfD8PWNqBvExWLVADyAI8YgcDOEEaxB5A2if5Z2rlHQDnQdnLLIALoFZwO3cgHsTahsiAsbGkqtazbYGMQHwi/AeLp0Irp/0BaP0MCpDsBhozhMYiyX41EPxXoc3YIM0I+2yXVtLDlp8OWS5Va5GqESR5PS57B1J93HFm0I8SBAtzWLBdOd5O8hCy07VAnvkyO4G7jCwx08DHmgMhkB9SlieT9kDIJVMXwAUArnWiDqBeGuWSl1MASyX/MDtDzt8q+16lK4y7UMJyzH7J9eDxwSeG2ZtKj0z/itSUsS15a5Jnl1ohOabJBUjypXuBBZKO2CwEUZHvdoyNjbugaR/U3zVjQpTkENEKW5zXK+E6k+yfRAD1LI73hD1AZlI/nX0TzNkSgTe+Bg1fHi2EDUVPVzAbtrqdHWFdzBcVBUjeA9/8X5zX7yzW4Uk4L0HPu3BseylLBWjcDXNLAtlQ1wI3fAj1t6UWQpIUHeMpt3PL2NA6CmDyAdeR4ahQ9Q5rQ8NmaPwnQ7mh83YYPAktXaVnivBxC/R3psodZcfGdGLWOtBfDq+jKZTRv+QpZmgJPnsdujZHS9iw+i1oenfYEspAc0dqSwz5A6wm6IGRuWEIqNv5PuK5qZQEn7fE3dC4hwmzdEcW+grpLAGWLcRcxGdqhZB8VPpRejA1+PLV1wZJX0kvrhC1gKb3oSFlxLJLq+on5bwgAB+giSIdFbVS3mgiuWyoXQ5rCpCZR1V10uGvwWf/SGMJ2xwJOTe6UPIBF3nW44GvawHVTLxkzSJoOVod+LJCVv0drro5jSUkWOUC69QKwQXmSnxJY21uw7xt0HwQVvwpZlxXoEVmITS1g0J1mi//bkPTXpi1JkVsNSR6LEahJFxvq6Zi5Fn0SLzP+w6sfHkY5Eja3PAp1C6dnGZjBZegdy8MHEqTHWz5nuRDFKzki+Caiprquh362uPnq++FVa+P0PyCyPmRQk0F/IW/QOcdaROcQDUUw/UBs35czXkQDq2D3rb4ueFOWLkTZq2Elo7qHXasYi7sgiPfiM1pyqAnuwYnC4NQ9nMhb0zwpWPTsCXmfBOaOyEzn1RdmQfhxP3TL7tRRmJJQCybCD8SBEHnLdESItKGlC2lamDVaxPqrFpD2iwOmPpJCwcbMtdAXfP0Bhplvl98FWYtn1aVWirWFoeqNg1XQdN7EOak37RMt/M749bXfA9UO20hAvjSpNqc1QyZJelpUwZ/7nk4/xIMnopRbPU76SkUlzwbkLon1IIEffuh8zZwMqLG8dTA9xWg5y2Ytz3ScdFD0F+Yli8YzgXsfFXZs3cfdN0J7p+wRa4I/uIb0P04zM7F+L/gfujZC2efTz8mkBPM8WCRr0oLEvS8DUe+Du4bw8QxTpr0Db8zcBy6fw2LH4Oef8OyZ6IlMvNh8aPTiUODks4ErAJQrL552R1r+qS3RCmN1nbPW/BxI5x7EYoX4fh3YfHP4cQDsPy5SKVZzTGi9f4nFYVsGzxAxp/IeRYBx0B1U2ojr9oEq/ZAZm4ppgkuvgmH744tpIHMbFjxPJx7Aa57AQaOQjIAdY3DzeCnj8KpX8X3VX1QsPR+yHpjUJZuW8ewp9ZG9rVB560RrASXDsLhrw6XB0GRakfvg+L/4vOHNkCxGw7Mg+KFuNYXHodlvy31QK56fyX+5VA2Stq1RfKuKXuUDXVro1OefAg8wLhNkUc0agJqV0DzRxAa4jNnnoXjP4SMqok+F0LWV8cR0H4ozVu6QQtSpdhUNZEh1MfJRc2S+N3pp+HEjyYpzQ3m98rxA4AQ1g2t9xtwytJQ6d5JeuDjtcNRa+EOWPHHcR3bjicLFk+4fURBk+wGFtGAdF5yuAIz3NGWqFkaxzC1y+J33U/AyZ+Ooxy/qCzfrliROc8WrF3mssz/Jy/ybjgeu7zBM3Dw2pg0SzAcqXMWa7mCezR2sJXkgd66vxn2quJc5DJeZV0d2hCTZcfaUeDL+CV+EdYNg69YEydt1KmGs0AdV9IKI8f1GhZqaKyIXlLW28ae2oymUDsoB0leNwH7xJU51JhsCAQ6ReJV6lvSq1tPVXlCk+c+W3/mSvvD2HwLh12kNaynp+oTGneBsrwsfK8keeg044ppPWYW6zyBDaqpDH5cAdQI3gPK8YrNTZhL2IrrXn61A8J+04mX6UbOjXc+VnVjm7RRR61ex9wSj990WbQe5+gewHpSOT9SzXuT9sRuh7CRS+qvvVXB98gaiCfzM2eNEtmFnWeAJcr5EXdlYoKdrgDKlTap60etvGp7geFhxCe2cUphht6xQbxha2vIkdNGzia7QY1FwleqGtFNQ3MFbXbCM8hrhGYBmRKBS8lVpflNjO1RyQbUjzwIvESGH4e1nE6dA1ODPwC6cSiLzwetxG4BsqCsxBzwEuCSrTOCbnAbIm+HLik5omzpLzedEFanw/F/byy0oCz4lroAAAAASUVORK5CYII=",
templateString:'<div class="plugin-entry" style="overflow:hidden;"><div class="plugin-list-item"><div><div class="plugin-icon"></div><span class="plugin-commands"></span><div class="stretch"><span class="plugin-title"></span><div></div><span class="plugin-description"></span><div class="plugin-links" style="font-size:11px"></div></div></div></div><div class="plugin-service-item" ></div></div>',serviceDescriptions:null,createElements:function(){this.node.innerHTML=this.templateString;this.pluginTitle=
c.$(".plugin-title",this.node);this.pluginDescription=c.$(".plugin-description",this.node);this.pluginLinks=c.$(".plugin-links",this.node);this.commandSpan=c.$(".plugin-commands",this.node);this.serviceContainer=c.$(".plugin-service-item",this.node);this.postCreate()},destroy:function(){if(this.node)this.node=this.pluginTitle=this.pluginDescription=this.pluginLinks=this.commandSpan=this.serviceContainer=null},show:function(){this.createElements()},addPluginLink:function(a,b){if(j.validateURLScheme(b)){var c=
document.createElement("a");c.classList.add("plugin-link");c.href=b;c.title=a;c.textContent=a;this.pluginLinks.appendChild(c)}else console.log("Illegal "+a+" URL: "+b)},postCreate:function(){var a=this.plugin.getHeaders(),c=this.plugin.getLocation();this.pluginTitle.textContent=a.name||f(c);this.pluginDescription.textContent=a.description||h["A plugin for Eclipse Orion"];this.addPluginLink("Plugin",c);a.website&&this.addPluginLink("Website",a.website);a.license&&this.addPluginLink("License",a.license);
a.login&&this.addPluginLink("Login",a.login);this.commandSpan.id=c;this.commandService.renderCommands("pluginCommand",this.commandSpan,c,this,"tool");this.serviceDescriptions=b(this.plugin);this.carousel=new e({serviceData:this.serviceDescriptions},this.serviceContainer);this.carousel.show()}});return a});
define("orion/widgets/plugin/PluginList","i18n!orion/settings/nls/messages,require,orion/Deferred,orion/commands,orion/commandRegistry,orion/commonHTMLFragments,orion/objects,orion/webui/littlelib,orion/widgets/plugin/PluginEntry,orion/explorers/explorer,orion/URITemplate,orion/PageLinks".split(","),function(h,j,g,c,e,f,b,a,d,i){function k(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function l(a,b){p.call(this,{},b);this.commandService=a}function m(a){this.renderer=
new l(a,this)}function o(a,c){b.mixin(this,a);this.node=c||document.createElement("div")}var s=i.Explorer,p=i.SelectionRenderer,n={},q=localStorage.getItem("/orion/preferences/default/plugins");q&&(q=JSON.parse(q),Object.keys(q).forEach(function(a){n[k(j.toUrl(a))]=!0}));l.prototype=Object.create(p.prototype);l.prototype.getCellElement=function(a,b){if(a===0){var c=new d({plugin:b,commandService:this.commandService});c.show();return c.node}};m.prototype=Object.create(s.prototype);b.mixin(o.prototype,
{templateString:'<div id="pluginSectionHeader" class="pluginSectionHeader sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft"></div><div class="sectionItemCount layoutLeft">0</div><div id="pluginCommands" class="pluginCommands layoutRight sectionActions"></div></div><div class="displaytable layoutBlock sectionTable"><div class="plugin-list-container"><div class="plugin-list" id="plugin-list" style="overflow:hidden;"></div></div></div>',pluginDialogState:!1,includeMaker:!1,
target:"_self",createElements:function(){this.node.innerHTML=this.templateString;this.pluginSectionHeader=a.$(".pluginSectionHeader",this.node);this.pluginTitle=a.$(".sectionAnchor",this.node);this.pluginCount=a.$(".sectionItemCount",this.node);this.pluginCommands=a.$(".pluginCommands",this.node);this.pluginList=a.$(".plugin-list",this.node);this.postCreate()},destroy:function(){if(this.node)a.empty(this.node),this.node=this.pluginSectionHeader=this.pluginTitle=this.pluginCount=this.pluginCommands=
this.pluginList=null},postCreate:function(){var a=this;if(this.pluginSectionHeader){var b=f.slideoutHTMLFragment("pluginSlideout"),c=document.createRange();c.selectNode(this.pluginSectionHeader);b=c.createContextualFragment(b);this.pluginSectionHeader.appendChild(b)}this.render();this.registry.registerService("orion.cm.managedservice",{updated:function(b){a.setTarget(b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?"_blank":"_self":"_self")}.bind(this)},{pid:"nav.config"})},updateToolbar:function(){this.pluginCommands&&
this.commandService.destroy(this.pluginCommands)},show:function(){this.createElements();this.updateToolbar();this.pluginsUri&&(this.commandService.addCommand(new c.Command({name:h["Get Plugins"],tooltip:h["Find More Orion Plugins"],id:"orion.findMorePluginsCommand",hrefCallback:function(a){return this.getPluginsLink(a.items)}.bind(this)})),this.commandService.registerCommandContribution("pluginCommands","orion.findMorePluginsCommand",1));this.commandService.addCommand(new c.Command({name:h.Install,
tooltip:h["Install a plugin by specifying its URL"],id:"orion.installPlugin",parameters:new e.ParametersDescription([new e.CommandParameter("url","url",h["Plugin URL:"],"")]),callback:function(a){a.parameters&&(a=a.parameters.valueFor("url"))&&this.installHandler(a)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommands","orion.installPlugin",2,null,!1,null,new e.URLBinding("installPlugin","url"));this.commandService.addCommand(new c.Command({name:h["Reload all"],tooltip:h["Reload all installed plugins"],
id:"orion.reloadAllPlugins",callback:this.reloadPlugins.bind(this)}));this.commandService.registerCommandContribution("pluginCommands","orion.reloadAllPlugins",3);this.commandService.addCommand(new c.Command({name:h.Create,tooltip:h["Create a new Orion Plugin"],id:"orion.createPlugin",callback:function(a){this.createPlugin(a.items)}.bind(this)}));this.includeMaker===!0&&this.commandService.registerCommandContribution("pluginCommands","orion.createPlugin",2);this.commandService.renderCommands("pluginCommands",
"pluginCommands",this,this,"button")},render:function(){this.commandService.addCommand(new c.Command({name:h.Reload,tooltip:h["Reload the plugin"],id:"orion.reloadPlugin",imageClass:"core-sprite-refresh",visibleWhen:function(a){return typeof a==="string"},callback:function(a){this.reloadPlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand","orion.reloadPlugin",1);this.commandService.addCommand(new c.Command({name:h.Delete,tooltip:h["Delete this plugin from the configuration"],
imageClass:"core-sprite-delete",id:"orion.uninstallPlugin",visibleWhen:function(a){return!n[a]},callback:function(a){this.removePlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand","orion.uninstallPlugin",2);var a=this.settings.pluginRegistry;this.commandService.addCommand(new c.Command({name:h.Disable,tooltip:h.DisableTooltip,id:"orion.disablePlugin",imageClass:"core-sprite-stop",visibleWhen:function(b){return n[b]?!1:a.getPlugin(b)._getAutostart()!=="stopped"},
callback:function(a){this.disablePlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand","orion.disablePlugin",3);this.commandService.addCommand(new c.Command({name:h.Enable,tooltip:h.EnableTooltip,id:"orion.enablePlugin",imageClass:"core-sprite-start",visibleWhen:function(b){return n[b]?!1:a.getPlugin(b)._getAutostart()==="stopped"},callback:function(a){this.enablePlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand",
"orion.enablePlugin",4);var b=this.settings.pluginRegistry.getPlugins();this.pluginTitle.textContent=h.Plugins;this.pluginCount.textContent=b.length;this.explorer=new m(this.commandService);this.pluginListTree=this.explorer.createTree(this.pluginList.id,new i.SimpleFlatModel(b,"plugin",function(a){return a.getLocation()}),{setFocus:!1})},pluginURLFocus:function(){this.pluginUrlEntry.value="";this.pluginUrlEntry.style.color=""},pluginURLBlur:function(){if(this.pluginUrlEntry.value==="")this.pluginUrlEntry.value=
h["Type a plugin url here ..."],this.pluginUrlEntry.style.color="#AAA"},createPlugin:function(){var a=j.toUrl("settings/maker.html");window.open(a,this.target)},addPlugin:function(a){this.statusService.setMessage(h["Installed "]+a,5E3,!0);this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!0)});this.render()},getPluginsLink:function(){return this.pluginsUri},pluginError:function(a){this.statusService.setErrorMessage(a)},installHandler:function(a){/^\S+$/.test(a.trim())&&
(this.statusService.setMessage(h["Installing "]+a+"...",null,!0),this.settings.pluginRegistry.getPlugin(a)?this.statusService.setErrorMessage(h["Already installed"]):this.settings.pluginRegistry.installPlugin(a).then(function(a){a.start({lazy:!0}).then(this.addPlugin.bind(this,a.getLocation()),this.pluginError.bind(this))}.bind(this),this.pluginError.bind(this)))},reloaded:function(){var a=this.settings.pluginRegistry.getPlugins();this.statusService.setMessage(h["Reloaded "]+a.length+h[" plugin"]+
(a.length===1?"":"s")+".",5E3,!0);this.render()},reloadPlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.update().then(this.render.bind(this)),this.statusService.setMessage(h["Reloaded "]+a,5E3,!0))},disablePlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.stop(),this.statusService.setMessage("Disabled "+a,5E3,!0),this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!1);this.render(this)}.bind(this)),this.render())},enablePlugin:function(a){var b=
this.settings.pluginRegistry.getPlugin(a);b&&(b.start({lazy:!0}),this.statusService.setMessage("Enabled "+a,5E3,!0),this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!1);this.render(this)}.bind(this)),this.render())},setTarget:function(a){this.target=a},reloadPlugins:function(){var a=[];this.settings.pluginRegistry.getPlugins().forEach(function(b){a.push(b.update())});g.all(a,function(){}).then(this.reloaded.bind(this))},forceRemove:function(a){var b=this.settings.pluginRegistry.getPlugin(a);
b&&b.uninstall().then(function(){this.statusService.setMessage(h["Uninstalled "]+a,5E3,!0);this.settings.preferences.getPreferences("/plugins").then(function(b){b.keys().some(function(c){if(k(j.toUrl(c))===k(a))return b.remove(c),!0})}.bind(this));this.render()}.bind(this))},removePlugin:function(a){window.confirm(h["Are you sure you want to uninstall '"]+a+"'?")&&this.forceRemove(a)}});return o});
define("orion/widgets/settings/Subsection",[],function(){function h(h){var g=h.sectionName;this.parentNode=h.parentNode;this.children=h.children;h=document.createElement("section");h.classList.add("setting-row");h.setAttribute("role","region");h.setAttribute("aria-labelledby","Navigation-header");var c=document.createElement("h3");c.classList.add("setting-header");c.textContent=g;g=document.createElement("div");g.classList.add("setting-content");h.appendChild(c);h.appendChild(g);this.node=h;this.subsectionContent=
g}h.prototype.show=function(){this.parentNode&&this.parentNode.appendChild(this.node);if(this.children){var h=this;this.children.forEach(function(g){h.subsectionContent.appendChild(g.node);g.show()})}};return h});define("orion/form",[],function(){function h(h){return encodeURIComponent(h).replace(/[!'()*]/g,escape).replace("%20","+")}return{encodeFormData:function(j){for(var j=j||{},g=Object.keys(j),c=[],e=0;e<g.length;e++){var f=g[e],b=j[f];c.push(h(f)+"="+h(b))}return c.join("&")}}});
define("profile/UsersService",["orion/Deferred","orion/xhr","orion/EventTarget","orion/form"],function(h,j,g,c){function e(b){return b===""?null:JSON.parse(b)}function f(b){g.attach(this);if(b)this._serviceRegistry=b,this._serviceRegistration=b.registerService("orion.core.user",this)}f.prototype={getUsersListSubset:function(b,a,c){var f=new h,g=this;j("GET","../users?start="+b+"&rows="+a,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=e(a.response);c&&(typeof c==="function"?c(a):
g.dispatchEvent({type:c,data:a}));f.resolve(a)},function(a){f.reject(a.response||a)});return f},getUsersList:function(b){var a=new h,c=this;j("GET","../users",{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(f){f=e(f.response);b&&(typeof b==="function"?b(f):c.dispatchEvent({type:b,data:f}));a.resolve(f.users)},function(b){a.reject(b.response||b)});return a},deleteUser:function(b,a){var c=new h,f=this;j("DELETE",b,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=e(b.response);
a&&(typeof a==="function"?a(b):f.dispatchEvent({type:a,data:b}));c.resolve(b)},function(a){c.reject(a.response||a)});return c},createUser:function(b){var b=b||{},a={login:b.login,password:b.password,email:b.email};if(b.guest)a.guest="",typeof a.login!=="string"&&delete a.login,typeof a.password!=="string"&&delete a.password,typeof a.email!=="string"&&delete a.email;return j("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:c.encodeFormData(a)}).then(function(a){return(new h).resolve(e(a.response))},
function(a){var b=a;try{b=e(a.response||a.error)}catch(c){}return(new h).reject(b)})},getUserInfo:function(b,a){var c=new h,f=this;j("GET",b,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=e(b.response);a&&(typeof a==="function"?a(b):f.dispatchEvent({type:a,data:b}));c.resolve(b)},function(a){c.reject(a.response||a)});return c},updateUserInfo:function(b,a,c){var f=new h,g=this;if(a.password!==a.passwordRetype)return f.reject({message:"Passwords do not match!"}),f;j("PUT",b,{headers:{"Content-Type":"application/json; charset=UTF-8",
"Orion-Version":"1"},timeout:15E3,data:JSON.stringify(a)}).then(function(a){a=e(a.response);c&&(typeof c==="function"?c(a):g.dispatchEvent({type:c,data:a}));f.resolve(a)},function(a){f.reject(a.response||a)});return f},resetUserPassword:function(b,a,d){var f=new h,g=this;j("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:c.encodeFormData({reset:!0,login:b,password:a})}).then(function(a){a=e(a.response);d&&(typeof d==="function"?
d(a):g.dispatchEvent({type:d,data:a}));f.resolve(a)},function(a){f.reject(a.response||a)});return f}};return f});
define("orion/widgets/input/LabeledCommand",["orion/objects","orion/webui/littlelib"],function(h,j){function g(c,e){h.mixin(this,c);this.node=e||document.createElement("div")}h.mixin(g.prototype,{templateString:'<span class="setting-repository-label"></span><span class="setting-command"></span>',show:function(){this.node.innerHTML=this.templateString;this.mylabel=j.$(".setting-repository-label",this.node);this.myCommand=j.$(".setting-command",this.node);this.postCreate()},destroy:function(){j.empty(this.node)},
postCreate:function(){this.mylabel.textContent=this.fieldlabel;this.commandService.renderCommands(this.scopeId,this.myCommand,{gitUrl:this.fieldlabel,keyIndex:this.keyIndex},this,"button")}});return g});
define("orion/widgets/settings/UserSettings","i18n!orion/settings/nls/messages,require,orion/commands,orion/section,orion/webui/littlelib,orion/objects,orion/i18nUtil,orion/widgets/settings/Subsection,profile/UsersService,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledCommand".split(","),function(h,j,g,c,e,f,b,a,d,i,k){function l(a,b){f.mixin(this,a);this.node=b}f.mixin(l.prototype,{dispatch:!0,templateString:'<div><div class="sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft">${User Profile}</div><div id="userCommands" class="layoutRight sectionActions"></div></div><div class="sectionTable sections"></div><div></div></div><div class="linkedSection"></div>',
createElements:function(){this.node.innerHTML=this.templateString;e.processTextNodes(this.node,h);this.sections=e.$(".sections",this.node);this.linkedSection=e.$(".linkedSection",this.node);this.createSections()},setHash:function(a,b){a.src=a.src.indexOf("#")>0?a.src.substr(0,a.src.indexOf("#"))+"#"+b:a.src+"#"+b},createSections:function(){this.accountFields=[new i({fieldlabel:h.Username,editmode:"readonly"}),new i({fieldlabel:h["Full Name"]}),new i({fieldlabel:h["Email Address"]}),new k({fieldlabel:h["Email Confirmed"],
editmode:"readonly"})];(new a({sectionName:h.Account,parentNode:this.sections,children:this.accountFields})).show();this.passwordFields=[new i({fieldlabel:h["Current Password"],inputType:"password"}),new i({fieldlabel:h["New Password"],inputType:"password"}),new i({fieldlabel:h["Verify Password"],inputType:"password"})];(new a({sectionName:h.Password,parentNode:this.sections,children:this.passwordFields})).show();this.commandService.addCommand(new g.Command({name:h.Update,tooltip:h["Update Profile Settings"],
id:"orion.updateprofile",callback:function(a){this.update(a.items)}.bind(this)}));this.commandService.registerCommandContribution("profileCommands","orion.updateprofile",3);this.commandService.renderCommands("profileCommands",e.node("userCommands"),this,this,"button");this.linkedAccountSection=new c.Section(this.linkedSection,{id:"linkedAccountSection",title:h["Linked Accounts"],content:'<div id="iFrameContent"></div>',canHide:!0,useAuxStyle:!0,hidden:!0,slideout:!0});var b=this.iframe=document.createElement("iframe");
b.src="../mixloginstatic/manageOpenids.html";b.style.border="0";b.style.width="500px";e.node("iFrameContent").appendChild(b)},confirmOpenId:function(a){if(a!==""&&a!==null)this.win=window.open("../mixlogin/manageopenids/openid?openid="+encodeURIComponent(a),"openid_popup","width=790,height=580")},update:function(){var a=[],b=this.registry.getServiceReferences("orion.core.auth"),c=this.registry.getService("orion.page.message"),d=this.userService,e={};e.login=this.accountFields[0].getValue();e.Name=
this.accountFields[1].getValue();e.email=this.accountFields[2].getValue();var f=this.passwordFields[1].getValue(),g=this.passwordFields[2].getValue();if(f.length>0)f!==g?(c.setProgressResult("New password, and retyped password do not match"),this.dispatch=!1):this.passwordFields[0].getValue().length>0?(e.oldPassword=this.passwordFields[0].getValue(),e.password=f,e.passwordRetype=g,this.dispatch=!0):(c.setProgressResult("Need to type your current password"),this.dispatch=!1);if(this.dispatch===!0)for(f=
0;f<b.length;f++){var i=this.registry.getService(b[f]);i.getKey().then(function(b){a.push(b);i.getUser().then(function(a){d.updateUserInfo(a.Location,e).then(function(a){a?c.setProgressResult(a):c.setProgressResult(h["User profile data successfully updated."])},function(a){c.setProgressResult(a)})})})}},show:function(){this.createElements();this.userService=this.registry.getService("orion.core.user");for(var a=[],b=this.registry.getServiceReferences("orion.core.auth"),c=this.userService,d=this,e=
0;e<b.length;e++){var f=this.registry.getService(b[e]);f.getKey().then(function(b){a.push(b);f.getUser().then(function(a){c.getUserInfo(a.Location).then(function(a){d.accountFields[0].setValue(a.login);d.accountFields[1].setValue(a.Name);d.accountFields[2].setValue(a.email);d.accountFields[3].setChecked(a.emailConfirmed)});d.setHash(d.iframe,a.Location)})})}},destroy:function(){if(this.node)e.empty(this.node),this.node=this.sections=this.linkedSection=null}});return l});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(h){function j(g){this._prefix="/git/credentials";this._preferenceService=g.getService("orion.core.preference")}j.prototype={put:function(g,c){var e={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(c!==void 0){if(c.gitSshUsername!==void 0&&c.gitSshUsername!==null)e.gitSshUsername=c.gitSshUsername;if(c.gitSshPassword!==void 0&&c.gitSshPassword!==null)e.gitSshPassword=c.gitSshPassword;if(c.gitPrivateKey!==void 0&&
c.gitPrivateKey!==null)e.gitPrivateKey=c.gitPrivateKey;if(c.gitPassphrase!==void 0&&c.gitPassphrase!==null)e.gitPassphrase=c.gitPassphrase}var f=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(b){var a=b.get("settings");a===void 0?f.reject():a.enabled?(b.put(g,e),f.resolve()):f.reject()});return f},get:function(g){var c={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},e=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(f){var b=
f.get("settings");b===void 0?e.reject():b.enabled?(f=f.get(g),f!==void 0?e.resolve(f):e.resolve(c)):e.reject()});return e},isEnabled:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(c){c=c.get("settings");c===void 0?g.resolve(!1):g.resolve(c.enabled)});return g},enable:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(c){c.put("settings",{enabled:!0});g.resolve()});return g},disable:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,
2).then(function(c){c.put("settings",{enabled:!1});g.resolve()});return g},remove:function(g){var c=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e.remove(g);c.resolve()});return c},getRepositories:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(c){for(var e=[],c=c.keys(),f=0;f<c.length;++f)c[f]!=="settings"&&e.push(c[f]);g.resolve(e)});return g}};return j.prototype.constructor=j});
define("orion/git/gitConfigPreference",["orion/Deferred"],function(h){function j(g){this._prefix="/git/config";this._preferenceService=g.getService("orion.core.preference")}j.prototype={getConfig:function(){var g=new h;this._preferenceService.getPreferences(this._prefix).then(function(c){c=c.get("userInfo");g.resolve(c)});return g},setConfig:function(g){var c=new h;this._preferenceService.getPreferences(this._prefix).then(function(e){e.put("userInfo",g);c.resolve()});return c}};return j.prototype.constructor=
j});
define("orion/widgets/settings/GitSettings","i18n!orion/settings/nls/messages,require,orion/commands,orion/section,orion/git/gitPreferenceStorage,orion/git/gitConfigPreference,orion/webui/littlelib,orion/objects,orion/i18nUtil,orion/widgets/settings/Subsection,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledCommand".split(","),function(h,j,g,c,e,f,b,a,d,i,k,l,m){function o(b,c){a.mixin(this,b);this.node=c}a.mixin(o.prototype,{dispatch:!0,templateString:'<div><div class="sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft">${Git Settings}</div><div id="userCommands" class="layoutRight sectionActions"></div></div><div class="sections sectionTable"></div><div></div></div><div><div class="sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft">${Git Credentials Storage}</div><div id="gitCommands" class="layoutRight sectionActions"></div></div><div class="gitSections sectionTable"></div><div></div></div>',createElements:function(){this.node.innerHTML=
this.templateString;b.processTextNodes(this.node,h);this.sections=b.$(".sections",this.node);this.gitSections=b.$(".gitSections",this.node);this.createSections()},setHash:function(a,b){a.src=a.src.indexOf("#")>0?a.src.substr(0,a.src.indexOf("#"))+"#"+b:a.src+"#"+b},refreshGitCredentials:function(){var a=this;(new e(this.registry)).isEnabled().then(function(b){a.gitCredentialsFields[0].setChecked(b)})},createSections:function(){this.gitFields=[new k({fieldlabel:h["Git Email Address"]}),new k({fieldlabel:h["Git Username"]})];
(new i({sectionName:h["Git Config"],parentNode:this.sections,children:this.gitFields})).show();this.commandService.addCommand(new g.Command({name:h.Update,tooltip:h["Update Git User Settings"],id:"orion.updateGitUser",callback:function(a){this.update(a.items)}.bind(this)}));this.commandService.registerCommandContribution("gitUserCommands","orion.updateGitUser",3);this.commandService.renderCommands("gitUserCommands",b.node("userCommands"),this,this,"button");this.gitCredentialsFields=[new l({fieldlabel:h["Enable Storage"]})];
var a,c=this;this.commandService.addCommand(new g.Command({name:h.Delete,id:"eclipse.orion.git.eraseGitCredentials",callback:function(a){var b=a.items.gitUrl,f=a.items.keyIndex,g=c.registry.getService("orion.page.message");(new e(c.registry)).remove(b).then(function(){g.setProgressResult(d.formatMessage(h["Deleted git credentials for ${0}"],[b]));c.gitCredentialsFields[f+1].destroy()})},visibleWhen:function(){return!0}}));this.commandService.registerCommandContribution("repositoryItemCommands","eclipse.orion.git.eraseGitCredentials",
1);(new e(this.registry)).getRepositories().then(function(d){for(var e=0;e<d.length;++e){var f=new m({keyIndex:e,fieldlabel:d[e],commandService:c.commandService,scopeId:"repositoryItemCommands"});c.gitCredentialsFields.push(f)}a=new i({sectionName:"",parentNode:c.gitSections,children:c.gitCredentialsFields});a.show();d=new g.Command({name:h.Update,tooltip:h["Update Git Credentials"],id:"orion.updateGitCredentials",callback:function(a){c.updateGitCredentials(a.items)}.bind(c)});c.commandService.addCommand(d);
c.commandService.registerCommandContribution("gitProfileCommands","orion.updateGitCredentials",2);c.commandService.renderCommands("gitProfileCommands",b.node("gitCommands"),c,c,"button")})},update:function(){var a=new f(this.registry),b=this.registry.getService("orion.page.message");a.setConfig({GitMail:this.gitFields[0].getValue(),GitName:this.gitFields[1].getValue()}).then(function(){b.setProgressResult(h["Git user data successfully updated."])})},updateGitCredentials:function(){var a=this.registry.getService("orion.page.message"),
b=new e(this.registry);this.gitCredentialsFields[0].isChecked()?window.confirm(h["Please be aware that your credentials will be stored persistently in the browser."]+"\n"+h["Do you wish to enable the Key Storage?"])&&b.enable().then(function(){a.setProgressResult(h["Git Credentials successfully updated."])}):b.disable().then(function(){a.setProgressResult(h["Git Credentials successfully updated."])})},show:function(){this.createElements();(new f(this.registry)).getConfig().then(function(a){a&&(a.GitMail&&
this.gitFields[0].setValue(a.GitMail),a.GitName&&this.gitFields[1].setValue(a.GitName))}.bind(this));this.refreshGitCredentials()},destroy:function(){if(this.node)b.empty(this.node),this.node=this.sections=this.gitSections=null}});return o});
define("orion/widgets/settings/EditorSettings","i18n!orion/settings/nls/messages,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledSelect,orion/section,orion/widgets/settings/Subsection,orion/commands,orion/objects,orion/webui/littlelib".split(","),function(h,j,g,c,e,f,b,a,d){function i(a,b,c,e,f){if(!e.local){var g=document.createElement("span");g.classList.add(s);g.classList.add(f[b+"LocalVisible"]?p:n);g.title=h.localSettingsTooltip;g.addEventListener("click",
function(){g.classList.contains(n)?(g.classList.add(p),g.classList.remove(n)):(g.classList.add(n),g.classList.remove(p))});b=d.$("label",a.node);b.parentNode.insertBefore(g,b)}return a}function k(a,b,c){return i(new g(b),a,this,b,c)}function l(a,b,c){b.inputType="integer";return i(new j(b),a,this,b,c)}function m(a,b){return!(this.min<=b[a]&&b[a]<=this.max)?h[a+"Invalid"]:""}function o(b,c){a.mixin(this,b);this.node=c}var s="setting-local-indicator",p="on",n="off",q={editorSettings:{keys:{keyBindings:{values:[{value:"",
label:h.Default},{value:"Emacs",label:"Emacs"},{value:"vi",label:"vi"}],create:function(a,b,d){var e=this.values;b.options=[];for(var f=0;f<e.length;f++){var g=e[f],h={value:g.value,label:g.label};if(g.value===d[a])h.selected=!0;b.options.push(h)}return i(new c(b),a,this,b,d)}}},fileManagement:{autoSave:{create:k},autoSaveTimeout:{min:50,max:1E4,create:l,validate:m},autoLoad:{create:k},saveDiffs:{create:k},trimTrailingWhiteSpace:{create:k}},typing:{autoPairQuotations:{create:k},autoPairParentheses:{create:k},
autoPairBraces:{create:k},autoPairSquareBrackets:{create:k},autoPairAngleBrackets:{create:k},autoCompleteComments:{create:k},smartIndentation:{create:k}},tabs:{tabSize:{min:1,max:16,create:l,validate:m},expandTab:{create:k}},whitespaces:{showTabs:{create:k},showSpaces:{create:k}},wrapping:{wordWrap:{create:k},showMargin:{create:k},marginOffset:{min:10,max:200,create:l,validate:m}},smoothScrolling:{scrollAnimation:{create:k},scrollAnimationTimeout:{min:50,max:1E3,create:l,validate:m}},rulers:{annotationRuler:{create:k},
lineNumberRuler:{create:k},foldingRuler:{create:k},overviewRuler:{create:k}},sourceControl:{showBlame:{create:k}}}};a.mixin(o.prototype,{templateString:'<div class="sections"></div>',commandTemplate:'<div id="commandButtons"><div id="editorCommands" class="layoutRight sectionActions"></div></div>',createElements:function(){this.node.innerHTML=this.templateString;this.sections=d.$(".sections",this.node);this.createSections();this.local?this.sections.classList.add("local"):(document.getElementById("pageActions").innerHTML=
this.commandTemplate,this.createToolbar())},createSections:function(){var a=this.oldPrefs,b=[],d,g,i=this.themePreferences;if(!this.local&&this.editorThemeWidget)this.editorThemeSection=new e.Section(this.sections,{id:"editorThemeSettings",title:h.EditorThemes,canHide:!0,slideout:!0}),this.editorThemeWidget.renderData(this.editorThemeSection.getContentElement(),"INITIALIZE");else{var j=this.oldThemeStyles;if(a.themeVisible&&(!this.local||a.themeLocalVisible)){var k=j.styles;d=[];for(var l=0;l<k.length;l++){g=
{value:k[l].name,label:k[l].name};if(k[l].name===j.style.name)g.selected=!0;d.push(g)}b.push(d=this.themeSelect=new c({fieldlabel:h.Theme,options:d}));d.setStorageItem=function(a){i.setTheme(a)}}if(a.fontSizeVisible&&(!this.local||a.fontSizeLocalVisible)){j=j.style.fontSize;d=[];for(k=8;k<19;k++){g={value:k+"pt",label:k+"pt"};if(g.label===j)g.selected=!0;d.push(g)}b.push(d=this.sizeSelect=new c({fieldlabel:h["Font Size"],options:d}));d.setStorageItem=function(a){i.setFontSize(a)}}!this.local&&b.length>
0&&(b=new f({sectionName:h.Theme,parentNode:this.editorThemeSection.getContentElement(),children:b}),b.show(),b=[])}var m,n;for(n in q)if(q.hasOwnProperty(n)){this.local||(m=new e.Section(this.sections,{id:n,title:h[n],canHide:!0,slideout:!0}));for(var o in q[n])if(q[n].hasOwnProperty(o)){for(var p in q[n][o])if(a[p+"Visible"]&&(!this.local||a[p+"LocalVisible"]))g=q[n][o][p],d={},d.local=this.local,d.fieldlabel=h[p],b.push(g.widget=g.create(p,d,a));!this.local&&b.length>0&&(b=new f({sectionName:h[o],
parentNode:m.getContentElement(),children:b}),b.show(),b=[])}}this.local&&b.forEach(function(a){this.sections.appendChild(a.node);if(!a.hasOwnProperty("setStorageItem"))a.setStorageItem=this.update.bind(this);a.show()}.bind(this))},createToolbar:function(){var a=d.node("editorSettingsToolActionsArea");this.commandService.addCommand(new b.Command({name:h.Restore,tooltip:h["Restore default Editor Settings"],id:"orion.restoreeditorsettings",callback:function(a){this.restore(a.items)}.bind(this)}));this.commandService.registerCommandContribution("restoreEditorSettingCommand",
"orion.restoreeditorsettings",2);this.commandService.renderCommands("restoreEditorSettingCommand",a,this,this,"button");this.commandService.addCommand(new b.Command({name:h.Update,tooltip:h["Update Editor Settings"],id:"orion.updateeditorsettings",callback:function(a){this.update(a.items)}.bind(this)}));this.commandService.registerCommandContribution("editorSettingCommand","orion.updateeditorsettings",1);this.commandService.renderCommands("editorSettingCommand",a,this,this,"button")},valueChanged:function(){var a=
{},b;for(b in this.oldPrefs)this.oldPrefs.hasOwnProperty(b)&&(a[b]=this.oldPrefs[b]);this.getValues(a);for(var c in a)if(a.hasOwnProperty(c)&&a[c]!==this.oldPrefs[c])return a},validate:function(a){var b="";this._forEach(function(c,d){return d.validate&&(b=d.validate(c,a))?!1:!0});return b},_progress:function(a,b){this.registry&&this.registry.getService("orion.page.message").setProgressResult({Message:a,Severity:b})},update:function(){var a=this.valueChanged();if(a){var b=this.validate(a);if(b){this._progress(b,
"Error");return}this.preferences.setPrefs(a,function(){this.setValues(this.oldPrefs=a);this._progress(h["Editor preferences updated"],"Normal")}.bind(this))}else this.setValues(this.oldPrefs);this.editor&&this.editor.focus()},restore:function(){this.preferences.setPrefs({},function(a){this._show(a);this._progress(h["Editor defaults restored"],"Normal")}.bind(this))},show:function(a,b){if(a)this.node=a;this.themePreferences.getTheme(function(a){this.preferences.getPrefs(function(c){this._show(c,a);
b&&b()}.bind(this))}.bind(this))},_show:function(a,b){if(b)this.oldThemeStyles=b;this.oldPrefs=a;this.createElements();this.setValues(a)},_forEach:function(a){for(var b in q)if(q.hasOwnProperty(b))for(var c in q[b])if(q[b].hasOwnProperty(c))for(var d in q[b][c])if(q[b][c].hasOwnProperty(d)){var e=q[b][c][d];if(e.widget&&!a(d,e))return}},getValues:function(a){this._forEach(function(b,c){a[b]=c.widget.getSelection();if(!this.local){var e=d.$("."+s,c.widget.node);a[b+"LocalVisible"]=e&&e.classList.contains(p)}return!0}.bind(this))},
setValues:function(a){this._forEach(function(b,c){c.widget.setSelection(a[b]);if(!this.local){var e=d.$("."+s,c.widget.node);e&&(a[b+"LocalVisible"]?(e.classList.add(p),e.classList.remove(n)):(e.classList.add(n),e.classList.remove(p)))}return!0}.bind(this))},destroy:function(){if(this.node)this.node=null;if(this.editorThemeWidget)this.editorThemeWidget.destroy(),this.editorThemeWidget=null}});return o});
define("orion/editorPreferences",[],function(){function h(c,e){this._preferences=c;if(this._callback=e)var f=c.listenForChangedSettings(j,function(b){b.key===f&&e()}.bind(this))}var j="/editor/settings",g={autoSave:!1,autoSaveVisible:!0,autoSaveLocalVisible:!0,autoSaveTimeout:1E3,autoSaveTimeoutVisible:!0,themeVisible:!0,themeLocalVisible:!0,fontSizeVisible:!0,fontSizeLocalVisible:!0,autoLoad:!0,autoLoadVisible:!0,saveDiffs:!0,saveDiffsVisible:!0,showBlame:!1,showBlameVisible:!0,autoPairParentheses:!0,
autoPairParenthesesVisible:!0,autoPairBraces:!0,autoPairBracesVisible:!0,autoPairSquareBrackets:!0,autoPairSquareBracketsVisible:!0,autoPairAngleBrackets:!1,autoPairAngleBracketsVisible:!0,autoPairQuotations:!0,autoPairQuotationsVisible:!0,autoCompleteComments:!0,autoCompleteCommentsVisible:!0,smartIndentation:!0,smartIndentationVisible:!0,trimTrailingWhiteSpace:!1,trimTrailingWhiteSpaceVisible:!0,tabSize:4,tabSizeVisible:!0,expandTab:!1,expandTabVisible:!0,scrollAnimation:!0,scrollAnimationVisible:!0,
scrollAnimationTimeout:300,scrollAnimationTimeoutVisible:!0,annotationRuler:!0,annotationRulerVisible:!0,lineNumberRuler:!0,lineNumberRulerVisible:!0,foldingRuler:!0,foldingRulerVisible:!0,overviewRuler:!0,overviewRulerVisible:!0,showTabs:!1,showTabsVisible:!0,showSpaces:!1,showSpacesVisible:!0,wordWrap:!1,wordWrapVisible:!0,showMargin:!1,showMarginVisible:!0,marginOffset:80,marginOffsetVisible:!0,keyBindings:"Default",keyBindingsVisible:!0,keyBindingsLocalVisible:!0};h.prototype={_initialize:function(c){var c=
c.get("editorSettings")||{},e;for(e in g)c.hasOwnProperty(e)||(c[e]=g[e]);return c},getPrefs:function(c){this._preferences.getPreferences(j).then(function(e){e=this._initialize(e);typeof e==="string"&&(e=JSON.parse(e));c(e)}.bind(this))},setPrefs:function(c,e){this._preferences.getPreferences(j).then(function(f){f.put("editorSettings",c);c=this._initialize(f);e&&e(c);this._callback&&this._callback(c)}.bind(this))}};return{EditorPreferences:h}});
define("orion/widgets/settings/SettingsContainer","i18n!orion/settings/nls/messages,orion/Deferred,orion/globalCommands,orion/PageUtil,orion/webui/littlelib,orion/objects,orion/URITemplate,orion/widgets/themes/ThemeBuilder,orion/settings/ui/PluginSettings,orion/widgets/themes/ThemePreferences,orion/widgets/themes/editor/ThemeData,orion/widgets/themes/container/ThemeData,orion/widgets/settings/SplitSelectionLayout,orion/widgets/plugin/PluginList,orion/widgets/settings/UserSettings,orion/widgets/settings/GitSettings,orion/widgets/settings/EditorSettings,orion/editorPreferences".split(","),function(h,
j,g,c,e,f,b,a,d,i,k,l,m,o,s,p,n,q){function t(a,b){m.apply(this,arguments);var c=this.registry.getServiceReferences("orion.core.getplugins");this.pluginsUri=c[0]&&c[0].getProperty("uri");this.settingsCategories=[]}var w=m.prototype;t.prototype=Object.create(w);f.mixin(t.prototype,{loadTranslatedPluginSettings:function(){return this.settingsRegistry.loadI18n()},show:function(){var a=this;j.all([this.preferences.getPreferences("/settingsContainer"),this.loadTranslatedPluginSettings()]).then(function(b){var b=
b[0],c=b.get("categories")||{};(c.showUserSettings===void 0||c.showUserSettings)&&a.settingsCategories.push({id:"userSettings",textContent:h["User Profile"],show:a.showUserSettings});(c.showGitSettings===void 0||c.showGitSettings)&&a.settingsCategories.push({id:"gitSettings",textContent:h["Git Settings"],show:a.showGitSettings});(c.showEditorSettings===void 0||c.showEditorSettings)&&a.settingsCategories.push({id:"editorSettings",textContent:h.Editor,show:a.showEditor});(c.showThemeSettings===void 0||
c.showThemeSettings)&&a.settingsCategories.push({id:"themeBuilder",textContent:h["UI Theme"],show:a.showThemeBuilder});(c.showPluginSettings===void 0||c.showPluginSettings)&&a.settingsCategories.push({id:"plugins",textContent:h.Plugins,show:a.showPlugins});a.settingsCategories.forEach(function(b){b.show=b.show.bind(a,b.id)}.bind(a));var d=a.settingsRegistry;d.getCategories().map(function(a){return{category:a,label:d.getCategoryLabel(a)||h[a]||a}}).sort(function(a,b){return a.label.localeCompare(b.label)}).forEach(function(b){var c=
b.category;a.settingsCategories.push({id:c,textContent:b.label,show:a.showPluginSettings.bind(a,c)})});a.itemToIndexMap={};a.toolbar=e.node(a.pageActions);a.manageDefaultData(b);a.drawUserInterface();window.addEventListener("hashchange",a.processHash.bind(a));g.setPageTarget({task:"Settings",serviceRegistry:a.registry,commandService:a.commandService})})},processHash:function(){var a=c.matchResourceParameters(),b=this;this.preferences.getPreferences("/settingsContainer").then(function(c){c=c.get("selection");
c=a.category||c;b.selectedCategory&&b.selectedCategory.id===c||b.showByCategory(c)});window.setTimeout(function(){this.commandService.processURL(window.location.href)}.bind(this),0)},showThemeBuilder:function(b){this.selectCategory(b);this.updateToolbar(b);this.themeWidget&&this.themeWidget.destroy();var b=new l.ThemeData,c=new i.ThemePreferences(this.preferences,b);this.themeWidget=new a({commandService:this.commandService,preferences:c,themeData:b});e.empty(this.table);b=document.createElement("div");
this.table.appendChild(b);this.themeWidget.renderData(b,"INITIALIZE")},showEditor:function(b){this.selectCategory(b);e.empty(this.table);this.editorSettingWidget&&this.editorSettingWidget.destroy();this.updateToolbar(b);b=document.createElement("div");this.table.appendChild(b);var c=new k.ThemeData,d=new i.ThemePreferences(this.preferences,c),f=new a({commandService:this.commandService,preferences:d,themeData:c,toolbarId:"editorThemeSettingsToolActionsArea"}),c={name:h.Import,tip:h["Import a theme"],
id:0,callback:c.importTheme.bind(c)};f.addAdditionalCommand(c);c=new q.EditorPreferences(this.preferences);this.editorSettings=new n({registry:this.registry,preferences:c,themePreferences:d,editorThemeWidget:f,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},b);this.editorSettings.show()},showUserSettings:function(a){this.selectCategory(a);e.empty(this.table);this.userWidget&&this.userWidget.destroy();
this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);this.userWidget=new s({registry:this.registry,settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.userWidget.show()},showGitSettings:function(a){this.selectCategory(a);e.empty(this.table);this.gitWidget&&this.gitWidget.destroy();this.updateToolbar(a);a=document.createElement("div");
this.table.appendChild(a);this.gitWidget=new p({registry:this.registry,settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.gitWidget.show()},initPlugins:function(){e.empty(this.table);this.pluginWidget&&this.pluginWidget.destroy();var a=document.createElement("div");this.table.appendChild(a);this.pluginWidget=new o({settings:this.settingsCore,
preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,registry:this.registry,pluginsUri:this.pluginsUri},a);this.pluginWidget.show()},initPluginSettings:function(a){e.empty(this.table);this.pluginSettingsWidget&&this.pluginSettingsWidget.destroy();var b=this.settingsRegistry.getSettings(a).sort(function(a,b){var c=a.getName(),d=b.getName();return typeof c==="string"&&typeof d==="string"?c.localeCompare(d):
a.getPid().localeCompare(b.getPid())});this.pluginSettingsWidget=new d({parent:this.table,serviceRegistry:this.registry,settings:b,title:h[a]||a})},showPlugins:function(a){this.selectCategory(a);this.updateToolbar(a);this.initPlugins(a)},showPluginSettings:function(a){this.selectCategory(a);this.updateToolbar(a);this.initPluginSettings(a)},selectCategory:function(a){this.preferences.getPreferences("/settingsContainer").then(function(b){b.put("selection",a)});w.selectCategory.apply(this,arguments);
var d=c.matchResourceParameters();if(d.category!==a)d.category=a,delete d.resource,window.location=(new b("#,{params*}")).expand({params:d})},showByCategory:function(a){this.updateToolbar(a);this.settingsCategories.some(function(b){if(b.id===a)return b.show(),!0})||this.selectCategory(a)},addCategory:function(a){a["class"]=(a["class"]||"")+" navbar-item";a.role="tab";a.tabindex=-1;a["aria-selected"]="false";a.onclick=a.show;w.addCategory.apply(this,arguments)},addCategories:function(){var a=this;
this.settingsCategories.forEach(function(b){a.addCategory(b)})},drawUserInterface:function(a){w.drawUserInterface.apply(this,arguments);this.addCategories();this.processHash()},handleError:function(a){console.log(a)},manageDefaultData:function(a){a.get("selection")||a.put("selection","userSettings")}});return t});
define('built-settings.js',"i18n!orion/settings/nls/messages,orion/browserCompatibility,orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/commands,orion/keyBinding,orion/profile/usersClient,orion/operationsClient,orion/fileClient,orion/searchClient,orion/dialogs,orion/globalCommands,orion/webui/littlelib,orion/config,orion/metatype,orion/settings/settingsRegistry,orion/widgets/settings/SettingsContainer".split(","),function(h,j,g,c,e,f,b,a,d,i,k,l,m,o,s,p,n,q,t){g.startup().then(function(g){var j=
g.serviceRegistry,p=g.preferences,x=g.pluginRegistry,y=new i.OperationsClient(j),G=new c.StatusReportingService(j,y,"statusPane","notifications","notificationArea"),F=new f.CommandRegistry({});new e.ProgressService(j,y,F);var y=new k.FileClient(j),y=new l.Searcher({serviceRegistry:j,commandService:F,fileService:y}),x=new d.UsersClient(j,x),E=new b.Command({name:"Clear themes and editor settings",tooltip:"Clear all settings associated with editor themes and window themes",id:"orion.clearThemes",callback:function(){p.getPreferences("/themes",
2).then(function(a){a.put("styles",null);a.put("selected",null);G.setMessage("Theme settings have been cleared.")})}});F.addCommand(E);F.registerCommandContribution("globalActions","orion.clearThemes",1,null,!0,new a.KeyBinding("t",!0,!0,!0));E=new m.DialogService(j);o.generateBanner("orion-settings",j,F,p,y);y=new q(j,new n.MetaTypeRegistry(j));G.setMessage(h["Loading..."]);(new t({preferences:p,registry:j,preferencesStatusService:G,commandService:F,preferenceDialogService:E,settingsCore:g,pageActions:"pageActions",
userClient:x,settingsRegistry:y},s.node("categoriesContainer"),s.node("settings"))).show();G.setMessage("")})});