/**
 * @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, 2014 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, 2014 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, 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) 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) 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) 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) 2014 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, 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, 2014 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, 2014 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, 2014 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, 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). 


 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) 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) 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) 2014 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) 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, 2014 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, 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) 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, 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) 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 g(b,d,e,c,a,i){d[b]&&(e.push(b),(d[b]===!0||d[b]===1)&&c.push(a+b+"/"+i))}function j(b,d,e,c,a){d=c+d+"/"+a;require._fileExists(b.toUrl(d+".js"))&&e.push(d)}function f(b,d,e){for(var c in d)d.hasOwnProperty(c)&&(!b.hasOwnProperty(c)||e)?b[c]=d[c]:typeof d[c]==="object"&&f(b[c],d[c],e)}var d=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(b){var h=b.config?b.config():{};return{version:"2.0.1+",load:function(b,c,a,i){i=i||{};if(i.locale)h.locale=i.locale;
var k=d.exec(b),l=k[1],m=k[4],o=k[5],r=m.split("-"),n=[],p={},q,t="";if(k[5])l=k[1],b=l+o;else{o=k[4];m=h.locale;if(!m)m=h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();r=m.split("-")}if(i.isBuild){n.push(b);j(c,"root",n,l,o);for(q=0;q<r.length;q++)i=r[q],t+=(t?"-":"")+i,j(c,t,n,l,o);c(n,function(){a()})}else c([b],function(i){var b=[],e;g("root",i,b,n,l,o);for(q=0;q<r.length;q++)e=r[q],t+=(t?"-":"")+e,g(t,i,b,n,l,o);c(n,function(){var e,
k,d;for(e=b.length-1;e>-1&&b[e];e--){d=b[e];k=i[d];if(k===!0||k===1)k=c(l+d+"/"+o);f(p,k)}a(p)})})}}})})();
define("orion/i18n",[],function(){return{load:function(g,j,f,d){var d=d||{},b=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,h=b.exec(g);if(h){if(!j.defined||j.defined(g))try{f(j(g));return}catch(e){}if(d.isBuild||d.isTest)f({});else if(j.specified&&!j.specified("orion/bootstrap"))f({});else{var c=h[1],a=h[3]?h[2]:"",i=h[3]||h[2];j(["orion/bootstrap"],function(e){e.startup().then(function(e){var k=e.serviceRegistry,e=k.getServiceReferences("orion.i18n.message");if(a)e.some(function(a){return g===a.getProperty("name")?
(k.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),!0):!1})||f({});else{var o={},r;e.forEach(function(e){var k=e.getProperty("name");if((h=b.exec(k))&&c===h[1]&&i===(h[3]||h[2]))if(a=h[3]?h[2]:""){if((e=d.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&e.toLowerCase().indexOf(a.toLowerCase())===0)o[a]=!0,(!j.specified||!j.specified(k))&&define(k,["orion/i18n!"+k],function(a){return a})}else r=e});!j.specified||!j.specified(g)?r?
k.getService(r).getMessageBundle().then(function(a){Object.keys(o).forEach(function(c){typeof a[c]==="undefined"&&(a[c]=o[c])});define(g,[],a);f(a)},function(){define(g,[],o);f(o)}):(define(g,[],o),f(o)):f(o)}})})}}else f(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:"Git","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",Export:"Export","Export a theme":"Export a theme","Theme name:":"Theme name:",yourTheme:"yourTheme",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 the local editor settings drop down.",editorSettingsInfo:"Use the ${0} and ${1} to toggle whether a given setting is shown in the local editor settings drop down ${2}.",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",languageTools:"Language Tools",showOccurrences:"Show Occurrences",contentAssistAutoTrigger:"Show Content Assist automatically","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(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
(function(){function g(){for(var b=navigator.userAgent,d={browser:!1,version:!1},e=[{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:"Microsoft Internet Explorer",regExp:/Trident\/(\d+)/i,minVersion:6},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:6}],c=0;c<e.length;c++){var a=e[c],i=b.match(a.regExp);if(i){d.browser=
!0;d.version=i[1]>=a.minVersion;d.name=a.name;break}}return d}function j(){try{return"localStorage"in window&&window.localStorage!==null}catch(b){return!1}}function f(b){alert(b);throw Error("unsupported browser");}var d=g();if(d.browser)d.version||f("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+d.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()||f("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:g,supportsLocalStorage:j,throwBrowserAlert:f}})();define("orion/browserCompatibility",function(){});
(function(g,j){typeof define==="function"&&define.amd?define("orion/Deferred",j):typeof exports==="object"?module.exports=j():(g.orion=g.orion||{},g.orion.Deferred=j())})(this,function(){function g(){for(var e;e=b.shift();)e();h=!1}function j(e){b.push(e);h||(h=!0,setTimeout(g,0))}function f(b){return function(){b.apply(void 0,arguments)}}function d(){function e(){for(var a;a=m.shift();){var c=a.deferred,i=l==="fulfilled"?"resolve":"reject";if(typeof a[i]==="function")try{var e=(0,a[i])(k),d=e&&(typeof e===
"object"||typeof e==="function")&&e.then;if(typeof d==="function")if(e===c.promise)c.reject(new TypeError);else{var h=e.cancel;typeof h==="function"?c._protected(b).parentCancel=h.bind(e):delete c._protected(b).parentCancel;d.call(e,f(c.resolve),f(c.reject),f(c.progress))}else c.resolve(e)}catch(g){c.reject(g)}else c[i](k)}}function c(a){delete g.parentCancel;l="rejected";k=a;m.length&&j(e)}function a(i){function b(a){return function(c){f||(f=!0,a(c))}}var f=!1;delete g.parentCancel;try{var t=i&&
(typeof i==="object"||typeof i==="function")&&i.then;if(typeof t==="function")if(i===h)c(new TypeError);else{l="assumed";var u=i&&i.cancel;if(typeof u!=="function"){var v=new d,i=v.promise;try{t(v.resolve,v.reject,v.progress)}catch(x){v.reject(x)}u=i.cancel;t=i.then}k=i;t.call(i,b(a),b(c));g.parentCancel=u.bind(i)}else l="fulfilled",k=i,m.length&&j(e)}catch(B){b(c)(B)}}function i(){var a=g.parentCancel;if(a)delete g.parentCancel,a();else if(!l)a=Error("Cancel"),a.name="Cancel",c(a)}var k,l,m=[],h=
this,g={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==b)throw Error("protected");return g}});this.resolve=function(c){l||a(c);return h};this.reject=function(a){l||c(a);return h};this.progress=function(a){l||m.forEach(function(c){if(c.progress)try{c.progress(a)}catch(i){}});return h.promise};this.cancel=function(){g.parentCancel?setTimeout(i,0):i();return h};this.then=function(a,c,i){a={resolve:a,reject:c,progress:i,deferred:new d};m.push(a);a.deferred._protected(b).parentCancel=
h.promise.cancel.bind(h);(l==="fulfilled"||l==="rejected")&&j(e);return a.deferred.promise};this.promise={then:h.then,cancel:h.cancel}}var b=[],h=!1;d.all=function(b,c){function a(a,c){m||(l[a]=c,--k===0&&f.resolve(l))}function i(i,b){if(!m){if(c)try{a(i,c(b));return}catch(e){b=e}f.reject(b)}}var k=b.length,l=[],m=!1,f=new d;f.then(void 0,function(){m=!0;b.forEach(function(a){a.cancel&&a.cancel()})});k===0?f.resolve(l):b.forEach(function(c,b){c.then(a.bind(void 0,b),i.bind(void 0,b))});return f.promise};
d.when=function(b,c,a,i){var k;if(!(b&&typeof b.then==="function"))k=new d,k.resolve(b),b=k.promise;return b.then(c,a,i)};return d});
define("orion/EventTarget",[],function(){function g(){this._namedListeners={}}g.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var f=this._namedListeners[g.type];f&&f.forEach(function(d){try{typeof d==="function"?d(g):d.handleEvent(g)}catch(b){typeof console!=="undefined"&&console.log(b)}});return!g.defaultPrevented},addEventListener:function(g,f){if(typeof f==="function"||f.handleEvent)this._namedListeners[g]=this._namedListeners[g]||[],this._namedListeners[g].push(f)},
removeEventListener:function(g,f){var d=this._namedListeners[g];if(d)for(var b=0;b<d.length;b++)if(d[b]===f){d.length===1?delete this._namedListeners[g]:d.splice(b,1);break}}};g.prototype.constructor=g;g.attach=function(j){var f=new g;j.dispatchEvent=f.dispatchEvent.bind(f);j.addEventListener=f.addEventListener.bind(f);j.removeEventListener=f.removeEventListener.bind(f)};return g});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(g,j){function f(c,a,i){this._properties=i||{};this._properties["service.id"]=c;this._properties.objectClass=a;this._properties["service.names"]=a}function d(c,a,i){this._serviceId=c;this._serviceReference=a;this._internalRegistry=i}function b(c,a){function i(i){return function(){var b;try{if(!a())throw Error("Service was unregistered");var e=c[i].apply(c,Array.prototype.slice.call(arguments));if(e&&typeof e.then==="function")return e;
else b=new g,b.resolve(e)}catch(k){b=new g,b.reject(k)}return b.promise}}for(var b in c)typeof c[b]==="function"&&(this[b]=i(b))}function h(c,a){this.type=c;this.serviceReference=a}function e(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new j;var c=this;this._internalRegistry={isRegistered:function(a){return c._entries[a]?!0:!1},unregisterService:function(a){var i=c._entries[a];if(!i)throw Error("Service has already been unregistered: "+a);var b=i.reference;c._serviceEventTarget.dispatchEvent(new h("unregistering",
b));c._entries[a]=null;b.getProperty("objectClass").forEach(function(a){for(var i=c._namedReferences[a],e=0;e<i.length;e++)if(i[e]===b){i.length===1?delete c._namedReferences[a]:i.splice(e,1);break}})},modifyService:function(a){var i=c._entries[a];if(!i)throw Error("Service not found while trying to send modified event: "+a);c._serviceEventTarget.dispatchEvent(new h("modified",i.reference))}}}f.prototype={getPropertyKeys:function(){var c=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&
c.push(a);return c},getProperty:function(c){return this._properties[c]}};f.prototype.constructor=f;d.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(c){var a=this._serviceReference._properties;this._serviceReference._properties=c||{};c["service.id"]=this._serviceId;
c.objectClass=a.objectClass;c["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};d.prototype.constructor=d;e.prototype={getService:function(c){var a;if(typeof c==="string")(c=this._namedReferences[c])&&c.some(function(c){a=this._entries[c.getProperty("service.id")].service;return!!a},this);else if(c=this._entries[c.getProperty("service.id")])a=c.service;return a||null},getServiceReferences:function(c){if(c)return this._namedReferences[c]?this._namedReferences[c]:
[];var a=[];this._entries.forEach(function(c){c&&a.push(c.reference)});return a},registerService:function(c,a,i){if(typeof a==="undefined"||a===null)throw Error("invalid service");typeof c==="string"?c=[c]:Array.isArray(c)||(c=[]);var e=this._entries.length,l=new f(e,c,i),m=this._namedReferences;c.forEach(function(a){m[a]=m[a]||[];m[a].push(l)});c=new b(a,this._internalRegistry.isRegistered.bind(null,e));this._entries.push({reference:l,service:c});c=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new h("registered",
l));return new d(e,l,c)},addEventListener:function(c,a){this._serviceEventTarget.addEventListener(c,a)},removeEventListener:function(c,a){this._serviceEventTarget.removeEventListener(c,a)}};e.prototype.constructor=e;return{ServiceRegistry:e}});
define("orion/xhr",["orion/Deferred"],function(g){function j(f,d,b,h){var e=typeof b.response!=="undefined"?b.response:b.responseText,c;try{c=b.status}catch(a){c=0}f={args:d,response:e,responseText:typeof e==="string"?e:null,status:c,url:f,xhr:b};if(typeof h!=="undefined")f.error=h;return f}return function(f,d,b){var b=b||{},h=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,e=new g,c=b.headers||{},a=b.log||!1,i;typeof c["X-Requested-With"]==="undefined"&&(c["X-Requested-With"]="XMLHttpRequest");
if(typeof b.data!=="undefined"&&(f==="POST"||f==="PUT"))i=b.data;var k=!1,l=!1;e.promise.then(void 0,function(a){k=!0;!l&&a instanceof Error&&a.name==="Cancel"&&h.abort()});h.onabort=function(){l=!0;if(!k){var a=Error("Cancel");a.name="Cancel";e.reject(a)}};h.onload=function(){var c=j(d,b,h);200<=h.status&&h.status<400?e.resolve(c):(e.reject(c),a&&typeof console!=="undefined"&&console.log(Error(h.statusText)))};h.onerror=function(){var c=j(d,b,h);e.reject(c);a&&typeof console!=="undefined"&&console.log(Error(h.statusText))};
h.onprogress=function(a){a.xhr=h;e.progress(a)};try{h.open(f,d,!0);if(typeof b.responseType==="string")h.responseType=b.responseType;if(typeof b.timeout==="number")if(typeof h.timeout==="number")h.timeout=b.timeout,h.addEventListener("timeout",function(){e.reject(j(d,b,h,"Timeout exceeded"))});else{var m=setTimeout(function(){e.reject(j(d,b,h,"Timeout exceeded"))},b.timeout);e.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(c).forEach(function(a){h.setRequestHeader(a,
c[a])});h.send(i||null)}catch(o){e.reject(j(d,b,h,o))}return e.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,j,f){function d(a,c){this._name=a;this._providers=c;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function b(a,c){return{get:function(b,e){if(c===0)return null;var d=localStorage.getItem(a+b);if(d===null)return null;d=JSON.parse(d);return e||c===-1||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(b,e){if(c!==0){if(c!==-1)e._expires=(new Date).getTime()+
1E3*c;if(Object.keys(e).length===0)localStorage.removeItem(a+b);else{var d=JSON.stringify(e);localStorage.setItem(a+b,d);delete e._expires}}},remove:function(c){localStorage.removeItem(a+c)}}}function h(a){this._currentPromises={};this._cache=new b("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var c=a.getServiceReferences("orion.core.preference.provider");if(c.length>0)this._service=a.getService(c[0])}return!!this._service}}function e(a){this._location=
a;this._currentPromise=null;this._cache=new b("/orion/preferences/default",3600)}function c(){this._cache=new b("/orion/preferences/local",-1)}function a(a,b){this._userProvider=new h(a);this._localProvider=new c;b=b||"defaults.pref";b.indexOf("://")===-1&&(b=g.toUrl(b));this._defaultsProvider=new e(b);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],c=0;c<this._stores.length;++c){var b=this._stores[c];this._dirty.indexOf(b)!==-1&&
a.push(this._providers[c].put(this._name,b));if(this._pendingDeletes[c]&&this._pendingDeletes[c].length>0){for(b=0;b<this._pendingDeletes[c].length;b++)a.push(this._providers[c].remove(this._name,this._pendingDeletes[c][b]));delete this._pendingDeletes[c]}}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 c=this._stores[a],b;for(b in c)c.hasOwnProperty(b)&&typeof this._cached[b]==="undefined"&&(this._cached[b]=c[b])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,c){if(this._stores.length!==0){var b=this._stores[0];if(b[a]!==c)b[a]=c,this._cached=null,this._scheduleFlush(b)}},remove:function(a){for(var c=0;c<
this._stores.length;++c){var b=this._stores[c];if(b.hasOwnProperty(a))return delete b[a],this._pendingDeletes[c]||(this._pendingDeletes[c]=[]),this._pendingDeletes[c].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 c=this,b=[],e=0;e<this._providers.length;++e)b.push(this._providers[e].get(this._name,
a).then(function(a){return function(b){c._stores[a]=b}}(e)));return j.all(b).then(function(){c._cached=null;c._getCached()})},flush:function(){this._flush()}};h.prototype={get:function(a,c){if(this._currentPromises[a])return this._currentPromises[a];var b=new j,e=null;c?this._cache.remove(a):e=this._cache.get(a);if(e!==null)b.resolve(e);else{this._currentPromises[a]=b;var d=this;this._service.get(a).then(function(c){d._cache.set(a,c);delete d._currentPromises[a];b.resolve(c)},function(c){c.status===
404?(c={},d._cache.set(a,c),delete d._currentPromises[a],b.resolve(c)):(delete d._currentPromises[a],b.resolve(d._cache.get(a,!0)||{}))})}return b},put:function(a,c){this._cache.set(a,c);return this._service.put(a,c)},remove:function(a,c){var b=this._cache.get(a);delete b[c];this._cache.set(a,b);return this._service.remove(a,c)}};e.prototype={get:function(a,c){if(this._currentPromise)return this._currentPromise;var b=new j,e=null;c?this._cache.remove(a):e=this._cache.get(a);if(e!==null)b.resolve(e);
else{this._currentPromise=b;var d=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(c){c=JSON.parse(c.response);d._cache.set(a,c[a]||{});d._currentPromise=null;b.resolve(c[a]||{})},function(c){c.xhr.status===401||c.xhr.status===404?(d._cache.set(a,{}),d._currentPromise=null,b.resolve({})):(d._currentPromise=null,c=d._cache.get(a,!0),c!==null?b.resolve(c[a]||{}):b.resolve({}))})}return b},put:function(){var a=new j;a.resolve();return a},remove:function(a,c){var b=
this._cache.get(a);delete b[c];this.put(a,b)}};c.prototype={get:function(a){var c=new j,a=this._cache.get(a);a!==null?c.resolve(a):c.resolve({});return c},put:function(a,c){var b=new j;this._cache.set(a,c);b.resolve();return b},remove:function(a,c){var b=this._cache.get(a);delete b[c];this.put(a,b)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(c,b,e){if(!b||typeof b!=="number"||b>7||b<1)e=b,b=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
e,!1);if((a.USER_SCOPE&b)!==0)return"/orion/preferences/user"+c;else if((a.LOCAL_SCOPE&b)!==0)return"/orion/preferences/local"+c;return"/orion/preferences/default"+c},getPreferences:function(c,b){if(!b||typeof b!=="number"||b>7||b<1)b=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var e=[];a.USER_SCOPE&b&&this._userProvider.available()&&e.push(this._userProvider);a.LOCAL_SCOPE&b&&e.push(this._localProvider);a.DEFAULT_SCOPE&b&&e.push(this._defaultsProvider);var m=new d(c,e);return m.sync().then(function(){return m})},
getSetting:function(a,c,b){for(var e,d=0;d<a.length;d++)if(a[d].label===c)for(var f=0;f<a[d].data.length;f++)if(a[d].data[f].label===b){e=a[d].data[f].value;break}return e}};return{PreferencesService:a}});
(function(){function g(a){if(typeof a!=="string")throw new TypeError;}function j(a){return a?a.split("&"):[]}function f(a){return a.length===0?"":a.join("&")}function d(a){var c=/([^=]*)(?:=?)(.*)/.exec(a),a=c[1]?decodeURIComponent(c[1]):"",c=c[2]?decodeURIComponent(c[2]):"";return[a,c]}function b(a){var c=encodeURIComponent(a[0]);a[1]&&(c+="="+encodeURIComponent(a[1]));return c}function h(a,c){var b="",e=[],i=0;return{next:function(){if(b!==a.query)b=a.query,e=j(b);if(i<e.length){var k=d(e[i++]);
switch(c){case "keys":return k[0];case "values":return k[1];case "keys+values":return[k[0],k[1]];default:throw new TypeError;}}throw H;}}}function e(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function c(a){return a?/[1-9]\d*$/.exec(a)[0]:""}function a(a){var c=[];a.split("/").forEach(function(a){a===".."?c.pop():a!=="."&&c.push(a)});return c.join("/")}function i(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function k(b,e){if(typeof b!==
"string")throw new TypeError;var b=i(b),d=r.exec(b);if(!d)return null;var k={};k.scheme=d[1]||"";if(k.scheme&&!p.test(k.scheme))return null;var l=d[2];if(l&&(l=n.exec(l),k.userinfo=l[1],k.host=l[2],k.port=l[3],k.port&&!q.test(k.port)))return null;k.path=d[3];k.query=d[4];k.fragment=d[5];if(!k.scheme&&e&&(k.scheme=e.scheme,!k.host&&e.host))k.userinfo=e.userinfo,k.host=e.host,k.port=e.port,k.pathRelative=!0;if(k.pathRelative)if(k.path){if(k.path[0]!=="/")d=/^(.*\/)[^\/]*$/.exec(e.path)[1]||"/",k.path=
d+k.path}else k.path=e.path;if(k.scheme)k.scheme=k.scheme.toLowerCase();if(k.port)k.port=c(k.port);if(k.host&&k.path)k.path=a(k.path);return k}function l(a,c){var b;if(c){c=c.href||c;b=k(c);if(!b||!b.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:b})}b=k(a,b);if(!b)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:b,writable:!0});var d=new e(this);Object.defineProperty(this,"query",{get:function(){return this._url?
d:null},enumerable:!0})}try{var m;if(typeof window.URL==="function"&&window.URL.length!==0&&(m=new window.URL("http://www.w3.org?q")).protocol==="http:"&&m.query)return}catch(o){}var r=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,n=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,p=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,q=/^\d*$/,t=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,u=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,v=/^([^?#\s]*)$/,x=/^([^\s]*)$/,B=/^\S*$/,z=/([^:]*):?(.*)/,H=typeof StopIteration!==
"undefined"?StopIteration:Error("Stop Iteration"),F={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(e.prototype,{get:{value:function(a){g(a);var c;j(this._url.query).some(function(b){b=d(b);if(b[0]===a)return c=b[1],!0});return c},enumerable:!0},set:{value:function(a,c){g(a);g(c);var e=j(this._url.query);e.some(function(i,k){var l=d(i);if(l[0]===a)return l[1]=c,e[k]=b(l),!0})||e.push(b([a,c]));this._url.query=f(e)},enumerable:!0},has:{value:function(a){g(a);
return j(this._url.query).some(function(c){if(d(c)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){g(a);var c=j(this._url.query),b=c.filter(function(c){return d(c)[0]!==a});return b.length!==c.length?(this._url.query=f(b),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,c){if(typeof a!=="function")throw new TypeError;var b=h(this._url,"keys+values");try{for(;;){var e=b.next();a.call(c,e[1],e[0],this)}}catch(d){if(d!==H)throw d;
}},enumerable:!0},keys:{value:function(){return h(this._url,"keys")},enumerable:!0},values:{value:function(){return h(this._url,"values")},enumerable:!0},items:{value:function(){return h(this._url,"keys+values")}},size:{get:function(){return j(this._url.query).length},enumerable:!0},getAll:{value:function(a){g(a);var c=[];j(this._url.query).forEach(function(b){b=d(b);b[0]===a&&c.push(b[1])});return c},enumerable:!0},append:{value:function(a,c){g(a);g(c);var e=j(this._url.query);e.push(b([a,c]));this._url.query=
f(e)},enumerable:!0}});Object.defineProperties(l.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var c=a.scheme?a.scheme+":":"";a.host&&(c+="//",a.userinfo&&(c+=a.userinfo+"@"),c+=a.host,a.port&&(c+=":"+a.port));c+=a.path;a.query&&(c+="?"+a.query);a.fragment&&(c+="#"+a.fragment);a=c}else a=this._input;return a},set:function(a){g(a);this._input=a;this._url=k(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){g(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,a===""||p.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){g(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=z.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){g(a);if(this._url){var c=
z.exec(this._userinfo),a=[encodeURIComponent(a||"")];c[2]&&a.push(c[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=z.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){g(a);if(this._url){var c=[z.exec(this._userinfo)[1]||""];a&&c.push(encodeURIComponent(a));this._userinfo=c.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){g(a);if(this._url&&(a=u.exec(a)))this._url.host=a[1],this._url.port=c(a[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){g(a);if(this._url&&t.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===F[this.protocol]&&(a="");return a},set:function(a){g(a);if(this._url&&q.exec(a))this._url.port=c(a)},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(c){g(c);
if(this._url&&v.exec(c))this._url.host&&c&&c[0]!=="/"&&(c="/"+c),this._url.path=c?a(c):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){g(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),x.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){g(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),B.exec(a)))this._url.fragment=a},enumerable:!0}});
if((m=window.URL||window.webkitURL)&&m.createObjectURL)Object.defineProperty(l,"createObjectURL",{value:m.createObjectURL.bind(m),enumerable:!1}),Object.defineProperty(l,"revokeObjectURL",{value:m.revokeObjectURL.bind(m),enumerable:!1});window.URL=l})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(g,j){function f(a,c){var b=Object.keys(a),e=Object.keys(c);if(b.length!==e.length)return!1;b.sort();e.sort();for(var d=0,i=b.length;d<i;d++){var k=b[d];if(k!==e[d])return!1;var f=a[k],k=c[k];if(f!==k&&JSON.stringify(f)!==JSON.stringify(k))return!1}return!0}function d(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(c){}return a}function b(a){var c=null,b={key:function(b){return(c=
c||Object.keys(a))[b]},getItem:function(c){return a[c]},setItem:function(b,e){a[b]=e;c=null},removeItem:function(b){delete a[b];c=null},clear:function(){(c=c||Object.keys(a)).forEach(function(c){delete a[c]}.bind(this));c=null}};Object.defineProperty(b,"length",{get:function(){return(c=c||Object.keys(a)).length}});return b}function h(a,c){if(c&&c instanceof XMLHttpRequest){var b,e;try{b=c.status,e=c.statusText}catch(d){b=0,e=""}return{status:b||0,statusText:e}}return c}function e(a){var c=a?JSON.parse(JSON.stringify(a,
h)):a;if(a instanceof Error)c.__isError=!0,c.message=c.message||a.message,c.name=c.name||a.name;return c}function c(a,c){this.type=a;this.plugin=c}function a(a,c){this.__objectId=a;this.__methods=c}function i(b,d,i){function k(a){G&&i.postMessage(a,G)}function h(c){if(!G)return(new g).reject(Error("plugin not connected"));c.id=String(L++);var b=new g;N[c.id]=b;b.then(null,function(a){w==="active"&&a instanceof Error&&a.name==="Cancel"&&k({requestId:c.id,method:"cancel",params:a.message?[a.message]:
[]})});var e=Object.prototype.toString;c.params.forEach(function(i,d){if(e.call(i)==="[object Object]"&&!(i instanceof a)){var k,l;for(k in i)e.call(i[k])==="[object Function]"&&(l=l||[],l.push(k));if(l){var m=Q++;O[m]=i;k=function(){delete O[m]};b.then(k,k);c.params[d]=new a(m,l)}}});i.postMessage(c,G);return b.promise}function p(a,c){a||a===0?k({id:a,result:null,error:c}):console.log(c)}function q(a,c,b,i){i.forEach(function(a,c){if(a&&typeof a.__objectId!=="undefined"){var b={};a.__methods.forEach(function(c){b[c]=
function(){return h({objectId:a.__objectId,method:c,params:Array.prototype.slice.call(arguments)})}});i[c]=b}});var d=typeof a===void 0?null:{id:a,result:null,error:null};try{var l=b.apply(c,i);if(d)l&&typeof l.then==="function"?(M[a]=l,l.then(function(c){delete M[a];d.result=c;k(d)},function(c){if(M[a])delete M[a],d.error=e(c),k(d)},function(){k({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(d.result=l,k(d))}catch(m){if(d)d.error=e(m),k(d)}}function t(a){try{if(a.method){var c=
a.method,b=a.params||[];if("serviceId"in a){var e=S[a.serviceId];e||p(a.id,"service not found");c in e?q(a.id,e,e[c],b):p(a.id,"method not found")}else if("objectId"in a){var d=O[a.objectId];d||p(a.id,"object not found");c in d?q(a.id,d,d[c],b):p(a.id,"method not found")}else if("requestId"in a){var k=M[a.requestId];k&&c==="cancel"&&k.cancel&&k.cancel.apply(k,b)}else if("responseId"in a){var l=N[a.responseId];l&&c==="progress"&&l.progress&&l.progress.apply(l,b)}else if("plugin"===a.method){var m=
a.params[0];P({headers:m.headers,services:m.services}).then(function(){D&&D.resolve(z)})}else if("timeout"===a.method)D&&D.reject(a.error);else throw Error("Bad method: "+a.method);}else{var f=N[String(a.id)];delete N[String(a.id)];if(a.error){var h=i.handleServiceError(z,a.error);f.reject(h)}else f.resolve(a.result)}}catch(g){console.log("Plugin._messageHandler "+g)}}function u(c){var b={};if(c.methods&&(c.methods.forEach(function(a){b[a]=function(){var b={serviceId:c.serviceId,method:a,params:Array.prototype.slice.call(arguments)};
return w==="active"?h(b):z.start({"transient":!0}).then(function(){return h(b)})}}),b.addEventListener&&b.removeEventListener)){var e=new j,i=Q++;O[i]={handleEvent:e.dispatchEvent.bind(e)};var d=new a(i,["handleEvent"]),k=b.addEventListener;b.addEventListener=function(a,c){e._namedListeners[a]||k(a,d);e.addEventListener(a,c)};var l=b.removeEventListener;b.removeEventListener=function(a,c){e.removeEventListener(a,c);e._namedListeners[a]||l(a,d)}}return b}function v(a){var c=JSON.parse(JSON.stringify(a.properties));
c.__plugin__=b;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);c.objectClass=a;return c}function x(a){var c=u(a),b=v(a),b=i.registerService(a.names||a.type,c,b);I[a.serviceId]={registration:b,proxy:c}}function B(){i.persist(b,{created:H,headers:F,services:E,autostart:s,lastModified:y})}var z=this,d=d||{},H=d.created||(new Date).getTime(),F=d.headers||{},E=d.services||[],s=d.autostart,y=d.lastModified||0,w="installed",C,D,G,A,I={},L=0,Q=0,M={},N={},O={},S={},P;this._persist=B;this._resolve=function(){w=
"resolved";i.dispatchEvent(new c("resolved",z))};this._getAutostart=function(){return s};this._getCreated=function(){return H};this.getLocation=function(){return b};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 y};this.getServiceReferences=function(){var a=[];Object.keys(I).forEach(function(c){a.push(I[c].registration.getReference())});
return a};this.setParent=function(a){return A!==a?(A=a,z.stop({"transient":!0}).then(function(){if("started"===s)return z.start({"transient":!0});else if("lazy"===s)return z.start({lazy:!0,"transient":!0})})):(new g).resolve()};this.getState=function(){return w};this.start=function(a){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.start.bind(this,a));if(w==="active")return(new g).resolve();if(!a||!a.transient){var e=a&&a.lazy?"lazy":"started";
e!==s&&(s=e,B())}e=i.getState();if(e!=="starting"&&e!=="active")return a.transient?(new g).reject(Error("start transient error")):(new g).resolve();if(w==="installed")try{this._resolve()}catch(d){return(new g).reject(d)}w==="resolved"&&E.forEach(function(a){x(a)});if(a&&a.lazy)return w!=="starting"&&(w="starting",i.dispatchEvent(new c("lazy activation",z))),(new g).resolve();var k=new g;C=k;w="starting";i.dispatchEvent(new c("starting",z));D=new g;G=i.connect(b,t,A);D.then(function(){D=null;w="active";
i.dispatchEvent(new c("started",z));C=null;k.resolve()},function(){D=null;w="stopping";i.dispatchEvent(new c("stopping",z));Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});i.disconnect(G);G=null;w="resolved";C=null;i.dispatchEvent(new c("stopped",z));k.reject(Error("plugin activation error"))});return k.promise};this.stop=function(a){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.stop.bind(this,a));if((!a||
!a.transient)&&"stopped"!==s)s="stopped",B();if(w!=="active"&&w!=="starting")return(new g).resolve();C=a=new g;w="stopping";i.dispatchEvent(new c("stopping",z));Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});G&&(i.disconnect(G),G=null);w="resolved";C=null;i.dispatchEvent(new c("stopped",z));a.resolve();return a.promise};P=function(a){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(!a)return y===0&&(y=(new Date).getTime(),B()),i.loadManifest(b).then(P);
var e=F,d=E,k=s;F=a.headers||{};E=a.services||{};s=a.autostart||s;a.lastModified?y=a.lastModified:(y=(new Date).getTime(),B());if(f(F,e)&&f(E,d)&&s===k)return(new g).resolve();if(w==="active"||w==="starting"){var m=[];Object.keys(E).forEach(function(a){var c=E[a];m.push(a);var b=I[a];if(b){if(f(c.methods,Object.keys(b.proxy))){var a=v(c),e=b.registration.getReference(),d={};e.getPropertyKeys().forEach(function(a){d[a]=e.getProperty(a)});f(a,d)||b.registration.setProperties(a);return}b.registration.unregister();
delete I[a]}x(c)});Object.keys(I).forEach(function(a){m.indexOf(a)===-1&&(I[a].registration.unregister(),delete I[a])})}w==="active"&&(i.disconnect(G),D=new g,G=i.connect(b,t,A),D.then(function(){D=null},function(){D=null;w="stopping";i.dispatchEvent(new c("stopping"),z);Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});i.disconnect(G);G=null;w="resolved";i.dispatchEvent(new c("stopped",z))}));return(new g).resolve()};this.update=function(a){return P(a).then(function(){i.dispatchEvent(new c("updated",
z))})};this.uninstall=function(){if(w==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(w==="active"||w==="starting"||w==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));i.removePlugin(this);w="uninstalled";i.dispatchEvent(new c("uninstalled",z));return(new g).resolve()}}var k=/^http[s]?/i;return{Plugin:i,PluginRegistry:function(a,e){function f(a){var c=a.source;t.some(function(b){if(c===b.target){try{var e;if(typeof b.useStructuredClone===
"undefined"){var d=typeof a.data!=="string";e=d?a.data:JSON.parse(a.data);b.useStructuredClone=d}else e=b.useStructuredClone?a.data:JSON.parse(a.data);b.handler(e)}catch(i){}return!0}})}var e=e||{},h=e.storage||localStorage;h.getItem||(h=b(h));var n="installed",p,q=[],t=[],u=new j,v={},x={registerService:a.registerService.bind(a),connect:function(a,c,b,e){function d(a){a=Error(a);a.name="timeout";c({method:"timeout",error:a})}var i={handler:c,url:a},k=setTimeout(d.bind(null,"Load timeout for: "+a),
e||15E3),l=document.createElement("iframe");l.name=a+"_"+(new Date).getTime();l.src=a;l.onload=function(){clearTimeout(k);k=setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};l.sandbox="allow-scripts allow-same-origin";l.style.width=l.style.height="100%";l.frameBorder=0;(b||p).appendChild(l);i.target=l.contentWindow;i.close=function(){clearTimeout(k);if(l){var a=l.parentNode;a&&a.removeChild(l);l=null}};t.push(i);return i},disconnect:function(a){for(var c=0;c<t.length;c++)if(a===t[c]){t.splice(c,
1);try{a.close()}catch(b){}break}},removePlugin:function(a){for(var c=0;c<q.length;c++)if(a===q[c]){q.splice(c,1);break}h.removeItem("plugin."+a.getLocation())},persist:function(a,c){h.setItem("plugin."+a,JSON.stringify(c))},postMessage:function(a,c){c.target.postMessage(c.useStructuredClone?a:JSON.stringify(a),c.url)},dispatchEvent:function(a){try{u.dispatchEvent(a)}catch(c){console&&console.log("PluginRegistry.dispatchEvent "+c)}},loadManifest:function(a){var c=new g,b=x.connect(a,function(a){b&&
a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],x.disconnect(b),b=null,c.resolve(a)):"timeout"===a.method&&(x.disconnect(b),b=null,c.reject(a.error)))});return c.promise},getState:function(){return n},handleServiceError:function(a,c){if(c&&c.status===401){var b=a.getHeaders(),e=a.getName()||a.getLocation(),d=document.createElement("span");d.appendChild(document.createTextNode("Authentication required for: "+e+"."));if(b.login)d.appendChild(document.createTextNode(" ")),e=document.createElement("a"),
e.target="_blank",e.textContent="Login",e.href=b.login,k.test(e.href)?(d.appendChild(e),d.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+b.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(d)}}if(c.__isError){var i=c,c=Error(i.message);Object.keys(i).forEach(function(a){c[a]=i[a]});delete c.__isError}return c}};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=x.getState;this.init=function(){if(!(n==="starting"||n==="active"||n==="stopping")){addEventListener("message",f,!1);for(var a=[],c=0,b=h.length;c<b;c++)a.push(h.key(c));a.forEach(function(a){if(a.indexOf("plugin.")===0){var c=a.substring(7),a=JSON.parse(h.getItem(a));a.created&&q.push(new i(c,a,x))}});q.sort(function(a,c){return a._getCreated()<c._getCreated()?-1:1});if(e.parent)p=e.parent;else{p=document.createElement("div");
if(!e.visible)p.style.display="none",p.style.visibility="hidden";document.body.appendChild(p)}e.plugins&&Object.keys(e.plugins).forEach(function(a){a=d(a);if(!this.getPlugin(a)){var c=e.plugins[a];typeof c!=="object"&&(c={});c.autostart=c.autostart||e.defaultAutostart||"lazy";q.push(new i(a,c,x))}}.bind(this));n="starting"}};this.start=function(){n!=="starting"&&this.init();if(n!=="starting")return(new g).reject("Cannot start framework. Framework is already "+n+".");var a=[],c=(new Date).getTime();
q.forEach(function(b){var e=b._getAutostart();b.getLastModified()===0?a.push(b.update().then(function(){if("started"===e)return b.start({"transient":!0});if("lazy"===e)return b.start({lazy:!0,"transient":!0});b._resolve()})):"started"===e?a.push(b.start({"transient":!0})):"lazy"===e?(a.push(b.start({lazy:!0,"transient":!0})),c>b.getLastModified()+864E5&&b.update()):b._resolve()});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){n="active"})};this.stop=function(){if(n!==
"starting"&&n!=="active")return(new g).reject("Cannot stop registry. Registry is already "+n+".");n="stopping";var a=[];q.forEach(function(c){a.push(c.stop({"transient":!0}))});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){if(!e.parent){var a=p.parentNode;a&&a.removeChild(p)}p=null;removeEventListener("message",f);n="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};
this.installPlugin=function(a,b){var a=d(a),e=this.getPlugin(a);if(e)return(new g).resolve(e);if(v[a])return v[a];if(b)return e=new i(a,b,x),q.push(e),e._persist(),x.dispatchEvent(new c("installed",e)),(new g).resolve(e);var k=x.loadManifest(a).then(function(b){e=new i(a,b,x);q.push(e);e._persist();delete v[a];x.dispatchEvent(new c("installed",e));return e},function(c){delete v[a];throw c;});return v[a]=k};this.getPlugins=function(){return q.slice()};this.getPlugin=function(a){var c=null,a=d(a);q.some(function(b){if(a===
b.getLocation())return c=b,!0});return c};this.addEventListener=u.addEventListener.bind(u);this.removeEventListener=u.removeEventListener.bind(u);this.resolvePlugins=function(){var a=!0;q.forEach(function(c){a=a&&c._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function g(d,b){function h(b){var e=b.getProperty("service.id"),d=this.addingService(b);d&&(c[e]=b,a[e]=d)}function e(b){var e=b.getProperty("service.id"),d=a[e];delete c[e];delete a[e];this.removedService(b,d)}this.serviceRegistry=d;var c={},a={},i=j,k,l;this.close=function(){if(i!==f)throw"Already closed";i=j;d.removeEventListener("registered",k);d.removeEventListener("unregistering",l);l=k=null;var a=this;this.getServiceReferences().forEach(function(c){e.call(a,
c)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=Object.keys(c);return!a.length?null:a.map(function(a){return c[a]})};this.open=function(){if(i!==j)throw"Already open";i=f;var a=this;k=function(c){if(c.serviceReference.getProperty("objectClass").indexOf(b)!==-1&&(h.call(a,c.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(c.serviceReference,a.serviceRegistry.getService(c.serviceReference))};l=function(c){c.serviceReference.getProperty("objectClass").indexOf(b)!==
-1&&e.call(a,c.serviceReference)};d.addEventListener("registered",k);d.addEventListener("unregistering",l);d.getServiceReferences(b).forEach(function(c){h.call(a,c);if(typeof a.onServiceAdded==="function")return a.onServiceAdded(c,d.getService(c))});if(typeof this.onOpen==="function")this.onOpen()}}var j=0,f=1;g.prototype={addingService:function(d){return this.serviceRegistry.getService(d)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return g});
define("orion/objects",[],function(){function g(g){for(var f=1;f<arguments.length;f++){var d=arguments[f],b;for(b in d)Object.prototype.hasOwnProperty.call(d,b)&&(g[b]=d[b])}return g}return{clone:function(j){if(Array.isArray(j))return Array.prototype.slice.call(j);var f=Object.create(Object.getPrototypeOf(j));g(f,j);return f},mixin:g,toArray:function(g){return Array.isArray(g)?g:[g]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(g,j,f){var d,b,h,e,c,a="pid";d=function(c,b,e){function d(a,c,e){c.forEach(function(d,i){try{var k=a[i].getProperty("__plugin__"),m=k&&b.getPlugin(k);(!k||m&&m.getState()==="active")&&c[i].updated(e)}catch(f){typeof console!=="undefined"&&console.log(f)}})}j.call(this,c,"orion.cm.managedservice");var i={},f={},h=function(b){var d=[];b.plugin.getServiceReferences().forEach(function(b){if(b.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var i=b.getProperty(a),b=c.getService(b);i&&b&&(i=(i=e._find(i))&&i.getProperties(),d.push(b.updated(i)))}});return g.all(d)};this.addingService=function(b){var e=b.getProperty(a),d=c.getService(b);if(!e||!d)return null;i[e]||(i[e]=[]);f[e]||(f[e]=[]);i[e].push(b);f[e].push(d);return d};this.onServiceAdded=function(c,b){var i=c.getProperty(a),i=e._find(i);d([c],[b],i&&i.getProperties())};this.onOpen=function(){b.addEventListener("started",h)};this.onClose=function(){b.removeEventListener("started",
h)};this.notifyUpdated=function(a){var c=a.getPid();d(i[c]||[],f[c]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(i[a]||[],f[a]||[],null)};this.removedService=function(c,b){var e=c.getProperty(a),d=i[e],k=f[e];d.length>1?d.splice(d.indexOf(c),1):delete i[e];k.length>1?k.splice(k.indexOf(b),1):delete f[e]}};b=function(){function a(c,b,i){this.store=new h(this,i);this.configAdmin=new e(this,this.store);this.tracker=new d(c,b,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(c){a.tracker.open();return c})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();e=function(){function a(c,b){this.factory=c;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";
h=function(){function b(e,d){this.factory=e;this.prefsService=d;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(e){if(!k.configs[e]){var d=b.get(e);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[a]=e,k.configs[e]=new c(k.factory,k,d))}})})}b.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new c(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,c=[];this.pref.keys().forEach(function(b){(b=a._find(b))&&b.getProperties()!==null&&c.push(b)});return c},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,c){this.pref.put(a,c.getProperties(!0)||{})}};return b}();c=function(){function c(b,e){e=f.clone(e);delete e[a];b.properties=e}function b(e,d,i){this.factory=e;this.store=d;if(i!==null&&typeof i==="object")this.pid=i[a],c(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(c){this._checkRemoved();var b=null;if(this.properties&&(b=f.clone(this.properties),!c))b[a]=this.pid;return b},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(a){this._checkRemoved();c(this,a);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:b}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(g,j,f,d,b,h){var e;return{startup:function(){if(e)return e;e=new j;var c=new f.ServiceRegistry,a=new d.PreferencesService(c);return a.getPreferences("/plugins").then(function(d){var k={plugins:{}};d.keys().forEach(function(a){var c=g.toUrl(a);k.plugins[c]=d[a]});var l=new b.PluginRegistry(c,k);return l.start().then(function(){if(c.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var c=[];a.keys().forEach(function(a){a=g.toUrl(a);l.getPlugin(a)||c.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return j.all(c,function(a){console.log(a)})})}).then(function(){return(new h.ConfigurationAdminFactory(c,l,a)).getConfigurationAdmin().then(c.registerService.bind(c,"orion.cm.configadmin"))}).then(function(){var a=c.getService("orion.core.auth");
if(a){var b=a.getUser().then(function(c){if(c)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),e=localStorage.getItem("lastLogin");if(!e||e<(new Date).getTime()-9E5)return b}}).then(function(){var b={serviceRegistry:c,preferences:a,pluginRegistry:l};e.resolve(b);return b})})}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell",ShellLinkWorkspace:"Workspace Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor",EditorRelatedLink:"Show Current Folder",EditorRelatedLinkParent:"Show Enclosing Folder",EditorLinkWorkspace:"Show Workspace",EditorRelatedLinkProj:"Show Project","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","Orion Image Viewer":"Orion Image Viewer","Orion Markdown Viewer":"Orion Markdown Viewer","Orion JSON Editor":"Orion JSON 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.":"I20140226-2325","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.",Browser:"Web Browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred.",Filter:"Filter (* = any string, ? = any character)",
"To view the browser's context menu, trigger the context menu again.":"To view the browser's context menu, trigger the context menu again.",Edit:"Edit",CentralNavTooltip:"Toggle Navigation Menu"});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/util",[],function(){var g=navigator.userAgent,j=g.indexOf("MSIE")!==-1||g.indexOf("Trident")!==-1?document.documentMode:void 0,f=parseFloat(g.split("Firefox/")[1]||g.split("Minefield/")[1])||void 0,d=g.indexOf("Opera")!==-1?parseFloat(g.split("Version/")[1]):void 0,b=parseFloat(g.split("Chrome/")[1])||void 0,h=g.indexOf("Safari")!==-1&&!b,e=parseFloat(g.split("WebKit/")[1])||void 0,c=g.indexOf("Android")!==-1,a=g.indexOf("iPad")!==-1,g=g.indexOf("iPhone")!==-1,i=a||g,k=navigator.platform.indexOf("Mac")!==
-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==-1,o="ontouchstart"in document.createElement("input");return{formatMessage:function(a){var c=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,b){return c[(b<<0)+1]})},createElement:function(a,c){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",c):a.createElement(c)},isIE:j,isFirefox:f,isOpera:d,isChrome:b,isSafari:h,isWebkit:e,isAndroid:c,isIPad:a,isIPhone:g,isIOS:i,isMac:k,isWindows:l,
isLinux:m,isTouch:o,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(g){function j(a,c){c||(c=document);return c.querySelectorAll(a)}function f(a){var c=a.tabIndex;c===0&&g.isIE&&!{a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0}[a.nodeName.toLowerCase()]&&!a.attributes.tabIndex&&(c=-1);return c}function d(a){if(f(a)>=0)return a;if(a.hasChildNodes())for(var c=0;c<a.childNodes.length;c++){var b=d(a.childNodes[c]);if(b)return b}return null}function b(a){if(f(a)>=
0)return a;if(a.hasChildNodes())for(var c=a.childNodes.length-1;c>=0;c--){var e=b(a.childNodes[c]);if(e)return e}return null}function h(a,c){if(a.nodeType===3){var b=e.exec(a.nodeValue);b&&b.length>1&&c(a,b)}if(a.hasChildNodes())for(b=0;b<a.childNodes.length;b++)h(a.childNodes[b],c)}var e=/\$\{([^\}]+)\}/,c=null;return{$:function(a,c){c||(c=document);return c.querySelector(a)},$$:j,$$array:function(a,c){return Array.prototype.slice.call(j(a,c))},node:function(a){var c=a;typeof a==="string"&&(c=document.getElementById(a));
return c},contains:function(a,c){if(!a||!c)return!1;if(a===c)return!0;var b=a.compareDocumentPosition(c);return Boolean(b&16)},bounds:function(a){a=a.getBoundingClientRect();return{left:a.left+document.documentElement.scrollLeft,top:a.top+document.documentElement.scrollTop,width:a.width,height:a.height}},empty:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)},firstTabbable:d,lastTabbable:b,stop:function(a){if(window.document.all)a.keyCode=0;a.preventDefault&&(a.preventDefault(),a.stopPropagation())},
processTextNodes:function(a,c){h(a,function(a,b){a.parentNode.replaceChild(document.createTextNode(c[b[1]]||b[1]),a)})},processDOMNodes:function(a,c){h(a,function(a,b){var e=c[b[1]];if(e){var d=document.createRange(),f=b.index;d.setStart(a,f);d.setEnd(a,f+b[0].length);d.deleteContents();d.insertNode(e)}})},addAutoDismiss:function(a,b){function e(a){c.forEach(function(c){var b=!1,e=c.excludeNodes.some(function(c){return document.body.contains(c)?(b=!0,c.contains(a.target)):!1});if(b&&!e)try{c.dismiss(a)}catch(d){typeof console!==
"undefined"&&console&&console.error(d&&d.message)}});c=c.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}c===null&&(c=[],document.addEventListener("click",e,!0),g.isIOS&&document.addEventListener("touchend",function(a){function c(){a.target.removeEventListener("click",c)}a.touches.length===0&&a.target.addEventListener("click",c)},!1));c.push({excludeNodes:a,dismiss:b})},setFramesEnabled:function(a){for(var c=document.getElementsByTagName("iframe"),b=
0;b<c.length;b++)c[b].parentNode.style.pointerEvents=a?"":"none"},removeAutoDismiss:function(a){c=c.filter(function(c){return a!==c.dismiss})},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(g){var j,f,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,h=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,c=e&&location.protocol&&location.protocol.replace(/\:/,""),a=e&&location.hostname,i=e&&(location.port||void 0),k=[],l=g.config&&g.config()||{};j={version:"2.0.5",strip:function(a){if(a){var a=a.replace(b,""),c=a.match(h);c&&(a=c[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,c,b;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(c=0;c<3;c+=1){b=d[c];try{a=new ActiveXObject(b)}catch(e){}if(a){d=[b];break}}return a},parseName:function(a){var c,
b,e=!1,d=a.indexOf(".");c=a.indexOf("./")===0||a.indexOf("../")===0;d!==-1&&(!c||d>1)?(c=a.substring(0,d),b=a.substring(d+1,a.length)):c=a;a=b||c;d=a.indexOf("!");d!==-1&&(e=a.substring(d+1)==="strip",a=a.substring(0,d),b?b=a:c=a);return{moduleName:c,ext:b,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,c,b,e){var d,i;d=j.xdRegExp.exec(a);if(!d)return!0;a=d[2];d=d[3];d=d.split(":");i=d[1];d=d[0];return(!a||a===c)&&(!d||d.toLowerCase()===b.toLowerCase())&&(!i&&!d||i===e)},finishLoad:function(a,
c,b,e){b=c?j.strip(b):b;l.isBuild&&(k[a]=b);e(b)},load:function(b,d,k,f){if(f.isBuild&&!f.inlineText)k();else{l.isBuild=f.isBuild;var h=j.parseName(b),f=h.moduleName+(h.ext?"."+h.ext:""),g=d.toUrl(f),t=l.useXhr||j.useXhr;!e||t(g,c,a,i)?j.get(g,function(a){j.finishLoad(b,h.strip,a,k)},function(a){k.error&&k.error(a)}):d([f],function(a){j.finishLoad(h.moduleName+"."+h.ext,h.strip,a,k)})}},write:function(a,c,b){if(k.hasOwnProperty(c)){var e=j.jsEscape(k[c]);b.asModule(a+"!"+c,"define(function () { return '"+
e+"';});\n")}},writeFile:function(a,c,b,e,d){var c=j.parseName(c),i=c.ext?"."+c.ext:"",k=c.moduleName+i,l=b.toUrl(c.moduleName+i)+".js";j.load(k,b,function(){var c=function(a){return e(l,a)};c.asModule=function(a,c){return e.asModule(a,l,c)};j.write(a,k,c,d)},d)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),j.get=function(a,c){var b=f.readFileSync(a,"utf8");b.indexOf("\ufeff")===0&&(b=b.substring(1));c(b)};else if(l.env===
"xhr"||!l.env&&j.createXhr())j.get=function(a,c,b,e){var d=j.createXhr(),i;d.open("GET",a,!0);if(e)for(i in e)e.hasOwnProperty(i)&&d.setRequestHeader(i.toLowerCase(),e[i]);if(l.onXhr)l.onXhr(d,a);d.onreadystatechange=function(){var e;if(d.readyState===4)e=d.status,e>399&&e<600?(e=Error(a+" HTTP status: "+e),e.xhr=d,b(e)):c(d.responseText)};d.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")j.get=function(a,c){var b,e,d=new java.io.File(a),i=java.lang.System.getProperty("line.separator"),
d=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(d),"utf-8")),k="";try{b=new java.lang.StringBuffer;(e=d.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(e!==null&&b.append(e);(e=d.readLine())!==null;)b.append(i),b.append(e);k=String(b.toString())}finally{d.close()}c(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(g,j,f){return{slideoutHTMLFragment:function(d){var b=document.createElement("div");b.innerHTML=f;var h=j.$("#slideContainer",b);h.id=d+h.id;h=j.$("#pageCommandParameters",b);h.id=d+h.id;h=j.$("#pageCommandDismiss",b);h.id=d+h.id;return b.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(g){function j(d,b,f,e,c,a){this.type=a||"keydown";this.keyCode=typeof d==="string"&&this.type==="keydown"?d.toUpperCase().charCodeAt(0):d;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=f!==void 0&&f!==null?f:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=c!==void 0&&c!==null?c:!1}function f(d){this.keys=d}j.prototype={getKeys:function(){return[this]},match:function(d,b){if(b!==void 0){if(b!==0)return!1}else if(d instanceof Array){if(d.length>1)return!1;
d=d[0]}return d.type!==this.type?!1:this.keyCode===d.keyCode||this.keyCode===String.fromCharCode(g.isOpera?d.which:d.charCode!==void 0?d.charCode:d.keyCode)?this.mod1!==(g.isMac?d.metaKey:d.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==d.shiftKey?!1:this.mod3!==d.altKey?!1:g.isMac&&this.mod4!==d.ctrlKey?!1:!0:!1},equals:function(d){return!d?!1:this.keyCode!==d.keyCode?!1:this.mod1!==d.mod1?!1:this.mod2!==d.mod2?!1:this.mod3!==d.mod3?!1:this.mod4!==d.mod4?!1:this.type!==d.type?!1:!0}};f.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(d,b){var f=this.keys;if(b!==void 0)return b>f.length?!1:f[b].match(d)?b===f.length-1?!0:b+1:!1;else{d instanceof Array||(d=[d]);if(d.length>f.length)return!1;var e;for(e=0;e<d.length;e++)if(!f[e].match(d[e]))return!1;return e===f.length?!0:e}},equals:function(d){if(!d.keys)return!1;if(d.keys.length!==this.keys.length)return!1;for(var b=0;b<d.keys.length;b++)if(!d.keys[b].equals(this.keys[b]))return!1;return!0}};return{KeyBinding:j,KeyStroke:j,
KeySequence:f}});
define("orion/webui/dropdown",["require","orion/webui/littlelib","orion/EventTarget"],function(g,j,f){function d(b){f.attach(this);this._init(b)}d.prototype={_init:function(b){this._dropdownNode=j.node(b.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=b.populate;this._selectionClass=b.selectionClass;this._parentDropdown=b.parentDropdown;this._positioningNode=b.positioningNode;if(!this._parentDropdown)for(var d=this._dropdownNode.parentNode;d&&document!==d;){if(d.classList&&
d.classList.contains("dropdownMenu")){this._parentDropdown=d.dropdown;break}d=d.parentNode}this._triggerNode=b.triggerNode?b.triggerNode:j.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!b.skipTriggerEventListeners){var e=this;this._triggerNode.addEventListener("click",function(c){e.toggle(c)&&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)},addTriggerNode:function(b){var d=this;b.addEventListener("click",function(b){d.toggle(b)&&j.stop(b)},!1)},toggle:function(b){return this.isVisible()?this.close():this.open(b)},isVisible:function(){return this._isVisible},open:function(b){var d=!1;if(!this.isVisible()){this.dispatchEvent({type:"triggered",dropdown:this,event:b});j.setFramesEnabled(!1);this._populate&&
(this.empty(),this._populate(this._dropdownNode));var e=this.getItems();if(e.length>0){if(!this._hookedAutoDismiss)this._boundAutoDismiss?j.removeAutoDismiss(this._boundAutoDismiss):this._boundAutoDismiss=this._autoDismiss.bind(this),d=j.$$array(".dropdownSubMenu",this._dropdownNode),j.addAutoDismiss([this._triggerNode].concat(d),this._boundAutoDismiss),this._hookedAutoDismiss=!0;this._triggerNode.classList.add("dropdownTriggerOpen");this._selectionClass&&this._triggerNode.classList.add(this._selectionClass);
this._dropdownNode.classList.add("dropdownMenuOpen");this._isVisible=!0;this._positionDropdown(b);e[0].focus();d=!0;this._parentDropdown&&this._parentDropdown.submenuOpen(this)}}return d},_autoDismiss:function(b){if(this.close(!1)&&this._dropdownNode.contains(b.target))for(b=this._parentDropdown;b;)b.close(!1),b=b._parentDropdown},_positionDropdown:function(){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+
"px";else{var b=j.bounds(this._dropdownNode),d=j.bounds(document.body);if(b.left+b.width>d.left+d.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-b.width+"px";else{var e=j.bounds(this._boundingNode(this._triggerNode)),c=j.bounds(this._triggerNode);this._dropdownNode.style.left=c.left-e.left-b.width+c.width+"px"}b=b.top+b.height-(d.top+d.height);if(0<b)this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-b)+"px"}},_boundingNode:function(b){var d=
window.getComputedStyle(b,null);return d===null?b:d.getPropertyValue("position")==="absolute"||!b.parentNode||b===document.body?b:this._boundingNode(b.parentNode)},close:function(b){var d=!1;if(this.isVisible())this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),j.setFramesEnabled(!0),b&&this._triggerNode.focus(),this._isVisible=!1,d=!0;return d},getItems:function(){var b=
[],d=this;j.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(e){e.parentNode.parentNode===d._dropdownNode&&b.push(e)});b.forEach(function(b){if(!b._hasDropdownMouseover)b.addEventListener("mouseover",function(c){b.dropdown?b.dropdown.open(c):(d._closeSelectedSubmenu(),j.stop(c))}),b._hasDropdownMouseover=!0});return b},empty:function(){var b=this;j.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===b._dropdownNode&&d.parentNode.removeChild(d)});
this._hookedAutoDismiss=!1},_dropdownKeyDown:function(b){if(b.keyCode===j.KEY.UP||b.keyCode===j.KEY.DOWN||b.keyCode===j.KEY.RIGHT||b.keyCode===j.KEY.ENTER||b.keyCode===j.KEY.LEFT){var d=this.getItems(),e=document.activeElement;if(d.length&&d.length>0&&e){var c=d.indexOf(e);c<0&&(c=d.indexOf(e.parentNode));c>=0&&(b.keyCode===j.KEY.UP&&c>0?(c--,d[c].focus()):b.keyCode===j.KEY.DOWN&&c<d.length-1?(c++,d[c].focus()):b.keyCode===j.KEY.ENTER||b.keyCode===j.KEY.RIGHT?e.classList.contains("dropdownTrigger")&&
e.dropdown&&e.dropdown.open():b.keyCode===j.KEY.LEFT&&e.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),j.stop(b))}}else b.keyCode===j.KEY.ESCAPE&&(this.close(!0),j.stop(b))},submenuOpen:function(b){if(b!==this._selectedSubmenu)this._closeSelectedSubmenu(),this._selectedSubmenu=b},_closeSelectedSubmenu:function(){for(var b=this._selectedSubmenu;b;)b.close(),b=b._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&j.removeAutoDismiss(this._boundAutoDismiss)}};
d.prototype.constructor=d;return{Dropdown:d}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<\!--span class="dropdownArrowDown core-sprite-openarrow"></span--\></button><ul class="dropdownMenu"></ul>'});define("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'<button class="dropdownTrigger dropdownDefaultButton">${ButtonText}<span class="dropdownArrowDown core-sprite-openarrow"></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"><span class="dropdownCommandName">${ButtonText}</span><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(g,j){function f(d){this._init(d)}f.prototype={_init:function(d){this._node=j.node(d.node);if(!this._node)throw"no dom node for tooltip found";this._position=d.position||["right","above","below","left"];this._text=d.text;this._hideDelay=d.hideDelay===void 0?200:d.hideDelay;this._tailSize=d.tailSize||10;this._trigger=d.trigger||"mouseover";this._afterShowing=d.afterShowing;this._afterHiding=d.afterHiding;var b=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(e){e.target===b._node&&(b.show(),j.stop(e))},!1);else if(this._trigger==="mouseover"){this._showDelay=d.showDelay===void 0?500:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(e){j.contains(b._node,e.target)&&(b.show(),j.stop(e))},!1);this._leaveHandler=function(e){j.contains(b._node,e.target)&&b.hide()};for(var f=0;f<d.length;f++)this._node.addEventListener(d[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 d=this;j.addAutoDismiss([this._tip,this._node],function(){d.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(d._timeout)window.clearTimeout(d._timeout),d._timeout=null;d._tip.addEventListener("mouseout",function(b){j.contains(d._tip,b.target)&&(d.hide(),j.stop(b))},
!1)},!1)}return this._tip},_positionTip:function(d,b){this._makeTipNode();d==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,e;for(e=j.bounds(f);f&&!e.width&&!e.height;f=f.parentNode)e=j.bounds(f);var f=j.bounds(this._tipInner),c;switch(d){case "above":c=e.top-f.height-this._tailSize-1;e=e.left-this._tailSize;break;case "below":c=e.top+e.height+this._tailSize+1;e=e.left-this._tailSize;break;case "left":c=e.top-this._tailSize/2;e=e.left-f.width-
this._tailSize-1;break;default:c=e.top-this._tailSize/2,e=e.left+e.width+this._tailSize+1}var a=j.bounds(document.documentElement);if(c+f.height>a.height)if(b)c=a.height-f.height-1;else return!1;if(e+f.width>a.width)if(b)e=a.width-f.width-1;else return!1;if(e<0)if(b)e=4;else return!1;if(c<0)if(b)c=4;else return!1;if(this._tail&&this._tail.previousPosition!==d)this._tip.removeChild(this._tail),this._tail=null;if(!this._tail){this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+
d);d==="above"||d==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner);if(d==="left")this._tail.style.left=f.width+"px";this._tail.previousPosition=d}this._tip.style.top=c+"px";this._tip.style.left=e+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._showDelay?this._timeout=
window.setTimeout(this._showImmediately.bind(this),this._showDelay):this._showImmediately()}},_showImmediately:function(){for(var d=!1,b=0;!d&&b<this._position.length;)d=this._positionTip(this._position[b]),b++;d||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(d){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(d===void 0)d=
this._hideDelay;var b=this;this._timeout=window.setTimeout(function(){b._tip.classList.remove("tooltipShowing");b._tip.removeAttribute("style");b._afterHiding&&b._afterHiding()},d)}},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 d=["mouseout","click"],b=0;b<d.length;b++)this._node.removeEventListener(d[b],this._leaveHandler,!1)}}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/dropdowntriggerbuttonwitharrow.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(g,j,f,d,b,h,e,c){function a(a){var c=a.invocation;if(c){var b=a.command;if(b.hrefCallback)return a=b.hrefCallback.call(c.handler||window,c),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;else if(c.commandRegistry)return c.commandRegistry._invoke(c),
!0;else if(b.onClick||b.callback)return window.setTimeout(function(){(b.onClick||b.callback).call(c.handler||window,c)},0),!0}return!1}function i(c,b){for(var e in b)if(b[e]&&b[e].keyBinding&&b[e].command&&b[e].keyBinding.match(c)){var d=b[e],i=d.keyBinding;if((!i.domScope||j.contains(j.node(i.domScope),c.target))&&a(d)){j.stop(c);break}}}function k(){var a={};if(t){var c,b,e;b=Object.keys(u);for(c=0;c<b.length;c++)e=b[c],a[e]=u[e];var d=t();b=Object.keys(d);for(c=0;c<b.length;c++)e=b[c],a[e]=d[e]}else a=
u;return a}function l(a){i(a,k())}function m(a,c){a=a||window.event;if(function(a){if(g.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;if(a.ctrlKey)return!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 b=a.target.nodeName.toLowerCase();if(b==="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(b==="textarea")return}c?c(a):l(a)}function o(){this._init()}
function r(a,c,b){c.classList.add("commandImage");var e;a.imageClass?a.addImageClassToElement?c.classList.add(a.imageClass):(e=document.createElement("span"),c.appendChild(e),e.classList.add(a.spriteClass),e.classList.add(a.imageClass)):(e=new Image,e.alt=a.name,e.name=b,e.id=b,e.src=a.image,c.appendChild(e));return e}function n(a,c){var b=document.createElement("span");b.classList.add("dropdownKeyBinding");b.appendChild(document.createTextNode(c));a.appendChild(b)}function p(a,c,b,e,d){this.commandRegistry=
d;this.handler=a;this.items=c;this.userData=b;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function q(a){this._init(a)}var t=null,u={};o.prototype={setProxy:function(a){this.proxy=a},setKeyBindings:function(a){this.bindings=a},_init:function(){var a=this;document.addEventListener("keydown",function(c){return m(c,function(c){var b=a.proxy,e=a.bindings;if(e&&b)for(var d=0;d<e.length;d++)e[d].match(c)&&(b.processKey({type:c.type,keyCode:c.keyCode,altKey:c.altKey,
ctrlKey:c.ctrlKey,metaKey:c.metaKey,shiftKey:c.shiftKey}),j.stop(c))})})}};window.document.addEventListener("keydown",m,!1);p.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var c=new p(this.handler,this.items,this.userData,this.command,this.commandRegistry);c.domNode=this.domNode;c.domParent=this.domParent;if(a)c.parameters=a.makeCopy();else if(this.parameters)c.parameters=this.parameters.makeCopy();return c}};
p.prototype.constructor=p;q.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.positioningNode=a.positioningNode;this.image=a.image||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC";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;this.isEditor=a.isEditor},populateChoicesMenu:function(a,c,b,e,d){var b=this.getChoices(c,b,e),i=b.some(function(a){return a.checked});b.forEach(function(b){if(b.name){var e=document.createElement("li");a.appendChild(e);var k=document.createElement("span");k.tabIndex=0;k.role="menuitem";k.classList.add("dropdownMenuItem");if(i){var l=document.createElement("span");l.classList.add("check");
l.appendChild(document.createTextNode(b.checked?"\u25cf":""));k.appendChild(l)}l=document.createTextNode(b.name);k.appendChild(l);e.appendChild(k);k.choice=b;k.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,c)},!1);k.addEventListener("keydown",function(a){(a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,c)},!1)}else d._generateMenuSeparator(a)})},getChoices:function(a,c,b){return this.choiceCallback?
this.choiceCallback.call(c,a,b):null},makeChoiceCallback:function(a,c){return function(b){a.callback&&a.callback.call(a,c,b)}},hasImage:function(){return this.imageClass||this.image!=="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"}};q.prototype.constructor=q;return{Command:q,CommandInvocation:p,createDropdownMenu:function(a,c,e,i,k,l,g,m,h){a=j.node(a);if(!a)throw"no parent node was specified";
var n=document.createRange();n.selectNode(a);n=h?n.createContextualFragment(b):n.createContextualFragment(d);j.processTextNodes(n,{ButtonText:c});a.appendChild(n);var a=a.lastChild,p;h?(h=a.previousSibling,p=h.lastChild):h=a.previousSibling;i?h.classList.add(i):(h.classList.add("orionButton"),h.classList.add("commandButton"));if(k){if(!l)h.textContent="",h.setAttribute("aria-label",c);r({spriteClass:"commandSprite",imageClass:k},h,c);h.classList.add("orionButton")}h.dropdown=new f.Dropdown({dropdown:a,
populate:e,selectionClass:g,skipTriggerEventListeners:!!p,positioningNode:m});a.dropdown=h.dropdown;return{menuButton:h,menu:a,dropdown:h.dropdown,dropdownArrow:p}},createCheckedMenuItem:function(a,c,b,d){a=j.node(a);if(!a)throw"no parent node was specified";var i=document.createRange();i.selectNode(a);i=i.createContextualFragment(e);j.processTextNodes(i,{ItemText:c});a.appendChild(i);a=j.$(".checkedMenuItem",a.lastChild);a.checked=b;a.addEventListener("change",d,!1);return a},createCommandItem:function(a,
b,e,d,i,k,l){var f,k=k||!b.name&&b.hasImage();if(b.hrefCallback)f=document.createElement("a"),f.id=d,k&&b.hasImage()?r(b,f,d):(f.className="commandLink",f.appendChild(document.createTextNode(b.name))),l=b.hrefCallback.call(e.handler,e),l.then?l.then(function(a){f.href=a}):f.href=l?l:"#";else{f=document.createElement("button");f.className="orionButton";k?b.hasImage()?(r(b,f,d),b.name&&f.setAttribute("aria-label",b.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),
f.appendChild(document.createTextNode(b.name))):(f.classList.add("commandButton"),d=document.createTextNode(b.name),f.appendChild(d));var g=l||b.callback;if(g)b.onClick=g,f.addEventListener("click",function(){g.call(e.handler,e)},!1)}a.nodeName.toLowerCase()==="ul"?(l=document.createElement("li"),a.appendChild(l),a=l):f.classList.add("commandMargins");a.appendChild(f);if(b.tooltip)f.commandTooltip=new c.Tooltip({node:f,text:b.tooltip,position:["above","below","right","left"]});i&&(u[b.id]={keyBinding:i,
command:b,invocation:e});return f},createCommandMenuItem:function(a,b,e,d,i,k){var l,f=a.dropdown;if(b.hrefCallback){l=document.createElement("a");var g=document.createElement("span");g.appendChild(document.createTextNode(b.name));g.classList.add("dropdownCommandName");l.appendChild(g);i=b.hrefCallback.call(e.handler,e);i.then?i.then(function(a){l.href=a}):l.href=i?i:"#";l.addEventListener("keydown",function(a){(a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.SPACE)&&l.click()},!1)}else{l=document.createElement("span");
l.tabIndex=0;g=document.createElement("span");g.appendChild(document.createTextNode(b.name));g.classList.add("dropdownCommandName");l.appendChild(g);var h=i||b.callback;if(h)b.onClick=h,l.addEventListener("click",function(){f.close(!0);h.call(e.handler,e)},!1),l.addEventListener("keydown",function(a){if(a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.SPACE)a.preventDefault(),l.click()},!1)}l.className="dropdownMenuItem";l.role="menuitem";if(b.tooltip)l.commandTooltip=new c.Tooltip({node:l,text:b.tooltip,
position:["above","below","right","left"]});k&&n(l,k);k=document.createElement("li");a.appendChild(k);k.appendChild(l);d&&(u[b.id]={keyBinding:d,command:b,invocation:e});return l},executeBinding:a,setKeyBindingProvider:function(a){t=a},localKeyBindings:u,CommandsProxy:o,getKeyBindings:k,processKey:l,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:i}});
define("orion/explorers/navigationUtils",[],function(){function g(f,d){if(!j&&f)f.push({domNode:d}),d.tabIndex=-1,d.style.outline="none"}var j=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,d,b){f&&(f=f.getGridNavHolder(d,!0))&&g(f,b)},generateNavGrid:g,removeNavGrid:function(f,d){if(f)for(var b=0;b<f.length;b++)if(f[b].domNode===d){f.splice(b,1);break}}}});
define("orion/PageUtil",[],function(){var g=/^http[s]?/i;return{hash:function(){var g=window.location.href.split("#")[1];return g?"#"+g:""},matchResourceParameters:function(g){var g=g||window.location.toString(),f={resource:""},d=g.indexOf("#");if(d!==-1&&(g=g.substring(d+1),g.length!==0)){g=g.split(",");f.resource=decodeURIComponent(g[0]);for(d=1;d<g.length;d++){var b=/([^=]*)(=?)(.*)/.exec(g[d]),h=decodeURIComponent(b[1]||""),b=decodeURIComponent(b[3]||"");h!==""&&h!=="resource"&&(f[h]=b)}}return f},
validateURLScheme:function(j,f){var d=j;if(j.indexOf("://")===-1){var b=document.createElement("a");b.href=j;d=b.href}b=!1;return(b=f?f.some(function(b){return RegExp("^"+b+":","i").test(d)}):g.test(d))?j:(console.log("Illegal URL Scheme: '"+j+"'"),"")}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(g){function j(d){var b="",f=navigator.platform.indexOf("Mac")!==-1;f?(d.mod4&&(b+="\u2303"),d.mod3&&(b+="\u2325"),d.mod2&&(b+="\u21e7"),d.mod1&&(b+="\u2318")):(d.mod1&&(b+="Ctrl+"),d.mod2&&(b+="Shift+"),d.mod3&&(b+="Alt+"));if(d.alphaKey)return b+d.alphaKey;if(d.type==="keypress")return b+d.keyCode;for(var e in g.KEY)if(typeof(g.KEY[e]==="number")&&g.KEY[e]===d.keyCode){if(f)switch(g.KEY[e]){case g.KEY.BKSPC:e="\u232b";break;case g.KEY.TAB:e=
"\u21e5";break;case g.KEY.ENTER:e="\u23ce";break;case g.KEY.ESCAPE:e="\u238b";break;case g.KEY.SPACE:e="\u2423";break;case g.KEY.PAGEUP:e="\u21de";break;case g.KEY.PAGEDOWN:e="\u21df";break;case g.KEY.END:e="\u21f2";break;case g.KEY.HOME:e="\u21f1";break;case g.KEY.DEL:e="\u2326"}switch(g.KEY[e]){case g.KEY.DOWN:e="\u2193";break;case g.KEY.UP:e="\u2191";break;case g.KEY.RIGHT:e="\u2192";break;case g.KEY.LEFT:e="\u2190"}return b+e}var c;switch(d.keyCode){case 59:c=d.mod2?":":";";break;case 61:c=d.mod2?
"+":"=";break;case 188:c=d.mod2?"<":",";break;case 190:c=d.mod2?">":".";break;case 191:c=d.mod2?"?":"/";break;case 192:c=d.mod2?"~":"`";break;case 219:c=d.mod2?"{":"[";break;case 220:c=d.mod2?"|":"\\";break;case 221:c=d.mod2?"}":"]";break;case 222:c=d.mod2?'"':"'"}return c?b+c:d.keyCode>=112&&d.keyCode<=123?b+"F"+(d.keyCode-111):b+String.fromCharCode(d.keyCode)}function f(d){var b=window.navigator.platform.indexOf("Mac")!==-1;return b&&d.metaKey||!b&&d.ctrlKey}return{getUserKeyString:function(d){for(var b=
"",d=d.getKeys(),f=0;f<d.length;f++)f!==0&&(b+=" "),b+=j(d[f]);return b},getUserText:function(d){var b=d.id,f=d.refNode,e=d.hideRefNode,c=d.initialText,a=d.onComplete,i=d.onEditDestroy,k=d.selectTo,l=d.isInitialValid,d=d.insertAsChild,m=!1,j=function(d){return function(k){if(!m){var j=g.node(b),o=j.value;if(j)if(d&&k.keyCode===g.KEY.ESCAPE){if(e)f.style.display="inline";m=!0;j.parentNode.removeChild(j);i&&i()}else if(!(d&&k.keyCode!==g.KEY.ENTER)){if(o.length===0||!l&&o===c){if(e)f.style.display=
"inline"}else if(a(o),e&&f.parentNode)f.style.display="inline";m=!0;j.parentNode&&j.parentNode.removeChild(j);i&&i()}}}},r=document.createElement("input");r.id=b;r.value=c||"";d?f.appendChild(r):f.parentNode.insertBefore(r,f.nextSibling);r.classList.add("userEditBoxPrompt");if(e)f.style.display="none";r.addEventListener("keydown",j(!0),!1);r.addEventListener("blur",j(!1),!1);window.setTimeout(function(){r.focus();if(c){var a=g.node(b),e=k?c.indexOf(k):-1;if(e>0)if(a.createTextRange)a=a.createTextRange(),
a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",e),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,e);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=e}else a.select()}},0)},openInNewWindow:f,followLink:function(d,b){b&&f(b)?window.open(d):window.location=d},createButton:function(d,b){var f=document.createElement("button");f.className="orionButton commandButton commandMargins";f.addEventListener("click",function(e){b();g.stop(e)},!1);d&&f.appendChild(document.createTextNode(d));
return f},createDropdownButton:function(){},isFormElement:function(d){switch(d.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","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(g,j,f,d,b,h,e,c,a,i){function k(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function l(a,c){this.token=a;this.parameterName=c}function m(a,c,b){this.event=a;this.handler=c;this.capture=b||!1}function o(a,c,b,e,d,i){this.name=a;this.type=c;this.label=b;this.value=e;this.lines=d||1;this.eventListeners=Array.isArray(i)?i:i?[i]:[]}function r(a,c,b){this._storeParameters(a);this._hasOptionalParameters=c&&c.hasOptionalParameters;this._options=c;this.optionsRequested=!1;this.getParameters=b;this.clientCollect=c&&c.clientCollect}k.prototype={_init:function(a){this._selectionService=
a.selection;var c=this;g.setKeyBindingProvider(function(){return c._activeBindings})},processURL:function(a){for(var c in this._urlBindings)if(this._urlBindings[c]&&this._urlBindings[c].urlBinding&&this._urlBindings[c].command){var b=this._urlBindings[c].urlBinding.match(a);if(b){var e=this._urlBindings[c],d=e.command,i=e.invocation;if(i&&i.parameters&&d.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,c,b,e){c?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(c):1)&&a.callback&&this._invoke(new g.CommandInvocation(b,c,null,a,this),e):(c=this._urlBindings[a])&&c.command&&c.command.callback&&this._invoke(c.invocation,e)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,c,b){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,
c,b))},confirm:function(a,c,b,e,d,i){var k=!1;if(this._parameterCollector&&!d){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(a,function(a,d){var i=document.createElement("span");i.classList.add("parameterPrompt");i.textContent=c;a.appendChild(i);i=document.createElement("button");i.addEventListener("click",function(){k=!0;l._parameterCollector.close()},!1);d.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);d.appendChild(f);f.appendChild(document.createTextNode(e));f.className="dismissButton";return i},function(){i(k)}))return}k=window.confirm(c);i(k)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,c){return this._collectAndInvoke(a.makeCopy(c),!1)},_collectAndInvoke:function(a,c){if(a)if(this._parameterCollector&&
a.parameters&&a.parameters.hasParameters()&&(c||a.parameters.shouldCollectParameters())){var b=!1;a.parameters.updateParameters(a);if(a.parameters.shouldCollectParameters()&&(b=this._parameterCollector.collectParameters(a),!b)){var d=new e.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),b=d.contentContainer();b.classList.add("parameterPopup");var i=window.document.activeElement,k=this._parameterCollector.getFillFunction(a,
function(){i&&i.focus();d.destroy()})(b);d.show();window.setTimeout(function(){k.focus();k.select()},0);b=!0}b||a.command.callback.call(a.handler||window,a)}else a.command.callback.call(a.handler||window,a);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 c(a){return function(){g.executeBinding(a)}}var b={},e,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,c){return(a.command.name||a.command.tooltip).localeCompare(c.command.name||c.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)):(e=d.getUserKeyString(i.keyBinding),a.createItem(e,i.command.name||i.command.tooltip,c(i)));for(var f in b)b[f].length&&b[f].length>0&&(a.createHeader(f),
b[f].forEach(function(b){e=d.getUserKeyString(b.keyBinding);a.createItem(e,b.command.name||b.command.tooltip,c(b))}))},addCommand:function(a){this._commandList[a.id]=a;var c=this._pendingBindings[a.id];if(c){var b=this;c.forEach(function(c){b._addBinding(a,c.type,c.binding,c.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,c,b,e,d,i,k,l,f,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,
d));if(a[c]){if(e)a[c].title=e;if(b)a[c].position=b;if(k)a[c].imageClass=k;if(l)a[c].tooltip=l;if(f)a[c].selectionClass=f;g===!0?a[c].pretendDefaultActionId=!0:a[c].defaultActionId=g;a[c].emptyGroupMessage=i}else a[c]={title:e,position:b,emptyGroupMessage:i,imageClass:k,tooltip:l,selectionClass:f,defaultActionId:g===!0?null:g,pretendDefaultActionId:g===!0,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,c){c&&c.split("/").forEach(function(c){if(c.length>1){if(!a[c])a[c]={position:0,
children:{}},a.sortedContributions=null;a=a[c].children}});return a},registerSelectionService:function(a,c){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=c},registerCommandContribution:function(a,c,b,e,d,i,k){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[c]={position:b};i&&((b=this._commandList[c])?this._addBinding(b,"key",i,
d):this._addPendingBinding(c,"key",i,d));k&&((b=this._commandList[c])?this._addBinding(b,"url",k,d):this._addPendingBinding(c,"url",k,d));a.sortedContributions=null},unregisterCommandContribution:function(a,c,b){if(this._contributionsByScopeId[a]){delete this._commandList[c];delete this._activeBindings[c];delete this._urlBindings[c];delete this._pendingBindings[c];var e=this._contributionsByScopeId[a];b&&b.split("/").forEach(function(a){if(a.length>1&&e[a])e=e[a].children});delete e[c];e.sortedContributions=
null}},_addBinding:function(a,c,b,e){if(!a.id)throw Error("No command id: "+a);c==="key"?this._activeBindings[a.id]={command:a,keyBinding:b,bindingOnly:e}:c==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:b,bindingOnly:e})},_addPendingBinding:function(a,c,b,e){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:c,binding:b,bindingOnly:e})},_checkForTrailingSeparator:function(a,c,e){var d;if(c==="tool"||c==="button")if((d=a.childNodes.length>0?a.childNodes[a.childNodes.length-
1]:null)&&d.classList.contains("commandSeparator"))return e?(a.removeChild(d),!1):!0;if(c==="menu"&&(a=b.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(d=a[a.length-1],e)d.parentNode.parentNode.removeChild(d.parentNode);else return!0;return!1},renderCommands:function(a,c,e,d,i,k,l){if(typeof a!=="string")throw"a scope id for rendering must be specified";c=b.node(c);if(!c)throw"no parent";var f=this._contributionsByScopeId[a];if(!e&&f){var e=f.localSelectionService||
this._selectionService,g=this;e&&e.getSelections(function(b){g.renderCommands(a,c,b,d,i,k)})}else f&&(this._render(f,c,e,d,i||"button",k,l),this._checkForTrailingSeparator(c,i,!0))},destroy:function(a){a=b.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var c=a.firstChild;c.commandTooltip&&c.commandTooltip.destroy();c.emptyGroupTooltip&&c.emptyGroupTooltip.destroy();this.destroy(c);a.removeChild(c)}},_render:function(a,c,b,i,k,l,f){var m=a.sortedContributions;if(!m){var m=[],h=!1,o;for(o in a)if(Object.prototype.hasOwnProperty.call(a,
o)){var r=a[o];if(r&&typeof r.position==="number")r.id=o,m.push(r),h=!0}if(h)m.sort(function(a,c){return a.position-c.position}),a.sortedContributions=m}var E=0,s=this;m.forEach(function(a){var m;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){var h=a.children;if(k==="tool"||k==="button")if(a.title){var o;if(a.defaultActionId)(h=s._commandList[a.defaultActionId])&&(h.visibleWhen?h.visibleWhen(b):1)?(o=new g.CommandInvocation(i,b,l,h,s),o.domParent=
c):a.pretendDefaultActionId=!0;h=s._createDropdownMenu(c,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass,null,o,a.pretendDefaultActionId);f&&j.generateNavGrid(f,h.menuButton);if(h)if(s._render(a.children,h.menu,b,i,"menu",l,f),s._checkForTrailingSeparator(h.menu,"menu",!0),h.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!h.menuButton.emptyGroupTooltip)h.menuButton.emptyGroupTooltip=new e.Tooltip({node:h.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right",
"above","left"]})}else f&&j.removeNavGrid(f,h.menuButton),a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},a(h.menu),a(h.menuButton),a(h.destroyButton);else h.menuButton.style.visibility="visible"}else{var r;c.childNodes.length>0&&!s._checkForTrailingSeparator(c,k)&&(r=s.generateSeparatorImage(c));s._render(h,c,b,i,k,l,f);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==r&&(r=s.generateSeparatorImage(c))}else if(a.title){if(a=s._createDropdownMenu(c,a.title,!0,null,null,a.imageClass))s._render(h,
a.menu,b,i,"menu",l,f),s._checkForTrailingSeparator(a.menu,"menu",!0),a.menu.childNodes.length===0&&a.destroyButton&&c.removeChild(a.destroyButton)}else c.childNodes.length>0&&s._generateMenuSeparator(c),s._render(h,c,b,i,k,l,f),s._generateMenuSeparator(c)}else{var n=s._commandList[a.id],h=n?!0:!1;o=a=null;if(n){m=new g.CommandInvocation(i,b,l,n,s);m.domParent=c;r=h&&(n.visibleWhen?n.visibleWhen(b):!0);if(s._activeBindings[n.id]&&s._activeBindings[n.id].keyBinding)a=s._activeBindings[n.id],a.invocation=
r?m:null,a.bindingOnly&&(h=!1);if(s._urlBindings[n.id]&&s._urlBindings[n.id].urlBinding)o=s._urlBindings[n.id],o.invocation=r?m:null,o.bindingOnly&&(h=!1);h=h&&r}if(h)n.choiceCallback?(k==="tool"||k==="button"?(a=c,h=!1,c.nodeName.toLowerCase()==="ul"&&(a=document.createElement("li"),c.appendChild(a))):(a=c,h=!0),s._createDropdownMenu(a,n.name,h,function(a){n.populateChoicesMenu(a,b,i,l,s)}.bind(n),n.imageClass,n.tooltip||n.title,n.selectionClass,n.positioningNode)):(m.handler=m.handler||this,m.domParent=
c,h=function(){s._invoke(m)},k==="menu"?(o=null,a&&a.keyBinding&&(o=d.getUserKeyString(a.keyBinding)),a=g.createCommandMenuItem(c,n,m,null,h,o)):(a=k+n.id+E,a=g.createCommandItem(c,n,m,a,null,k==="tool",h)),j.generateNavGrid(f,a),m.domNode=a,E++)}})},_createDropdownMenu:function(a,c,d,k,l,f,m,j,o,r){a=b.node(a);if(!a||!b.contains(document.body,a))return null;var F,E,s=a;if(d)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(i),b.processTextNodes(f,{ButtonText:c}),a.appendChild(f),
E=a.lastChild,l=E.lastChild,c=l.previousSibling,c.dropdown=new h.Dropdown({dropdown:l,populate:k,parentDropdown:a.dropdown}),l.dropdown=c.dropdown;else{a.nodeName.toLowerCase()==="ul"&&(s=document.createElement("li"),a.appendChild(s),E=s);a=null;l&&(a="dropdownButtonWithIcon",f=f||c);var f=l?f||c:f,y=g.createDropdownMenu(s,c,k,a,l,!1,m,j,o||r);F=y.dropdownArrow;c=y.menuButton;if(F){if(o)o.domNode=y.menuButton;var w=this;c.onclick=function(a){var c=b.bounds(F);a.clientX>=c.left&&y.dropdown?y.dropdown.toggle(a):
w._invoke(o)};if(y.dropdown)c.onkeydown=function(a){b.KEY.DOWN===a.keyCode&&(y.dropdown.toggle(a),b.stop(a))}}var l=y.menu,C;(k=o&&o.command&&(o.command.tooltip||o.command.name))?C=o.command.tooltip||o.command.name:k&&(C=f);if(C)c.commandTooltip=new e.Tooltip({node:c,text:C,position:["above","below","right","left"]})}return{menuButton:c,menu:l,dropdown:c.dropdown,destroyButton:E,dropdownArrow:F}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var c=document.createElement("li");
c.classList.add("dropdownSeparator");var b=document.createElement("span");b.classList.add("dropdownSeparator");c.appendChild(b);a.appendChild(c)}},generateSeparatorImage:function(a){var c;c=a.nodeName.toLowerCase()==="ul"?document.createElement("li"):document.createElement("span");a.appendChild(c);c.classList.add("core-sprite-sep");c.classList.add("imageSprite");c.classList.add("commandSeparator");return c}};k.prototype.constructor=k;l.prototype={match:function(a){a=f.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};l.prototype.constructor=l;m.prototype.constructor=m;o.prototype={optionsRequested:function(){return this.optionsRequested}};o.prototype.constructor=o;r.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){var c=this.parameterTable={};a.forEach(function(a){c[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,c){var b=this.parameterTable[a];if(b)b.value=c},forEach:function(a){for(var c in this.parameterTable)this.parameterTable[c].type&&this.parameterTable[c].name&&a(this.parameterTable[c])},makeCopy:function(){var a=[];this.forEach(function(c){c=new o(c.name,c.type,c.label,
c.value,c.lines,c.eventListeners);a.push(c)});var c=new r(a,this._options,this.getParameters);c.clientCollect=this.clientCollect;return c},hasOptionalParameters:function(){return this._hasOptionalParameters}};r.prototype.constructor=r;return{CommandRegistry:k,URLBinding:l,ParametersDescription:r,CommandParameter:o,CommandEventListener:m}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,j,f){function d(b,d){this._activeContainer=null;this._getElementsFunction=b;this._toolbarLayoutFunction=d}d.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&f.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&f.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(b,d,e){typeof b==="string"&&(b=f.node(b));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===b)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(b))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=e;var c=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!c)return!1;this._activeElements.focusNode=c;b=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(b.length===0){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;b=document.createElement("button");b.id="closebox";b.className="imageSprite core-sprite-close dismissButton";b.title=g.Close;d.appendChild(b);var a=this;b.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(c)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){c.focus();c.select&&c.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(b,d){f.$$array("input",d).forEach(function(e){e.type==="checkbox"?b.parameters.setValue(e.parameterName,e.checked):e.type!=="button"&&b.parameters.setValue(e.parameterName,e.value.trim())});f.$$array("textArea",d).forEach(function(e){b.parameters.setValue(e.parameterName,e.value.trim())});b.command.callback&&b.command.callback.call(b.handler,b)},collectParameters:function(b){return b.parameters?
(b.domNode&&b.domNode.classList.add("commandMarker"),this.open(b.domNode||b.domParent,this.getFillFunction(b))):!1},getFillFunction:function(b,d){var e=this;return function(c,a){var i=null,k=function(){d&&d();e.close()},l=function(a){a.keyCode===f.KEY.ENTER&&e._collectAndCall(b,c);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)k(),f.stop(a)};b.parameters.forEach(function(a){var e=null;if(a.label)e=document.createElement("label"),e.classList.add("parameterInput"),e.setAttribute("for",a.name+
"parameterCollector"),e.textContent=a.label,c.appendChild(e);var d=a.name+"parameterCollector",g,e=e||c;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)g=document.createElement("textarea"),g.rows=a.lines,g.type="textarea",g.id=d,e.appendChild(g),l=function(a){a.keyCode===f.KEY.ESCAPE&&(k(),f.stop(a))};else if(a.type==="boolean"){if(g=document.createElement("input"),g.type="checkbox",g.id=d,e.appendChild(g),a.value)g.checked=!0}else if(g=document.createElement("input"),g.type=a.type,g.id=
d,e.appendChild(g),a.value)g.value=a.value;g.classList.add("parameterInput");g.setAttribute("speech","speech");g.setAttribute("x-webkit-speech","x-webkit-speech");g.parameterName=a.name;i||(i=g);a.eventListeners.length>0&&a.eventListeners.forEach(function(a){g.addEventListener(a.event,function(c){return a.handler(c,b)},a.capture)});g.addEventListener("keydown",l,!1)});var m=a;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),c.appendChild(m));
var j=function(a,c){var b=document.createElement("button");c.appendChild(b);a&&b.appendChild(document.createTextNode(a));b.classList.add("dismissButton");return b};if(b.parameters.hasOptionalParameters())b.parameters.optionsRequested=!1,j(g.More,m).addEventListener("click",function(){b.parameters.optionsRequested=!0;e._collectAndCall(b,c);k()},!1);j(g.Submit,m).addEventListener("click",function(){e._collectAndCall(b,c);k()},!1);m=j(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");
m.title=g.Close;m.addEventListener("click",function(){k()},!1);return i}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});define("orion/regex",[],function(){return{escape:function(g){return g.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(g){return(g=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(g))?{pattern:g[1],flags:g[2]}:null}}});
define("orion/contentTypes",[],function(){function g(a,c){function b(a,c,e,d){var e=c.filename.indexOf(e)>=0,i;i=d.toLowerCase();i=c.extension.indexOf(i)!==-1;if(e||i){if(!(i=!a))e&&(d=d.toLowerCase(),e=a.extension.indexOf(d)!==-1),i=e;if(i)return c}return a}if(typeof a!=="string")return null;for(var e=a&&a.split(".").pop(),d=null,f=0;f<c.length;f++){var g=c[f];b(d,g,a,e)===g&&(d=g)}return d}function j(a){return a===null||typeof a==="undefined"?[]:Array.isArray(a)?a:[a]}function f(a){return j(a).map(function(a){return String.prototype.toLowerCase.call(a)})}
function d(a){return{id:a.id,name:a.name,image:a.image,imageClass:a.imageClass,"extends":a["extends"],extension:f(a.extension),filename:j(a.filename)}}function b(a){var c=Object.create(null);a.map(d).forEach(function(a){Object.prototype.hasOwnProperty.call(c,a.id)||(c[a.id]=a)});return c}function h(d){if(d&&d.registerService){this.serviceRegistry=d;for(var k=d.getServiceReferences(c).concat(d.getServiceReferences(a)),l=[],f=0;f<k.length;f++)for(var g=j(k[f].getProperty("contentTypes")),h=0;h<g.length;h++)l.push(g[h]);
this.map=b(l);d.registerService(e,this)}else if(Array.isArray(d))this.serviceRegistry=null,this.map=b(d);else throw Error("Invalid parameter");}var e="orion.core.contentTypeRegistry",c="orion.core.contenttype",a="orion.file.contenttype";h.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),c=[],b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(a[b]);return c},getContentTypesMap:function(){return this.map},getFileContentType:function(a){return g(a.Name,this.getContentTypes())},
getFilenameContentType:function(a){return g(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,c){a=typeof a==="string"?this.getContentType(a):a;c=typeof c==="string"?this.getContentType(c):c;if(!a||!c)return!1;if(a.id===c.id)return!0;else for(var b=a,e={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(e[b.id])throw Error("Cycle: "+b.id);e[b.id]=!0}return!1},isSomeExtensionOf:function(a,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(a,
c[b]))return!0;return!1}};return{ContentTypeRegistry:h,getFilenameContentType:g}});
define("orion/URITemplate",[],function(){function g(a){this._text=a}function j(a){return a.replace("%25","%")}function f(a,c){if(c==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(c==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(i,j);if(c==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+c);}function d(a,c,b){for(var e=
[],d=0;d<a.length;d++)typeof a[d]!=="undefined"&&e.push(f(a[d],c));return e.join(b)}function b(a,c,b,e){for(var d=Object.keys(a),i=[],g=0;g<d.length;g++)typeof a[d[g]]!=="undefined"&&i.push(f(d[g],c)+b+f(a[d[g]],c));return i.join(e)}function h(b){if(b.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=c[b[0]])?b=b.substring(1):this._operator=c.NUL;for(var e=[],d=b.split(","),i=0;i<d.length;i++){var f=d[i].match(a);if(f===null)throw Error("Bad VarSpec: "+b);e.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=e}function e(a){for(var c=[],b=0,e=a.indexOf("{",b);e!==-1;){c.push(new g(a.substring(b,e)));b=a.indexOf("}",e+1);if(b===-1)throw Error("Invalid template: "+a);c.push(new h(a.substring(e+1,b)));b+=1;e=a.indexOf("{",b)}c.push(new g(a.substring(b)));this._templateComponents=c}var c={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-,"}},a=/^((?:(?:[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;g.prototype={expand:function(){return encodeURI(this._text)}};
h.prototype={expand:function(a){for(var c=[],e=0;e<this._varSpecList.length;e++){var i=this._varSpecList[e],g=i.name,h=a[g],j=typeof h;if(j!=="undefined"&&h!==null){var q=c.length===0?this._operator.first:this._operator.sep;if(j==="string")this._operator.named&&(q+=f(g,"U+R"),q+=h.length===0?this._operator.ifemp:"="),i.prefix!==-1&&i.prefix<h.length&&(h=h.substring(0,i.prefix)),q+=f(h,this._operator.allow);else if(Array.isArray(h)){if(h.length===0)continue;i.explode?q+=d(h,this._operator.allow,this._operator.sep):
(i=d(h,this._operator.allow,","),this._operator.named&&(q+=f(g,"U+R"),q+=i.length===0?this._operator.ifemp:"="),q+=i)}else if(j==="object"){if(Object.keys(h).length===0)continue;i.explode?q+=b(h,this._operator.allow,"=",this._operator.sep):(i=b(h,this._operator.allow,",",","),this._operator.named&&(q+=f(g,"U+R"),q+=i.length===0?this._operator.ifemp:"="),q+=i)}else throw Error("bad param type: "+g+" : "+j);c.push(q)}}return c.join("")}};e.prototype={expand:function(a){for(var c=[],b=0;b<this._templateComponents.length;b++)c.push(this._templateComponents[b].expand(a));
return c.join("")}};return e});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,j){function f(b){if(b=localStorage.getItem("orion/messageBundle/"+b))if(b=JSON.parse(b),b._expires&&b._expires>(new Date).getTime())return delete b._expires,b;return null}var d={};return{getMessageBundle:function(b){function h(a){a?g(["i18n!"+b],function(a){if(a){var e=b;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(a));delete a._expires}c.resolve(a)}):e(Error(b))}function e(a){c.reject(a)}
if(d[b])return d[b];var c=new j;d[b]=c;var a=f(b);if(a)return c.resolve(a),c;try{g([b],h,e)}catch(i){g(["orion/i18n!"+b],h,e)}return c},formatMessage:function(b){var d=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(b,c){return d[(c<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/objects,orion/URL-shim".split(","),function(g,j,f,d,b,h){function e(){return g.toUrl?(new URL(g.toUrl("orion/../"),window.location.href)).href.slice(0,-1):(new URL("/",window.location.href)).href.slice(0,-1)}function c(a){var c={};a.getPropertyKeys().forEach(function(b){b!=="objectClass"&&b!=="service.names"&&b!=="service.id"&&b!=="__plugin__"&&(c[b]=a.getProperty(b))});return c}function a(a){return b.getMessageBundle(a.nls).then(function(c){a.textContent=
a.nameKey?c[a.nameKey]:a.name;return a},function(){a.textContent=a.nameKey||a.name;return a})}function i(b,i){var k=b.getServiceReferences(i||"orion.page.link"),l=f.matchResourceParameters(window.location.href),g={OrionHome:e(),Location:l.resource},h=[];k.forEach(function(b){b=c(b);if(b.uriTemplate&&(b.nls||b.name)){var e=(new d(b.uriTemplate)).expand(g),e=f.validateURLScheme(e);b.href=e;b.nls?h.push(a(b)):(b.textContent=b.name,h.push((new j).resolve(b)))}});return j.all(h)}function k(a){var c=this.categories=
Object.create(null);a.forEach(function(a){c[a.id]=a})}function l(a){this.allPageLinks=a;this.allPageLinks.sort(m)}function m(a,c){var b=a.textContent&&a.textContent.toLowerCase(),e=c.textContent&&c.textContent.toLowerCase();return b<e?-1:b>e?1:0}var o;h.mixin(k.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});h.mixin(l.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var c=a.href,a=
a.textContent,b=document.createElement("a");b.href=c;b.target="_self";b.classList.add("targetSelector");b.textContent=a;return b})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(b){var e;return!o?(e=[],b.getServiceReferences("orion.page.link.category").forEach(function(b){b=c(b);if(b.id&&(b.name||b.nameKey))b.nls?e.push(a(b)):(b.textContent=b.name,e.push((new j).resolve(b)))}),j.all(e).then(function(a){return o=new k(a)})):(new j).resolve(o)},getPageLinksInfo:function(a,
c){return i(a,c).then(function(a){return new l(a)})},getOrionHome:e}});
define("orion/edit/nls/root/messages",{Editor:"Editor",switchEditor:"Switch Editor",Fetching:"Fetching: ${0}",confirmUnsavedChanges:"There are unsaved changes.  Do you still want to navigate away?",searchFiles:"Search Files...",searchTerm:"Enter search term:",unsavedChanges:"There are unsaved changes.",unsavedAutoSaveChanges:"Please stay on the page until Auto Save is complete.",Save:"Save",Saved:"Saved",Blame:"Blame",BlameTooltip:"Show blame annotations",saveOutOfSync:"Resource is out of sync with the server. Do you want to save it anyway?",
loadOutOfSync:"Resource is out of sync with the server. Do you want to load it anyway? This will overwrite your local changes.",ReadingMetadata:"Reading metadata of ${0}",ReadingMetadataError:"Can not get metadata of ${0}",Reading:"Reading ${0}",readonly:"Read Only.",saveFile:"Save this file",gotoLine:"Go to Line...",gotoLineTooltip:"Go to specified line number",gotoLinePrompt:"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find...",noResponse:"No response from server.  Check your internet connection and try again.",
savingFile:"Saving file ${0}",running:"Running ${0}","Saving...":"Saving...",View:"View",SidePanel:"Side Panel",SidePanelTooltip:"Choose what to show in the side panel.",Actions:"Actions",Navigator:"Navigator",FolderNavigator:"Folder Navigator",Project:"Project",New:"New",File:"File",Edit:"Edit",Tools:"Tools",Add:"Add",noActions:"There are no actions for the current selection.",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding.",LocalEditorSettings:"Local Editor Settings",
NoProject:"${0} is not a project. To convert it to a project use ${1}.",NoProjects:"There are no projects in your workspace. Use the ${0} menu to create projects.",disconnected:"(disconnected)",ChooseFS:"Choose Filesystem",ChooseFSTooltip:"Choose the filesystem you want to view.",FSTitle:"${0} (${1})",Deploy:"Deploy","Deploy As":"Deploy As",Import:"Import",Export:"Export",OpenWith:"Open With",OpenRelated:"Open Related",Dependency:"Dependency",UnnamedCommand:"Unnamed"});
define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages","orion/edit/nls/root/messages"],function(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks,i18n!orion/edit/nls/messages".split(","),function(g,j,f,d,b,h,e,c,a,i){function k(a){var c={};a.getPropertyKeys().forEach(function(b){c[b]=a.getProperty(b)});return c}var l={},m=a.getOrionHome();l._cloneItemWithoutChildren=function p(a){if(a===null||typeof a!=="object")return a;var c=a.constructor(),b;for(b in a)b!=="children"&&b!==
"Children"&&(c[b]=p(a[b]));return c};l._getOpenWithNavCommandExtensions=function(a){function c(a,b){for(var e=a.getServiceReferences("orion.navigate.openWith"),d=[],i=[],k=0;k<e.length;k++){var f=e[k];if(f.getProperty("editor")===b.id){var l=f.getProperty("contentType");l instanceof Array?d=d.concat(l):d.push(l||"*/*");f=f.getProperty("excludedContentTypes");f instanceof Array?i=i.concat(f):f!==null&&typeof f!=="undefined"&&i.push(f)}}0===d.length&&(d=null);0===i.length&&(i=null);return{contentTypes:d,
excludedContentTypes:i}}for(var b=function(){for(var c=a.getServiceReferences("orion.edit.editor"),b=[],e=0;e<c.length;e++){var d=c[e],i=d.getProperty("id");b.push({id:i,"default":d.getProperty("default")||!1,name:d.getProperty("name"),nameKey:d.getProperty("nameKey"),nls:d.getProperty("nls"),uriTemplate:d.getProperty("orionTemplate")||d.getProperty("uriTemplate"),validationProperties:d.getProperty("validationProperties")||[]})}return b}(),e=[],d=0;d<b.length;d++){var i=b[d],k=c(a,i);e.push({properties:{name:i.name||
i.id,nameKey:i.nameKey,id:"eclipse.openWithCommand."+i.id,contentType:k.contentTypes,excludedContentTypes:k.excludedContentTypes,uriTemplate:i.uriTemplate,nls:i.nls,forceSingleItem:!0,isEditor:i["default"]?"default":"editor",validationProperties:i.validationProperties},service:{}})}return e};l._makeValidator=function(a,c,e,d){function i(a,c,b,e){var d=b.match,k,f;if((k=c.indexOf("["))>=0){if((f=c.indexOf("]"))<0)return!1;var l=c.substring(0,k),g;if(!(g=a[l])||!Array.isArray(g))return!1;k=c.substring(k+
1,f);k=parseInt(k,10);if(isNaN(k))return!1;k<0&&(k+=g.length);c=c.substring(f+1);c=l+":"+String(k)+c}if(c.indexOf("|")>=0)return k=c.substring(0,c.indexOf("|")),c=c.substring(c.indexOf("|")+1),i(a,k,b,e)?!0:i(a,c,b,e);else if(c.indexOf(":")>=0)return k=c.substring(0,c.indexOf(":")),c=c.substring(c.indexOf(":")+1),a[k]?i(a[k],c,b,e):!1;else{a:{var l=!1,h;if(c.charAt(0)==="!")b=typeof a[c.substring(1)]==="undefined";else if(typeof a[c]!=="undefined"){if(typeof d==="undefined")h=a[c],l=!0;else if(typeof d===
"string"){if(!typeof(a[c]==="string")){b=!1;break a}if(b.variableName){if(d=RegExp(d).exec(a[c]))h=d[0],h=b.variableMatchPosition==="before"?a[c].substring(0,d.index):b.variableMatchPosition==="after"?a[c].substring(d.index+h.length):b.variableMatchPosition==="only"?h:a[c],l=!0}else{b=RegExp(d).test(a[c]);break a}}else a[c]===d&&(h=a[c],l=!0);if(l&&b.variableName&&(e[b.variableName]=h,e.itemCached=a,b.replacements))for(a=0;a<b.replacements.length;a++)h=!1,b.replacements[a].pattern?e[b.variableName]=
e[b.variableName].replace(RegExp(b.replacements[a].pattern),b.replacements[a].replacement||""):h=!0,h&&window.console.log("Invalid replacements specified in validation property.  "+b.replacements[a]);b=l}else b=!1}return b}}function k(c,e,d){if(d.info.validationProperties)for(var f=0;f<d.info.validationProperties.length;f++){var l=d.info.validationProperties[f];if(typeof l.source!=="undefined"){if(!i(c,l.source,l,d))return!1}else return window.console.log("Invalid validationProperties in "+a.id+".  No source property specified."),
!1}var f=!0,g=e?b.getFilenameContentType(c.Name,e):null,g=g||{id:"application/octet-stream"};d.info.excludedContentTypes&&e&&(f=d.info.excludedContentTypes.every(function(a){a=a.replace(/([*?])/g,".$1");return-1!==g.id.search(a)?!1:!0}));f&&d.info.contentType&&e&&(f=d.info.contentType.some(function(a){a=a.replace(/([*?])/g,".$1");return-1!==g.id.search(a)?!0:!1}));return f}return{info:a,validationFunction:function(a){typeof d==="function"&&(a=d.call(this,a));if(a){if(Array.isArray(a)){if((this.info.forceSingleItem||
this.info.uriTemplate)&&a.length!==1)return!1;if(a.length<1)return!1}else a=[a];for(var c=0;c<a.length;c++)if(!k(a[c],e,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var c={},b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&(c[b]=a[b]);if(this.info.validationProperties)for(b=0;b<this.info.validationProperties.length;b++){var e=this.info.validationProperties[b];e.source&&e.variableName&&(this.itemCached===
a&&this[e.variableName]||i(a,e.source,e,this),a[e.variableName]?window.console.log("Variable name "+e.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):c[e.variableName]=this[e.variableName])}c.OrionHome=m;return(new h(this.info.uriTemplate)).expand(c)}return null}}};var o=i.UnnamedCommand;l._createCommandOptions=function(a,c,b,d,i,k){function f(e,g){var h=l._makeValidator(a,b,d,k);e.visibleWhen=h.validationFunction.bind(h);if(i)if(h.generatesURI.bind(h)())e.hrefCallback=
function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var m=a;e.callback=function(a){var d;if(m.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,d=l._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){d=[];for(var i=0;i<a.items.length;i++)d.push(l._cloneItemWithoutChildren(a.items[i]))}else d=l._cloneItemWithoutChildren(a.items);if(b)var k=b.getService("orion.page.progress");c.run?k?k.progress(c.run(d),"Running command: "+e.name):c.run(d):b&&
(k?k.progress(b.getService(c).run(d),"Running command: "+e.name):b.getService(c).run(d))}}g.resolve(e)}var g=new j;if(a.nls){var h=function(c){var b;c?(b=a.tooltipKey&&c[a.tooltipKey],c=a.nameKey&&c[a.nameKey]||a.name||o,b=b||a.tooltip||""):(c=a.name||a.nameKey||o,b=a.tooltip||a.tooltipKey||"");f({name:c,image:a.image,id:a.id||a.name,tooltip:b,isEditor:a.isEditor,showGlobally:a.showGlobally},g)};e.getMessageBundle(a.nls).then(h,h.bind(this,null))}else f({name:a.name,image:a.image,id:a.id||a.name,
tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},g);return g};l.getOpenWithCommand=function(a,c,b){for(var e,a=b||l.getOpenWithCommands(a),b=0;b<a.length;b++)if(a[b].visibleWhen(c)){var d=a[b].isEditor==="default";if(!e||d)if(e=a[b],d)break}return e};l.getOpenWithCommands=function(a){var c=[],b;for(b in a._commandList){var e=a._commandList[b];e.isEditor&&c.push(e)}return c};var r;l.createAndPlaceFileCommandsExtension=function(a,c,b,e,d,k){return l.createFileCommands(a,null,k?"all":
void 0,!!k,c).then(function(a){d&&0<a.length&&(c.addCommandGroup(b,"eclipse.openWith",1E3,i.OpenWith,d,null,null,null,"dropdownSelection"),c.addCommandGroup(b,"eclipse.fileCommandExtensions",1E3,i.OpenRelated,d));a.forEach(function(a){var i=null;d&&(i=a.isEditor?d+"/eclipse.openWith":d+"/eclipse.fileCommandExtensions");c.registerCommandContribution(b,a.id,e,i)});return{}})};l.createFileCommands=function(a,c,b,e,d){var b=b===void 0?"global":b,e=e===void 0?!0:e,i=[];l._cachedFileCommands||l._createCachedFileCommands(a);
(b==="all"||b==="global")&&l._cachedFileCommands.forEach(function(a){var c=a.properties;(b==="all"||c.forceSingleItem&&c.showGlobally)&&i.push(a)});return j.when(function(){var b=a.getService("orion.core.contentTypeRegistry")||c;return r||j.when(b.getContentTypes(),function(a){return r=a})}(),function(){if(e){if(!l._cachedOpenWithExtensions)l._cachedOpenWithExtensions=l._getOpenWithNavCommandExtensions(a,r);i=i.concat(l._cachedOpenWithExtensions);d._addedOpenWithCommands=e}var c=i.map(function(c){var b=
c.properties,c=c.service,e=d.findCommand(b.id||b.name);return e?(new j).resolve(e):l._createCommandOptions(b,c,a,r,!0).then(function(a){a=new f.Command(a);d.addCommand(a);return a})});return j.all(c,function(a){return{_error:a}}).then(function(a){return a})})};l._createCachedFileCommands=function(a){var c=a.getServiceReferences("orion.navigate.command");l._cachedFileCommands=[];for(var b=0;b<c.length;b++)if(c[b].getProperty("id")!=="orion.navigateFromMetadata"){var e=a.getService(c[b]),d=k(c[b]);
l._cachedFileCommands.push({properties:d,service:e})}};l.getFileCommandIds=function(){var a=[];if(l._cachedFileCommands)l._cachedFileCommands.length&&(a=l._cachedFileCommands.map(function(a){return a.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return a};l.createOpenWithCommands=function(a,c,b){return b&&b._addedOpenWithCommands?(new j).resolve(l.getOpenWithCommands(b)):l.createFileCommands(a,c,"none",!0,b)};return l});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,j){function f(d){this._init(d)}f.prototype={_init:function(d){var b=j.node(d.container);if(!b)throw"no parent container";this._container=b;b.classList.remove("currentLocation");this._id=d.id||"eclipse.breadcrumbs";this._resource=d.resource||null;this._rootSegmentName=d.rootSegmentName;this._workspaceRootSegmentName=d.workspaceRootSegmentName;this._workspaceRootURL=d.workspaceRootURL;this._makeHref=d.makeHref;this._makeFinalHref=
d.makeFinalHref;this._maxLength=d.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var d;if(this._resource&&this._resource.Parents&&!this._resource.skip){d=document.createElement("a");var b=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(d,b):d.href=g.toUrl("edit/edit.html")+"#"+b}else d=document.createElement("span");j.empty(d);d.appendChild(document.createTextNode(this._workspaceRootSegmentName));
return d}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(d){var b=document.createElement("a");b.classList.add("breadcrumb");b.appendChild(document.createTextNode(d));return b},addSegmentHref:function(d,b){this._makeHref?this._makeHref(d,b.Location,b):d.href=g.toUrl("edit/edit.html")+"#"+b.ChildrenLocation},buildSegments:function(d,b){if(this._resource.Parents){var f=this._resource.Parents.slice(0),e,c;f&&(f=f.slice(0),b==="reverse"&&(f=f.reverse().slice(0)),
f.forEach(function(a){if(!a.skip)d?(c=d,d=null):c=a.Name,e=this.buildSegment(c),this.path+=a.Name,this.addSegmentHref(e,a),e.include=!1,this.segments.push(e)}.bind(this)))}},addDivider:function(){var d=document.createElement("span");d.appendChild(document.createTextNode(" / "));this.path+="/";d.classList.add("breadcrumbSeparator");this.append(d)},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(d){this.crumbs.appendChild(d)},addTitle:function(d,b){var f=b||document.title;this.crumbs.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(f)),
d.classList.add("breadcrumb"),d.classList.add("currentLocation"),this.append(d))},finalSegment:function(d,b){if(!this._resource.skip){var f;f=b?b:this._resource.Name;this._makeFinalHref?(d=this.buildSegment(f),this.addSegmentHref(d,this._resource)):(d=document.createElement("span"),d.appendChild(document.createTextNode(f)));d.classList.add("currentLocation");this.path+=this._resource.Name;this.append(d)}},firstSegment:function(d){if(d)if(this.append(d),this._resource&&this._resource.Parents&&!this._resource.skip)d.classList.add("breadcrumb"),
this.addDivider();else{if(!this._resource.skip)d.href="";d.classList.add("currentLocation")}},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(d){d.include===!0&&(this.append(d),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var d=this.segments.slice(0).reverse();d.forEach(function(b){this.append(b);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?b.include=!0:this.INCLUDE_FIRST_SECTION=
!1}.bind(this));this.segments=d.reverse()}},measure:function(){var d=this._container;d.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:d.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var d=this.getNavigatorWorkspaceRootSegment(),b=this._rootSegmentName;if(b)this.addTitle(d,b);else if(this.finalSegment(d,b),this._resource&&this._resource.Parents&&(this.buildSegments(b,"reverse"),this.measureSegments(),this.firstSegment(d)),this.crumbs.offsetWidth>=
this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var d=this.getNavigatorWorkspaceRootSegment(),b=this._rootSegmentName;b?this.addTitle(d,b):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(d),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(d,b)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(g,j,f){function d(b){j.attach(this);this._init(b)}d.prototype={_init:function(b){this._tracking=null;this._animationDelay=501;this._closeReversely=b.closeReversely;this.$node=f.node(b.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(b.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(b.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=b.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(b.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 b.closeByDefault!=="undefined")this._closeByDefault=b.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(b){this.addEventListener("resize",function(d){b(d.node)})},_initializeFromStoredSettings:function(){var b=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof b==="string"?b==="closed":this._closeByDefault;var b=f.bounds(this.$node.parentNode),d=f.bounds(this.$node),e;if(this._vertical)if(e=localStorage.getItem(this._prefix+"/yPosition")){if(this._splitTop=parseInt(e,10),this._splitTop>b.top+b.height-d.height)this._splitTop=b.top+b.height/
2}else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(e=localStorage.getItem(this._prefix+"/xPosition")){if(this._splitLeft=parseInt(e,10),this._splitLeft>b.left+b.width-d.width)this._splitLeft=b.left+b.width/2}else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var b=f.bounds(this.$node),d=f.bounds(this.$node.parentNode);return this.vertical?b.top-d.top:b.left-d.left},_adjustToSplitPosition:function(b){var d=
f.bounds(this.$node),e=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=d.height;if(b||!this._splitTop)this._splitTop=d.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);b=this._splitTop;this.$node.parentNode.style.position==="relative"&&(b=this._splitTop-e.top);this.$sideNode.style.height=b+"px";this.$sideNode.style.display="block";this.$node.style.top=b+"px"}else{this._splitWidth=d.width;if(b||!this._splitLeft)this._splitLeft=d.left,localStorage.setItem(this._prefix+
"/xPosition",this._splitLeft);b=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(b=this._splitLeft-e.left);this.$sideNode.style.width=b+"px";this.$sideNode.style.display="block";this.$node.style.left=b+"px"}this._resize()},_resize:function(b,d,e){var b=b||0,c=f.bounds(this.$node.parentNode),a=f.bounds(this.$node);this._vertical?(e===void 0&&(e=a.top-c.top),e+=a.height,this.$mainNode.style.top=e+"px"):(d===void 0&&(d=a.left-c.left),d+=a.width,this.$mainNode.style.left=d+"px");var i=
this;window.setTimeout(function(){i._notifyResizeListeners(i.$mainNode);i._notifyResizeListeners(i.$sideNode)},b)},_notifyResizeListeners:function(b){this.dispatchEvent({type:"resize",node:b})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(b,d){b||this._addAnimation();var e=this._splitTop,c=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")e=c=this._initialSplit}else if(this._closed=
!0,this._closeReversely){var a=f.bounds(this.$node.parentNode),i=f.bounds(this.$node);this._vertical?e=a.height-i.height:c=a.width-i.width}else e=c=0;this._vertical?(this.$sideNode.style.height=e+"px",this.$node.style.top=e+"px"):(this.$sideNode.style.width=c+"px",this.$node.style.left=c+"px");this._resize(this._animationDelay,c,e);b||this._removeAnimation();d||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var k=this;window.setTimeout(function(){k._notifyToggleListeners()},
this._animationDelay)},_removeAnimation:function(){var b=this;window.setTimeout(function(){b.$sideNode.classList.remove(b._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");b.$mainNode.classList.remove(b._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");b.$node.classList.remove(b._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(b){if(b.target===this._thumb)return f.stop(b),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),f.setFramesEnabled(!1),f.stop(b)},_mouseMove:function(b){if(this._tracking){var d=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=b.clientY;if(this._splitTop<d.top+5)this._splitTop=d.top+5;else if(this._splitTop>d.top+d.height-5)this._splitTop=d.top+d.height-5;var e=this._splitTop,e=this._splitTop-d.top;this.$node.style.top=e+"px"}else{this._splitLeft=b.clientX;if(this._splitLeft<d.left+5)this._splitLeft=d.left+5;else if(this._splitLeft>
d.left+d.width-5)this._splitLeft=d.left+d.width-5;e=this._splitLeft;e=this._splitLeft-2*d.left;this.$node.style.left=e+"px"}this._adjustToSplitPosition(!0);f.stop(b)}},_mouseUp:function(b){if(this._tracking)f.setFramesEnabled(!0),window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),f.stop(b)}};d.prototype.constructor=d;return{Splitter:d}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(g,j,f){function d(b){this.commandRegistry=b.commandRegistry;this.create();this._filterString="";this._providers=[]}d.prototype={addProvider:function(b){this._providers.push(b)},create:function(){var b=this._keyAssistDiv=document.createElement("div");b.id="keyAssist";b.style.display="none";b.classList.add("keyAssistFloat");b.setAttribute("role","menu");var d=this._keyAssistInput=document.createElement("input");
d.classList.add("keyAssistInput");d.type="text";d.placeholder=g["Filter bindings"];b.appendChild(d);var e=this._keyAssistContents=document.createElement("div");e.classList.add("keyAssistContents");if(f.isIOS||f.isAndroid)e.style.overflowY="auto";b.appendChild(e);var c=this._keyAssistTable=document.createElement("table");c.tabIndex=0;c.classList.add("keyAssistList");e.appendChild(c);document.body.appendChild(b);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));e.addEventListener(f.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===j.KEY.ESCAPE&&this.hide()}.bind(this));j.addAutoDismiss([b],function(){this.hide()}.bind(this))},createContents:function(){j.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var b=this._idCount=
this._keyAssistContents.scrollTop=0;b<this._providers.length;b++)this._providers[b].showKeyBindings(this);this.createHeader(g.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(b,d,e){if(this._filterString){var c=this._filterString.toLowerCase(),a;c!==this._filterString?(c=this._filterString,a=function(a){return a}):a=function(a){return a.toLowerCase()};if(a(d).indexOf(c)===-1&&a(b).indexOf(c)===-1&&a(this._lastHeader).indexOf(c)===-1)return}var i=this._keyAssistTable.insertRow(-1);
i.id="keyAssist-keyBinding-"+this._idCount++;i.setAttribute("role","menuitem");i._execute=e;i.classList.add("keyAssistItem");i.addEventListener("click",function(a){this._selectedRow=i;this.execute();a.preventDefault()}.bind(this));e=i.insertCell(-1);e.classList.add("keyAssistName");e.appendChild(document.createTextNode(d));e=i.insertCell(-1);e.classList.add("keyAssistAccel");e.appendChild(document.createTextNode(b))},createHeader:function(b){this._lastHeader=b;var d=this._keyAssistTable.insertRow(-1);
d.classList.add("keyAssistSection");var d=d.insertCell(-1),e=document.createElement("h2");e.appendChild(document.createTextNode(b));d.appendChild(e)},execute:function(){window.setTimeout(function(){this.hide();var b=this._selectedRow;this._selectedRow=null;b&&b._execute&&b._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var b=this._keyAssistInput.value;if(this._filterString!==b)this._filterString=
b,this.createContents()}.bind(this),100)},hide:function(){if(this.isVisible()){var b=document.activeElement,d=this._keyAssistDiv,b=d===b||(d.compareDocumentPosition(b)&16)!==0;d.style.display="none";b&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},removeProvider:function(b){b=this._providers.indexOf(b);b!==-1&&this._providers.splice(b,
1)},select:function(b){var d=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(d.length===0)this._selectedIndex=-1;else{var e=this._selectedIndex;e+=b?1:-1;e%=d.length;e<0&&(e=d.length-1);if(this._selectedIndex!==-1)b=d[this._selectedIndex],b.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=e;if(this._selectedIndex!==-1){this._selectedRow=b=d[this._selectedIndex];b.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",b.id);this._keyAssistTable.focus();
var d=b.getBoundingClientRect(),c=this._keyAssistContents,a=c.getBoundingClientRect();b.offsetTop<c.scrollTop?e===0?c.scrollTop=0:b.scrollIntoView(!0):d.bottom>a.bottom&&b.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(b){if(b.keyCode===40)this.select(!0);else if(b.keyCode===38)this.select(!1);else if(b.keyCode===13)this.execute();else return;b.preventDefault()},_scrollWheel:function(b){var d=0,d=f.isIE||f.isOpera?-b.wheelDelta:f.isFirefox?b.detail*40:-b.wheelDeltaY,e=this._keyAssistContents,c=e.scrollTop;e.scrollTop+=d;if(c!==e.scrollTop)return b.preventDefault&&b.preventDefault(),!1}};return{KeyAssistPanel:d}});
define("orion/widgets/themes/ThemePreferences",[],function(){function g(g,f){this._preferences=g;this._themeData=f;var d=f.getThemeStorageInfo();this._themeVersion=d.version;var b=g.listenForChangedSettings(d.storage,2,function(d){d.key===b&&this.apply()}.bind(this))}g.prototype={_initialize:function(g,f,d){var b,h;this._themeVersion===void 0||d.get("version")===this._themeVersion?(b=d.get(g.styleset),(h=d.get("selected"))&&(h=JSON.parse(h))):h=b=null;b||(b=f.getStyles(),d.put(g.styleset,JSON.stringify(b)));
if(!h||h[g.selectedKey]===void 0)h=h||{},h[g.selectedKey]=g.defaultTheme,d.put("selected",JSON.stringify(h));d.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(g){var f=this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(b){this._initialize(d,f,b);var h=JSON.parse(b.get("selected")),b=JSON.parse(b.get(d.styleset)),e;if(b)for(var c=0;c<b.length;c++)if(b[c].name===h[d.selectedKey]){e=b[c];break}g({style:e,styles:b})}.bind(this))},
setTheme:function(g,f){var d=this._themeData,b=d.getThemeStorageInfo();this._preferences.getPreferences(b.storage,2).then(function(h){this._initialize(b,d,h);var e=JSON.parse(h.get("selected"));g||(g=e[b.selectedKey]);e[b.selectedKey]=g;h.put("selected",JSON.stringify(e));f?h.put(b.styleset,JSON.stringify(f)):f=JSON.parse(h.get(b.styleset));for(var c=0;c<f.length;c++)if(f[c].name===e[b.selectedKey]){d.processSettings(f[c]);break}h.put("version",this._themeVersion)}.bind(this))},setFontSize:function(g){var f=
this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(b){this._initialize(d,f,b);var h=JSON.parse(b.get("selected")),e=JSON.parse(b.get(d.styleset)),c;if(e)for(var a=0;a<e.length;a++)e[a].fontSize=g,e[a].name===h[d.selectedKey]&&(c=e[a]);b.put(d.styleset,JSON.stringify(e));f.processSettings(c)}.bind(this))}};return{ThemePreferences:g}});
define("orion/editor/eventTarget",[],function(){function g(){}g.addMixin=function(j){var f=g.prototype,d;for(d in f)f.hasOwnProperty(d)&&(j[d]=f[d])};g.prototype={addEventListener:function(g,f,d){if(!this._eventTypes)this._eventTypes={};var b=this._eventTypes[g];b||(b=this._eventTypes[g]={level:0,listeners:[]});b.listeners.push({listener:f,useCapture:d})},dispatchEvent:function(g){var f=g.type;this._dispatchEvent("pre"+f,g);this._dispatchEvent(f,g);this._dispatchEvent("post"+f,g)},_dispatchEvent:function(g,
f){var d=this._eventTypes?this._eventTypes[g]:null;if(d){var b=d.listeners;try{if(d.level++,b)for(var h=0,e=b.length;h<e;h++)if(b[h]){var c=b[h].listener;typeof c==="function"?c.call(this,f):c.handleEvent&&typeof c.handleEvent==="function"&&c.handleEvent(f)}}finally{if(d.level--,d.compact&&d.level===0){for(h=b.length-1;h>=0;h--)b[h]||b.splice(h,1);b.length===0&&delete this._eventTypes[g];d.compact=!1}}}},isListening:function(g){return!this._eventTypes?!1:this._eventTypes[g]!==void 0},removeEventListener:function(g,
f,d){if(this._eventTypes){var b=this._eventTypes[g];if(b){for(var h=b.listeners,e=0,c=h.length;e<c;e++){var a=h[e];if(a&&a.listener===f&&a.useCapture===d){b.level!==0?(h[e]=null,b.compact=!0):h.splice(e,1);break}}h.length===0&&delete this._eventTypes[g]}}}};return{EventTarget:g}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(g,j,f){function d(b){b=b||{};this._document=b.document||document}var b={};d.getTheme=function(f){var f=f||"default",e=b[f];e||(e=b[f]=new d);return e};d.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(b,e){var c=this,a=c._themeClass;c._themeClass=b;this._load(b,e,function(){c.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:c.getThemeClass()})})},onThemeChanged:function(b){return this.dispatchEvent(b)},
buildStyleSheet:function(b,e){function c(c,e,d){e&&(a.push("."+b+" ."+c+" {"),a.push("\t"+(d?"background-color":"color")+": "+e+";"),a.push("}"))}var a=[];a.push("");a.push("."+b+" {");e.fontFamily&&a.push("\tfont-family: "+e.fontFamily+";");e.fontSize&&a.push("\tfont-size: "+e.fontSize+";");e.fontSize&&a.push("\tcolor: "+e.text+";");a.push("}");a.push("."+b+".textview {");e.background&&a.push("\tbackground-color: "+e.background+";");a.push("}");c("ruler.annotations",e.annotationRuler,!0);c("ruler.lines",
e.annotationRuler,!0);c("ruler.folding",e.annotationRuler,!0);c("ruler.overview",e.overviewRuler,!0);c("rulerLines",e.lineNumber,!1);c("rulerLines.even",e.lineNumberEven,!1);c("rulerLines.odd",e.lineNumberOdd,!1);c("annotationLine.currentLine",e.currentLine,!0);c("entity-name-tag",e.keyword,!1);c("entity-other-attribute-name",e.attribute,!1);c("string-quoted",e.string,!1);c("meta.annotation.currentLine",e.currentLine,!0);c("keyword",e.keyword,!1);c("string",e.string,!1);c("comment",e.comment,!1);
c("comment.block.documentation",e.comment,!1);c("keyword.other.documentation.markup",e.comment,!1);return a.join("\n")},_createStyle:function(b,e,c,a){var d=this._document,b="orion-theme-"+b,k=d.getElementById(b);if(k){if(a||k.firstChild.data===e)return;k.removeChild(k.firstChild);k.appendChild(d.createTextNode(e))}else a?(k=f.createElement(d,"link"),k.rel="stylesheet",k.type="text/css",k.href=e,k.addEventListener("load",function(){c()})):(k=f.createElement(d,"style"),k.appendChild(d.createTextNode(e))),
k.id=b,(d.getElementsByTagName("head")[0]||d.documentElement).appendChild(k);a||c()},_load:function(b,e,c){if(b)if(typeof e==="string")this._createStyle(b,e,c);else if(e=e.href,e.substring(e.length-4)!==".css"&&(e+=".css"),/^\//.test(e)||/[a-zA-Z0-9]+:\/\//i.test(e)||!g.toUrl)this._createStyle(b,e,c,!0);else{var a=this;g(["text!"+e],function(e){a._createStyle(b,e,c,!1)})}else c()}};j.EventTarget.addMixin(d.prototype);return{TextTheme:d}});
define("orion/widgets/themes/ThemeClass",[],function(){function g(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}g.prototype.className=null;g.prototype.classString=void 0;g.prototype.style=void 0;g.prototype.closeString=" }\n";g.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:g}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(g){function j(){}j.prototype.navbar="white";j.prototype.button="#777777";j.prototype.location="#EFEFEF";j.prototype.selection="#cedce7";j.prototype.sidepanel="#F7F7F7";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 f="",d=[],b=new g.ThemeClass("orionPage");
b.style.backgroundColor="#fdfdfd";b.style.width="100%";b.style.height="100%";d.push(b);b=new g.ThemeClass("topRowBanner");b.style.margin="0";b.style.border="0";b.style.backgroundColor=this.navbar;b.style.height="16px";b.style.padding="10px";b.style.paddingLeft="6px";b.style.paddingRight="2px";b.style.borderBottom="none";b.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";b.style.zIndex="100";d.push(b);b=new g.ThemeClass("a");b.style.textDecoration="none";b.style.color=
this.content;d.push(b);b=new g.ThemeClass("navlink");b.style.display="inline-block";b.style.padding="2px";b.style.color=this.content;b.style.verticalAlign="bottom";d.push(b);b=new g.ThemeClass("primaryNav");b.style.color=this.navtext;b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.paddingTop="0";b.style.verticalAlign="baseline";d.push(b);b=new g.ThemeClass("primaryNav a");b.style.fontSize="8pt";b.style.color=this.navtext;b.style.marginRight="6px";b.style.marginLeft="6px";b.style.verticalAlign=
"baseline";b.style.textDecoration="none";d.push(b);b=new g.ThemeClass("primaryNav a:hover");b.style.color="#bfbfbf";b.style.cursor="hand";b.style.color="white";b.style.fontWeight="normal";d.push(b);for(var h in d)f+=d[h].toString();return f};j.prototype.writeLocationStyle=function(){var f="",d=[],b=new g.ThemeClass("titleArea");b.style.margin="0";b.style.paddingTop="5px";b.style.border="0";b.style.background=this.location;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";b.style.borderBottom="1px solid "+this.location;b.style.minHeight="20px";d.push(b);b=new g.ThemeClass("breadcrumb");b.style.fontSize="8pt";b.style.textDecoration="none";b.style.color="#f1f1f2;";b.style.paddingTop="2px";d.push(b);b=new g.ThemeClass("a.breadcrumb:hover");b.style.textDecoration="none";b.style.borderBottom="1px dotted";b.style.color="#F58B0F";b.style.cursor="pointer";d.push(b);b=new g.ThemeClass("breadcrumbSeparator");b.style.fontSize=
"8pt";b.style.textDecoration="none";b.style.color=this.separator;b.style.fontWeight="bold";d.push(b);b=new g.ThemeClass("currentLocation");b.style.fontWeight="bold";b.style.fontSize="8pt";b.style.color=this.breadcrumb;b.style.textDecoration="none";b.style.textWrap="normal";b.style.lineHeight="10pt";d.push(b);b=new g.ThemeClass("a.currentLocation:hover");b.style.fontWeight="bold";b.style.fontSize="10pt";b.style.color="#666666";b.style.textDecoration="none";b.style.borderBottom="0";d.push(b);b=new g.ThemeClass("navlinkonpage");
b.style.color=this.content;b.style.verticalAlign="middle";d.push(b);if(this.bannerProgress)b=new g.ThemeClass("topRowBanner .progressPane_running"),b.style.borderColor=this.bannerProgress,d.push(b);for(var h in d)f+=d[h].toString();return f};j.prototype.writeButtonStyle=function(){var f="",d=[],b=new g.ThemeClass("commandButton");b.style.color="#666";b.style.border="1px solid #dedede";b.style.backgroundColor="#ddd";b.style.textAlign="center";b.style.verticalAlign="middle";b.style.cursor="pointer";
b.style.display="inline-block";b.style.padding="4px 6px";b.style.borderRadius="3px";b.style.lineHeight="12px";b.style.fontSize="9pt";b.style.userSelect="none";d.push(b);b=new g.ThemeClass("commandButton:over");b.style.backgroundColor="#e6e6e6";b.style.border="1px solid #808080";d.push(b);b=new g.ThemeClass("commandMenu");b.style.color="#222";b.style.display="inline-block";b.style.verticalAlign="baseline";b.style.margin="0";b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.border="1px solid #dedede";
b.style.backgroundColor="#efefef";b.style.cursor="pointer";b.style.borderRadius="1px";d.push(b);b=new g.ThemeClass("commandMenuItem");b.style.border="0";b.style.padding="0";b.style.margin="0";d.push(b);for(var h in d)f+=d[h].toString();return f};j.prototype.writeMainStyle=function(){var f="",d=[],b=new g.ThemeClass("searchbox");b.style.backgroundImage="url(../images/core_sprites.png)";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="4px -297px";b.style.width="12px";b.style.height=
"12px";b.style.backgroundColor=this.search;b.style.border="1px solid "+this.search;b.style.fontSize="11px";b.style.width="15em";b.style.height="16px";b.style.borderRadius="10px";b.style.color="#999";b.style.padding="0";b.style.paddingLeft="20px";b.style.marginLeft="5px";b.style.marginTop="6px !important";b.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";d.push(b);b=new g.ThemeClass("searchbox:focus");b.style.color="white";b.style.outline=
"none";d.push(b);b=new g.ThemeClass("checkedRow");b.style.cssText="background-color:"+this.selection+" !important;";d.push(b);b=new g.ThemeClass("navbar-item-selected");b.style.background=this.selection;b.style.color=this.content;d.push(b);b=new g.ThemeClass("auxpane");b.style.border="0";b.style.background=this.sidepanel;d.push(b);b=new g.ThemeClass("mainpane");b.style.background=this.mainpanel;b.style.border=0;d.push(b);b=new g.ThemeClass("mainToolbar");b.style.background=this.toolpanel;d.push(b);
for(var h in d)f+=d[h].toString();return f};j.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};j.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=
f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value,this.bannerProgress=f.bannerProgress.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel,this.bannerProgress=f.bannerProgress);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(g,j,f){function d(){}function b(){this.styles=[];var b=new d;b.name="Orion";b.navbar="white";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";b.bannerProgress="whitesmoke";
this.styles.push(b);b=new d;b.name="Orion2014";b.navbar="white";b.button="#EFEFEF";b.location="#EFEFEF";b.selection="FEC";b.sidepanel="#EEEEEE";b.mainpanel="#EEEEEE";b.toolpanel="#EEEEEE";b.navtext="#BFBFBF";b.content="#333333";b.search="#444444";b.breadcrumb="#333333";b.separator="#333333";b.bannerProgress="orange";this.styles.push(b);b=new d;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";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;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";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;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";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;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";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;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";b.bannerProgress="#F2F2F2";this.styles.push(b);
b=new d;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";b.bannerProgress="#F2F2F2";this.styles.push(b)}function h(){return this.styles}d.prototype.name="Orion";d.prototype.navbar="#404648";d.prototype.button="#EFEFEF";d.prototype.location="#333";d.prototype.breadcrumb="#3087B3";d.prototype.separator=
"#333";d.prototype.selection="FEC";d.prototype.sidepanel="#FBFBFB";d.prototype.mainpanel="white";d.prototype.toolpanel="white";d.prototype.navtext="#bfbfbf";d.prototype.content="#3087B3";d.prototype.search="#444";d.prototype.bannerProgress="white";b.prototype.styles=[];b.prototype.getStyles=h;b.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};b.prototype.getViewData=function(){var b={top:10,left:10,
width:350,height:350};b.shapes=[{type:"RECTANGLE",name:g["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:g["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:g["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:g["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",
name:g["Selection Bar"],x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:g.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:g["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:g.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:g.Content,label:"/",x:78,y:60,family:"content",
fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:g.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:g["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:g.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:g["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:g["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:g["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:g["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:g["Line Color"],
x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:g["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:g["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 c=0;c<3;c++)b.shapes.push({type:"TEXT",name:g.Content,label:"org.eclipse.orion.content",x:170,y:127+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)b.shapes.push({type:"TEXT",name:g.Content,label:"Item",x:25,y:115+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)b.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+c*20,x2:165,y2:124+c*20,x3:160,y3:127+c*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};b.prototype.processSettings=function(b){var c=new f.ThemeSheetWriter;(new j.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",c.getSheet(b))};return{ThemeData:b,getStyles:h}});
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","FileName FolderName":"FileName FolderName(Optional)","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","Report a Bug":"Report a Bug","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(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(g){function j(f,d,b){this.elements=b;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);d===!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),g.addAutoDismiss([this.container],this.destroy.bind(this))):f.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(f){var d=document.createElement("span");d.className="UAContainer-icon";d.innerHTML='<span class="workingSpan"><img src="'+f.image+'" id="'+f.label+'ImageNode" alt="'+f.alt+'" height="64" width="64"></span><span class="UAIcon-label"><span class="UALabel" id="'+f.label+'LabelNode" >'+f.label+"</span></span>";d.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;document.getElementById(f.label+"LabelNode").className="UALabel-live";d.className="UAContainer-icon-live"};
d.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";d.className="UAContainer-icon"};var b=this;d.onclick=function(){b.showMedia(f)};this.elementNode.appendChild(d)};j.prototype.clearElements=function(){this.elementNode.innerHTML=""};j.prototype.showMedia=function(f){this.clearElements();this.addElement(f);var d=document.createElement("span");d.className="UAContainer-media";d.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
f.media+'" alt="'+f.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(d);setTimeout(function(){d.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};j.prototype.createSwitch=function(f){var d;d=f?f.label+"switch":"indexSwitch";var b=document.createElement("span");b.className="workingSpan";b.innerHTML='<div class="circle" id ="'+d+'"></div>';var g=this;b.onclick=
f?function(){g.showMedia(f)}:function(){g.initialize();g.chosenSwitch.firstChild.className="circle";g.chosenSwitch=b;g.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(b);return this.radioButtons[this.radioButtons.length]=b};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(g,j,f,d){function b(){}var h=null;b.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 b=document.body;this.$frameParent=b;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(b);c=c.createContextualFragment(this.CONTAINERTEMPLATE);b.appendChild(c);this.$frame=b.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(){a.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);
c=document.createRange();c.selectNode(this.$parent);b=c.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(b,this.messages);this.$parent.appendChild(b);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(c){c.keyCode===f.KEY.ESCAPE?a.hide():c.keyCode===f.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 b=this;this.buttons.forEach(function(c){var a=d.createButton(c.text,c.callback);if(c.id)a.id=c.id,b["$"+a.id]=a;if(c.isDefault)b._defaultCallback=c.callback,b._defaultButton=a;b.$buttonContainer.appendChild(a)})}},_makeModal:function(){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var c=!f.contains(b.$frame,
a.target);if(c)for(var d=0;d<b.$$modalExclusions.length;d++)if(f.contains(b.$$modalExclusions[d],a.target)){c=!1;break}c&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$parent).focus()},0),f.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,a=!1;this._addedBackdrop=[];for(var d=0;d<c.length;d++){for(var k=0;k<this.$$modalExclusions.length;k++)if(f.contains(this.$$modalExclusions[k],
c[d])){a=!0;break}!a&&c[d]!==b.$frame&&c[d].classList&&!c[d].classList.contains("tooltipContainer")&&(k=c[d],k.classList.contains("modalBackdrop")||(k.classList.add("modalBackdrop"),this._addedBackdrop.push(k)))}(c=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var c=b._getFirstFocusField();c&&c!==a.target&&c.focus();f.stop(a)}},!1)},_addChildDialog:function(b){this.$$modalExclusions.push(b.$frame||b.$parent)},
_inModalExclusion:function(b){return this.$$modalExclusions.some(function(c){return b.$frame===c||b.$parent===c})},_bindElements:function(b){for(var c=0;c<b.childNodes.length;c++){var a=b.childNodes[c];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(b){!b&&h===this&&(h=null);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");f.setFramesEnabled(!0);typeof this._afterHiding==="function"&&this._afterHiding();var c=this;this.keepAlive||window.setTimeout(function(){c.destroy()},0)},show:function(b){if(this.modal)if(h){if(!h._inModalExclusion(this)){this.hide(!0);return}}else h=this;typeof this._beforeShowing==="function"&&this._beforeShowing();f.setFramesEnabled(!1);var c=f.bounds(this.$frame),a=f.bounds(document.documentElement),d;b?(d=f.bounds(b),b=d.top+d.height+4,d=d.left+
4,b+c.height>a.height&&(b=Math.max(0,a.height-c.height-4)),d+c.width>a.width&&(d=Math.max(0,a.width-c.width-4))):(d=Math.max(0,(a.width-c.width)/2),b=Math.max(0,(a.height-c.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=b+"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 f.firstTabbable(this.$parent)||
this._defaultButton||f.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){if(this.$frame)h===this&&(h=null),f.setFramesEnabled(!0),this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(b){b.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}};b.prototype.constructor=
b;return{Dialog:b}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,orion/webui/littlelib,orion/PageLinks,orion/widgets/userAssistance/UATaskPanel,orion/webui/dialog".split(","),function(g,j,f,d,b){function h(b){this._displaySignOut=!0;this._init(b)}h.prototype={_init:function(b){this._dropdownNode=f.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 c=0,a;for(a in b)b.hasOwnProperty(a)&&c++;return c},_makeMenuItem:function(b,
c){var a=document.createElement("span");a.role="menuitem";a.tabIndex=0;var d=document.createTextNode(b);a.appendChild(d);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&a.classList.add(this._dropDownItemClass):a.classList.add("dropdownMenuItem");a.addEventListener("click",c,!1);a.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&c()},!1);return a},_renderAuthenticatedService:function(b){var c=this,a=this.authenticatedServices[b].authService;
if(a&&a.logout&&this._displaySignOut){var d=document.createElement("li"),k=this._makeMenuItem(g["Sign Out"],function(){a.logout().then(function(){c.addUserItem(b,a,c.authenticatedServices[b].label);localStorage.removeItem(b);localStorage.removeItem("lastLogin");for(var d=localStorage.length-1;d>=0;d--){var i=localStorage.key(d);i&&i.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(i)}a.getAuthForm(window.location.href).then(function(a){window.location=a})})});d.appendChild(k);this._dropdownNode.appendChild(d)}},
renderServices:function(){function b(d){a[d]||(a[d]=c.createDocumentFragment());return a[d]}var c=document,a=[],i=this._serviceRegistry;d.getPageLinksInfo(i,"orion.page.link.user").then(function(d){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);d.getAllLinks().forEach(function(a){var d,i;if(a.category&&(i=/user\.(\d+)/.exec(a.category)))d=parseInt(i[1],10);if(typeof d!=="number"||isNaN(d))d=1;d=b(d);i=c.createElement("li");var k=c.createElement("a");k.role="menuitem";
typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&k.classList.add(this._dropDownItemClass):k.classList.add("dropdownMenuItem");k.href=a.href;k.textContent=a.textContent;i.appendChild(k);d.appendChild(i);k.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&k.click()},!1)}.bind(this));if(this.keyAssistFunction){var d=document.createElement("li"),l=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass===
"string"?this._keyAssistClass!==""&&l.classList.add(this._keyAssistClass):l.classList.add("key-assist-menuitem");d.appendChild(l);b(0).appendChild(d)}if(d=i.getServiceReferences("orion.page.getstarted")[0])l=d.getProperty("data"),d=document.createElement("li"),l=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,l)),d.appendChild(l),b(0).appendChild(d);var m=this;a.sort(function(a,c){return a-c}).forEach(function(c,b){if(b<a.length-1&&!this._noSeparator){var d=document.createElement("li");
d.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");d.appendChild(e);c.appendChild(d)}m._dropdownNode.appendChild(c)}.bind(this));if(this.isSingleService())for(var h in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(h)&&this._renderAuthenticatedService(h,0)}.bind(this))},getStartedDialog:function(d){new b(null,!0,d)},setKeyAssist:function(b){this.keyAssistFunction=b;this.renderServices()},addUserItem:function(b,c,a,d){d?
(this.unauthenticatedServices[b]&&delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:c,label:a,data:d}):(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?{authService:c,label:a,pending:this.unauthenticatedServices[b].pending}:{authService:c,label:a});this.renderServices()}};h.prototype.constructor=h;return{UserMenu:h}});
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(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(g,j,f,d,b,h){function e(a,c,b){var d="";b&&(d="^");if(d=f.parse("/"+d+a.searchStr+"/"))b=d.pattern,d=d.flags,d.indexOf("i")===-1&&!c.caseSensitive&&(d+="i"),a.regExp={pattern:b,flags:d},a.wildCard=!0}var c={ALL_FILE_TYPE:"*.*"};c.doSearch=function(a,b,d,e){if(a){var f=!0;d==="*"&&(d="");d===""&&(f=e&&e.type!==c.ALL_FILE_TYPE);if(f)d!==""&&c.addRecentSearch(b,
d,e?e.regEx:!1),a=a.createSearchParams(d,!1,!1,e),a=c.generateSearchHref(a),window.location=a}else window.alert(g["Can't search: no search service is available"])};c.generateSearchHelper=function(a,b){var d=a.keyword,f=d,g={};a.fileType&&a.fileType!==c.ALL_FILE_TYPE&&d===""&&(f="*."+a.fileType);if(a.regEx)g.searchStr=d,e(g,a,b);else{var h=d.indexOf("*")>-1,j=d.indexOf("?")>-1;h&&(d=d.split("*").join(".*"));j&&(d=d.split("?").join("."));!h&&!j&&!a.nameSearch?(g.searchStr=a.caseSensitive?d.split("\\").join(""):
d.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?d:d.toLowerCase(),e(g,a,b),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:a,inFileQuery:g,displayedSearchTerm:f}};c.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"};c.copySearchParams=function(a,c){var b={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(c||d!=="replace"))b[d]=a[d];return b};c.generateSearchHref=function(a){var b=j.toUrl("search/search.html"),a=c.copySearchParams(a,!0),d=a.resource;a.resource=void 0;return typeof a.keyword!=="undefined"?(new h(b+"#{,resource,params*}")).expand({resource:d,params:a}):(new h(b+"#{,resource}")).expand({resource:d})};c.generateFindURLBinding=
function(a,c,b,d,e){a={find:c.searchStr,regEx:c.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof d==="string"?d:void 0,atLine:typeof b==="number"?b:void 0};return e?a:","+(new h("{,params*}")).expand({params:a})};c.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)};c.replaceRegEx=
function(a,c,b){return a.replace(RegExp(c.pattern,c.flags),b)};c.replaceStringLiteral=function(a,b,d){b=f.parse("/"+b+"/gim");return c.replaceRegEx(a,b,d)};c.searchOnelineLiteral=function(a,c,b){var d;d=0;for(var e=!1,f=[];;)if(d=c.indexOf(a.searchStr,d),d<0)break;else{f.push({startIndex:d,length:a.searchStrLength});e=!0;if(b)break;d+=a.searchStrLength}return e?f:null};c.findRegExp=function(a,c,b,d){if(!c)return null;b=b||"";b+=(b.indexOf("g")===-1?"g":"")+(b.indexOf("m")===-1?"m":"");var e=null;
return(e=RegExp(c,b).exec(a.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};c.searchOnelineRegEx=function(a,b,d){for(var e=0,f=!1,g=[];;)if(e=c.findRegExp(b,a.regExp.pattern,a.regExp.flags,e)){g.push(e);f=!0;if(d)break;e=e.startIndex+e.length}else break;return f?g:null};c.generateNewContents=function(a,b,d,e,f,g){if(e&&b){if(!a)d.contents=[];for(var h=0;h<b.length;h++){for(var j=b[h],p=!1,q=!1,t=[],u,v=0,x=0;x<e.children.length;x++)if(e.children[x].lineNumber-1===h){v=x;for(p=0;p<e.children[x].matches.length;p++)e.children[x+
p].checked!==!1&&t.push(p);q=t.length>0;u=e.children[x].matches;p=!0;break}if(p){if(q){t=c.replaceCheckedMatches(j,f,u,t,g);j=t.replacedStr;for(p=0;p<e.children[v].matches.length;p++)e.children[v+p].newMatches=t.newMatches}else for(p=0;p<e.children[v].matches.length;p++)e.children[v+p].newMatches=e.children[v+p].matches;a?d.contents[h]=j:d.contents.push(j)}else a||d.contents.push(j)}}};c.generateMatchContext=function(a,c,b){var d=[],e=a*2+1,f;c.length<=e?(f=0,a=c.length-1):(f=b-a,f<0?(f=0,a=f+e-1):
(a=b+a,a>c.length-1&&(a=c.length-1,f=a-e+1)));for(e=f;e<=a;e++)d.push({context:c[e],current:e===b});return d};c.splitFile=function(a){for(var c=0,b=0,d=0,e=0,f=[];;){c!==-1&&c<=d&&(c=a.indexOf("\r",d));b!==-1&&b<=d&&(b=a.indexOf("\n",d));if(b===-1&&c===-1){f.push(a.substring(e));break}var g=1;c!==-1&&b!==-1?c+1===b?(g=2,d=b+1):d=(c<b?c:b)+1:d=c!==-1?c+1:b+1;f.push(a.substring(e,d-g));e=d}return f};c.searchWithinFile=function(a,b,d,e,f,g){d=c.splitFile(d);if(f)b.contents=d;if(b){b.children=[];for(var h=
e=0;h<d.length;h++){var j=d[h];if(j&&j.length>0){var p=g?j:j.toLowerCase();if(p=a.wildCard?c.searchOnelineRegEx(a,p):c.searchOnelineLiteral(a,p)){var q,t=h+1;if(f)for(var u=0;u<p.length;u++)q=u+1,q={parent:b,checked:b.checked,type:"detail",matches:p,lineNumber:t,matchNumber:q,name:j,location:b.location+"-"+t+"-"+q},b.children.push(q);else q={parent:b,context:c.generateMatchContext(2,d,h),checked:b.checked,type:"detail",matches:p,lineNumber:t,name:j,location:b.location+"-"+t},b.children.push(q);e+=
p.length}}}b.totalMatches=e}};c.replaceCheckedMatches=function(a,c,b,d,e){for(var f=0,g="",h=[],j=0;j<b.length;j++){f!==b[j].startIndex&&(g+=a.substring(f,b[j].startIndex));if(b[j].length)e=b[j].length;for(var f=!1,q=0;q<d.length;q++)if(d[q]===j){f=!0;break}f?(h.push({startIndex:g.length,length:c.length}),g+=c):(h.push({startIndex:g.length,length:e}),g+=a.substring(b[j].startIndex,b[j].startIndex+e));f=b[j].startIndex+e}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:h}};c.fullPathNameByMeta=
function(a){var c=a.length,b="";if(c>0)for(c-=1;c>-1;c--)b=b+(b===""?"":"/")+a[c].Name;return b};c.path2FolderName=function(a,c,b){return a.substring(0,a.length-c.length-(b?0:1))};c._storeRecentSearch=function(a,c,b,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",c);b&&window.setTimeout(function(){b.dispatchEvent({type:"inputDataListChanged",deleting:d})}.bind(this),20)})};c.addRecentSearch=function(a,b,d){typeof b==="string"&&b&&
a.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:d});c._storeRecentSearch(a,e)})};c.removeRecentSearch=function(a,b,d){typeof b==="string"&&b&&a.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);c._storeRecentSearch(a,e,d,!0);break}})};c.getSearches=function(a,c,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(c);typeof a==="string"&&(a=JSON.parse(a));a&&b&&b(a)})};c.getMixedSearches=function(a,b,d,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));b&&(a=
a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var b=c.parseQueryStr(a.query);f.some(function(a){return b.searchStrTitle===a.name})||f.push({name:b.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&e&&e(f)})};c.getOpenSearchPref=function(a,c){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");c(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?!0:!1:!1)})};
c.setOpenSearchPref=function(a,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:c})})};return c});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(g,j,f,d,b,h){function e(c,a,b,e){this.registry=c;this.fileClient=a;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:d.generateSearchHelper(b);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location;this._cancelled=!1;this._statusService=this.registry.getService("orion.page.message");this._progressService=this.registry.getService("orion.page.progress");this._statusService&&this._statusService.setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}e.prototype.search=function(c){var a=this.registry.getService("orion.core.contentTypeRegistry");
this._onSearchComplete=c;this._cancelled=!1;this._deferredArray=[];a.getContentTypes().then(function(a){this.contentTypesCache=a;var c=this;this._visitRecursively(this._childrenLocation).then(function(){c._cancelled||c._reportResult()}.bind(c),function(a){c._reportResult();c._statusService&&a.name==="Cancel"&&(console.log("Crawling search cancelled. Deferred array length : "+c._deferredArray.length),c._statusService.setProgressResult({Message:g["Search cancelled by user"],Severity:"Warning"}))}.bind(c))}.bind(this))};
e.prototype.searchName=function(c,a){if(c)this._searchParams=c,this.searchHelper=d.generateSearchHelper(c,!0);if(a)this.onSearchNameComplete=a;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?d.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):d.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}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};e.prototype.buildSkeleton=function(c,a){this._buildingSkeleton=!0;var b=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var d=this;c();b.getContentTypes().then(function(c){d.contentTypesCache=c;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;
a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};e.prototype._sort=function(c){c.sort(function(a,c){var b,e;if(this._searchParams.sort==="Path asc"){b=a.Location&&a.Location.toLowerCase();b=d.path2FolderName(b,a.Name&&a.Name.toLowerCase(),!0);e=c.Location&&c.Location.toLowerCase();e=d.path2FolderName(e,c.Name&&c.Name.toLowerCase(),!0);if(b<e)return-1;if(b>e)return 1}return this._sortOnNameSingle(a,c)}.bind(this))};e.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})};e.prototype._sortOnNameSingle=function(c,a){var b=c.Name&&c.Name.toLowerCase(),d=a.Name&&a.Name.toLowerCase();return b<d?-1:b>d?1:0};e.prototype._onFileType=function(c){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===d.ALL_FILE_TYPE?!0:c.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};e.prototype._visitRecursively=function(c){var a=[],d=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(c);return(d._progressService?this._progressService.progress(d.fileClient.fetchChildren(c),
"Crawling search for children of "+c):d.fileClient.fetchChildren(c)).then(function(c){for(var e=0;e<c.length;e++)if(c[e].Directory!==void 0&&c[e].Directory===!1)if(d._searchOnName)a.push(d._buildSingleSkeleton(c[e]));else if(d._buildSkeletonOnly)a.push(d._buildSingleSkeleton(c[e]));else{if(!d._cancelled){var f=b.getFilenameContentType(c[e].Name,d.contentTypesCache);if(f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&d._onFileType(f))f=d._sniffSearch(c[e]),a.push(f),d._deferredArray.push(f)}}else if(c[e].Location)if(d._cancelled)break;
else f=d._visitRecursively(c[e].ChildrenLocation),a.push(f),d._deferredArray.push(f);return h.all(a)})};e.prototype._hitOnceWithinFile=function(c){c=this._searchParams.caseSensitive?c:c.toLowerCase();return this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,c,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,c,!0)};e.prototype._reportSingleHit=function(c){if(!this._cancelled)c.LastModified=c.LocalTimeStamp,this.fileLocations.push(c),this._hitCounter++,
this._sort(this.fileLocations),this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};e.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(c){c.cancel()})};e.prototype._sniffSearch=function(c){this._totalCounter++;var a=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(c),this._statusService&&this._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return(a._progressService?a._progressService.progress(a.fileClient.read(c.Location),"Reading file "+c.Location):a.fileClient.read(c.Location)).then(function(b){a._hitOnceWithinFile(b)&&a._reportSingleHit(c);a._statusService&&a._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)},g.Cancel)},function(a){a&&a.message&&a.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+
a.message)})};e.prototype._buildSingleSkeleton=function(c){this._totalCounter++;this.fileSkeleton.push(c);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();c=new h;c.resolve(this._totalCounter);return c};e.prototype.constructor=e;return{SearchCrawler:e}});
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(g,j,f,d,b,h,e){function c(a){this._init(a)}c.prototype=new e.Dialog;c.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="'+
d.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:250px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';c.prototype._init=function(a){this.title=a.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new f.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(g["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(g["Missing required argument: searchRenderer"]);this._initialize()};c.prototype._bindToDom=function(a){var c=this;c.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",g["FileName FolderName"]):this.$fileName.setAttribute("placeholder",g.Search);this.$fileName.addEventListener("input",function(){c._time=+new Date;c._timeoutId&&clearTimeout(c._timeoutId);c._timeoutId=setTimeout(c.checkSearch.bind(c),
0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===b.KEY.ENTER){var d=b.$("a",c.$results);if(d)b.stop(a),(h.isMac?a.metaKey:a.ctrlKey)?window.open(d.href):(window.location.href=d.href,c.hide())}},!1);a.addEventListener("keydown",function(a){var d,e,f;if(a.keyCode===b.KEY.DOWN||a.keyCode===b.KEY.UP)d=b.$$array("a",c.$results),e=document.activeElement,f=d.indexOf(e),a.keyCode===b.KEY.DOWN?f>=0?(e.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?(e.classList.remove("treeIterationCursor"),e=c.$fileName,d=f>0?d[f-1]:e,d.focus(),f>0&&d.classList.add("treeIterationCursor")):d.length>0&&(d[d.length-1].focus(),d[d.length-1].classList.add("treeIterationCursor")),b.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);setTimeout(function(){if(c._forceUseCrawler||!c._fileService.getService(c._searcher.getSearchLocation()).search){var a=
c._searchOnRoot?c._searcher.getSearchRootLocation():c._searcher.getChildrenLocation(),a=new j.SearchCrawler(c._searcher.registry,c._fileService,"",{searchOnName:!0,location:a});c._searcher.setCrawler(a);a.buildSkeleton(function(){c.$crawlingProgress.style.display="inline";c.$progress.appendChild(document.createTextNode(g["Building file skeleton..."]))},function(){c.$crawlingProgress.style.display="none";c.$progress.removeChild(c.$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()};c.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)};c.prototype._detectFolderKeyword=function(a){var c,b=a,d=null;if(this._nameSearch&&(c=/(\S+)\s*(.*)/,(a=c.exec(a))&&a.length===3))a[1]&&
(b=a[1]),a[2]&&(d=a[2]);return{keyword:b,folderKeyword:d}};c.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var c=this._detectFolderKeyword(a),d=this._searcher.createSearchParams(c.keyword,this._nameSearch,this._searchOnRoot),e=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=e;var f=document.createElement("div");f.appendChild(document.createTextNode(this._nameSearch?g["Searching..."]:h.formatMessage(g["Searching for occurrences of"],
a)));b.empty(this.$results);this.$results.appendChild(f);this._searcher.search(d,c.folderKeyword,function(){e===this.currentSearch&&e.apply(null,arguments)}.bind(this))}};c.prototype.decorateResult=function(a){function c(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&d.hide()}for(var d=this,a=b.$$array("a",a),e=0;e<a.length;e++)a[e].addEventListener("click",c,!1)};c.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};c.prototype._afterHiding=function(){this._onHide&&this._onHide()};c.prototype.constructor=
c;return{OpenResourceDialog:c}});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\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<div id="centralNavigationArea" style="position:absolute;left:0;top:0;width:39px;height:36px; z-index:1;border-right:1px solid #ddd;"></div>\n\n\t\t<\!-- Static "Home" link. TODO delete this --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\n\t\t<\!-- Left banner component: hamburger --\>\n\t\t<nav id="primaryNav" class="bannerLeftArea" style="z-index:2;" role="navigation">\n\t\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\n\t\t<\!-- Middle banner component: Breadcrumb bar --\>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\n\t\t<\!-- Right banner component: user identity --\>\n\t\t<div class="bannerRightArea" style="z-index:2;">\n\t\t\t<\!-- Global commands support. --\>\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\n\t\t\t<\!-- Search. TODO delete this --\>\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\n\t\t\t<\!-- User identity menu and Progress --\>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;line-height:16px;">\n\t\t\t\t<div style="position: absolute;right: 0px;top:0;width: 39px;height:36px; z-index:-50;border-left: 1px solid #ddd;"></div>\n\n\t\t\t\t<\!-- Progress indicator --\>\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\n\t\t\t\t<\!-- User identity menu --\>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger" style="z-index:2;">\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\n\t<\!-- IDE notification messages go in here --\>\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'<\!--\n<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\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="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=5.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>\n--\>'});
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<ul class="layoutRight commandList pageActions" id="settingsActions"></ul>\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(g,j){function f(d,b,f){if(d=j.node(d))this._parent=d;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;d=document.createElement("div");d.classList.add("dropDownContainer");d.id=this.navDropDownId;d.style.display="none";this._parent.appendChild(d);this._dropdownMenu=d;if(b=j.node(b))this._triggerNode=
b;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))}g.mixin(f.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){j.setFramesEnabled(!1);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",j.setFramesEnabled(!0),this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},
addContent:function(d){this._dropdownMenu.innerHTML=d},getContentNode:function(){return this._dropdownMenu},updateContent:function(d,b){b()},_positionDropdown:function(){this._dropdownMenu.style.right="";var d=j.bounds(this._dropdownMenu),b=j.bounds(document.body);if(d.left+d.width>b.left+b.width)d=j.bounds(this._boundingNode(this._triggerNode)),b=j.bounds(this._triggerNode),this._dropdownMenu.style.right=d.width-(b.left-d.left+b.width)+"px"},_boundingNode:function(d){var b=window.getComputedStyle(d,
null);return b===null?d:b.getPropertyValue("position")==="absolute"||!d.parentNode||d===document.body?d:this._boundingNode(d.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.setFramesEnabled(!0),j.empty(this._parent),this._parent=this.select=null}});return f});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","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":"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":"File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"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...":"File System","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP","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","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",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With",
"Loading ":"Loading ",New:"New",File:"File",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...":"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} menu 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(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,j,f){function d(b,c,a){if(!b[c])throw c+g[" is not supported in this file system"];return b[c].apply(b,a)}function b(e,c,a,f){if(!e.readBlob)throw g["source file service does not support binary read"];if(!a.writeBlob)throw g["target file service does not support binary write"];if(c[c.length-1]!=="/")return d(e,"readBlob",[c]).then(function(c){return d(a,"writeBlob",[f,c])});var k=f.substring(0,
f.length-1),l=decodeURIComponent(k.substring(k.lastIndexOf("/")+1)),k=k.substring(0,k.lastIndexOf("/")+1);return d(a,"createFolder",[k,l]).then(function(){},function(){}).then(function(){return d(e,"fetchChildren",[c]).then(function(c){for(var d=[],g=0;g<c.length;++g){var k=c[g].Location,l=k;c[g].Directory&&(l=k.substring(0,k.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+1));l=f+encodeURIComponent(l);c[g].Directory&&(l+="/");d[g]=b(e,k,a,l)}return j.all(d)})})}function h(b,c){function a(a){var c=
new j;c.reject(g["No Matching FileService for location:"]+a);return c}var d=b.getServiceReferences("orion.core.file"),k=d;if(c)for(var k=[],l=0;l<d.length;++l)c(d[l])&&k.push(d[l]);for(var h=[],o=[],r=[],n=[],p={fetchChildren:function(){var a=new j;a.resolve(n);return a},createWorkspace:function(){var a=new j;a.reject(g["no file service"]);return a},loadWorkspaces:function(){var a=new j;a.reject(g["no file service"]);return a},loadWorkspace:function(){var a=new j;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:n,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},d=0;d<k.length;++d)n[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:k[d].getProperty("top"),ChildrenLocation:k[d].getProperty("top"),Name:k[d].getProperty("Name")},l=k[d].getProperty("pattern")||k[d].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),l[0]!=="^"&&(l=
"^"+l),h[d]=RegExp(l),o[d]=b.getService(k[d]),r[d]=k[d].getProperty("Name"),k[d].getProperty("NameKey")&&k[d].getProperty("nls")&&f.getMessageBundle(k[d].getProperty("nls")).then(function(a,c){n[a].Name=c[k[a].getProperty("NameKey")];r[a]=c[k[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return o[0]?0:-1;for(var c=0;c<h.length;++c)if(h[c].test(a))return c;throw g["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return a===-1?p:o[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?p.Name:r[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?p.Location:n[a].Location}}h.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 d(this._getService(b),"fetchChildren",
arguments)},createWorkspace:function(b){return d(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return d(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,c,a,f){return d(this._getService(b),"createProject",arguments)},createFolder:function(b,c){return d(this._getService(b),"createFolder",arguments)},createFile:function(b,c){return d(this._getService(b),"createFile",
arguments)},deleteFile:function(b){return d(this._getService(b),"deleteFile",arguments)},moveFile:function(e,c,a){var f=this._getService(e),g=this._getService(c);if(f===g)return d(f,"moveFile",arguments);var l=e[e.length-1]==="/",h=c;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var j=e;l&&(j=j.substring(0,j.length-1));h+=j.substring(j.lastIndexOf("/")+1)}l&&h[h.length-1]!=="/"&&(h+="/");return b(f,e,g,h).then(function(){return d(f,"deleteFile",[e])})},copyFile:function(e,c,a){var f=
this._getService(e),g=this._getService(c);if(f===g)return d(f,"copyFile",arguments);var l=e[e.length-1]==="/",h=c;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var j=e;l&&(j=j.substring(0,j.length-1));h+=j.substring(j.lastIndexOf("/")+1)}l&&h[h.length-1]!=="/"&&(h+="/");return b(f,e,g,h)},read:function(b,c){return d(this._getService(b),"read",arguments)},readBlob:function(b){return d(this._getService(b),"readBlob",arguments)},write:function(b,c,a){return d(this._getService(b),"write",
arguments)},remoteImport:function(b,c){return d(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,c){return d(this._getService(b),"remoteExport",arguments)},search:function(b){return d(this._getService(b.resource),"search",arguments)}};h.prototype.constructor=h;return{FileClient:h}});
define("orion/webui/SideMenu","orion/commands,orion/objects,orion/webui/littlelib,orion/PageLinks,orion/PageUtil,orion/URITemplate,orion/URL-shim,orion/util".split(","),function(g,j,f,d,b,h,e,c){function a(a,c){this.parentNode=f.node(a);this.contentNode=f.node(c);if(!this.parentNode)throw Error("Missing parentNode");this.menuitems=Object.create(null);this.categories=this.links=null;this.anchor=document.createElement("ul");this.anchor.classList.add("sideMenuList");this.parentNode.appendChild(this.anchor);
this.anchor.addEventListener("click",this._handleEvent.bind(this));this.anchor.addEventListener("touchstart",this._handleEvent.bind(this));this.anchor.addEventListener("focus",this._handleEvent.bind(this),!0);f.addAutoDismiss([this.anchor],this._expandMenu.bind(this,null))}function i(a){return!a.isRelatedLink}function k(a,c){var b=a.order,d=c.order;if(b<d)return-1;else if(d<b)return 1;return 0}function l(a,c){var b=a.source.order,d=c.source.order,b=typeof b==="number"?b:100,d=typeof d==="number"?
d:100;return b===d?a.textContent.localeCompare(c.textContent):b<d?-1:1}var m=c.isTouch;j.mixin(a.prototype,{LOCAL_STORAGE_NAME:"sideMenuNavigation",OPEN_STATE:"open",CLOSED_STATE:"closed",DEFAULT_STATE:"open",SIDE_MENU_OPEN_WIDTH:"40px",TRANSITION_DURATION_MS:301,addMenuItem:function(a,c,b){var d=this.anchor,a=this.createListItem(a,c);b&&a.classList.add("sideMenuItemActive");d.appendChild(a);this.menuitems[c]=a},setSideMenu:function(){var a=this.getDisplayState(),c=this.parentNode;if(c){if(a===this.CLOSED_STATE){this.setPageContentLeft("0");
if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){c.style.display="none"},this.TRANSITION_DURATION_MS);c.classList.add("animating")}if(a===this.OPEN_STATE){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;c.classList.remove("animating");c.style.display="block";c.style.width=this.SIDE_MENU_OPEN_WIDTH;this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH)}}},setPageContentLeft:function(a){var c=this.contentNode;if(c)c.style.left=
a},toggleSideMenu:function(){var a=this.getDisplayState(),c=this.contentNode;c&&c.classList.add("content-fixedHeight-animation");a=a===this.OPEN_STATE?this.CLOSED_STATE:this.OPEN_STATE;a===this.DEFAULT_STATE?localStorage.removeItem(this.LOCAL_STORAGE_NAME):localStorage.setItem(this.LOCAL_STORAGE_NAME,a);this.setSideMenu()},clearMenuItems:function(){this.menuitems=[];f.empty(this.anchor)},getMenuItems:function(){var a=this.menuitems;return Object.keys(a).map(function(c){return a[c]})},getMenuItem:function(a){return this.menuitems[a]},
getDisplayState:function(){var a=localStorage.getItem(this.LOCAL_STORAGE_NAME);if(!a)a=this.DEFAULT_STATE;return a},createListItem:function(a,c){var b=document.createElement("li");b.className=a;b.classList.add("sideMenuItem");b.categoryId=c;return b},setCategories:function(a){this.categories=a;this.links=Object.create(null)},setPageLinks:function(a){this.pageLinks=a;var c=this,b=a.createLinkElements();a.getAllLinks().forEach(function(a,d){var e=b[d];e.source=a;c._getLinksBin(a.category).push(e)});
this._renderLinks()},setRelatedLinks:function(a,c){this.relatedLinks=a;var b=this;Object.keys(this.links).forEach(function(a){var c=b._getLinksBin(a);b.links[a]=c.filter(i)});var d=document.createDocumentFragment();a.forEach(function(a){var c=a.relatedLink,e=b._getLinksBin(c.category),a=g.createCommandMenuItem(d,a.command,a.invocation);a.classList.remove("dropdownMenuItem");a.isRelatedLink=!0;a.source=c;e.push(a)});this._renderLinks(c)},_getLinksBin:function(a){if(a){var c=this.links;c[a]=c[a]||[];
return c[a]}else return[]},_sort:function(){var a=this.links;Object.keys(a).forEach(function(c){a[c].sort(l)})},_renderCategories:function(){var a=this.categories,c=this,e=new URL(window.location.href),f=b.matchResourceParameters();f.OrionHome=d.getOrionHome();var i=!1;this.clearMenuItems();a.getCategoryIDs().map(function(c){return a.getCategory(c)}).sort(k).forEach(function(a){var b=c._getLinksBin(a.id);b.length&&(i?c.addMenuItem(a.imageClass,a.id,!1):(b=b.some(function(a){if(!a.source.uriTemplate)return!1;
a=new h(a.source.uriTemplate);a=new URL(a.expand(f),window.location);return a.protocol===e.protocol&&a.host===e.host&&a.hostname===e.hostname&&a.port===e.port&&a.pathname===e.pathname&&a.search===e.search?i=!0:!1}),c.addMenuItem(a.imageClass,a.id,b)))})},_renderLinks:function(a){a=a||[];this._sort();this._renderCategories();var c=this,b=window.location.href;Object.keys(this.menuitems).forEach(function(d){var e=c.getMenuItem(d);if(e){for(var f=c._getLinksBin(d).slice(),f=f.filter(function(c){var d=
c.source;return a.indexOf(d.id)>=0||!d.default&&!d.force&&c.href===b?!1:!0}),f=f.filter(function(a){a=a.source;return!(f.length>1&&a.default&&!a.force)}),i=f.length-1;i>0;i--)f[i].href===f[i-1].href&&f.splice(i,1);if(f.length){e.appendChild(c._createCategoryElement(d,e,f[0]));var g=document.createElement("ul");g.className="sideMenuSubMenu";f.forEach(function(a){var c=document.createElement("li");c.className="sideMenuSubMenuItem";var b=document.createElement("a");b.href=a;b.className="sideMenuSubMenuItemLink";
var d=document.createElement("span");d.innerHTML=a.innerHTML;d.className="sideMenuSubMenuItemSpan";b.appendChild(d);c.appendChild(b);g.appendChild(c)});e.appendChild(g)}}})},_createCategoryElement:function(a,c,b){var a=this.categories.getCategory(a),d;m?(d=document.createElement("button"),d.type="button"):(d=document.createElement("a"),d.href=b.href);d.className+=a.imageClass;d.classList.add("submenu-trigger");d.tabIndex="0";c.classList.remove(a.imageClass);return d},_handleEvent:function(a){var c=
a.target,a=a.type==="focus";if(c.tagName!=="A"||a)c.classList.contains("submenu-trigger")&&(m||a)&&this._expandMenu(f.$(".sideMenuSubMenu",c.parentNode))},_expandMenu:function(a){this.getMenuItems().forEach(function(c){c=f.$(".sideMenuSubMenu",c);a!==c&&c.classList.remove("expanded")});a&&a.classList.toggle("expanded")}});return a});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/EventTarget,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/keyAssist,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/util,orion/customGlobalCommands,orion/fileClient,orion/webui/SideMenu,orion/objects".split(","),function(g,
j,f,d,b,h,e,c,a,i,k,l,m,o,r,n,p,q,t,u,v,x,B,z,H,F,E,s,y,w,C,D,G,A,I){var L,Q,M,N,O,S,P,V;function ea(a,c){if(a.getLabel)return a.getLabel();else{var b=new B;b.resolve(c.properties.name);return b}}function ga(a){m.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function fa(a,c){var b=a.getServiceReferences("orion.core.auth");ba=[];var d=L.apply(this,arguments);if(d)for(var e=
0;e<b.length;e++){var f=b[e],i=a.getService(f);ea(i,f).then(function(a){i.getKey().then(function(c){ba.push(c);i.getUser().then(function(b){d.addUserItem(c,i,a,b)},function(b,e){d.addUserItem(c,i,a,e)});window.addEventListener("storage",function(){aa[c]!==localStorage.getItem(c)&&(aa[c]=localStorage.getItem(c),i.getUser().then(function(b){d.addUserItem(c,i,a,b)},function(){d.addUserItem(c,i,a)}))},!1)})})}}function W(a){return a}function X(c,b,d,f,i){function g(a){for(var c={},b=a.getPropertyKeys(),
d,e=0;e<b.length;e++)d=b[e],c[d]=a.getProperty(d);return c}function k(a,c){var b=null;a.some(function(a){return c===a.getProperty("id")?!!(b=a):!1});return b}function l(a){var c=a.command;if(!c.visibleWhen||c.visibleWhen(b))return a.invocation=new e.CommandInvocation(b,b,null,c,f),(new B).resolve(a);else if(typeof i==="function")return v||(v=i()),B.when(v,function(d){if(d&&b===ca&&(!c.visibleWhen||c.visibleWhen(d)))return a.invocation=new e.CommandInvocation(d,d,null,c,f),a});return(new B).resolve()}
function h(a,c,b){return b?(new B).resolve({relatedLink:a,command:b}):c.then(function(c){return{relatedLink:a,command:new e.Command(c)}})}var j=arguments,m,v,o=c&&c.getServiceReferences("orion.page.link.related");if(o&&o.length!==0){var r=this;B.when(function(){if(m)return m;var a=c.getService("orion.core.contentTypeRegistry");a||(a=new p.ContentTypeRegistry(c),a=c.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return m=a})}(),function(){if(Q.apply(r,j)){var b=
c.getServiceReferences("orion.navigate.command"),e=[];o.forEach(function(d){var i=g(d);if(i.id){var l;if((i.nls&&i.nameKey||i.name)&&i.uriTemplate)l=a._createCommandOptions(i,d,c,m,!0),e.push(h(i,l,null));else if(l=k(b,i.id)){var j=g(l),d={};I.mixin(d,j,i);(i=f.findCommand(i.id))?e.push(h(d,null,i)):(l=a._createCommandOptions(j,l,c,m,!0),e.push(h(d,l,null)))}}});B.all(e,W).then(function(a){a.sort(function(a,c){return a.command.name.localeCompare(c.command.name)});return B.all(a.map(l),W).then(function(c){var b=
[],c=c.filter(function(c,d){if(c)return!0;b.push(a[d]);return!1});M.call(r,f,c,b,d);N.apply(r,j)})})}})}}function ha(a){var c=m.node("globalActions");c&&(a.destroy(c),a.renderCommands(c.id,c,{},{},"tool"))}function Y(a){var c=window.getComputedStyle(a,null);return c===null?a:c.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:Y(a.parentNode)}function Z(a){var c={},b=null;typeof a==="string"&&(a=m.node(a));a||(a=m.node("pageActions"));for(var d=a;d&&d.classList;){if(d.classList.contains("toolComposite")){b=
d;break}d=d.parentNode}if(a.classList.contains("commandMarker"))c.commandNode=a;if(b&&(c.slideContainer=m.$(".slideParameters",b),c.parameterArea=m.$(".parameters",b),c.dismissArea=m.$(".parametersDismiss",b),c.notifications=m.$("#notificationArea",b),b.parentNode&&(c.toolbarTarget=m.$(".toolbarTarget",b.parentNode),c.toolbarTarget)))a=m.bounds(c.toolbarTarget),d=m.bounds(Y(c.toolbarTarget.parentNode)),c.toolbarTargetY=a.top-d.top,c.toolbar=b;return c}function $(a){if(a=a.slideContainer)if(a.style.left=
"",a.style.top="",a.classList.contains("slideContainerActive")){var c=m.bounds(a),b=m.bounds(a.parentNode);a.style.left=(b.width-c.width)/2+"px";a.style.top="0"}}var h=function(a){var c=document.createElement("a");c.href=a;return c.href}(j.toUrl("auth/NotifyAuthentication.html")),aa={},K=null;L=D.createMenuGenerator||function(a,c){if(m.node("userMenu")){var b=m.node("userDropdown"),d=new r.Dropdown({dropdown:b}),b=new z.UserMenu({dropdownNode:b,dropdown:d,serviceRegistry:a}),d=m.node("userTrigger");
new n.Tooltip({node:d,text:g.Options,position:["below","left"]});var d=document.getElementById("userTrigger"),e=d.className;e+=" imageSprite core-sprite-silhouette";d.className=e;b.setKeyAssist(c);return b}};Q=D.beforeGenerateRelatedLinks||function(){return!0};M=D.addRelatedLinkCommands||function(a,c,b,d){this.sideMenu&&this.sideMenu.setRelatedLinks(c,d)};N=D.afterGenerateRelatedLinks||function(){};O=D.afterSetPageTarget||function(){};S=D.generateNavigationMenu||function(){var a=m.node("sideMenu");
if(a){var c=m.node("centralNavigation");new n.Tooltip({node:c,text:g.CentralNavTooltip,position:["right"]});K=this.sideMenu=new A(a,m.node("pageContent"));c.addEventListener("click",K.toggleSideMenu.bind(K));(a=m.node("sideMenuToggle"))&&a.addEventListener("click",K.toggleSideMenu.bind(K))}};P=D.afterGenerateNavigationMenu||function(){};V=D.afterGenerateBanner||function(){};var ba=[],ca,U=[],J,T=null,R=null,da=new b;return{generateBanner:function(a,b,i,k,l,h,r,n){function u(a){a.registerService("orion.cm.managedservice",
{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",c=m.$$array(".targetSelector"),b=0;b<c.length;b++)c[b].target=a}},{pid:"nav.config"})}(new v.ThemePreferences(k,new x.ThemeData)).apply();var A=m.node(a);if(!A)throw g["could not find banner parent, id was "]+a;var p=document.createRange();p.selectNode(A);p=p.createContextualFragment(E);m.processTextNodes(p,g);A.firstChild?A.insertBefore(p,A.firstChild):A.appendChild(p);A=m.node("home");A.href=
j.toUrl("edit/edit.html");A.setAttribute("aria-label",g["Orion Home"]);m.node("progressPane").src=e.NO_IMAGE;if(A=m.node("pageToolbar"))A.classList.add("toolbarLayout"),A.innerHTML=y+f.slideoutHTMLFragment("mainToolbar");(A=m.node("closeNotifications"))&&A.setAttribute("aria-label",g["Close notification"]);if(C.isFirefox<=17&&(A=m.node("staticBanner")))A.style.width="100%",A.style.MozBoxSizing="border-box";if(A=m.node("footer"))A.innerHTML=s,m.processTextNodes(A,g);i.setParameterCollector(new c.CommandParameterCollector(Z,
$));document.addEventListener("keydown",function(a){a.keyCode===m.KEY.ESCAPE&&(a=b.getService("orion.page.message"))&&a.setProgressMessage("")},!1);S.apply(this,arguments);P.apply(this,arguments);A=H.getCategoriesInfo(b);p=H.getPageLinksInfo(b,"orion.page.link");B.all([A,p]).then(function(a){if(K){var c=a[1];K.setCategories(a[0]);K.setPageLinks(c);K.setSideMenu()}});if(A=m.$(".split")){var p=m.$(".sidePanelLayout"),q=m.$(".mainPanelLayout");if(p&&q)T={side:p,main:q},T.splitter=new o.Splitter({node:A,
sidePanel:p,mainPanel:q,toggle:!0,closeByDefault:n}),A=new e.Command({name:g["Toggle side panel"],tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){T.splitter.toggleSidePanel()}}),i.addCommand(A),i.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.KeyBinding("l",C.isMac?!1:!0,!0,!1,C.isMac?!0:!1))}var L=!1,I=function(a,c){if(!L){var b=c.getService("orion.page.progress"),d=new F.OpenResourceDialog({searcher:a,progress:b,searchRenderer:a.defaultRenderer,
onHide:function(){L=!1}});window.setTimeout(function(){L=!0;d.show()},0)}},A=new e.Command({name:g["Find File Named..."],tooltip:g["Choose a file by name and open an editor on it"],id:"orion.openResource",callback:function(){I(l,b)}});i.addCommand(A);i.registerCommandContribution("globalActions","orion.openResource",100,null,!0,new d.KeyBinding("f",!0,!0));A=new e.Command({name:g["Toggle banner and footer"],tooltip:g["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=
m.node("banner"),c=m.node("footer"),b=m.node("sideMenu"),d=m.$(".content-fixedHeight"),e=a.style.visibility==="hidden";e?(a.style.visibility="visible",c.style.visibility="visible",d.classList.remove("content-fixedHeight-maximized"),b&&b.classList.remove("sideMenu-maximized")):(a.style.visibility="hidden",c.style.visibility="hidden",d.classList.add("content-fixedHeight-maximized"),b&&b.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!e});return!0}});i.addCommand(A);
i.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.KeyBinding("m",!0,!0));A=new e.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return j.toUrl("help/about.html")}});i.addCommand(A);i.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.KeyBinding(112,!0,!0));A=new e.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],
id:"orion.backgroundOperations",hrefCallback:function(){return j.toUrl("operations/list.html")}});i.addCommand(A);i.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.KeyBinding("o",!0,!0));R=new t.KeyAssistPanel({commandRegistry:i});A=new e.Command({name:g["Show Keys"],tooltip:g["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){R.isVisible()?R.hide():R.show();return!0}});i.addCommand(A);i.registerCommandContribution("globalActions",
"orion.keyAssist",100,null,!0,new d.KeyBinding(191,!1,!0));ha(i);fa(b,A.callback);ga(b);window.addEventListener("hashchange",function(){i.processURL(window.location.href)},!1);window.setTimeout(function(){u(b)},0);V.apply(this,arguments)},getToolbarElements:Z,getMainSplitter:function(){return T},getKeyAssist:function(){return R},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,setPageTarget:function(a){var c,b,d=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&
a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&(b=d?d+" ":"",b+=a.fileService.fileServiceName(a.target.Location),d=null),c=a.name||a.target.Name,ca=a.target,X.call(this,e,a.target,U,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),c=a.name,X.call(this,e,{NoTarget:""},U,a.commandService,a.makeAlternate));(J=a.title)||(J=c?c+" - "+a.task:a.task);window.document.title=J;O.apply(this,arguments);if(c=a.breadCrumbContainer?m.node(a.breadCrumbContainer):
m.node("location")){m.empty(c);var f=e&&new G.FileClient(e),e=a.breadcrumbTarget||a.target,f=f&&e&&e.Location?f.fileServiceRootURL(e.Location):null;new l.BreadCrumbs({container:c,resource:e,rootSegmentName:d,workspaceRootSegmentName:b,workspaceRootURL:f,makeFinalHref:a.makeBreadcrumFinalLink,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 c=m.node("dirty");if(c)c.textContent=
a?"*":""},setPageCommandExclusions:function(a){U=a},notifyAuthenticationSite:h}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(g){return{detectValidURL:function(j){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,d=f.exec(j),b=[],h=0;d;){if(d.length===3&&d[2].length>0){var e=new URL(d[2]);e.protocol!==":"&&g.validateURLScheme(e.href)&&(d.index>h&&b.push({segmentStr:j.substring(h,d.index)}),b.push({segmentStr:d[1].length>0?d[1]:d[2],urlStr:d[2]}),h=d.index+d[0].length)}d=f.exec(j)}if(h===0)return null;h<j.length-1&&b.push({segmentStr:j.substring(h)});return b},processURLSegments:function(g,
f){f.forEach(function(d){if(d.urlStr){var b=document.createElement("a");b.href=d.urlStr;b.appendChild(document.createTextNode(d.segmentStr))}else b=document.createElement("span"),b.textContent=d.segmentStr;g.appendChild(b)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(g,j,f,d){function b(b,c,a,d,f){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=c;this.notificationContainerDomId=f;this.domId=a;this.progressDomId=d||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var h;b.prototype={_init:function(){var b=j.node("closeNotifications");if(b&&
!this._hookedClose){b.style.cursor="pointer";this._hookedClose=!0;var c=j.node(this.notificationContainerDomId);j.addAutoDismiss([c],function(){this._clickToDisMiss&&this.close()}.bind(this));b.addEventListener("click",function(){this.close()}.bind(this));c.addEventListener("click",function(a){a&&a.target&&a.target.nodeName.toLowerCase()==="a"&&(a=j.$$("a",c))&&a.length&&a.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var b=j.node("closeNotifications");
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):this.setProgressMessage("")},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,c,a){this._init();this.currentMessage=b;var d=j.node(this.domId);
if(typeof a==="boolean"){var f=d.getAttribute("aria-live");d.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){b===this.currentMessage&&(j.empty(d),d.appendChild(document.createTextNode(b)),window.setTimeout(function(){d.setAttribute("aria-live",f)},100))}.bind(this),100)}else j.empty(d),d.appendChild(document.createTextNode(b));typeof c==="number"&&window.setTimeout(function(){b===this.currentMessage&&(j.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),c)},setErrorMessage:function(b){this._clickToDisMiss=
!0;this.currentMessage=b;this._init();var c=b.responseText||b.message||b;if(typeof c==="string")try{c=JSON.parse(c)}catch(a){}var b=c.Message||c,d="red";if(c.Severity)switch(c.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}c=document.createElement("span");c.style.color=d;c.appendChild(document.createTextNode(b));b=j.node(this.domId);j.empty(b);b.appendChild(c)},setProgressMessage:function(b){this._clickToDisMiss=!1;this._init();this.currentMessage=
b;var c=document.createElement("span");c.classList.add("progressIcon");var a=j.node(this.progressDomId);j.empty(a);a.appendChild(c);a.appendChild(document.createTextNode(b));c=j.node(this.notificationContainerDomId);c.classList.remove("notificationHide");if(b&&b.length>0)c.classList.add("progressNormal"),c.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else c.classList.remove("notificationShow"),c.classList.add("notificationHide")},
setCancelFunction:function(b){this._cancelFunc=b},setProgressResult:function(b,c){this._clickToDisMiss=!1;this._cancelMsg=c;this.currentMessage=b;var a=b.responseText||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(f){}this._init();var k=a.Message||a.toString(),l=g.UnknownError,h="core-sprite-information",o="progressNormal",r=document.createElement("span");r.classList.add("imageSprite");r.classList.add("progressIcon");var n=[];if(a.Severity)switch(a.Severity){case "Warning":l=g.UnknownWarning;
h="core-sprite-warning";o="progressWarning";n.push("progressInfo");n.push("progressError");n.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":h="core-sprite-error";o="progressError";n.push("progressWarning");n.push("progressInfo");n.push("progressNormal");this._clickToDisMiss=!0;break;default:o="progressNormal",n.push("progressWarning"),n.push("progressError"),n.push("progressNormal")}n.push("notificationHide");r.classList.add(h);var p=j.node(this.progressDomId),h=j.node(this.notificationContainerDomId);
j.empty(p);p.appendChild(r);k===Object.prototype.toString()&&(k=l);if(a.HTML)a=document.createElement("span"),a.innerHTML=k,p.appendChild(a);else{if(l=d.detectValidURL(k))k=document.createDocumentFragment(),d.processURLSegments(k,l),Array.prototype.forEach.call(j.$$("a",k),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&a.Severity!=="Error"&&!c)this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),
5E3);k=document.createTextNode(k)}p.appendChild(k)}if(o&&this.progressDomId!==this.domId){h.classList.add(o);for(o=0;o<n.length;o++)h.classList.remove(n[o])}h.classList.add("notificationShow");if(n=j.node("closeNotifications"))this._cancelMsg?(n.classList.add("cancelButton"),n.classList.remove("dismissButton"),n.classList.remove("core-sprite-close"),n.classList.remove("imageSprite"),n.innerHTML=this._cancelMsg):(n.innerHTML="",n.classList.remove("cancelButton"),n.classList.add("dismissButton"),n.classList.add("core-sprite-close"),
n.classList.add("imageSprite"))},showWhile:function(b,c){var a=this;if(c){a.setProgressMessage(c);var d=function(){c===a.currentMessage&&a.setProgressMessage("")};b.then(d,d)}return b},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,c){return new h(this,++this._lastProgressId,b,c)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",c=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(c||(b+=", "),b+=this._progressMonitors[a].status,
c=!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()}};b.prototype.constructor=
b;h=function(b,c,a,d){this.statusService=b;this.progressId=c;if(a){this.deferred=a;this.begin(d);var f=this;a.then(function(){f.done.bind(f)()},function(){f.done.bind(f)()})}};h.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};h.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};h.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};h.prototype.constructor=h;return{StatusReportingService:b,
ProgressMonitor:h}});
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(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,j,f,d){function b(){}b.prototype={_initialize:function(b,e,c,a,i){this._tooltip=new d.Tooltip({node:b,hideDelay:i||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:c,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";b=document.createRange();b.selectNode(this.$parent);b=b.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(b,g);this.$parent.appendChild(b);var k=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&k.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(b){for(var d=0;d<b.childNodes.length;d++){var c=b.childNodes[d];c.id&&(this["$"+c.id]=c);this._bindElements(c)}},_afterShowingFunction:function(b){return function(){b&&b.bind(this)();if(!this.customFocus){var d=
f.firstTabbable(this.$parent);d&&d.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};b.prototype.constructor=b;return{PopupDialog:b}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,j,f,d){var b={};(function(){var h=!1;b.updateNavTools=function(b,c,a,d,k,l){var j=f.node(d);if(j)c.destroy(j);else throw g["could not find toolbar "]+d;c.renderCommands(d,j,l,a,"button");if(k&&(d=f.node(k)))c.destroy(d),c.renderCommands(k,d,null,a,"button");h||(h=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",function(b){var d=f.node(k);
d&&(c.destroy(d),c.renderCommands(k,d,b.selections,a,"button"))}))};b.createOperationsCommands=function(b,c,a){function f(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var k=new d.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){c.loadOperations.bind(c)()})},visibleWhen:function(){return!0}});b.addCommand(k);
k=new d.Command({name:g.Remove,tooltip:g["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],d=0;d<b.length;d++){var e=b[d];a.removeOperation.bind(a)(e.Location).then(function(){c.loadOperations.bind(c)()},function(){c.loadOperations.bind(c)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!f(a);for(var c in a)if(f(a[c]))return!1;return!0}});b.addCommand(k);
k=new d.Command({name:g.Cancel,tooltip:g["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],c=0;c<a.length;c++){var b=a[c];b.deferred&&b.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return f(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var c in a)if(!f(a[c])||!a[c].operation||!a[c].operation.cancelable)return!1;return!0}});b.addCommand(k)}})();
return b});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,j,f,d,b){function h(b){this._options=b}h.prototype=new d.PopupDialog;h.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>';h.prototype._init=
function(d){this._myOperations=[];this._operationsDeferreds=[];this._commandService=d.commandRegistry;b.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(d.triggerNode)};h.prototype._bindToDom=function(){this.$allOperationsLink.href=j.toUrl("operations/list.html");this._setOperationsVisibility()};h.prototype.setOperations=function(b,c){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(b)for(var a in b)this._myOperations.push(b[a]),this._operationsDeferreds.push(c[a]);this._renderOperations()};h.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}var a={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==a.Message)a.DetailedMessage=b.DetailedMessage;return a};h.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};h.prototype._renderOperationsTable=function(b,c,a){f.empty(b);for(var d=0;d<c.length;d++){var k=c[d],l=document.createElement("tr"),h=document.createElement("td");h.style.paddingLeft="5px";h.style.paddingRight="5px";h.textContent=k.Name;l.appendChild(h);var j=document.createElement("div");h.appendChild(j);h=document.createElement("span");h.style.paddingRight="5px";h.classList.add("imageSprite");switch(k.type){case "Warning":h.classList.add("core-sprite-warning");h.setAttribute("aria-label",
g["Operation resulted in a warning."]);break;case "error":h.classList.add("core-sprite-error");h.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":h.classList.add("core-sprite-start");h.setAttribute("aria-label",g["Operation is running."]);break;case "abort":h.classList.add("core-sprite-stop");h.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":h.classList.add("core-sprite-ok"),h.setAttribute("aria-label","Operation ok.")}j.appendChild(h);
h=document.createElement("span");h.classList.add("operationStatus");h.textContent=k.Name;j.appendChild(h);if(k.error){var r=k.error.Message||k.error;k.error.DetailedMessage&&k.error.DetailedMessage!==""&&(r+=": "+k.error.DetailedMessage);h.textContent=r;h.classList.remove("operationStatus");h.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",j,{operation:k,deferred:a[d]},this,"tool");b.appendChild(l)}this._setOperationsVisibility()};h.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"};h.prototype.constructor=h;return{OperationsDialog:h}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,j,f,d,b){function h(c,a){if(!this._progressPane){this._progressPane=d.node(c);this._operationsDialog=new b.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var e=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===d.KEY.ENTER)&&e._operationsDialog.show()})}}function e(c,a,b,d){this._serviceRegistry=
c;this._serviceRegistration=c.registerService("orion.page.progress",this);this._commandRegistry=b;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}h.prototype={_switchIconTo:function(c){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=c;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(c,a){var b=
{},d;for(d in c)c[d].progressMonitor||(b[d]=c[d]);if(this._isEmpty(b))this._switchIconTo("progressPane_empty"),this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in b){var f=b[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=g["Operations running"];this._progressPane.alt=g["Operations running"];
this._progressPane.setAttribute("aria-valuetext",g["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=g["Some operations finished with warning"];this._progressPane.alt=g["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=g["Some operations finished with error"];this._progressPane.alt=
g["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(b,a)},_isEmpty:function(c){for(var a in c)return!1;return!0}};
h.prototype.constructon=h;e.prototype={init:function(c){if(!this._progressMonitorClass)this._progressMonitorTool=new h(c,this._commandRegistry)},progress:function(c,a,b){var d=this,e=this._operationsIndex++;!b&&this._progressMonitorClass&&(b=new this._progressMonitorClass,b.begin(a));c.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(b)f.progressMonitor=b;d.writeOperation.bind(d)(e,f,c);f.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(f){if(d._operations[e]){var g=d._operations[e];if(a)g.Name=a;if(b)g.progressMonitor=b;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,c);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(b)f.progressMonitor=b;d.writeOperation.bind(d)(e,f,c)});return c},removeOperation:function(c){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===c){this._removeOperationFromTheList(a);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(c)},_removeOperationFromTheList:function(c){var a=this._operations[c].progressMonitor;delete this._operations[c];delete this._operationDeferrds[c];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var c in this._operations){var a=this._operations[c];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[c].progressMonitor)&&
a.done(),delete this._operations[c],delete this._operationDeferrds[c]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(c){this._serviceRegistry.getService("orion.page.message").setProgressResult(c)},showWhile:function(c,a,b){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var d=this;c.then(function(){d._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){b?d._serviceRegistry.getService("orion.page.message").setProgressMessage(""):
d.setProgressResult.bind(d)(a);return a});return this.progress(c,a)},writeOperation:function(c,a,b){this._operations[c]=a;this._operationDeferrds[c]=b;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(c){c.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/profile/usersClient",[],function(){function g(g){this.serviceRegistry=g}g.prototype={getUserInfo:function(g,f){return this._doServiceCall("getUserInfo",arguments)},getUsersListSubset:function(g,f,d){return this._doServiceCall("getUsersListSubset",arguments)},getUsersList:function(g){return this._doServiceCall("getUsersList",arguments)},deleteUser:function(g,f){return this._doServiceCall("deleteUser",arguments)},createUser:function(g,f,d){return this._doServiceCall("createUser",arguments)},
updateUserInfo:function(g,f,d){return this._doServiceCall("updateUserInfo",arguments)},resetUserPassword:function(g,f,d){return this._doServiceCall("resetUserPassword",arguments)},initProfile:function(g,f,d){return this._doServiceCall("initProfile",arguments)},fire:function(g,f,d){return this._doServiceCall("fire",arguments)},getDivContent:function(){return this._doServiceCall("getDivContent",arguments)},_doServiceCall:function(g,f){var d=this.serviceRegistry.getService("orion.core.user");return d[g].apply(d,
f)}};g.prototype.constructor=g;return{UsersClient:g}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,j){function f(b,c,a){return b[c].apply(b,a)}function d(b){this._location=b}function b(){var b=new j;b.reject(g["No Matching OperationService for location:"]+this._location);return b}function h(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var c=b.getServiceReferences("orion.core.operation"),
a=0;a<c.length;a++){var f=b.getService(c[a]);this._services[a]=f;f=c[a].getProperty("pattern")||".*";f[0]!=="^"&&(f="^"+f);this._patterns[a]=RegExp(f)}this._getService=function(a){if(!a)return this._services[0];for(var c=0;c<this._patterns.length;++c)if(this._patterns[c].test(a))return this._services[c];this._operations.remove(a);return new d(a)}}d.prototype={getOperation:b,getOperations:b,removeCompletedOperations:b,removeOperation:b,cancelOperation:b};d.prototype.constructor=d;h.prototype={getOperations:function(){var b=
new j;if(this._operations)return b.resolve(this._operations),b;var c=this;this._preferenceService.getPreferences("/operations").then(function(a){c._operations=a;b.resolve(c._operations)});return b},getOperation:function(b){return f(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],c=this,a=0;a<this._services.length;a++){var d=this._patterns[a],g=new j;b[a]=g.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(b){Array.isArray(b)&&
c.getOperations.bind(c)().then(function(c){for(var e=c.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&b.indexOf(g)<0&&c.remove(g)}a.resolve()})}}(g),function(a){return function(b){a.reject(b)}}(g))}return j.all(b)},removeOperation:function(b){var c=this;return f(this._getService(b),"removeOperation",arguments).then(function(){c.getOperations.bind(c)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};h.prototype.constructor=h;return{OperationsClient:h}});
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",Next:"Next",Previous:"Previous",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","${0} is already saved":"${0} is already saved","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 the Search page for this folder.","${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(g,j){var f={root:j};Object.keys(g).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=g[d])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,j){function f(d){this._init(d)}f.prototype={_init:function(d){var b=d.parent,f=this,b=j.node(b);if(!b)throw g["no parent"];if(!d.model)throw g["no tree model"];if(!d.renderer)throw g["no renderer"];this._parent=b;this._treeModel=d.model;this._onComplete=d.onComplete;this._renderer=d.renderer;this._showRoot=d.showRoot===void 0?!1:d.showRoot;this._indent=d.indent===void 0?16:d.indent;this._onCollapse=d.onCollapse;
this._labelColumnIndex=d.labelColumnIndex===void 0?0:d.labelColumnIndex;this._id=d.id===void 0?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){f._showRoot?(b._depth=0,f._generate([b],0)):f._treeModel.getChildren(b,function(b){f.destroyed||f._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(d,
b){j.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var e=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(e);e.id=this._id;this._tableStyle&&e.classList.add(this._tableStyle);this._renderer.initTable(e,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";d.length===0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(d,b);e.appendChild(this._bodyElement);f.appendChild(e);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(d,b,f){for(var e=0;e<d.length;e++){var c=document.createElement(this._tableRowElement);c.id=this._treeModel.getId(d[e]);c._depth=b;c._item=d[e];this._renderer.render(d[e],c);c.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*b+"px";this._renderer.rowCallback&&this._renderer.rowCallback(c,d[e]);f?(this._bodyElement.insertBefore(c,f.nextSibling),f&&(f=c)):this._bodyElement.appendChild(c)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,b,f){var e=this._treeModel.getId(d),c;if(e===this._id)this._removeChildRows(e),this._generateChildren(b,0),this._rowsChanged();else{var a=j.node(e);a?(a._item=d,
a&&(f||a._expanded)?(this._removeChildRows(e),b?(a._expanded=!0,this._renderer.updateExpandVisuals(a,!0),this._generateChildren(b,a._depth+1,a),this._rowsChanged()):(c=this,this._renderer.updateExpandVisuals(a,"progress"),b=this._treeModel.getChildren(a._item,function(b){if(!c.destroyed&&(c._renderer.updateExpandVisuals(a,!0),!a._expanded))a._expanded=!0,c._generateChildren(b,a._depth+1,a),c._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(g["could not find table row "]+e)}},
getItem:function(d){var b=j.node(d);return b&&b._item?b._item:d},toggle:function(d){var b=j.node(d);b&&(b._expanded?this.collapse(d):this.expand(d))},isExpanded:function(d){d=typeof d==="string"?d:this._treeModel.getId(d);return(d=j.node(d))?d._expanded:!1},expand:function(d,b,f){var d=typeof d==="string"?d:this._treeModel.getId(d),e=j.node(d);if(e)if(e._expanded)b&&b.apply(c,f);else{var c=this;this._renderer.updateExpandVisuals(e,"progress");this._treeModel.getChildren(e._item,function(a){if(!c.destroyed){c._renderer.updateExpandVisuals(e,
!0);if(!e._expanded)e._expanded=!0,c._generateChildren(a,e._depth+1,e),c._rowsChanged();b&&b.apply(c,f)}})}},_removeChildRows:function(d){for(var b=d===this._id,f=!1,e=-1,c=[],a=j.$$array(".treeTableRow",this._parent),i=0;i<a.length;i++){var g=a[i];if(f)break;if(b)g._depth>e?c.push(g):f=!0;else if(g.id===d)b=!0,e=g._depth}for(d=0;d<c.length;d++)b=c[d],b.parentNode.removeChild(b)},collapse:function(d){var d=typeof d==="string"?d:this._treeModel.getId(d),b=j.node(d);if(b){if(!b._expanded)return;b._expanded=
!1;this._renderer.updateExpandVisuals(b,!1);this._removeChildRows(d);this._rowsChanged()}this._onCollapse&&this._onCollapse(b._item)},getIndent:function(){return this._indent}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/treeModelIterator",[],function(){var g={};g.TreeModelIterator=function(){function g(f,d){this.firstLevelChildren=f;this.reset();this._init(d)}g.prototype={_init:function(f){if(f)this.isExpanded=f.isExpanded,this.isExpandable=f.isExpandable,this.forceExpandFunc=f.forceExpandFunc,this.getChildrenFunc=f.getChildrenFunc},topLevel:function(f){return f.parent?f.parent===this.root:!0},_getChildren:function(f){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(f):f?f.children:
null},_expanded:function(f){if(!f)return!0;var d=this._getChildren(f),d=d&&d.length>0;this.isExpanded&&d&&(d=this.isExpanded(f));return d},_expandable:function(f){return!f?!0:this.isExpandable?this.isExpandable(f):!1},_diveIn:function(f){return this._expanded(f)?(this.setCursor(this._getChildren(f)[0]),this.cursor()):null},_drillToLast:function(f){return this._expanded(f)?(f=this._getChildren(f),this._drillToLast(f[f.length-1])):f},_forward:function(f){if(!this._cursor)return null;var d=this._diveIn(this._cursor);
if(!d){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var b=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&b.setCursor(d)})}(d=this._findSibling(this._cursor,!0))&&this.setCursor(d)}return d},_backward:function(f){if(!this._cursor)return null;var d=this._findSibling(this._cursor,!1);d&&d!==this._cursor.parent&&(d=this._drillToLast(d));if(f&&d&&this._expandable(d)&&this.forceExpandFunc&&d!==this._cursor.parent){var b=this;return this.forceExpandFunc(d,"last",function(d){d&&
b.setCursor(d)})}d&&this.setCursor(d);return d},_findSibling:function(f,d){for(var b=this.topLevel(f),g=this._getChildren(f.parent),g=b?this.firstLevelChildren:g,e=0;e<g.length;e++)if(g[e]===f)return e===0&&!d?b?null:f.parent:e===g.length-1&&d?b?null:this._findSibling(f.parent,d):d?g[e+1]:g[e-1];return null},_inParentChain:function(f,d){for(var b=f.parent;b;){if(b===d)return!0;b=b.parent}return!1},_getTopLevelParent:function(f){if(this.topLevel(f))return f;for(f=f.parent;f;){if(this.topLevel(f))return f;
f=f.parent}return null},_onCollapse:function(f){return this._expanded(f.parent)?f:this._onCollapse(f.parent)},_scan:function(f,d,b){this.setCursor(d);var g=[];for(g.push(d);;){if(this.iterate(f))g.push(this.cursor());else break;if(b===this.cursor())return g}return null},setCursor:function(f){this._prevCursor=this._cursor;this._cursor=f},setTree:function(f){this.firstLevelChildren=f;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(f,d){var b=this.cursor(),
g=this._scan(!0,f,d);g||(g=this._scan(!1,f,d));this.setCursor(b);return g},iterate:function(f,d){return f?this._forward(d):this._backward(d)},iterateOnTop:function(f,d){var b=this._findSibling(this._getTopLevelParent(this.cursor()),f);b?this.setCursor(b):d&&this.firstLevelChildren.length>0&&this.setCursor(f?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(f){if(!this._cursor)return null;return this._inParentChain(this._cursor,f)?(this.setCursor(f),
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 g}();return g});
define("orion/explorers/explorerNavHandler",["orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(g,j,f){var d={},b=navigator.userAgent.indexOf("iPad")!==-1,h=window.navigator.platform.indexOf("Mac")!==-1;d.ExplorerNavHandler=function(){function d(b,a,e){this.explorer=b;this.model=this.explorer.model;this._navDict=a;this._listeners=[];this._selections=[];this._currentColumn=0;b=this._getEventListeningDiv();b.tabIndex=0;b.classList.add("selectionModelContainer");var k=this;this._modelIterator=
new j.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:e.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return k.explorer.renderer.isExpandable(a)}:function(a){return k.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return k.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(e);(!e||e.setFocus!==!1)&&b.focus();e=function(a){if(f.isFormElement(a.target))return!0;if(k.explorer.preventDefaultFunc&&k.explorer.preventDefaultFunc(a,
k._modelIterator.cursor()))return!0;if(a.keyCode===g.KEY.DOWN)return k.onDownArrow(a);else if(a.keyCode===g.KEY.UP)return k.onUpArrow(a);else if(a.keyCode===g.KEY.RIGHT)return k.onRightArrow(a);else if(a.keyCode===g.KEY.LEFT)return k.onLeftArrow(a);else if(a.keyCode===g.KEY.SPACE)return k.onSpace(a);else if(a.keyCode===g.KEY.ENTER)return k.onEnter(a)};b.addEventListener("keydown",e,!1);this._listeners.push({type:"keydown",listener:e});e=function(){if(k.explorer.onFocus)k.explorer.onFocus(!1);else k.toggleCursor(null,
!1)};b.addEventListener("blur",e,!1);this._listeners.push({type:"blur",listener:e});e=function(){if(k.explorer.onFocus)k.explorer.onFocus(!0);else k.toggleCursor(null,!0)};b.addEventListener("focus",e,!1);this._listeners.push({type:"focus",listener:e});this._parentDiv=b}d.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(b){this._linearGridMove=!1;if(b)this._selectionPolicy=b.selectionPolicy,this.gridClickSelectionPolicy=
b.gridClickSelectionPolicy||"none",this.preventDefaultFunc=b.preventDefaultFunc,this.postDefaultFunc=b.postDefaultFunc},_ctrlKeyOn:function(b){return h?b.metaKey:b.ctrlKey},removeListeners:function(){if(this._listeners)for(var b=0;b<this._listeners.length;b++)this._parentDiv.removeEventListener(this._listeners[b].type,this._listeners[b].listener,!1)},focus:function(){var b=this._getEventListeningDiv();b&&b.focus()},_getEventListeningDiv:function(b){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv===
"function"?this.explorer.keyEventListeningDiv(b):g.node(this.explorer._parentId)},isExpandable:function(b){return!b?!1:g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)))?!0:!1},isExpanded:function(b){return!b?!1:this.explorer.myTree.isExpanded(this.model.getId(b))},refreshSelection:function(b,a){var d=this;this.explorer.selection&&this.explorer.selection.getSelections(function(e){d._clearSelection(a);for(var f=0;f<e.length;f++)d._selections.push(e[f]);d._selections.length>0?
d.cursorOn(d._selections[0],!0,!1,b):d.cursorOn(null,!1,!1,b);if(!(d._shiftSelectionAnchor&&d._inSelection(d._shiftSelectionAnchor)>=0))d._shiftSelectionAnchor=null})},refreshModel:function(b,a,d,e){this._currentColumn=0;this.topIterationNodes=[];this.model=a;this._navDict=b;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(d)this.topIterationNodes=d;this._modelIterator.setTree(this.topIterationNodes);!e&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),
!1),this._modelIterator.reset());this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(b){for(var b=this.model.getId(b),a=0;a<this._selections.length;a++)if(b===this.model.getId(this._selections[a]))return a;return-1},_clearSelection:function(b){if(b)for(b=0;b<this._selections.length;b++)this._checkRow(this._selections[b],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(b){if(this._selectionPolicy!==
b)this._selectionPolicy=b,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(b,a,d){if(this._selectionPolicy==="cursorOnly")a&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0);else if(this._isRowSelectable(b)){!a||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b):(a=this._inSelection(b),a>=0?(this._checkRow(b,!0),this._selections.splice(a,1)):(this._checkRow(b,
!1),this._selections.push(b),this._lastSelection=b));if(d)this._shiftSelectionAnchor=this._lastSelection;this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(b,a){b||(b=this.currentModel());var d=this._getGridChildren(b);if(d&&d.length>1||a===0&&d){a!==0&&this.toggleCursor(b,!1);var e=this._currentColumn,f=!0;e+=a;e<0?(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!1)?b=this.currentModel():f=!1),
e=f?d.length-1:this._currentColumn):e>=d.length&&(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!0)?b=this.currentModel():f=!1),e=f?0:this._currentColumn);this._currentColumn=e;a!==0&&this.toggleCursor(b,!0);return!0}return!1},_getGridChildren:function(b){return this._navDict?this._navDict.getGridNavHolder(b):null},getCurrentGrid:function(b){b||(b=this.currentModel());return(b=this._getGridChildren(b))&&b.length>0?b[this._currentColumn]:null},getAriaContainerElement:function(b){for(var a=
this._parentDiv,d;b&&b!==a&&(d=b.getAttribute("role"))!=="grid"&&d!=="tree"&&d!=="treegrid";)b=b.parentNode;return b===a?null:b},toggleCursor:function(b,a){var d=this.getRowDiv(b),e=this.getCurrentGrid(b);e?(d&&(a?d.classList.add("treeIterationCursorRow"):d.classList.remove("treeIterationCursorRow")),e.domNode&&(d=this.getAriaContainerElement(e.domNode),a?(e.domNode.classList.add("treeIterationCursor"),d&&d.setAttribute("aria-activedescendant",e.domNode.id)):e.domNode.classList.remove("treeIterationCursor"))):
d&&(a?d.classList.add("treeIterationCursorRow_Dotted"):d.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(b,a,d,e){var f,g;if(b||a){if(g===this._modelIterator.cursor())return;f=this._modelIterator.cursor();g=b;this._modelIterator.setCursor(g)}else f=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();if(f!==g||a)if(this.toggleCursor(f,!1),!a||g){this.moveColumn(null,0);this.toggleCursor(g,!0);if((b=this.getRowDiv())&&
!e){e=b.parentNode;for(a=document.documentElement;e&&e!==a;){var h=window.getComputedStyle(e,null);if(!h)break;h=h.getPropertyValue("overflow-y");if(h==="auto"||h==="scroll")break;e=e.parentNode}e&&(a=!0,b.offsetTop<=e.scrollTop?(a=!1,d===void 0&&(d=!1)):b.offsetTop+b.offsetHeight>=e.scrollTop+e.clientHeight&&(a=!1,d===void 0&&(d=!0)),a||b.scrollIntoView(!d))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(f,g)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=
[],a=0;a<this._selections.length;a++)b.push(this.model.getId(this._selections[a]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;var b=this.model.getId(b),a=this._navDict.getValue(b);return a&&a.rowDomNode?a.rowDomNode:g.node(b)},iterate:function(b,a,d,e){var f=null;if(this.topIterationNodes&&this.topIterationNodes.length!==0)if(e){e=this.currentModel();for((f=this._modelIterator.iterate(b,a))&&this._setCursorOnItem(b,d);f&&f.isNotSelectable;)(f=this._modelIterator.iterate(b,
a))&&this._setCursorOnItem(b,d);f||(this.cursorOn(e,!0,!1,!0),this._setCursorOnItem(b,d))}else(f=this._modelIterator.iterate(b,a))&&this._setCursorOnItem(b,d)},_setCursorOnItem:function(b,a){this.cursorOn(null,!1,b);if(a){var d=this._inSelection(this._modelIterator.prevCursor()),e=this._inSelection(this._modelIterator.cursor());d>=0&&e>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(b,a){if(this.explorer.renderer._useCheckboxSelection&&
this._selectionPolicy!=="singleSelection"){var d=this.getRowDiv(b);if(d){var e=g.node(this.explorer.renderer.getCheckBoxId(d.id)),f=a?!e.checked:!0;if(f!==e.checked)this.explorer.renderer.onCheck(d,e,f,!0)}}else this._select(b,a)},_select:function(b){b||(b=this._modelIterator.cursor());var a=this.getRowDiv(b);a&&(this._inSelection(b)<0?a.classList.add("checkedRow"):a.classList.remove("checkedRow"))},_onModelGrid:function(b,a){var d=this._getGridChildren(b);if(d)for(var e=0;e<d.length;e++)if(a.target===
d[e].domNode)return!0;return!1},onClick:function(c,a){if(this.isDisabled(this.getRowDiv(c)))g.stop(a);else{var d=g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));if(a.target!==d&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(c,a)))if(this.cursorOn(c,!0,!1,!0),b)this.setSelection(c,!0);else if(this._ctrlKeyOn(a))this.setSelection(c,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(d=this._modelIterator.scan(this._shiftSelectionAnchor,c)){this._clearSelection(!0);
for(var e=0;e<d.length;e++)this.setSelection(d[e],!0)}}else this.setSelection(c,!1,!0)}},onCollapse:function(b){this._modelIterator.collapse(b)&&this.cursorOn()},onUpArrow:function(b){this.iterate(!1,!1,b.shiftKey,!0);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey,!0);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},_shouldMoveColumn:function(b){var a=
this.currentModel(),d=this._getGridChildren(a);return d&&d.length>1?this.isExpandable(a)?this._ctrlKeyOn(b):!0:!1},onLeftArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,-1),b.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&this.isExpanded(a))return this.explorer.myTree.collapse(a),b.preventDefault(),!0;this._modelIterator.topLevel(a)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(a.parent),
this.setSelection(a.parent,!1,!0))},onRightArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,1),b.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&!this.isExpanded(a))return this.explorer.myTree.expand(a),this.explorer.postUserExpand&&this.explorer.postUserExpand(this.model.getId(a)),b.preventDefault(),!1},_isRowSelectable:function(b){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(b):!0},onSpace:function(b){this.setSelection(this.currentModel(),
!0,!0);b.preventDefault()},onEnter:function(b){var a=this.getCurrentGrid(this._modelIterator.cursor());if(a)if(a.widget)if(typeof a.onClick==="function")a.onClick();else typeof a.widget.focus==="function"&&a.widget.focus();else{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(b),!1,!1,!1,0,null);a.domNode.dispatchEvent(d)}else if(a=this._modelIterator.cursor()){if(this.explorer.renderer.getRowActionElement&&(d=this.explorer.renderer.getRowActionElement(this.model.getId(a)),
d.href))this._ctrlKeyOn(b)?window.open(d.href):window.location.href=d.href;if(this.explorer.renderer.performRowAction)return this.explorer.renderer.performRowAction(b,a),b.preventDefault(),!1}},setIsNotSelectable:function(b,a){b.isNotSelectable=a},disableItem:function(b){var a=this.getRowDiv(b);this.isExpandable(b)&&this.isExpanded(b)&&(this._modelIterator.collapse(b),this.explorer.myTree.toggle(a.id));a.classList.remove("checkedRow");a.classList.add("disabledNavRow");this.setIsNotSelectable(b,!0)},
isDisabled:function(b){return b.classList.contains("disabledNavRow")},enableItem:function(b){var a=this.getRowDiv(b);a&&(a.classList.remove("disabledNavRow"),this.setIsNotSelectable(b,!1))}};return d}();d.ExplorerNavDict=function(){function b(c){this._dict={};this._model=c}b.prototype={addRow:function(b,a){this._dict[this._model.getId(b)]={model:b,rowDomNode:a}},getValue:function(b){return this._dict[b]},getGridNavHolder:function(b,a){if(!b)return null;var d=this._model.getId(b);if(this._dict[d]){if(!this._dict[d].gridChildren&&
a)this._dict[d].gridChildren=[];return this._dict[d].gridChildren}return null},initGridNavHolder:function(b){if(!b)return null;b=this._model.getId(b);if(this._dict[b])this._dict[b].gridChildren=null}};return b}();return d});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(g,j,f,d,b,h){var e={};e.Explorer=function(){function c(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;if(this.renderer)this.renderer.explorer=this;this.myTree=null}c.prototype={destroy:function(){this._navHandler&&this._navHandler.destroy();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,d){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),d=document.createElement("span"),d.id=b+"placeHolderRow",a.appendChild(d),{tempNode:d,refNode:d};if(a){var e=document.createElement("tr");
e.id=b+"placeHolderRow";c=document.createElement("td");c.id=b+"placeHolderCol";e.appendChild(c);d?(a.parentNode.insertBefore(e,a.nextSibling),a=parseInt(a.firstChild.style.paddingLeft),c.style.paddingLeft=this.myTree.getIndent()+a+"px"):a.appendChild(e);d=f.node(b+"placeHolderRow");a=f.node(b+"placeHolderCol");if(d&&a)return{tempNode:d,refNode:a}}return null},getRow:function(a){if(a=this.model.getId(a))return f.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 c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,c,e){a=typeof a==="string"?a:a.id||a;this.selection&&
this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",h=f.node(g);h&&f.empty(h);if(c)c.rootId=g;this.model=c;this._parentId=a;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new b.ExplorerNavDict(this.model);this.myTree=new d.TableTree({id:g,model:c,parent:a,onComplete:e?e.onComplete:void 0,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:e?!!e.showRoot:
!1,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,navHandlerFactory:e?e.navHandlerFactory:void 0,tableElement:e?e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.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(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.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 b.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var c=this;this.model.getRoot(function(b){b instanceof Array?c.getNavHandler().refreshModel(c.getNavDict(),c.model,b):b.children&&b.children instanceof Array&&c.getNavHandler().refreshModel(c.getNavDict(),c.model,b.children);a&&a.setFocus&&c.getNavHandler().cursorOn(null,!1,!1,!0)})}},
_lastHash:null,checkbox:!1};return c}();e.createExplorerCommands=function(b,a){function d(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var e=new h.Command({tooltip:g["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return d(a)},callback:function(a){a.items.expandAll()}}),f=new h.Command({tooltip:g["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",
groupId:"orion.explorerGroup",visibleWhen:function(a){return d(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(e);b.addCommand(f)};e.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}b.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 b}();e.ExplorerFlatModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.root=d}b.prototype=new e.ExplorerModel;b.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)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();e.ExplorerRenderer=function(){function b(a,c){this.explorer=c;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite"}b.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;this.tableNode=
a;f.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&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 f},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;if(this.getCheckedFunc)d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(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,d);this.explorer.getNavHandler()&&e&&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 d=[],c=0;c<
a.length;c++){var e=b.getValue(a[c]);if(e&&e.rowDomNode&&e.model&&(d.push(e.model),this._highlightSelection&&e.rowDomNode.classList.add("checkedRow"),e=f.node(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,e.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(d),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 d;if(c)for(d=0;d<c.length;d++)if(f.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._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=f.node(this.expandCollapseImageId(a.id));c&&(c.classList.remove(this._expandImageClass),c.classList.remove(this._collapseImageClass),c.classList.remove(this._progressImageClass),c.classList.add(b==="progress"?this._progressImageClass:b?this._expandImageClass:this._collapseImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);
e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=this;e.onclick=function(){if(!g.explorer.getNavHandler().isDisabled(a)){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id),g.explorer.postUserExpand&&g.explorer.postUserExpand(a.id);else for(var b in g._expanded)if(g._expanded[b]===a.id){g._expanded.splice(b,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&
g._storeExpansions(b)}};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler());(f.$(".sectionTreeTable",this.tableNode.parentNode)||f.$(".treetable",this.tableNode.parentNode))&&f.$$array(".treeTableRow",this.tableNode).forEach(function(a,b){var c=!(b%2)?"darkSectionTreeTableRow":"lightSectionTreeTableRow",d=c==="darkSectionTreeTableRow"?"lightSectionTreeTableRow":
"darkSectionTreeTableRow";a.classList.add(c);a.classList.remove(d)})},updateCommands:function(){if(this.commandService)for(var a=f.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=f.node(c.id+"actionswrapper");this.commandService.destroy(d);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,d,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};
return b}();e.SelectionRenderer=function(){function b(a,c){this._init(a);this.explorer=c}b.prototype=new e.ExplorerRenderer;b.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 d=0,e=this.getCellHeaderElement(d);e;)e.innerHTML.length>0&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);
d>0&&a.appendChild(b)};b.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=this.explorer.getNavDict();if(c){c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),c===0?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle(a)):
e.classList.add("navColumn"):this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();e.SimpleFlatModel=function(){function b(a,c,d){this.items=a;this.getKey=d;this.idPrefix=c;this.root={children:a}}b.prototype=new e.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.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};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return e});
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(g,j,f,d,b,h,e,c){function a(a){switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":return!0}return!1}function i(c,d,f,g,i,k,t,u,v){var d=h.clone(d),x;if(d.Directory)x=document.createElement("a"),
x.className="navlinkonpage",x.href=!c?l:(new e(c+"#{,resource,params*}")).expand({resource:d.ChildrenLocation}),d.Name&&x.appendChild(document.createTextNode(d.Name));else{i||(i=b.getOpenWithCommands(f));x=document.createElement("a");x.className="navlink targetSelector";k&&typeof k==="object"&&Object.keys(k).forEach(function(a){x[a]=k[a]});var B=null,z=null;if(B=u?u.holderDom:x)z=document.createElement("span"),z.className="core-sprite-file modelDecorationSprite thumbnail",B.appendChild(z);d.Name&&
x.appendChild(document.createTextNode(d.Name));var H=d.Location;if(t&&typeof t==="object")d.params={},h.mixin(d.params,t);(c=b.getOpenWithCommand(f,d,i))&&(H=c.hrefCallback({items:d}));j.when(g.getFileContentType(d),function(b){if(B){var c=B,e=z;if(b){var f,g=b.imageClass,i=b.image;if(g)f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail");else if(i)f=document.createElement("img"),f.src=i,f.classList.add("thumbnail");f&&c.replaceChild(f,e)}}x.href=H;v&&typeof v.updateFileNode===
"function"&&v.updateFileNode(d,x,a(b))})}return x}function k(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 l=new e("#{,resource,params*}");k.prototype=new f.SelectionRenderer;k.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};k.prototype.tableCallback=function(a){a.setAttribute("aria-label",g.Navigator);a.setAttribute("role","presentation")};k.prototype.rowCallback=
function(a){a.setAttribute("role","treeitem")};k.prototype.emptyCallback=function(a){var b=document.createElement("tr"),d=document.createElement("td");d.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=g.NoFile;var f=document.createElement("span");f.appendChild(document.createTextNode(g.File));c.processDOMNodes(e,[f]);d.appendChild(e);b.appendChild(d);a.appendChild(b)};k.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"}};k.prototype.setTarget=function(a){this.target=a};k.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};k.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=i(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};k.prototype.updateFileNode=function(){};k.prototype.showFolderLinks=!0;k.prototype.getCellElement=function(a,c,e){switch(a){case 0:var a=document.createElement("td"),f=document.createElement("span");f.id=e.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var g;if(c.Directory)this.getExpandImage(e,f),g=this.createFolderNode(c),f.appendChild(g),this.explorer._makeDropTarget(c,
g),this.explorer._makeDropTarget(c,e);else{if(!this.openWithCommands)this.openWithCommands=b.getOpenWithCommands(this.commandService);g=i("",c,this.commandService,this.contentTypeService,this.openWithCommands,{target:this.target},null,null,this);f.appendChild(g)}if(g)g.id=e.id+"NameLink",g.nodeType===1&&(d.addNavGrid(this.explorer.getNavDict(),c,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,c,this.explorer,
"tool",null,!0);return a;case 1:if(this.oneColumn)return null;e=document.createElement("td");if(c.LocalTimeStamp)e.textContent=(new Date(c.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!c.Directory&&typeof c.Length==="number")c=parseInt(c.Length,10)/1024,e.textContent=Math.ceil(c).toLocaleString()+" KB";e.style.textAlign="right";return e}};k.prototype.constructor=k;return{NavigatorRenderer:k,isImage:a,createLink:i}});
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(g,j,f,d,b,h,e,c,a){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(i,h,k,r,n){var p=this.serviceRegistry,q=this.commandRegistry;this.openWithCommands=this.openWithCommands||c.createOpenWithCommands(p,i,q);var t=this;return function(c,v,x,p){a.when(t.openWithCommands,function(a){if(x)f.empty(h),a=document.createElement("div"),a.appendChild(document.createTextNode(g["Search failed."])),h.appendChild(a),typeof r==="function"&&r(h);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;f.empty(h);if(c&&c.length>0){var E=document.createElement("table");E.setAttribute("role","presentation");for(var s=0;s<c.length;s++){var y=
c[s],w;if(!F&&(F=!0,k))w=E.insertRow(0).insertCell(0),w.textContent=k;w=E.insertRow(-1).insertCell(0);w.colspan=2;n&&n(w);var C={Name:y.name,Directory:y.directory,Location:y.path||y.location},D=null;if(typeof y.LineNumber==="number")D={},D.line=y.LineNumber;if(p&&p.keyword&&!p.nameSearch){var G=b.generateSearchHelper(p),D=D||{};D.find=G.inFileQuery.searchStr;D.regEx=G.inFileQuery.wildCard?!0:void 0}C=e.createLink(j.toUrl("edit/edit.html"),C,q,i,a,{"aria-describedby":(y.folderName?y.folderName:y.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},D);y.LineNumber&&C.appendChild(document.createTextNode(" (Line "+y.LineNumber+")"));w.appendChild(C);t(w,y)}h.appendChild(E);typeof r==="function"&&r(h)}!F&&v&&(a=d.formatMessage(g["No matches found for ${0}"],v),f.empty(h),h.appendChild(document.createTextNode(a)),typeof r==="function"&&r(h))}})}};k.prototype={search:function(a,c,d){var e=function(a){for(var d=[],e=0;e<a.response.docs.length;e++){var f=a.response.docs[e],g=f.Location,i=b.path2FolderName(f.Path?
f.Path:f.Location,f.Name),h=i?i:g;(c?h.indexOf(c)>=0:1)&&d.push({name:f.Name,path:g,folderName:i,directory:f.Directory,lineNumber:f.LineNumber})}return d};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){d(e(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 c=a.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(b),c,null,a)},function(a){d(null,
null,a,null)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(b){d(e(b),null,null,a)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new h.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(b){d(e(b),null,null,a)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=
a},handleError:function(a,b){console.error(a);f.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",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),c=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),
c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;e=f.node("search");c||(c="");if(e&&e.placeholder){e.value="";var i=d.formatMessage(g["Search ${0}"],c);e.placeholder=i.length>30?i.substring(0,27)+"...":d.formatMessage(g["Search ${0}"],c)}if(e&&e.title)e.title=g["Type a keyword or wild card to search in "]+c},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 g(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.page.dialog",this)}g.prototype={confirm:function(g,f){f(window.confirm(g))},openFiles:function(){}};g.prototype.constructor=g;return{DialogService:g}});
define("orion/metatype",["orion/serviceTracker"],function(g){function j(c){function a(a,b,c){a=a.getProperty(b);a instanceof Array&&a.forEach(c)}var i=new g(c,b),h=this.ocdsMap={},j=this.pidsMap={};i.addingService=function(b){a(b,f,function(a){a=new e(a);h[a.getId()]=a});a(b,d,function(a){var b=a.pid,a=a.classId;b&&a&&(j[b]=h[a])});return c.getService(b)};i.removedService=function(b){a(b,f,function(a){delete h[a.id]});a(b,d,function(a){delete j[a.pid]})};i.open()}var f="classes",d="designates",b=
"orion.cm.metatype",h,e;j.prototype={getObjectClassDefinitionForPid:function(b){return this.pidsMap[b]||null},getObjectClassDefinition:function(b){return this.ocdsMap[b]||null}};e=function(b){this.id=b.id;this.name=b.name||null;this.nameKey=b.nameKey||null;this.nls=b.nls||null;var a=b.properties;if(!this.id)throw'Missing "id" property: '+JSON.stringify(b);if(!(a instanceof Array)||!a.length)throw'"properties" property is missing or empty: '+JSON.stringify(b);this.props=[];for(b=0;b<a.length;b++)this.props.push(new h(a[b]))};
e.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}};h=function(b){this.id=b.id;this.name=b.name||null;this.nameKey=b.nameKey||null;this.options=b.options||null;this.type=b.type||"string";this.defaultValue=typeof b.defaultValue!=="undefined"?b.defaultValue:null;if(!this.id)throw'Missing "id" property: '+JSON.stringify(b);var a;switch(this.type){case "boolean":case "number":case "string":a=
!0}if(!a)throw'Invalid "type": '+this.type;this.options&&this.options.forEach(function(a){if(typeof a.value==="undefined")throw"Missing option value: "+JSON.stringify(a);})};h.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(b){return b._nlsLabel||b.label})},getOptionLabelKeys:function(){return this.options&&this.options.map(function(b){return b.labelKey})},
getOptionValues:function(){return this.options&&this.options.map(function(b){return b.value})},getType:function(){return this.type},getDefaultValue:function(){return this.defaultValue},_setNlsName:function(b){this._nlsName=b},_setNlsOptionLabels:function(b){this.options&&this.options.forEach(function(a,d){a._nlsLabel=b[d]})}};return{MetaTypeRegistry:j}});
define("orion/settings/settingsRegistry",["orion/Deferred","orion/i18nUtil","orion/serviceTracker"],function(g,j,f){function d(a,b){return typeof a[b]==="string"?a[b]:null}function b(a){this.pid=a.pid;this.classId=(this.isRef=d(a,"classId"))?a.classId:this.pid+".type";this.name=d(a,"name");this.nameKey=d(a,"nameKey");this.nls=d(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 h(d,
e,g,h){var j={};f.call(this,d,a);this.addingService=function(a){var q=a.getProperty(i);if(!q||!q.length)return null;for(var t=0;t<q.length;t++){var u=q[t],v=new b(u),x=v.getObjectClassDefinitionId(),B={designates:[{pid:v.getPid(),classId:x}]};if(!v.isRef&&!e.getObjectClassDefinition(x))B.classes=[{id:x,nameKey:v.getNameKey(),nls:v.getNls(),properties:u.properties}];j[v.getPid()]=d.registerService(c,{},B);u=e.getObjectClassDefinition(x);v.properties=u.getAttributeDefinitions();g[v.getPid()]=v;u=v.getCategory()||
k;Object.prototype.hasOwnProperty.call(h,u)||(h[u]=[]);h[u].push(v.getPid())}return f.prototype.addingService.call(this,a)};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 g[c];var e=h[d||k];e.splice(e.indexOf(c),1);e.length||delete h[d]}}}function e(a,b){this.settingsMap=Object.create(null);this.categories=Object.create(null);this.categoryLabels=Object.create(null);(new h(a,b,this.settingsMap,this.categories)).open()}
var c="orion.cm.metatype",a="orion.core.setting",i="settings",k="unsorted";b.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}};e.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 g.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 e});
define("orion/widgets/themes/ThemeComponent",[],function(){function g(){}function j(f,d,b,h,e,c,a,i,k){var j=new g;j.type="ELLIPSE";j.fill=k;j.width=i;j.x=d;j.y=b;j.radius=h;j.startangle=e;j.endangle=c;j.direction=a;j.render(f);return j}g.prototype.type=null;g.prototype.fill=null;g.prototype.stroke=null;g.prototype.width=0;g.prototype.height=0;g.prototype.font=null;g.prototype.text=null;g.prototype.radius=null;g.prototype.x=0;g.prototype.y=0;g.prototype.x2=0;g.prototype.y2=0;g.prototype.x3=0;g.prototype.y3=
0;g.prototype.context=null;g.prototype.description=null;g.prototype.over=!1;g.prototype.family=null;g.prototype.render=function(f){if(f)this.context=f;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()}};g.prototype.mouseOver=function(f,d){this.over=!1;switch(this.type){case "RECTANGLE":case "ROUNDRECTANGLE":if(f>this.x&&f<this.x+this.width&&d>this.y&&d<this.y+this.height)this.over=!0;break;case "TEXT":if(f>this.x&&f<this.x+this.width&&d>this.y-16&&d<this.y-
16+this.height)this.over=!0;break;case "ELLIPSE":if(f>this.x-5-this.radius&&f<this.x-5+this.radius&&d>this.y-5-this.radius&&d<this.y-5+this.radius)this.over=!0}return this.over};g.prototype.glow=function(f,d){var b=Math.floor(this.y-6+(this.height+12)/2);switch(this.type){case "TEXT":b-=8}var g=this.x-6+(this.width+12)*0.5;this.context.beginPath();this.context.moveTo(g+0.5,b+0.5);this.context.lineTo(f+30+0.5,b+0.5);this.context.lineTo(f+30+0.5,d+7+0.5);this.context.lineTo(f+45+0.5,d+7+0.5);this.context.strokeStyle=
"#cc0000";this.context.lineWidth=1;this.context.stroke();j(this.context,g,b,3,0,2*Math.PI,!1,null,"#cc0000");this.context.closePath()};return{Component:g,drawArc:j,drawLine:function(f,d,b,h,e,c,a){var i=new g;i.type="LINE";i.stroke=a;i.width=c;i.x=d;i.y=b;i.x2=h;i.y2=e;i.render(f);return i},drawText:function(f,d,b,h,e,c){var a=new g;a.type="TEXT";a.font=e;a.fill=c;a.text=d;a.x=b;a.y=h;a.render(f);a.width=f.measureText(d).width;a.height=15;return a},drawRectangle:function(f,d,b,h,e,c,a){var i=new g;
i.type="RECTANGLE";i.fill=c;i.stroke=a;i.x=d;i.y=b;i.width=h;i.height=e;i.render(f);return i},drawTriangle:function(f,d,b,h,e,c,a,i,k){var j=new g;j.type="TRIANGLE";j.fill=i;j.stroke=k;j.x=d;j.y=b;j.x2=h;j.y2=e;j.x3=c;j.y3=a;j.render(f);return j},roundRect:function(f,d,b,h,e,c,a,i){var k=new g;k.type="ROUNDRECTANGLE";k.fill=a;k.stroke=i;k.x=d;k.y=b;k.width=h;k.height=e;k.radius=c;k.render(f);return k}}});
define("orion/widgets/themes/editor/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme"],function(g,j){function f(){}function d(){this.styles=[];var b=new f;b.name="Eclipse";b.annotationRuler="white";b.background="white";b.comment="green";b.keyword="#7f0055";b.text="darkSlateGray";b.string="blue";b.overviewRuler="white";b.lineNumberOdd="#444";b.lineNumberEven="#444";b.lineNumber="#444";b.currentLine="#EAF2FE";b.tag="darkorange";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=
e;this.styles.push(b);b=new f;b.name="Prospecto";b.annotationRuler="white";b.background="white";b.comment="#3C802C";b.keyword="#CC4C07";b.text="#333";b.string="#446FBD";b.overviewRuler="white";b.lineNumberOdd="silver";b.lineNumberEven="silver";b.lineNumber="silver";b.currentLine="#EAF2FE";b.tag="#CC4C07";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=e;this.styles.push(b);b=new f;b.name="Blue";b.annotationRuler="lavender";b.background="aliceBlue";b.comment="indigo";b.keyword="cornFlowerBlue";b.text=
"navy";b.string="cornFlowerBlue";b.overviewRuler="lavender";b.lineNumberOdd="darkSlateGray";b.lineNumberEven="darkSlateGray";b.lineNumber="darkSlateGray";b.currentLine="white";b.tag="cornFlowerBlue";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=e;this.styles.push(b);b=new f;b.name="Ambience";b.annotationRuler="#3D3D3D";b.background="#202020";b.comment="mediumslateblue";b.keyword="cornFlowerBlue";b.text="darkseagreen";b.string="lightcoral";b.overviewRuler="white";b.lineNumberOdd="black";b.lineNumberEven=
"black";b.lineNumber="black";b.currentLine="lightcyan";b.tag="cornFlowerBlue";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=e;this.styles.push(b);b=new f;b.name="Tierra";b.annotationRuler="moccasin";b.background="lemonchiffon";b.comment="darkseagreen";b.keyword="darkred";b.text="#555555";b.string="orangered";b.overviewRuler="moccasin";b.lineNumberOdd="chocolate";b.lineNumberEven="chocolate";b.lineNumber="chocolate";b.currentLine="#baa289";b.tag="darkred";b.attribute="cadetBlue";b.fontFamily=h;
b.fontSize=e;this.styles.push(b);b=new f;b.name="Nimbus";b.annotationRuler="#444";b.background="dimgray";b.comment="darkseagreen";b.keyword="darkorange";b.text="white";b.string="cornflowerblue";b.overviewRuler="#444";b.lineNumberOdd="#aaa";b.lineNumberEven="#aaa";b.lineNumber="#aaa";b.currentLine="#aabfbb";b.tag="darkorange";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=e;this.styles.push(b);b=new f;b.name="Adelante";b.annotationRuler="#E2D2B2";b.background="#F1E7C8";b.comment="#5D774E";b.keyword=
"#AF473B";b.text="dimgray";b.string="#DE5D3B";b.overviewRuler="#E2D2B2";b.lineNumberOdd="#AF473B";b.lineNumberEven="#AF473B";b.lineNumber="#AF473B";b.currentLine="#9e937b";b.tag="#AF473B";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=e;this.styles.push(b);b=new f;b.name="Raspberry Pi";b.annotationRuler="seashell";b.background="seashell";b.comment="#66B32F";b.keyword="#E73E36";b.text="dimgray";b.string="darkorange";b.overviewRuler="seashell";b.lineNumberOdd="#E73E36";b.lineNumberEven="#E73E36";
b.lineNumber="#E73E36";b.currentLine="#F5B1AE";b.tag="#E73E36";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=e;this.styles.push(b)}function b(){return this.styles}var h='"Consolas", "Monaco", "Vera Mono", "monospace"',e="10pt";d.prototype.styles=[];d.prototype.getStyles=b;d.prototype.fontSettable=!0;d.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"editorstyles",defaultTheme:"Prospecto",selectedKey:"editorSelected",version:"5.0"}};d.prototype.parseToXML=function(b){try{var a=
null;if(window.DOMParser){var a=(new DOMParser).parseFromString(b,"text/xml"),d=a.getElementsByTagName("parsererror");return!d||!d.length||!d[0].childNodes.length?a:null}else return a=new ActiveXObject("Microsoft.XMLDOM"),a.async=!1,a.loadXML(b),a}catch(e){}};d.prototype.selectFontSize=function(b){console.log("fontsize: "+b)};d.prototype.importTheme=function(b){console.log("import theme");console.log(b);var a=this.parseToXML(b.parameters.valueFor("name")),d=new f;d.name=a.getElementsByTagName("colorTheme")[0].attributes[1].value;
d.annotationRuler=a.getElementsByTagName("background")[0].attributes[0].value;d.background=a.getElementsByTagName("background")[0].attributes[0].value;d.comment=a.getElementsByTagName("singleLineComment")[0].attributes[0].value;d.keyword=a.getElementsByTagName("keyword")[0].attributes[0].value;d.text=a.getElementsByTagName("foreground")[0].attributes[0].value;d.string=a.getElementsByTagName("string")[0].attributes[0].value;d.overviewRuler=a.getElementsByTagName("background")[0].attributes[0].value;
d.lineNumberOdd=a.getElementsByTagName("lineNumber")[0].attributes[0].value;d.lineNumberEven=a.getElementsByTagName("lineNumber")[0].attributes[0].value;d.lineNumber=a.getElementsByTagName("lineNumber")[0].attributes[0].value;d.currentLine=a.getElementsByTagName("selectionBackground")[0].attributes[0].value;b.items.addTheme(d)};d.prototype.processSettings=function(b){var a=j.TextTheme.getTheme();a.setThemeClass("editorTheme",a.buildStyleSheet("editorTheme",b))};d.prototype.getViewData=function(){var b=
{top:10,left:10,width:400,height:350},a=b.left,d=b.top;b.shapes=[{type:"TEXT",name:g["Line Numbers"],label:"1",x:a+20,y:d+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"},{type:"RECTANGLE",name:g.Background,x:a+46,y:d,width:290,height:b.height,family:"background",fill:"white"},{type:"TEXT",name:g.Strings,label:"'text/javascript'",x:a+134,y:d+20,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"=",x:a+124,y:d+20,fill:"darkSlateGray",family:"text",
font:"9pt sans-serif"},{type:"RECTANGLE",name:g["Current Line"],x:a+46,y:d+87,width:290,height:18,family:"currentLine",fill:"#eaf2fd"},{type:"TEXT",name:g["HTML Attribute"],label:"type",x:a+98,y:d+20,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"RECTANGLE",name:g["Overview Ruler"],x:a+336,y:d,width:14,height:b.height,family:"overviewRuler",fill:"white"},{type:"TEXT",name:g.Comments,label:"/* comment */",x:a+75,y:d+40,fill:"darkSeaGreen",family:"comment",font:"9pt sans-serif"},{type:"TEXT",
name:g["HTML Tag"],label:"<script",x:a+55,y:d+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:">",x:a+213,y:d+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Strings,label:"'Result'",x:a+164,y:d+80,fill:"cornflowerBlue",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"multiply(a,b){",x:a+120,y:d+60,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"function",
x:a+75,y:d+60,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"var",x:a+95,y:d+80,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"output = ",x:a+115,y:d+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:";",x:a+205,y:d+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"var",x:a+95,y:d+100,fill:"darkorange",family:"keyword",
font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"result = a*b;",x:a+115,y:d+100,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"return",x:a+95,y:d+120,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"output + result;",x:a+135,y:d+120,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"}",x:a+75,y:d+140,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},
{type:"TEXT",name:g["HTML Tag"],label:"<\/script>",x:a+55,y:d+160,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:"<style",x:a+55,y:d+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Attribute"],label:"type",x:a+95,y:d+200,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"=",x:a+121,y:d+200,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Strings,
label:"'text/css'",x:a+131,y:d+200,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:">",x:a+180,y:d+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Class Name"],label:".some-class",x:a+75,y:d+220,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Class Name"],label:"{",x:a+145,y:d+220,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Attribute"],label:"color:",
x:a+95,y:d+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Value"],label:"#123456",x:a+130,y:d+240,fill:"darkSlateGray",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Text"],label:";",x:a+180,y:d+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Class Name"],label:"}",x:a+75,y:d+260,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:"</style>",x:a+55,y:d+280,fill:"darkorange",
family:"keyword",font:"9pt sans-serif"},{type:"RECTANGLE",name:g["Annotation Ruler"],x:a,y:d,width:46,height:b.height,family:"annotationRuler",fill:"white"}];for(var e=0;e<16;e++)b.shapes.push({type:"TEXT",name:g["Line Numbers"],label:e+1,x:a+20,y:d+20*e+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"});return b};return{ThemeData:d,getStyles:b}});
define("orion/widgets/input/Select",["orion/objects","orion/webui/littlelib"],function(g,j){function f(d,b){g.mixin(this,d);this.node=b||document.createElement("div");this.node.innerHTML=this.templateString;this.select=j.$(".setting-control",this.node)}g.mixin(f.prototype,{templateString:'<select class="setting-control" id="selection"></select>',addOptions:function(d){var b=document.createElement("option");b.value=d.value;b.appendChild(document.createTextNode(typeof d.label==="string"?d.label:d.value));
if(d.selected)b.selected="selected";this.select.appendChild(b)},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(d){this.select.selectedIndex=
d},getSelection:function(){return this.getSelected()},setSelection:function(d){for(var b=0;b<this.options.length;b++)if(this.options[b].value===d){this.setSelectedIndex(b);return}this.setSelectedIndex(0)},change:function(){var d=this.select.value;this.category?this.setStorageItem(this.category,this.item,this.element,d,this.ui):this.setStorageItem(d)}});return f});
define("orion/widgets/input/TextField",["orion/objects","orion/webui/littlelib"],function(g,j){function f(d,b){g.mixin(this,d);this.node=b||document.createElement("div");this.node.innerHTML=this.templateString;this.textfield=j.$(".setting-control",this.node)}g.mixin(f.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(d){this.textfield.style.width=d},getValue:function(){return this.inputType==="integer"?parseInt(this.textfield.value,10):this.textfield.value},setValue:function(d){this.textfield.value=d},getSelection:function(){return this.getValue()},setSelection:function(d){this.setValue(d)},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 d;if(this.selection&&this.selection.value)d=this.selection.value;this.setStorageItem(this.category,this.item,this.element,d,this.ui)}});return f});
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(g,j,f,d,b,h,e,c,a,i){function k(){B=null;E=H=!0;s=[];C=w=y=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:g.Cancel,tooltip:g["Revert Theme"],id:"orion.reverttheme",callback:function(a){this.revert(a.items)}.bind(this)}),b=new j.Command({name:g.Update,tooltip:g["Update Theme"],id:"orion.applytheme",
callback:function(a){this.apply(a.items)}.bind(this)}),c=new j.Command({name:g["Show Guide"],tooltip:g["Check Guide"],id:"orion.checkGuide",callback:function(a){this.guide(a.items)}.bind(this)}),d=new j.Command({name:g.Export,tooltip:g["Export a theme"],id:"orion.exportTheme",parameters:D,callback:function(a){var b;b=a.parameters&&a.parameters.valueFor("name")?a.parameters.valueFor("name"):"yourTheme";this.exportTheme(a.items,b)}.bind(this)});this.commandService.addCommand(c);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);this.commandService.addCommand(d);this.commandService.registerCommandContribution("themeCommands","orion.exportTheme",5)}function o(){if(w){w.clearRect(0,0,y.width,y.height);var a=y.height;y.width=y.width;y.height=a}}function r(a){var b=y.getBoundingClientRect();
return{x:a.clientX-b.left,y:a.clientY-b.top}}function n(a){var b=r(a),a=b.x,b=b.y;C=[];for(var c=0;c<s.length;c++)if(s[c].mouseOver(a,b)){y.style.cursor="crosshair";s[c].id=c;C.push(s[c]);break}else y.style.cursor=""}function p(){y.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,b){for(var c=x+40,d=[],f=0,i=0,h=0;h<b.length;h++){var k=b[h];if(q(d,k.family)===!1&&k.description){var f=u+10+i*28,j=Math.floor(k.x-6+(k.width+12)/2),l=Math.floor(k.y-
6+(k.height+12)/2);switch(k.family){case "background":a.beginPath();a.moveTo(j+70+0.5,f-4+0.5);a.lineTo(x+50+0.5,f-4+0.5);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=1;a.stroke();e.drawArc(a,j+70,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;case "Side":a.beginPath();a.moveTo(j+30+0.5,f-4+0.5);a.lineTo(x+50+0.5,f-4+0.5);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=1;a.stroke();e.drawArc(a,j+30,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;default:a.moveTo(j+0.5,l+0.5),a.lineTo(j+
0.5,f-4+0.5),a.lineTo(x+50+0.5,f-4+0.5),a.strokeStyle="rgba(187,0,0,0.7)",a.lineWidth=1,a.stroke(),e.drawArc(a,j,l,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)")}a.globalAlpha=1;e.drawText(a,k.description,v+5+c,f,"bold 8pt sans-serif","#333");k.family&&d.push(k.family);i++}}e.drawText(a,g.clickDiagram,v+5+c,f+50,"bold 8pt sans-serif","#cc0000");e.drawText(a,g.clickUpdate,v+5+c,f+65,"bold 8pt sans-serif","#cc0000");document.getElementById("stringcontainer").style.display="none"}var u=10,v=10,x=350,B=null,
z=!0,H=!0,F=!1,E=!0,s=[],y=null,w=null,C=null;l.prototype.name=void 0;l.prototype.value=void 0;var D=new f.ParametersDescription([new f.CommandParameter("name","text",g["Theme name:"],g.yourTheme)]);m.prototype.applyColor=function(){var a=document.getElementById(this.themebuilder.colorFieldId).firstChild.value;if(this.themebuilder.validateHex(a))s[B.id].fill=a,this.themebuilder.updateFamily(s[B.id].family,a),z=!1,this.themebuilder.refresh(),s[B.id].glow(x,u),this.themebuilder.drawPicker(w,s[B.id]),
h.node("pickercontainer").style.display="none",h.node("savecontainer").style.display="",h.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">'+g["Theme:"]+'</span><div id="themepicker" class="themepicker"></div></div><div id="savecontainer" style="display:none;"><span class="settingsLabel">'+
g["New Theme Name:"]+'</span><div id="themesaver" class="themesaver"></div></div><div id="sizecontainer"><span class="settingsLabel">'+g["Font Size:"]+'</span><div id="fontsizepicker" class="fontsizepicker"></div></div><div id="stringcontainer" style="position:relative;left:400px;top:-140px;display:none;"><span>'+g["OR HEX:"]+'</span><div id="colorstring" class="colorfield"></div><button class="commandButton" style="padding:5px;font-size:9pt;" type="button" id="colorButton">'+g.Ok+"</button></div></div>";
var G=["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=G;m.prototype.addAdditionalCommand=function(a){var b=new f.ParametersDescription([new f.CommandParameter("name","text",g["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<s.length;c++)if(s[c].family){if(s[c].family===a)s[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,b){var c=x+40;e.drawText(a,b.description,v+c,u+10,"bold 9pt sans-serif","#555");e.drawText(a,g["COLOR:"],v+c,u+50,"8pt sans-serif","#555");e.drawRectangle(a,v+c+5,u+60,40,15,b.fill,null);e.drawText(a,b.fill,v+c+5+40+5,u+70,"8pt sans-serif","#555");e.drawLine(a,v+c,u+25,v+c+190,u+25,10,"#555");e.drawLine(a,v+c,u+85,v+c+190,u+85,5,"#555");e.drawText(a,g["NEW COLOR:"],v+c,u+115,"bold 8pt sans-serif","#555");if(E===!0){for(c=0;c<7;c++)for(var d=
1;d<11;d++){var f=e.drawArc(a,v+x+d*20+25,u+90+c*20+50,7,0,2*Math.PI,!1,null,G[c][d-1]);f.paintchip=!0;s.push(f)}E=!1}else for(c=0;c<s.length;c++)s[c].paintchip&&s[c].render();c=document.getElementById("stringcontainer");c.style.display="";c.zIndex=1;c=document.getElementById(this.colorFieldId);if(!this.colfld)this.colfld=new i({},c),this.colfld.show(),this.colfld.width("100px");c=document.getElementById("colorButton");c.themebuilder=this;c.onclick=this.applyColor};m.prototype.colfld=void 0;m.prototype.mouseDown=
function(a){z=!1;for(var b=r(a),a=b.x,b=b.y,c=0;c<s.length;c++)if(s[c].mouseOver(a,b))s[c].id=c,C=[],this.refresh(),C.push(s[c]);if(C.length>0){for(b=a=0;b<C.length;b++)C[b].width<C[a].width&&(a=b);z=C.length>0?!0:!1;switch(C[a].type){case "ELLIPSE":s[B.id].fill=C[a].fill;this.updateFamily(s[B.id].family,C[a].fill);z=!1;this.refresh();s[B.id].glow(x,u);this.drawPicker(w,s[B.id]);h.node("pickercontainer").style.display="none";h.node("savecontainer").style.display="";if(this.AUTONAME===!1)this.themeSaver.setValue(this.themeSelect.getSelected()),
this.AUTONAME=!0;break;case "RECTANGLE":case "ROUNDRECTANGLE":case "TEXT":C[a].glow(x,u),this.drawPicker(w,C[a]),B=C[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,
b){var c;switch(a.type){case "RECTANGLE":c=e.drawRectangle(w,a.x,a.y,a.width,a.height,b,"#CCC");break;case "TEXT":c=e.drawText(w,a.label,a.x,a.y,a.font,b);break;case "ROUNDRECTANGLE":c=e.roundRect(w,a.x,a.y,a.width,a.height,5,b,"#CCC");break;case "LINE":e.drawLine(w,a.x1,a.y1,a.x2,a.y2,a.linewidth,b);break;case "TRIANGLE":e.drawTriangle(w,a.x1,a.y1,a.x2,a.y2,a.x3,a.y3,b);break;case "IMAGE":var d=new Image;d.onload=function(){w.drawImage(d,a.x,a.y)};d.src=a.source}if(c)c.description=a.name,c.family=
a.family,c.paintchip=!1,s.push(c)};m.prototype.drawOutlineData=function(a){a&&this.addData(a);y||(y=document.getElementById("orionui"),w=y.getContext("2d"),y.addEventListener("mousedown",this.mouseDown.bind(this),!1),y.addEventListener("mousemove",n,!1),y.addEventListener("mouseup",p,!1));if(H===!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)}H=!1}else for(var c in s)s[c].paintchip||s[c].render();z&&t(w,s)};m.prototype.apply=function(){this.preferences.getTheme(function(a){var b=this.settings.name,a=a.styles,c=h.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 f in this.settings)if(e=
this.settings[f].name,e!=="name")b[e]=this.settings[f].value;a.push(b)}b=d;c.firstChild.value=""}this.preferences.setTheme(b,a);this.settings.fontSize&&this.preferences.setFontSize(this.settings.fontSize.value);h.node("savecontainer").style.display="none";h.node("pickercontainer").style.display="";this.updateThemePicker(b,a);this.AUTONAME=!1}.bind(this))};m.prototype.revert=function(){this.guide();h.node("pickercontainer").style.display="";h.node("savecontainer").style.display="none";this.AUTONAME=
!1};m.prototype.guide=function(a){this.refresh();z=!0;a=this.themeData.getViewData();this.drawOutlineData(a);h.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(b){for(var c=
[],d=8;d<19;d++){var e={value:d+"pt",label:d+"pt"};if(d===b)e.selected="true";c.push(e)}this.sizeSelect.destroy();b=document.createElement("div");b.id="fontsizepicker";document.getElementById("sizecontainer").appendChild(b);this.sizeSelect=new a({options:c},b);this.sizeSelect.setStorageItem=this.selectFontSize.bind(this);this.sizeSelect.show()};m.prototype.addFontSizePicker=function(b){b=b.style.fontSize;document.getElementById("sizecontainer");for(var c=document.getElementById("fontsizepicker"),
d=[],e=8;e<19;e++){var f={value:e+"pt",label:e+"pt"};if(f.value===b)f.selected="true";d.push(f)}if(!this.sizeSelect)this.sizeSelect=new a({options:d},c),this.sizeSelect.setStorageItem=this.selectFontSize.bind(this),this.sizeSelect.show()};m.prototype.addThemePicker=function(b){for(var c=[],d=b.style.name,b=b.styles,e=0;e<b.length;e++){var f={value:b[e].name,label:b[e].name};if(b[e].name===d)f.selected=!0;c.push(f)}this.select(d,b);d=document.getElementById("themepicker");if(!this.themeSelect)this.themeSelect=
new a({options:c},d),this.themeSelect.setStorageItem=this.selectTheme.bind(this),this.themeSelect.show(),c=document.getElementById("themesaver"),this.themeSaver=new i({},c),this.themeSaver.show()};m.prototype.updateThemePicker=function(b,c){var d=[],e;for(e in c){var f={value:c[e].name,label:c[e].name};if(b&&c[e].name===b)f.selected=!0;d.push(f);this.themeSelect.destroy();f=document.createElement("div");f.id="themepicker";for(var g=document.getElementById("themepicker"),i=g.firstChild;i;)g.removeChild(i),
i=g.firstChild;g.appendChild(f);this.themeSelect=new a({options:d},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"&&(H=!0);a.innerHTML=this.template;var d=this.themeData.getThemeStorageInfo(),e=document.getElementById("colorstring");this.colorFieldId=d.styleset+"colorField";e.id=this.colorFieldId;h.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()};m.prototype.exportTheme=function(a,b){var c={},d;for(d in s)if(!s[d].paintchip){console.log(s[d]);var e=s[d];if(e.family==="lineNumber"&&!c.hasOwnProperty("lineNumber"))c.lineNumber=e.fill;else if(e.family==="background"&&!c.hasOwnProperty("background"))c.background=
e.fill;else if(e.family==="string"&&!c.hasOwnProperty("string"))c.string=e.fill;else if(e.family==="text"&&!c.hasOwnProperty("text"))c.foreground=e.fill;else if(e.family==="currentLine"&&!c.hasOwnProperty("currentLine"))c.selectionBackground=e.fill;else if(e.family==="comment"&&!c.hasOwnProperty("comment"))c.singleLineComment=e.fill;else if(e.family==="keyword"&&!c.hasOwnProperty("keyword"))c.keyword=e.fill;else if(e.family==="overviewRuler"&&!c.hasOwnProperty("overviewRuler"))c.overviewRuler=e.fill;
else if(e.family==="annotationRuler"&&!c.hasOwnProperty("annotationRuler"))c.annotationRuler=e.fill;else if(e.family==="attribute"&&!c.hasOwnProperty("attribute"))c.attribute=e.fill}c.themeName=b;d='<colorTheme id="0" name="#themeName"><background color="#background"/><singleLineComment color="#singleLineComment"/><keyword color="#keyword"/><foreground color="#foreground"/><string color="#string"/><lineNumber color="#lineNumber"/><selectionBackground color="#selectionBackground"/><overviewRuler color="#overviewRuler"/><annotationRuler color="#annotationRuler"/><attribute color="#attribute"/></colorTheme>';
for(var f in c)d=d.replace("#"+f,c[f]);window.alert(d)};return m});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(g){function j(f,d){d||(d="orion.page.selection");this._serviceRegistry=f;g.attach(this);this._serviceRegistration=f.registerService(d,this);this._selections=null}j.prototype={getSelection:function(f){var d=this._getSingleSelection();typeof f==="function"&&f(d);return d},getSelections:function(f){var d=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(d);return d},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var d=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;d!==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,orion/objects,orion/selection".split(","),function(g,j,f,d,b,h){function e(a,b){var c=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!b.id)throw Error("Missing required argument: id");this.id=b.id;if(!b.title)throw Error("Missing required argument: title");var e=b.useAuxStyle?["sectionWrapper",
"sectionWrapperAux","toolComposite"]:["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");a.appendChild(this.domNode);for(var f=0;f<e.length;f++)this.domNode.classList.add(e[f]);this.domNode.id=b.id;if(b.canHide)this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitleTwistie"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=
0,this.domNode.addEventListener("click",function(a){(a.target===c.titleNode||a.target===c.twistie)&&c._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(a){a.keyCode===g.KEY.ENTER&&(a.target===c.domNode||a.target===c.titleNode||a.target===c.twistie)&&c._changeExpandedState()},!1);if(b.iconClass){var h=document.createElement("span");h.classList.add("sectionIcon");this.domNode.appendChild(h);e=Array.isArray(b.iconClass)?b.iconClass:[b.iconClass];e.forEach(function(a){h.classList.add(a)})}b.headerClass&&
(e=Array.isArray(b.headerClass)?b.headerClass:[b.headerClass],e.forEach(function(a){this.domNode.classList.add(a)}.bind(this)));this.titleNode=document.createElement("div");this.titleNode.id=b.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=b.title;if(typeof b.getItemCount==="function")e=document.createElement("div"),e.classList.add("layoutLeft"),
e.classList.add("sectionItemCount"),this.domNode.appendChild(e),e.textContent=b.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=b.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=b.id+
"FilterSearchBox";this.domNode.appendChild(e);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=b.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("ul");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("commandList");this.actionsNode.classList.add("sectionActions");
this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("ul");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("commandList");this.selectionNode.classList.add("sectionActions");this.domNode.appendChild(this.selectionNode);b.slideout&&(e=d.slideoutHTMLFragment(b.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);a.appendChild(this._contentParent);b.content&&this.setContent(b.content);this.hidden=b.hidden;if(typeof b.onExpandCollapse==="function")this._onExpandCollapse=b.onExpandCollapse;this._preferenceService=b.preferenceService;this._contentParent.style.display="none";this.domNode.classList.add("sectionWrapperClosed");
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.domNode.classList.remove("sectionWrapperClosed");j._updateExpandedState(!j.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block",this.domNode.classList.remove("sectionWrapperClosed");this._updateExpandedState(!this.hidden,!1)}this._commandService=b.commandService;this._lastMonitor=
0;this._loading={}}function c(a){this._section=a;this._id=++a._lastMonitor}e.prototype={setTitle:function(a){this.titleNode.textContent=a},getHeaderElement:function(){return this.domNode},getTitleElement:function(){return this.titleNode},getActionElement:function(){return this._toolActionsNode},setContent:function(a){typeof a==="string"?this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},embedExplorer:function(a,
c,d){this._contentParent.innerHTML="";if(!a.parent)a.parent=c;this._contentParent.appendChild(a.parent);a.section=this;b.mixin(a,{createActionSections:function(){this.actionsSections&&this.actionsSections.forEach(function(a){if(!g.node(a)){var b=document.createElement("ul");b.id=a;b.classList.add("commandList");b.classList.add("layoutRight");this.section.actionsNode.appendChild(b)}}.bind(this))},getCommandsVisible:function(){return this.section.actionsNode.style.visibility!=="hidden"},setCommandsVisible:function(a){this.section.actionsNode.style.visibility=
a?"":"hidden";var b=a?null:"cursorOnly";this.renderer.selectionPolicy=b;var c=this.getNavHandler();c&&c.setSelectionPolicy(b);a?this.updateCommands():this.actionsSections&&this.actionsSections.forEach(function(a){g.node(a)&&this.commandRegistry.destroy(a)}.bind(this))},destroy:function(){Object.getPrototypeOf(this).destroy.call(this);var a=this;this.actionsSections&&(this.actionsSections.forEach(function(b){delete a[b]}),delete this.actionsSections)},updateCommands:function(a){this.section.actionsNode&&
this.getCommandsVisible()&&(this.createActionSections(),Object.getPrototypeOf(this).updateCommands.call(this,a))},loaded:function(){var a=this;if(!this.selection&&!d)this.serviceRegistry||this.registry?(this.selection=new h.Selection(this.serviceRegistry||this.registry,this.parent.id+"Selection"),this.selection.addEventListener("selectionChanged",function(b){a.updateCommands(b.selections)})):window.console.error("Could not create a Selection for the explorer because of lack of serviceRegistry");var b=
this.registerCommands();!b||!b.then?a.updateCommands():b.then(function(){a.updateCommands()})}});if(a.renderer)a.renderer.section=this,b.mixin(a.renderer,{getCellHeaderElement:function(a){(a=Object.getPrototypeOf(this).getCellHeaderElement.call(this,a))&&this.section.setTitle(a.innerHTML);return null}})},createProgressMonitor:function(){return new c(this)},_setMonitorMessage:function(a,b){this._progressNode.style.visibility="visible";this._loading[a]=b;var c="",d;for(d in this._loading)c!==""&&(c+=
"\n"),c+=this._loading[d];this._progressNode.title=c},_monitorDone:function(a){delete this._loading[a];var a="",b;for(b in this._loading)a!==""&&(a+="\n"),a+=this._loading[b];this._progressNode.title=a;if(a==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.domNode.classList.remove("sectionWrapperClosed"),this.hidden=!1):(this._contentParent.style.display="none",this.domNode.classList.add("sectionWrapperClosed"),
this.hidden=!0);this._updateExpandedState(!this.hidden,!0)},_updateExpandedState:function(a,b){var c=this.twistie,d=this.id;c&&(c.classList.add(a?this._expandImageClass:this._collapseImageClass),c.classList.remove(a?this._collapseImageClass:this._expandImageClass));this._preferenceService&&b&&this._preferenceService.getPreferences("/window/views").then(function(b){b.put(d,a)});this._onExpandCollapse&&this._onExpandCollapse(a,this)}};e.prototype.constructor=e;c.prototype={begin:function(a){this.status=
a;this._section._setMonitorMessage(this.id,a)},worked:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},done:function(a){this.status=a;this._section._monitorDone(this.id)}};c.prototype.constructor=c;return{Section:e}});
define("orion/widgets/input/Checkbox",["orion/objects","orion/webui/littlelib"],function(g,j){function f(d,b){g.mixin(this,d);this.node=b||document.createElement("div");this.node.innerHTML=this.templateString;this.checkbox=j.$(".setting-control",this.node)}g.mixin(f.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(d){this.checkbox.checked=d},getSelection:function(){return this.isChecked()},setSelection:function(d){this.setChecked(d)},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 f});
define("orion/widgets/input/LabeledCheckbox",["orion/objects","orion/webui/littlelib","orion/widgets/input/Checkbox"],function(g,j,f){function d(b,d){f.apply(this,arguments);this.mylabel=j.$(".setting-label",this.node)}g.mixin(d.prototype,f.prototype,{templateString:'<label><span class="setting-label"></span><input class="setting-control settingsCheckbox" type="checkbox"/></label>',postCreate:function(){f.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){f.prototype.destroy.call(this);
if(this.mylabel)this.mylabel=null}});return d});
define("orion/widgets/input/LabeledTextfield",["orion/objects","orion/webui/littlelib","orion/widgets/input/TextField"],function(g,j,f){function d(b,d){f.apply(this,arguments);this.mylabel=j.$(".setting-label",this.node)}g.mixin(d.prototype,f.prototype,{templateString:'<div class="setting-property"><label><span class="setting-label"></span><input class="setting-control" type="text" /></label></div>',destroy:function(){f.prototype.destroy.call(this);if(this.mylabel)this.mylabel=null},postCreate:function(){f.prototype.postCreate.call(this);
this.mylabel.textContent=this.fieldlabel+":"}});return d});
define("orion/widgets/input/LabeledSelect",["orion/objects","orion/webui/littlelib","orion/widgets/input/Select"],function(g,j,f){function d(b,d){f.apply(this,arguments);this.mylabel=j.$(".setting-label",this.node)}g.mixin(d.prototype,f.prototype,{templateString:'<div class="setting-property"><label><span class="setting-label"></span><select class="setting-control"></select></label></div>',postCreate:function(){f.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){f.prototype.destroy.call(this);
if(this.mylabel)this.mylabel=null}});return d});
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(g,j,f,d,b,h,e,c,a){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,r=f.Section,n=function(a){h.mixin(this,a);this.fieldlabel=this.property.getName()};h.mixin(n.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 p=function(a){n.apply(this,arguments);c.apply(this,arguments)};h.mixin(p.prototype,c.prototype,n.prototype,{postCreate:function(){c.prototype.postCreate.apply(this,arguments);n.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){n.apply(this,
arguments);e.apply(this,arguments)};h.mixin(q.prototype,e.prototype,n.prototype,{change:function(a){this.changeProperty(a.target.checked)},postCreate:function(){n.prototype.postCreate.call(this);e.prototype.postCreate.call(this)},updateField:function(a){this.checkbox.checked=a}});var t=function(b){n.apply(this,arguments);a.apply(this,arguments)};h.mixin(t.prototype,a.prototype,n.prototype,{postCreate:function(){var b=this.property.getOptionValues(),c=this.property.getOptionLabels();this.options=b.map(function(a,
b){var d=typeof c[b]==="string"?c[b]:a;return{value:d,label:d}});a.prototype.postCreate.apply(this,arguments);n.prototype.postCreate.apply(this,arguments)},change:function(b){a.prototype.change.apply(this,arguments);var c=this.property.getOptionValues()[this.getSelectedIndex()];typeof c!=="undefined"&&this.changeProperty(c)},updateField:function(a){a=this.property.getOptionValues().indexOf(a);a!==-1&&this.setSelectedIndex(a)}});var u=function(a,b){h.mixin(this,a);if(!b)throw"parentNode is required";
this.node=b};h.mixin(u.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 b).resolve(a);
else{var c=this;return this.configPromise=this.configPromise||this.configAdmin.getConfiguration(this.setting.getPid()).then(function(a){return c.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 p(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 u({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 r(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);c.length>0&&c[0].category&&a.getContentElement().classList.add(c[0].category+"SettingsTable");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",noSelection:!0})}};return l});
define("orion/widgets/settings/SplitSelectionLayout",["i18n!orion/settings/nls/messages","require","orion/webui/littlelib","orion/objects"],function(g,j,f,d){function b(b,e,c){d.mixin(this,b);this.selectionNode=e;this.contentNode=c;this.itemToIndexMap=null;this.toolbar=f.node(this.pageActions);this.selectionNode.innerHTML=this.categoriesTemplateString;this.contentNode.innerHTML=this.contentTemplateString;this.navbar=f.$(".navbar",this.selectionNode);this.table=f.$(".split-selection-table",this.contentNode)}
d.mixin(b.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&&f.empty(this.toolbar)},addCategory:function(b,d){var d=typeof d===
"undefined"?0:d,c=document.createElement("li");c.classList.add("navbar-item");c.setAttribute("role","tab");c.setAttribute("aria-selected","false");c.tabIndex=-1;c.textContent=b.textContent;Object.keys(b).forEach(function(a){a==="show"||a==="onclick"?c.addEventListener("click",b[a]):c.setAttribute(a,b[a])});this.navbar.appendChild(c);this.itemToIndexMap[b.id]=d},selectCategory:function(b){if(this.selectedCategory)this.selectedCategory.classList.remove("navbar-item-selected"),this.selectedCategory.setAttribute("aria-selected",
"false"),this.selectedCategory.tabIndex=-1;if(b)this.selectedCategory=f.node(b);this.selectedCategory.classList.add("navbar-item-selected");this.selectedCategory.setAttribute("aria-selected","true");this.contentNode.setAttribute("aria-labelledby",b);this.selectedCategory.tabIndex=0;this.selectedCategory.focus()},showSettings:function(b){this.selectCategory(b);this.updateToolbar(b)},drawUserInterface:function(){f.empty(this.navbar);var b=this,d;this.navbar.addEventListener("keydown",function(c){if(c.keyCode===
f.KEY.LEFT||c.keyCode===f.KEY.UP)b.selectedCategory.previousSibling&&(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.selectedCategory.previousSibling.dispatchEvent(d));else if((c.keyCode===f.KEY.RIGHT||c.keyCode===f.KEY.DOWN)&&b.selectedCategory.nextSibling)d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.selectedCategory.nextSibling.dispatchEvent(d)})}});return b});
define("orion/widgets/plugin/ServiceCarousel",["i18n!orion/settings/nls/messages","orion/objects","orion/webui/littlelib"],function(g,j,f){function d(b,d){var c=b.style;c.left=d.left+"px";c.top=d.top+"px";c.width=d.width+"px";c.height=d.height+"px"}function b(b,d){j.mixin(this,b);this.node=document.createElement("div");if(!this.node)throw Error("parentNode is required");d.appendChild(this.node)}j.mixin(b.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;f.processTextNodes(this.node,g);var b=this.serviceLabel=f.$(".serviceContainerClosed",this.node);this.serviceCount=f.$(".serviceCount",this.node);var d=this.rails=f.$(".serviceRails",this.node);this.leftbutton=f.$(".leftButton",this.node);this.listContainer=f.$(".listContainer",this.node);this.testlist=f.$(".serviceList",this.node);this.rightbutton=f.$(".rightButton",this.node);f.$(".leftCarousel",this.node).addEventListener("click",
this.slideLeft.bind(this));f.$(".rightCarousel",this.node).addEventListener("click",this.slideRight.bind(this));b.addEventListener("click",this.showServices.bind(this));b.addEventListener("keypress",this.onServiceClick.bind(this));d.addEventListener("mouseenter",this.showButtons.bind(this));d.addEventListener("mouseleave",this.hideButtons.bind(this));d.addEventListener("focus",this.showButtons.bind(this));d.addEventListener("blur",this.hideButtons.bind(this));d.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 b=f.bounds(this.node.parentNode);this.addData(this.serviceData);this.serviceLabel.textContent=g.Services;this.serviceCount.textContent=this.serviceData.length;this.node.style.width=b.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?f.bounds(this.rails,this.box):this.box=f.bounds(this.rails)):(f.bounds(this.rails,{height:0}),this.collapse())},onServiceClick:function(b){if(b.keyCode===f.KEY.ENTER||b.charCode===f.KEY.SPACE)this.showServices(),this.serviceState===!1?b.target.setAttribute("aria-pressed","true"):b.target.setAttribute("aria-pressed","false"),b.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 b=f.bounds(this.rails),d=f.bounds(this.leftbutton.firstChild),b=Math.round(b.height/2)-Math.round(d.height)+"px";this.leftbutton.firstChild.style.top=b;this.rightbutton.firstChild.style.top=b},hideButtons:function(){this.leftbutton.style.visibility="hidden";this.rightbutton.style.visibility="hidden"},slideRight:function(){this.box=f.bounds(this.rails);if(this.pointer<this.serviceData.length-1){this.pointer+=1;
for(var b=0;b<this.pointer;b++)this.listContainer.childNodes[0].childNodes[b].style.display="none";d(this.rails,this.box)}this.showButtons()},slideLeft:function(){this.box=f.bounds(this.rails);if(this.pointer>0)this.pointer-=1,this.listContainer.childNodes[0].childNodes[this.pointer].style.display="";this.showButtons();d(this.rails,this.box)},consoleOutput:function(b){console.log("Service: "+b.title+" Element: "+b.item+":");console.dir(b.value)},createServiceTable:function(b,d){var c=document.createElement("li");
c.classList.add("serviceData");d.appendChild(c);var a=document.createElement("div");a.classList.add("listEntry");c.appendChild(a);c=document.createElement("div");c.classList.add("tablecontainer");a.appendChild(c);var i=document.createElement("table");c.classList.add("serviceTable");c.appendChild(i);i.innerHTML='<thead><tr><th scope="col">${Item}</th><th scope="col">${Value}</th></tr></thead>';f.processTextNodes(i,g);c=document.createElement("tbody");i.appendChild(c);for(i=0;i<b.items.length;i++){var j=
document.createElement("tr"),l=document.createElement("td");l.textContent=b.items[i].item;j.appendChild(l);c.appendChild(j);var m=b.items[i].value,l=document.createElement("td");j.appendChild(l);typeof m==="object"?(j={title:b.service,item:b.items[i].item,value:m},m=document.createElement("span"),m.classList.add("objectLink"),m.title=g["click here, then check javascript console to drill down"],m.addEventListener("click",this.consoleOutput.bind(this,j)),m.textContent=g["JavaScript Object"],l.appendChild(m)):
l.textContent=m}c=document.createElement("div");c.classList.add("listTitle");c.textContent=b.service;a.appendChild(c)},addData:function(b){var d;for(d=0;d<b.length;d++)this.createServiceTable(b[d],this.testlist)},handleKeypress:function(b){b.keyCode===f.KEY.LEFT&&this.leftbutton.style.visibility!=="hidden"?this.slideLeft():b.keyCode===f.KEY.RIGHT&&this.rightbutton.style.visibility!=="hidden"&&this.slideRight()}});return b});
define("orion/widgets/plugin/PluginEntry",["i18n!orion/settings/nls/messages","orion/PageUtil","orion/objects","orion/webui/littlelib","orion/widgets/plugin/ServiceCarousel"],function(g,j,f,d,b){function h(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 e(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 c(a,b){f.mixin(this,a);this.node=b||document.createElement("div")}f.mixin(c.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=
d.$(".plugin-title",this.node);this.pluginDescription=d.$(".plugin-description",this.node);this.pluginLinks=d.$(".plugin-links",this.node);this.commandSpan=d.$(".plugin-commands",this.node);this.serviceContainer=d.$(".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||h(c);this.pluginDescription.textContent=a.description||g["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=e(this.plugin);this.carousel=new b({serviceData:this.serviceDescriptions},this.serviceContainer);this.carousel.show()}});return c});
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(g,j,f,d,b,h,e,c,a,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){n.call(this,{},b);this.commandService=a}function m(a){this.renderer=
new l(a,this)}function o(a,b){e.mixin(this,a);this.node=b||document.createElement("div")}var r=i.Explorer,n=i.SelectionRenderer,p={},q=localStorage.getItem("/orion/preferences/default/plugins");q&&(q=JSON.parse(q),Object.keys(q).forEach(function(a){p[k(j.toUrl(a))]=!0}));l.prototype=Object.create(n.prototype);l.prototype.getCellElement=function(b,c){if(b===0){var d=new a({plugin:c,commandService:this.commandService});d.show();return d.node}};m.prototype=Object.create(r.prototype);e.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=c.$(".pluginSectionHeader",this.node);this.pluginTitle=c.$(".sectionAnchor",this.node);this.pluginCount=c.$(".sectionItemCount",this.node);this.pluginCommands=c.$(".pluginCommands",this.node);this.pluginList=c.$(".plugin-list",this.node);this.postCreate()},destroy:function(){if(this.node)c.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=h.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 d.Command({name:g["Get Plugins"],tooltip:g["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 d.Command({name:g.Install,
tooltip:g["Install a plugin by specifying its URL"],id:"orion.installPlugin",parameters:new b.ParametersDescription([new b.CommandParameter("url","url",g["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 b.URLBinding("installPlugin","url"));this.commandService.addCommand(new d.Command({name:g["Reload all"],tooltip:g["Reload all installed plugins"],
id:"orion.reloadAllPlugins",callback:this.reloadPlugins.bind(this)}));this.commandService.registerCommandContribution("pluginCommands","orion.reloadAllPlugins",3);this.commandService.addCommand(new d.Command({name:g.Create,tooltip:g["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 d.Command({name:g.Reload,tooltip:g["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 d.Command({name:g.Delete,tooltip:g["Delete this plugin from the configuration"],
imageClass:"core-sprite-delete",id:"orion.uninstallPlugin",visibleWhen:function(a){return!p[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 d.Command({name:g.Disable,tooltip:g.DisableTooltip,id:"orion.disablePlugin",imageClass:"core-sprite-stop",visibleWhen:function(b){return p[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 d.Command({name:g.Enable,tooltip:g.EnableTooltip,id:"orion.enablePlugin",imageClass:"core-sprite-start",visibleWhen:function(b){return p[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=g.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=
g["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(g["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(g["Installing "]+a+"...",null,!0),this.settings.pluginRegistry.getPlugin(a)?this.statusService.setErrorMessage(g["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(g["Reloaded "]+a.length+g[" 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(g["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())});f.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(g["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(g["Are you sure you want to uninstall '"]+a+"'?")&&this.forceRemove(a)}});return o});
define("orion/widgets/settings/Subsection",[],function(){function g(g){var f=g.sectionName;this.parentNode=g.parentNode;this.children=g.children;g=document.createElement("section");g.classList.add("setting-row");g.setAttribute("role","region");g.setAttribute("aria-labelledby","Navigation-header");var d=document.createElement("h3");d.classList.add("setting-header");d.textContent=f;f=document.createElement("div");f.classList.add("setting-content");g.appendChild(d);g.appendChild(f);this.node=g;this.subsectionContent=
f}g.prototype.show=function(){this.parentNode&&this.parentNode.appendChild(this.node);if(this.children){var g=this;this.children.forEach(function(f){g.subsectionContent.appendChild(f.node);f.show()})}};return g});define("orion/form",[],function(){function g(g){return encodeURIComponent(g).replace(/[!'()*]/g,escape).replace("%20","+")}return{encodeFormData:function(j){for(var j=j||{},f=Object.keys(j),d=[],b=0;b<f.length;b++){var h=f[b],e=j[h];d.push(g(h)+"="+g(e))}return d.join("&")}}});
define("profile/UsersService",["orion/Deferred","orion/xhr","orion/EventTarget","orion/form"],function(g,j,f,d){function b(b){return b===""?null:JSON.parse(b)}function h(b){f.attach(this);if(b)this._serviceRegistry=b,this._serviceRegistration=b.registerService("orion.core.user",this)}h.prototype={getUsersListSubset:function(d,c,a){var f=new g,h=this;j("GET","../users?start="+d+"&rows="+c,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(c){c=b(c.response);a&&(typeof a==="function"?a(c):
h.dispatchEvent({type:a,data:c}));f.resolve(c)},function(a){f.reject(a.response||a)});return f},getUsersList:function(d){var c=new g,a=this;j("GET","../users",{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(f){f=b(f.response);d&&(typeof d==="function"?d(f):a.dispatchEvent({type:d,data:f}));c.resolve(f.users)},function(a){c.reject(a.response||a)});return c},deleteUser:function(d,c){var a=new g,f=this;j("DELETE",d,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(d){d=b(d.response);
c&&(typeof c==="function"?c(d):f.dispatchEvent({type:c,data:d}));a.resolve(d)},function(b){a.reject(b.response||b)});return a},createUser:function(e){var e=e||{},c={login:e.login,password:e.password,email:e.email};if(e.guest)c.guest="",typeof c.login!=="string"&&delete c.login,typeof c.password!=="string"&&delete c.password,typeof c.email!=="string"&&delete c.email;return j("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:d.encodeFormData(c)}).then(function(a){return(new g).resolve(b(a.response))},
function(a){var c=a;try{c=b(a.response||a.error)}catch(d){}return(new g).reject(c)})},getUserInfo:function(d,c){var a=new g,f=this;j("GET",d,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(d){d=b(d.response);c&&(typeof c==="function"?c(d):f.dispatchEvent({type:c,data:d}));a.resolve(d)},function(b){a.reject(b.response||b)});return a},updateUserInfo:function(d,c,a){var f=new g,h=this;if(c.password!==c.passwordRetype)return f.reject({message:"Passwords do not match!"}),f;j("PUT",d,{headers:{"Content-Type":"application/json; charset=UTF-8",
"Orion-Version":"1"},timeout:15E3,data:JSON.stringify(c)}).then(function(c){c=b(c.response);a&&(typeof a==="function"?a(c):h.dispatchEvent({type:a,data:c}));f.resolve(c)},function(a){f.reject(a.response||a)});return f},resetUserPassword:function(e,c,a){var f=new g,h=this;j("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:d.encodeFormData({reset:!0,login:e,password:c})}).then(function(c){c=b(c.response);a&&(typeof a==="function"?
a(c):h.dispatchEvent({type:a,data:c}));f.resolve(c)},function(a){f.reject(a.response||a)});return f}};return h});
define("orion/widgets/input/LabeledCommand",["orion/objects","orion/webui/littlelib"],function(g,j){function f(d,b){g.mixin(this,d);this.node=b||document.createElement("div")}g.mixin(f.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 f});
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(g,j,f,d,b,h,e,c,a,i,k){function l(a,b){h.mixin(this,a);this.node=b}h.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;b.processTextNodes(this.node,g);this.sections=b.$(".sections",this.node);this.linkedSection=b.$(".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:g.Username,editmode:"readonly"}),new i({fieldlabel:g["Full Name"]}),new i({fieldlabel:g["Email Address"]}),new k({fieldlabel:g["Email Confirmed"],
editmode:"readonly"})];(new c({sectionName:g.Account,parentNode:this.sections,children:this.accountFields})).show();this.passwordFields=[new i({fieldlabel:g["Current Password"],inputType:"password"}),new i({fieldlabel:g["New Password"],inputType:"password"}),new i({fieldlabel:g["Verify Password"],inputType:"password"})];(new c({sectionName:g.Password,parentNode:this.sections,children:this.passwordFields})).show();this.commandService.addCommand(new f.Command({name:g.Update,tooltip:g["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",b.node("userCommands"),this,this,"button");this.linkedAccountSection=new d.Section(this.linkedSection,{id:"linkedAccountSection",title:g["Linked Accounts"],content:'<div id="iFrameContent"></div>',canHide:!0,useAuxStyle:!0,hidden:!0,slideout:!0});var a=this.iframe=document.createElement("iframe");
a.src="../mixloginstatic/manageOpenids.html";a.style.border="0";a.style.width="500px";b.node("iFrameContent").appendChild(a)},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(),h=this.passwordFields[2].getValue();if(f.length>0)f!==h?(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=h,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(g["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)b.empty(this.node),this.node=this.sections=this.linkedSection=null}});return l});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(g){function j(f){this._prefix="/git/credentials";this._preferenceService=f.getService("orion.core.preference")}j.prototype={put:function(f,d){var b={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(d!==void 0){if(d.gitSshUsername!==void 0&&d.gitSshUsername!==null)b.gitSshUsername=d.gitSshUsername;if(d.gitSshPassword!==void 0&&d.gitSshPassword!==null)b.gitSshPassword=d.gitSshPassword;if(d.gitPrivateKey!==void 0&&
d.gitPrivateKey!==null)b.gitPrivateKey=d.gitPrivateKey;if(d.gitPassphrase!==void 0&&d.gitPassphrase!==null)b.gitPassphrase=d.gitPassphrase}var h=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(d){var c=d.get("settings");c===void 0?h.reject():c.enabled?(d.put(f,b),h.resolve()):h.reject()});return h},get:function(f){var d={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},b=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(g){var e=
g.get("settings");e===void 0?b.reject():e.enabled?(g=g.get(f),g!==void 0?b.resolve(g):b.resolve(d)):b.reject()});return b},isEnabled:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d=d.get("settings");d===void 0?f.resolve(!1):f.resolve(d.enabled)});return f},enable:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d.put("settings",{enabled:!0});f.resolve()});return f},disable:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,
2).then(function(d){d.put("settings",{enabled:!1});f.resolve()});return f},remove:function(f){var d=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(b){b.remove(f);d.resolve()});return d},getRepositories:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(d){for(var b=[],d=d.keys(),g=0;g<d.length;++g)d[g]!=="settings"&&b.push(d[g]);f.resolve(b)});return f}};return j.prototype.constructor=j});
define("orion/git/gitConfigPreference",["orion/Deferred"],function(g){function j(f){this._prefix="/git/config";this._preferenceService=f.getService("orion.core.preference")}j.prototype={getConfig:function(){var f=new g;this._preferenceService.getPreferences(this._prefix).then(function(d){d=d.get("userInfo");f.resolve(d)});return f},setConfig:function(f){var d=new g;this._preferenceService.getPreferences(this._prefix).then(function(b){b.put("userInfo",f);d.resolve()});return d}};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(g,j,f,d,b,h,e,c,a,i,k,l,m){function o(a,b){c.mixin(this,a);this.node=b}c.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;e.processTextNodes(this.node,g);this.sections=e.$(".sections",this.node);this.gitSections=e.$(".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 b(this.registry)).isEnabled().then(function(b){a.gitCredentialsFields[0].setChecked(b)})},createSections:function(){this.gitFields=[new k({fieldlabel:g["Git Email Address"]}),new k({fieldlabel:g["Git Username"]})];
(new i({sectionName:g["Git Config"],parentNode:this.sections,children:this.gitFields})).show();this.commandService.addCommand(new f.Command({name:g.Update,tooltip:g["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",e.node("userCommands"),this,this,"button");this.gitCredentialsFields=[new l({fieldlabel:g["Enable Storage"]})];
var c,d=this;this.commandService.addCommand(new f.Command({name:g.Delete,id:"eclipse.orion.git.eraseGitCredentials",callback:function(c){var e=c.items.gitUrl,f=c.items.keyIndex,h=d.registry.getService("orion.page.message");(new b(d.registry)).remove(e).then(function(){h.setProgressResult(a.formatMessage(g["Deleted git credentials for ${0}"],[e]));d.gitCredentialsFields[f+1].destroy()})},visibleWhen:function(){return!0}}));this.commandService.registerCommandContribution("repositoryItemCommands","eclipse.orion.git.eraseGitCredentials",
1);(new b(this.registry)).getRepositories().then(function(a){for(var b=0;b<a.length;++b){var h=new m({keyIndex:b,fieldlabel:a[b],commandService:d.commandService,scopeId:"repositoryItemCommands"});d.gitCredentialsFields.push(h)}c=new i({sectionName:"",parentNode:d.gitSections,children:d.gitCredentialsFields});c.show();a=new f.Command({name:g.Update,tooltip:g["Update Git Credentials"],id:"orion.updateGitCredentials",callback:function(a){d.updateGitCredentials(a.items)}.bind(d)});d.commandService.addCommand(a);
d.commandService.registerCommandContribution("gitProfileCommands","orion.updateGitCredentials",2);d.commandService.renderCommands("gitProfileCommands",e.node("gitCommands"),d,d,"button")})},update:function(){var a=new h(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(g["Git user data successfully updated."])})},updateGitCredentials:function(){var a=this.registry.getService("orion.page.message"),
c=new b(this.registry);this.gitCredentialsFields[0].isChecked()?window.confirm(g["Please be aware that your credentials will be stored persistently in the browser."]+"\n"+g["Do you wish to enable the Key Storage?"])&&c.enable().then(function(){a.setProgressResult(g["Git Credentials successfully updated."])}):c.disable().then(function(){a.setProgressResult(g["Git Credentials successfully updated."])})},show:function(){this.createElements();(new h(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)e.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(g,j,f,d,b,h,e,c,a){function i(b,c,d,e,f){if(!e.local){var h=document.createElement("span");h.classList.add(r);h.classList.add(f[c+"LocalVisible"]?n:p);h.title=g.localSettingsTooltip;h.addEventListener("click",
function(){h.classList.contains(p)?(h.classList.add(n),h.classList.remove(p)):(h.classList.add(p),h.classList.remove(n))});c=a.$("label",b.node);c.parentNode.insertBefore(h,c)}return b}function k(a,b,c){return i(new f(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)?g[a+"Invalid"]:""}function o(a,b){c.mixin(this,a);this.node=b}var r="setting-local-indicator",n="on",p="off",q={editorSettings:{keys:{keyBindings:{values:[{value:"",
label:g.Default},{value:"Emacs",label:"Emacs"},{value:"vi",label:"vi"}],create:function(a,b,c){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===c[a])h.selected=!0;b.options.push(h)}return i(new d(b),a,this,b,c)}}},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}},languageTools:{showOccurrences:{create:k},contentAssistAutoTrigger:{create:k}}}};c.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=a.$(".sections",this.node);this.createSections();this.local?this.sections.classList.add("local"):
(document.getElementById("pageActions").innerHTML=this.commandTemplate,this.createToolbar())},createSections:function(){var c=this.oldPrefs,e=[],f,i,j=this.themePreferences;if(!this.local&&this.editorThemeWidget)this.editorThemeSection=new b.Section(this.sections,{id:"editorThemeSettings",title:g.EditorThemes,canHide:!0,slideout:!0}),this.editorThemeWidget.renderData(this.editorThemeSection.getContentElement(),"INITIALIZE");else{var k=this.oldThemeStyles;if(c.themeVisible&&(!this.local||c.themeLocalVisible)){var l=
k.styles;f=[];for(var m=0;m<l.length;m++){i={value:l[m].name,label:l[m].name};if(l[m].name===k.style.name)i.selected=!0;f.push(i)}e.push(f=this.themeSelect=new d({fieldlabel:g.Theme,options:f}));f.setStorageItem=function(a){j.setTheme(a)}}if(c.fontSizeVisible&&(!this.local||c.fontSizeLocalVisible)){k=k.style.fontSize;f=[];for(l=8;l<19;l++){i={value:l+"pt",label:l+"pt"};if(i.label===k)i.selected=!0;f.push(i)}e.push(f=this.sizeSelect=new d({fieldlabel:g["Font Size"],options:f}));f.setStorageItem=function(a){j.setFontSize(a)}}!this.local&&
e.length>0&&(e=new h({sectionName:g.Theme,parentNode:this.editorThemeSection.getContentElement(),children:e}),e.show(),e=[])}var o,s;for(s in q)if(q.hasOwnProperty(s)){if(!this.local)o=new b.Section(this.sections,{id:s,title:g[s],canHide:!0,slideout:!0}),f=document.createElement("div"),f.classList.add("setting-info"),f.textContent=g.editorSettingsInfo,i=document.createElement("span"),i.classList.add(r),i.classList.add(n),k=document.createElement("span"),k.classList.add(r),k.classList.add(p),l=document.createElement("span"),
l.classList.add("core-sprite-wrench"),l.classList.add("icon-inline"),l.classList.add("imageSprite"),a.processDOMNodes(f,[i,k,l]),o.getContentElement().appendChild(f);for(var y in q[s])if(q[s].hasOwnProperty(y)){for(var w in q[s][y])if(c[w+"Visible"]&&(!this.local||c[w+"LocalVisible"]))i=q[s][y][w],f={},f.local=this.local,f.fieldlabel=g[w],e.push(i.widget=i.create(w,f,c));!this.local&&e.length>0&&(e=new h({sectionName:g[y],parentNode:o.getContentElement(),children:e}),e.show(),e=[])}}this.local&&e.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 b=a.node("editorSettingsToolActionsArea");this.commandService.addCommand(new e.Command({name:g.Restore,tooltip:g["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",
b,this,this,"button");this.commandService.addCommand(new e.Command({name:g.Update,tooltip:g["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",b,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(g["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(g["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(b){this._forEach(function(c,d){b[c]=d.widget.getSelection();if(!this.local){var e=a.$("."+r,d.widget.node);b[c+"LocalVisible"]=e&&e.classList.contains(n)}return!0}.bind(this))},setValues:function(b){this._forEach(function(c,d){d.widget.setSelection(b[c]);
if(!this.local){var e=a.$("."+r,d.widget.node);e&&(b[c+"LocalVisible"]?(e.classList.add(n),e.classList.remove(p)):(e.classList.add(p),e.classList.remove(n)))}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 g(d,b){this._preferences=d;if(this._callback=b)var f=d.listenForChangedSettings(j,function(d){d.key===f&&b()}.bind(this))}var j="/editor/settings",f={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,contentAssistAutoTrigger:!0,contentAssistAutoTriggerVisible:!0,
showOccurrences:!1,showOccurrencesVisible:!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};g.prototype={_initialize:function(d){var d=d.get("editorSettings")||{},b;for(b in f)d.hasOwnProperty(b)||(d[b]=f[b]);return d},getPrefs:function(d){this._preferences.getPreferences(j).then(function(b){b=this._initialize(b);typeof b==="string"&&(b=JSON.parse(b));d(b)}.bind(this))},setPrefs:function(d,b){this._preferences.getPreferences(j).then(function(f){f.put("editorSettings",d);d=this._initialize(f);b&&b(d);this._callback&&this._callback(d)}.bind(this))}};return{EditorPreferences:g}});
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(g,j,f,d,b,h,e,c,a,i,k,l,m,o,r,n,p,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 u=m.prototype;t.prototype=Object.create(u);h.mixin(t.prototype,{loadTranslatedPluginSettings:function(){return this.settingsRegistry.loadI18n()},show:function(){var a=this;j.all([this.preferences.getPreferences("/settingsContainer"),this.loadTranslatedPluginSettings()]).then(function(c){var c=
c[0],d=c.get("categories")||{};(d.showUserSettings===void 0||d.showUserSettings)&&a.settingsCategories.push({id:"userSettings",textContent:g["User Profile"],show:a.showUserSettings});(d.showGitSettings===void 0||d.showGitSettings)&&a.settingsCategories.push({id:"gitSettings",textContent:g.Git,show:a.showGitSettings});(d.showEditorSettings===void 0||d.showEditorSettings)&&a.settingsCategories.push({id:"editorSettings",textContent:g.Editor,show:a.showEditor});(d.showThemeSettings===void 0||d.showThemeSettings)&&
a.settingsCategories.push({id:"themeBuilder",textContent:g["UI Theme"],show:a.showThemeBuilder});(d.showPluginSettings===void 0||d.showPluginSettings)&&a.settingsCategories.push({id:"plugins",textContent:g.Plugins,show:a.showPlugins});a.settingsCategories.forEach(function(b){b.show=b.show.bind(a,b.id)}.bind(a));var e=a.settingsRegistry;e.getCategories().map(function(a){return{category:a,label:e.getCategoryLabel(a)||g[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=b.node(a.pageActions);a.manageDefaultData(c);a.drawUserInterface();window.addEventListener("hashchange",a.processHash.bind(a));f.setPageTarget({task:"Settings",serviceRegistry:a.registry,commandService:a.commandService})})},processHash:function(){var a=d.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(a){this.selectCategory(a);this.updateToolbar(a);this.themeWidget&&this.themeWidget.destroy();var a=new l.ThemeData,d=new i.ThemePreferences(this.preferences,a);this.themeWidget=new c({commandService:this.commandService,preferences:d,themeData:a});b.empty(this.table);a=document.createElement("div");
this.table.appendChild(a);this.themeWidget.renderData(a,"INITIALIZE")},showEditor:function(a){this.selectCategory(a);b.empty(this.table);this.editorSettingWidget&&this.editorSettingWidget.destroy();this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);var d=new k.ThemeData,e=new i.ThemePreferences(this.preferences,d),f=new c({commandService:this.commandService,preferences:e,themeData:d,toolbarId:"editorThemeSettingsToolActionsArea"}),d={name:g.Import,tip:g["Import a theme"],
id:0,callback:d.importTheme.bind(d)};f.addAdditionalCommand(d);d=new q.EditorPreferences(this.preferences);this.editorSettings=new p({registry:this.registry,preferences:d,themePreferences:e,editorThemeWidget:f,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.editorSettings.show()},showUserSettings:function(a){this.selectCategory(a);b.empty(this.table);this.userWidget&&this.userWidget.destroy();
this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);this.userWidget=new r({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);b.empty(this.table);this.gitWidget&&this.gitWidget.destroy();this.updateToolbar(a);a=document.createElement("div");
this.table.appendChild(a);this.gitWidget=new n({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(){b.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(c){b.empty(this.table);this.pluginSettingsWidget&&this.pluginSettingsWidget.destroy();var d=this.settingsRegistry.getSettings(c).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 a({parent:this.table,serviceRegistry:this.registry,settings:d,title:g[c]||c})},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)});u.selectCategory.apply(this,arguments);
var b=d.matchResourceParameters();if(b.category!==a)b.category=a,delete b.resource,window.location=(new e("#,{params*}")).expand({params:b})},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;u.addCategory.apply(this,arguments)},addCategories:function(){var a=this;
this.settingsCategories.forEach(function(b){a.addCategory(b)})},drawUserInterface:function(a){u.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(g,j,f,d,b,h,e,c,a,i,k,l,m,o,r,n,p,q,t){f.startup().then(function(f){var j=
f.serviceRegistry,n=f.preferences,B=f.pluginRegistry,z=new i.OperationsClient(j),H=new d.StatusReportingService(j,z,"statusPane","notifications","notificationArea"),F=new h.CommandRegistry({});new b.ProgressService(j,z,F);var z=new k.FileClient(j),z=new l.Searcher({serviceRegistry:j,commandService:F,fileService:z}),B=new a.UsersClient(j,B),E=new e.Command({name:"Clear themes and editor settings",tooltip:"Clear all settings associated with editor themes and window themes",id:"orion.clearThemes",callback:function(){n.getPreferences("/themes",
2).then(function(a){a.put("styles",null);a.put("selected",null);H.setMessage("Theme settings have been cleared.")})}});F.addCommand(E);F.registerCommandContribution("globalActions","orion.clearThemes",1,null,!0,new c.KeyBinding("t",!0,!0,!0));E=new m.DialogService(j);o.generateBanner("orion-settings",j,F,n,z);z=new q(j,new p.MetaTypeRegistry(j));H.setMessage(g["Loading..."]);(new t({preferences:n,registry:j,preferencesStatusService:H,commandService:F,preferenceDialogService:E,settingsCore:f,pageActions:"pageActions",
userClient:B,settingsRegistry:z},r.node("categoriesContainer"),r.node("settings"))).show();H.setMessage("")})});