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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 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 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) 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(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=a.shift();)e();i=!1}function j(e){a.push(e);i||(i=!0,setTimeout(g,0))}function f(a){return function(){a.apply(void 0,arguments)}}function c(){function e(){for(var b;b=m.shift();){var d=b.deferred,k=l==="fulfilled"?"resolve":"reject";if(typeof b[k]==="function")try{var e=(0,b[k])(h),c=e&&(typeof e===
"object"||typeof e==="function")&&e.then;if(typeof c==="function")if(e===d.promise)d.reject(new TypeError);else{var q=e.cancel;typeof q==="function"?d._protected(a).parentCancel=q.bind(e):delete d._protected(a).parentCancel;c.call(e,f(d.resolve),f(d.reject),f(d.progress))}else d.resolve(e)}catch(i){d.reject(i)}else d[k](h)}}function d(b){delete i.parentCancel;l="rejected";h=b;m.length&&j(e)}function b(a){function k(b){return function(d){f||(f=!0,b(d))}}var f=!1;delete i.parentCancel;try{var g=a&&
(typeof a==="object"||typeof a==="function")&&a.then;if(typeof g==="function")if(a===q)d(new TypeError);else{l="assumed";var u=a&&a.cancel;if(typeof u!=="function"){var A=new c,a=A.promise;try{g(A.resolve,A.reject,A.progress)}catch(w){A.reject(w)}u=a.cancel;g=a.then}h=a;g.call(a,k(b),k(d));i.parentCancel=u.bind(a)}else l="fulfilled",h=a,m.length&&j(e)}catch(B){k(d)(B)}}function k(){var b=i.parentCancel;if(b)delete i.parentCancel,b();else if(!l)b=Error("Cancel"),b.name="Cancel",d(b)}var h,l,m=[],q=
this,i={};Object.defineProperty(this,"_protected",{value:function(b){if(b!==a)throw Error("protected");return i}});this.resolve=function(d){l||b(d);return q};this.reject=function(b){l||d(b);return q};this.progress=function(b){l||m.forEach(function(d){if(d.progress)try{d.progress(b)}catch(a){}});return q.promise};this.cancel=function(){i.parentCancel?setTimeout(k,0):k();return q};this.then=function(b,d,h){b={resolve:b,reject:d,progress:h,deferred:new c};m.push(b);b.deferred._protected(a).parentCancel=
q.promise.cancel.bind(q);(l==="fulfilled"||l==="rejected")&&j(e);return b.deferred.promise};this.promise={then:q.then,cancel:q.cancel}}var a=[],i=!1;c.all=function(a,d){function b(b,d){m||(l[b]=d,--h===0&&q.resolve(l))}function k(a,h){if(!m){if(d)try{b(a,d(h));return}catch(k){h=k}q.reject(h)}}var h=a.length,l=[],m=!1,q=new c;q.then(void 0,function(){m=!0;a.forEach(function(b){b.cancel&&b.cancel()})});h===0?q.resolve(l):a.forEach(function(d,a){d.then(b.bind(void 0,a),k.bind(void 0,a))});return q.promise};
c.when=function(a,d,b,k){var h;if(!(a&&typeof a.then==="function"))h=new c,h.resolve(a),a=h.promise;return a.then(d,b,k)};return c});
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(c){try{typeof c==="function"?c(g):c.handleEvent(g)}catch(a){typeof console!=="undefined"&&console.log(a)}});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 c=this._namedListeners[g];if(c)for(var a=0;a<c.length;a++)if(c[a]===f){c.length===1?delete this._namedListeners[g]:c.splice(a,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(d,b,a){this._properties=a||{};this._properties["service.id"]=d;this._properties.objectClass=b;this._properties["service.names"]=b}function c(d,b,a){this._serviceId=d;this._serviceReference=b;this._internalRegistry=a}function a(d,b){function a(h){return function(){var a;try{if(!b())throw Error("Service was unregistered");var k=d[h].apply(d,Array.prototype.slice.call(arguments));if(k&&typeof k.then==="function")return k;
else a=new g,a.resolve(k)}catch(e){a=new g,a.reject(e)}return a.promise}}for(var h in d)typeof d[h]==="function"&&(this[h]=a(h))}function i(d,b){this.type=d;this.serviceReference=b}function e(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new j;var d=this;this._internalRegistry={isRegistered:function(b){return d._entries[b]?!0:!1},unregisterService:function(b){var a=d._entries[b];if(!a)throw Error("Service has already been unregistered: "+b);var h=a.reference;d._serviceEventTarget.dispatchEvent(new i("unregistering",
h));d._entries[b]=null;h.getProperty("objectClass").forEach(function(b){for(var a=d._namedReferences[b],k=0;k<a.length;k++)if(a[k]===h){a.length===1?delete d._namedReferences[b]:a.splice(k,1);break}})},modifyService:function(b){var a=d._entries[b];if(!a)throw Error("Service not found while trying to send modified event: "+b);d._serviceEventTarget.dispatchEvent(new i("modified",a.reference))}}}f.prototype={getPropertyKeys:function(){var a=[],b;for(b in this._properties)this._properties.hasOwnProperty(b)&&
a.push(b);return a},getProperty:function(a){return this._properties[a]}};f.prototype.constructor=f;c.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("Service has already been unregistered: "+this._serviceId);return this._serviceReference},setProperties:function(a){var b=this._serviceReference._properties;this._serviceReference._properties=a||{};a["service.id"]=this._serviceId;
a.objectClass=b.objectClass;a["service.names"]=b["service.names"];this._internalRegistry.modifyService(this._serviceId)}};c.prototype.constructor=c;e.prototype={getService:function(a){var b;if(typeof a==="string")(a=this._namedReferences[a])&&a.some(function(a){b=this._entries[a.getProperty("service.id")].service;return!!b},this);else if(a=this._entries[a.getProperty("service.id")])b=a.service;return b||null},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:
[];var b=[];this._entries.forEach(function(a){a&&b.push(a.reference)});return b},registerService:function(d,b,k){if(typeof b==="undefined"||b===null)throw Error("invalid service");typeof d==="string"?d=[d]:Array.isArray(d)||(d=[]);var h=this._entries.length,e=new f(h,d,k),m=this._namedReferences;d.forEach(function(b){m[b]=m[b]||[];m[b].push(e)});d=new a(b,this._internalRegistry.isRegistered.bind(null,h));this._entries.push({reference:e,service:d});d=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new i("registered",
e));return new c(h,e,d)},addEventListener:function(a,b){this._serviceEventTarget.addEventListener(a,b)},removeEventListener:function(a,b){this._serviceEventTarget.removeEventListener(a,b)}};e.prototype.constructor=e;return{ServiceRegistry:e}});
define("orion/xhr",["orion/Deferred"],function(g){function j(f,c,a,i){var e=typeof a.response!=="undefined"?a.response:a.responseText,d;try{d=a.status}catch(b){d=0}f={args:c,response:e,responseText:typeof e==="string"?e:null,status:d,url:f,xhr:a};if(typeof i!=="undefined")f.error=i;return f}return function(f,c,a){var a=a||{},i=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,e=new g,d=a.headers||{},b=a.log||!1,k;typeof d["X-Requested-With"]==="undefined"&&(d["X-Requested-With"]="XMLHttpRequest");
if(typeof a.data!=="undefined"&&(f==="POST"||f==="PUT"))k=a.data;var h=!1,l=!1;e.promise.then(void 0,function(b){h=!0;!l&&b instanceof Error&&b.name==="Cancel"&&i.abort()});i.onabort=function(){l=!0;if(!h){var b=Error("Cancel");b.name="Cancel";e.reject(b)}};i.onload=function(){var d=j(c,a,i);200<=i.status&&i.status<400?e.resolve(d):(e.reject(d),b&&typeof console!=="undefined"&&console.log(Error(i.statusText)))};i.onerror=function(){var d=j(c,a,i);e.reject(d);b&&typeof console!=="undefined"&&console.log(Error(i.statusText))};
i.onprogress=function(b){b.xhr=i;e.progress(b)};try{i.open(f,c,!0);if(typeof a.responseType==="string")i.responseType=a.responseType;if(typeof a.timeout==="number")if(typeof i.timeout==="number")i.timeout=a.timeout,i.addEventListener("timeout",function(){e.reject(j(c,a,i,"Timeout exceeded"))});else{var m=setTimeout(function(){e.reject(j(c,a,i,"Timeout exceeded"))},a.timeout);e.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(d).forEach(function(b){i.setRequestHeader(b,
d[b])});i.send(k||null)}catch(q){e.reject(j(c,a,i,q))}return e.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,j,f){function c(b,a){this._name=b;this._providers=a;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function a(b,a){return{get:function(d,e){if(a===0)return null;var c=localStorage.getItem(b+d);if(c===null)return null;c=JSON.parse(c);return e||a===-1||c._expires&&c._expires>(new Date).getTime()?(delete c._expires,c):null},set:function(d,e){if(a!==0){if(a!==-1)e._expires=(new Date).getTime()+
1E3*a;if(Object.keys(e).length===0)localStorage.removeItem(b+d);else{var c=JSON.stringify(e);localStorage.setItem(b+d,c);delete e._expires}}},remove:function(a){localStorage.removeItem(b+a)}}}function i(b){this._currentPromises={};this._cache=new a("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var a=b.getServiceReferences("orion.core.preference.provider");if(a.length>0)this._service=b.getService(a[0])}return!!this._service}}function e(b){this._location=
b;this._currentPromise=null;this._cache=new a("/orion/preferences/default",3600)}function d(){this._cache=new a("/orion/preferences/local",-1)}function b(b,a){this._userProvider=new i(b);this._localProvider=new d;a=a||"defaults.pref";a.indexOf("://")===-1&&(a=g.toUrl(a));this._defaultsProvider=new e(a);this._serviceRegistration=b.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var b=[],a=0;a<this._stores.length;++a){var d=this._stores[a];this._dirty.indexOf(d)!==-1&&
b.push(this._providers[a].put(this._name,d));if(this._pendingDeletes[a]&&this._pendingDeletes[a].length>0){for(d=0;d<this._pendingDeletes[a].length;d++)b.push(this._providers[a].remove(this._name,this._pendingDeletes[a][d]));delete this._pendingDeletes[a]}}this._dirty=[];return j.all(b)},_scheduleFlush:function(b){b&&this._dirty.indexOf(b)===-1&&this._dirty.push(b);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 b=0;b<this._stores.length;++b){var a=this._stores[b],d;for(d in a)a.hasOwnProperty(d)&&typeof this._cached[d]==="undefined"&&(this._cached[d]=a[d])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(b){return this._getCached()[b]},put:function(b,a){if(this._stores.length!==0){var d=this._stores[0];if(d[b]!==a)d[b]=a,this._cached=null,this._scheduleFlush(d)}},remove:function(b){for(var a=0;a<
this._stores.length;++a){var d=this._stores[a];if(d.hasOwnProperty(b))return delete d[b],this._pendingDeletes[a]||(this._pendingDeletes[a]=[]),this._pendingDeletes[a].push(b),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var b=0;b<this._stores.length;++b)this._stores[b]={},this._scheduleFlush(this._stores[b]);this._cached=null},sync:function(b){if(this._flushPending)return this._flushPending=!1,this._flush();for(var a=this,d=[],e=0;e<this._providers.length;++e)d.push(this._providers[e].get(this._name,
b).then(function(b){return function(d){a._stores[b]=d}}(e)));return j.all(d).then(function(){a._cached=null;a._getCached()})},flush:function(){this._flush()}};i.prototype={get:function(b,a){if(this._currentPromises[b])return this._currentPromises[b];var d=new j,e=null;a?this._cache.remove(b):e=this._cache.get(b);if(e!==null)d.resolve(e);else{this._currentPromises[b]=d;var c=this;this._service.get(b).then(function(a){c._cache.set(b,a);delete c._currentPromises[b];d.resolve(a)},function(a){a.status===
404?(a={},c._cache.set(b,a),delete c._currentPromises[b],d.resolve(a)):(delete c._currentPromises[b],d.resolve(c._cache.get(b,!0)||{}))})}return d},put:function(b,a){this._cache.set(b,a);return this._service.put(b,a)},remove:function(b,a){var d=this._cache.get(b);delete d[a];this._cache.set(b,d);return this._service.remove(b,a)}};e.prototype={get:function(b,a){if(this._currentPromise)return this._currentPromise;var d=new j,e=null;a?this._cache.remove(b):e=this._cache.get(b);if(e!==null)d.resolve(e);
else{this._currentPromise=d;var c=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=JSON.parse(a.response);c._cache.set(b,a[b]||{});c._currentPromise=null;d.resolve(a[b]||{})},function(a){a.xhr.status===401||a.xhr.status===404?(c._cache.set(b,{}),c._currentPromise=null,d.resolve({})):(c._currentPromise=null,a=c._cache.get(b,!0),a!==null?d.resolve(a[b]||{}):d.resolve({}))})}return d},put:function(){var b=new j;b.resolve();return b},remove:function(b,a){var d=
this._cache.get(b);delete d[a];this.put(b,d)}};d.prototype={get:function(b){var a=new j,b=this._cache.get(b);b!==null?a.resolve(b):a.resolve({});return a},put:function(b,a){var d=new j;this._cache.set(b,a);d.resolve();return d},remove:function(b,a){var d=this._cache.get(b);delete d[a];this.put(b,d)}};b.DEFAULT_SCOPE=1;b.LOCAL_SCOPE=2;b.USER_SCOPE=4;b.prototype={listenForChangedSettings:function(a,d,e){if(!d||typeof d!=="number"||d>7||d<1)e=d,d=b.DEFAULT_SCOPE|b.LOCAL_SCOPE|b.USER_SCOPE;window.addEventListener("storage",
e,!1);if((b.USER_SCOPE&d)!==0)return"/orion/preferences/user"+a;else if((b.LOCAL_SCOPE&d)!==0)return"/orion/preferences/local"+a;return"/orion/preferences/default"+a},getPreferences:function(a,d){if(!d||typeof d!=="number"||d>7||d<1)d=b.DEFAULT_SCOPE|b.LOCAL_SCOPE|b.USER_SCOPE;var e=[];b.USER_SCOPE&d&&this._userProvider.available()&&e.push(this._userProvider);b.LOCAL_SCOPE&d&&e.push(this._localProvider);b.DEFAULT_SCOPE&d&&e.push(this._defaultsProvider);var m=new c(a,e);return m.sync().then(function(){return m})},
getSetting:function(b,a,d){for(var e,c=0;c<b.length;c++)if(b[c].label===a)for(var i=0;i<b[c].data.length;i++)if(b[c].data[i].label===d){e=b[c].data[i].value;break}return e}};return{PreferencesService:b}});
(function(){function g(b){if(typeof b!=="string")throw new TypeError;}function j(b){return b?b.split("&"):[]}function f(b){return b.length===0?"":b.join("&")}function c(b){var a=/([^=]*)(?:=?)(.*)/.exec(b),b=a[1]?decodeURIComponent(a[1]):"",a=a[2]?decodeURIComponent(a[2]):"";return[b,a]}function a(b){var a=encodeURIComponent(b[0]);b[1]&&(a+="="+encodeURIComponent(b[1]));return a}function i(b,a){var d="",e=[],h=0;return{next:function(){if(d!==b.query)d=b.query,e=j(d);if(h<e.length){var k=c(e[h++]);
switch(a){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(b){Object.defineProperty(this,"_url",{get:function(){return b._url}})}function d(b){return b?/[1-9]\d*$/.exec(b)[0]:""}function b(b){var a=[];b.split("/").forEach(function(b){b===".."?a.pop():b!=="."&&a.push(b)});return a.join("/")}function k(b){return b.replace(/\s/g,function(b){return"%"+b.charCodeAt(0).toString(16)})}function h(a,e){if(typeof a!==
"string")throw new TypeError;var a=k(a),h=r.exec(a);if(!h)return null;var c={};c.scheme=h[1]||"";if(c.scheme&&!o.test(c.scheme))return null;var l=h[2];if(l&&(l=p.exec(l),c.userinfo=l[1],c.host=l[2],c.port=l[3],c.port&&!n.test(c.port)))return null;c.path=h[3];c.query=h[4];c.fragment=h[5];if(!c.scheme&&e&&(c.scheme=e.scheme,!c.host&&e.host))c.userinfo=e.userinfo,c.host=e.host,c.port=e.port,c.pathRelative=!0;if(c.pathRelative)if(c.path){if(c.path[0]!=="/")h=/^(.*\/)[^\/]*$/.exec(e.path)[1]||"/",c.path=
h+c.path}else c.path=e.path;if(c.scheme)c.scheme=c.scheme.toLowerCase();if(c.port)c.port=d(c.port);if(c.host&&c.path)c.path=b(c.path);return c}function l(b,a){var d;if(a){a=a.href||a;d=h(a);if(!d||!d.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:d})}d=h(b,d);if(!d)throw new SyntaxError;Object.defineProperty(this,"_input",{value:b,writable:!0});Object.defineProperty(this,"_url",{value:d,writable:!0});var c=new e(this);Object.defineProperty(this,"query",{get:function(){return this._url?
c: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(q){}var r=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,p=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,o=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,n=/^\d*$/,s=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,u=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,A=/^([^?#\s]*)$/,w=/^([^\s]*)$/,B=/^\S*$/,x=/([^:]*):?(.*)/,H=typeof StopIteration!==
"undefined"?StopIteration:Error("Stop Iteration"),G={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(e.prototype,{get:{value:function(b){g(b);var a;j(this._url.query).some(function(d){d=c(d);if(d[0]===b)return a=d[1],!0});return a},enumerable:!0},set:{value:function(b,d){g(b);g(d);var e=j(this._url.query);e.some(function(h,k){var l=c(h);if(l[0]===b)return l[1]=d,e[k]=a(l),!0})||e.push(a([b,d]));this._url.query=f(e)},enumerable:!0},has:{value:function(b){g(b);
return j(this._url.query).some(function(a){if(c(a)[0]===b)return!0})},enumerable:!0},"delete":{value:function(b){g(b);var a=j(this._url.query),d=a.filter(function(a){return c(a)[0]!==b});return d.length!==a.length?(this._url.query=f(d),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(b,a){if(typeof b!=="function")throw new TypeError;var d=i(this._url,"keys+values");try{for(;;){var e=d.next();b.call(a,e[1],e[0],this)}}catch(c){if(c!==H)throw c;
}},enumerable:!0},keys:{value:function(){return i(this._url,"keys")},enumerable:!0},values:{value:function(){return i(this._url,"values")},enumerable:!0},items:{value:function(){return i(this._url,"keys+values")}},size:{get:function(){return j(this._url.query).length},enumerable:!0},getAll:{value:function(b){g(b);var a=[];j(this._url.query).forEach(function(d){d=c(d);d[0]===b&&a.push(d[1])});return a},enumerable:!0},append:{value:function(b,d){g(b);g(d);var e=j(this._url.query);e.push(a([b,d]));this._url.query=
f(e)},enumerable:!0}});Object.defineProperties(l.prototype,{href:{get:function(){var b;if(this._url){b=this._url;var a=b.scheme?b.scheme+":":"";b.host&&(a+="//",b.userinfo&&(a+=b.userinfo+"@"),a+=b.host,b.port&&(a+=":"+b.port));a+=b.path;b.query&&(a+="?"+b.query);b.fragment&&(a+="#"+b.fragment);b=a}else b=this._input;return b},set:function(b){g(b);this._input=b;this._url=h(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(b){g(b);if(this._url&&(b=b.slice(-1)===":"?b.substring(0,b.length-1):b,b===""||o.test(b)))this._url.scheme=b.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(b){g(b);if(this._url)this._url.userinfo=b}},username:{get:function(){if(!this._url)return"";var b=x.exec(this._userinfo);return decodeURIComponent(b[1]||"")},set:function(b){g(b);if(this._url){var a=
x.exec(this._userinfo),b=[encodeURIComponent(b||"")];a[2]&&b.push(a[2]);this._userinfo=b.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var b=x.exec(this._userinfo);return decodeURIComponent(b[2]||"")},set:function(b){g(b);if(this._url){var a=[x.exec(this._userinfo)[1]||""];b&&a.push(encodeURIComponent(b));this._userinfo=a.join(":")}},enumerable:!0},host:{get:function(){var b="";this._url&&this._url.host&&(b+=this._url.host,this._url.port&&(b+=":"+this._url.port));return b},
set:function(b){g(b);if(this._url&&(b=u.exec(b)))this._url.host=b[1],this._url.port=d(b[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(b){g(b);if(this._url&&s.exec(b))this._url.host=b},enumerable:!0},port:{get:function(){var b=this._url?this._url.port||"":"";b&&b===G[this.protocol]&&(b="");return b},set:function(b){g(b);if(this._url&&n.exec(b))this._url.port=d(b)},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(a){g(a);
if(this._url&&A.exec(a))this._url.host&&a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?b(a):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(b){g(b);if(this._url&&(b&&b[0]==="?"&&(b=b.substring(1)),w.exec(b)))this._url.query=b},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(b){g(b);if(this._url&&(b&&b[0]==="#"&&(b=b.substring(1)),B.exec(b)))this._url.fragment=b},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(b,a){var d=Object.keys(b),e=Object.keys(a);if(d.length!==e.length)return!1;d.sort();e.sort();for(var c=0,h=d.length;c<h;c++){var k=d[c];if(k!==e[c])return!1;var i=b[k],k=a[k];if(i!==k&&JSON.stringify(i)!==JSON.stringify(k))return!1}return!0}function c(b){if(b.indexOf("://")===-1)try{return(new URL(b,location.href)).href}catch(a){}return b}function a(b){var a=null,d={key:function(d){return(a=
a||Object.keys(b))[d]},getItem:function(a){return b[a]},setItem:function(d,e){b[d]=e;a=null},removeItem:function(d){delete b[d];a=null},clear:function(){(a=a||Object.keys(b)).forEach(function(a){delete b[a]}.bind(this));a=null}};Object.defineProperty(d,"length",{get:function(){return(a=a||Object.keys(b)).length}});return d}function i(b,a){if(a&&a instanceof XMLHttpRequest){var d,e;try{d=a.status,e=a.statusText}catch(c){d=0,e=""}return{status:d||0,statusText:e}}return a}function e(b){var a=b?JSON.parse(JSON.stringify(b,
i)):b;if(b instanceof Error)a.__isError=!0,a.message=a.message||b.message,a.name=a.name||b.name;return a}function d(b,a){this.type=b;this.plugin=a}function b(b,a){this.__objectId=b;this.__methods=a}function k(a,c,h){function k(b){E&&h.postMessage(b,E)}function i(a){if(!E)return(new g).reject(Error("plugin not connected"));a.id=String(R++);var d=new g;L[a.id]=d;d.then(null,function(b){v==="active"&&b instanceof Error&&b.name==="Cancel"&&k({requestId:a.id,method:"cancel",params:b.message?[b.message]:
[]})});var e=Object.prototype.toString;a.params.forEach(function(c,h){if(e.call(c)==="[object Object]"&&!(c instanceof b)){var k,l;for(k in c)e.call(c[k])==="[object Function]"&&(l=l||[],l.push(k));if(l){var m=P++;M[m]=c;k=function(){delete M[m]};d.then(k,k);a.params[h]=new b(m,l)}}});h.postMessage(a,E);return d.promise}function o(b,a){b||b===0?k({id:b,result:null,error:a}):console.log(a)}function n(b,a,d,c){c.forEach(function(b,a){if(b&&typeof b.__objectId!=="undefined"){var d={};b.__methods.forEach(function(a){d[a]=
function(){return i({objectId:b.__objectId,method:a,params:Array.prototype.slice.call(arguments)})}});c[a]=d}});var h=typeof b===void 0?null:{id:b,result:null,error:null};try{var l=d.apply(a,c);if(h)l&&typeof l.then==="function"?(K[b]=l,l.then(function(a){delete K[b];h.result=a;k(h)},function(a){if(K[b])delete K[b],h.error=e(a),k(h)},function(){k({responseId:b,method:"progress",params:Array.prototype.slice.call(arguments)})})):(h.result=l,k(h))}catch(m){if(h)h.error=e(m),k(h)}}function s(b){try{if(b.method){var a=
b.method,d=b.params||[];if("serviceId"in b){var e=S[b.serviceId];e||o(b.id,"service not found");a in e?n(b.id,e,e[a],d):o(b.id,"method not found")}else if("objectId"in b){var c=M[b.objectId];c||o(b.id,"object not found");a in c?n(b.id,c,c[a],d):o(b.id,"method not found")}else if("requestId"in b){var k=K[b.requestId];k&&a==="cancel"&&k.cancel&&k.cancel.apply(k,d)}else if("responseId"in b){var l=L[b.responseId];l&&a==="progress"&&l.progress&&l.progress.apply(l,d)}else if("plugin"===b.method){var m=
b.params[0];N({headers:m.headers,services:m.services}).then(function(){y&&y.resolve(x)})}else if("timeout"===b.method)y&&y.reject(b.error);else throw Error("Bad method: "+b.method);}else{var i=L[String(b.id)];delete L[String(b.id)];if(b.error){var p=h.handleServiceError(x,b.error);i.reject(p)}else i.resolve(b.result)}}catch(f){console.log("Plugin._messageHandler "+f)}}function u(a){var d={};if(a.methods&&(a.methods.forEach(function(b){d[b]=function(){var d={serviceId:a.serviceId,method:b,params:Array.prototype.slice.call(arguments)};
return v==="active"?i(d):x.start({"transient":!0}).then(function(){return i(d)})}}),d.addEventListener&&d.removeEventListener)){var e=new j,c=P++;M[c]={handleEvent:e.dispatchEvent.bind(e)};var h=new b(c,["handleEvent"]),k=d.addEventListener;d.addEventListener=function(b,a){e._namedListeners[b]||k(b,h);e.addEventListener(b,a)};var l=d.removeEventListener;d.removeEventListener=function(b,a){e.removeEventListener(b,a);e._namedListeners[b]||l(b,h)}}return d}function A(b){var d=JSON.parse(JSON.stringify(b.properties));
d.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);d.objectClass=b;return d}function w(b){var a=u(b),d=A(b),d=h.registerService(b.names||b.type,a,d);F[b.serviceId]={registration:d,proxy:a}}function B(){h.persist(a,{created:H,headers:G,services:D,autostart:t,lastModified:z})}var x=this,c=c||{},H=c.created||(new Date).getTime(),G=c.headers||{},D=c.services||[],t=c.autostart,z=c.lastModified||0,v="installed",C,y,E,O,F={},R=0,P=0,K={},L={},M={},S={},N;this._persist=B;this._resolve=function(){v=
"resolved";h.dispatchEvent(new d("resolved",x))};this._getAutostart=function(){return t};this._getCreated=function(){return H};this.getLocation=function(){return a};this.getHeaders=function(){return JSON.parse(JSON.stringify(G))};this.getName=function(){var b=this.getHeaders();return b?b.name||"":null};this.getVersion=function(){var b=this.getHeaders();return b?b.version||"0.0.0":null};this.getLastModified=function(){return z};this.getServiceReferences=function(){var b=[];Object.keys(F).forEach(function(a){b.push(F[a].registration.getReference())});
return b};this.setParent=function(b){return O!==b?(O=b,x.stop({"transient":!0}).then(function(){if("started"===t)return x.start({"transient":!0});else if("lazy"===t)return x.start({lazy:!0,"transient":!0})})):(new g).resolve()};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.start.bind(this,b));if(v==="active")return(new g).resolve();if(!b||!b.transient){var e=b&&b.lazy?"lazy":"started";
e!==t&&(t=e,B())}e=h.getState();if(e!=="starting"&&e!=="active")return b.transient?(new g).reject(Error("start transient error")):(new g).resolve();if(v==="installed")try{this._resolve()}catch(c){return(new g).reject(c)}v==="resolved"&&D.forEach(function(b){w(b)});if(b&&b.lazy)return v!=="starting"&&(v="starting",h.dispatchEvent(new d("lazy activation",x))),(new g).resolve();var k=new g;C=k;v="starting";h.dispatchEvent(new d("starting",x));y=new g;E=h.connect(a,s,O);y.then(function(){y=null;v="active";
h.dispatchEvent(new d("started",x));C=null;k.resolve()},function(){y=null;v="stopping";h.dispatchEvent(new d("stopping",x));Object.keys(F).forEach(function(b){F[b].registration.unregister();delete F[b]});h.disconnect(E);E=null;v="resolved";C=null;h.dispatchEvent(new d("stopped",x));k.reject(Error("plugin activation error"))});return k.promise};this.stop=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.stop.bind(this,b));if((!b||
!b.transient)&&"stopped"!==t)t="stopped",B();if(v!=="active"&&v!=="starting")return(new g).resolve();C=b=new g;v="stopping";h.dispatchEvent(new d("stopping",x));Object.keys(F).forEach(function(b){F[b].registration.unregister();delete F[b]});E&&(h.disconnect(E),E=null);v="resolved";C=null;h.dispatchEvent(new d("stopped",x));b.resolve();return b.promise};N=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(!b)return z===0&&(z=(new Date).getTime(),B()),h.loadManifest(a).then(N);
var e=G,c=D,k=t;G=b.headers||{};D=b.services||{};t=b.autostart||t;b.lastModified?z=b.lastModified:(z=(new Date).getTime(),B());if(f(G,e)&&f(D,c)&&t===k)return(new g).resolve();if(v==="active"||v==="starting"){var m=[];Object.keys(D).forEach(function(b){var a=D[b];m.push(b);var d=F[b];if(d){if(f(a.methods,Object.keys(d.proxy))){var b=A(a),e=d.registration.getReference(),c={};e.getPropertyKeys().forEach(function(b){c[b]=e.getProperty(b)});f(b,c)||d.registration.setProperties(b);return}d.registration.unregister();
delete F[b]}w(a)});Object.keys(F).forEach(function(b){m.indexOf(b)===-1&&(F[b].registration.unregister(),delete F[b])})}v==="active"&&(h.disconnect(E),y=new g,E=h.connect(a,s,O),y.then(function(){y=null},function(){y=null;v="stopping";h.dispatchEvent(new d("stopping"),x);Object.keys(F).forEach(function(b){F[b].registration.unregister();delete F[b]});h.disconnect(E);E=null;v="resolved";h.dispatchEvent(new d("stopped",x))}));return(new g).resolve()};this.update=function(b){return N(b).then(function(){h.dispatchEvent(new d("updated",
x))})};this.uninstall=function(){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));h.removePlugin(this);v="uninstalled";h.dispatchEvent(new d("uninstalled",x));return(new g).resolve()}}var h=/^http[s]?/i;return{Plugin:k,PluginRegistry:function(b,e){function i(b){var a=b.source;s.some(function(d){if(a===d.target){try{var e;if(typeof d.useStructuredClone===
"undefined"){var c=typeof b.data!=="string";e=c?b.data:JSON.parse(b.data);d.useStructuredClone=c}else e=d.useStructuredClone?b.data:JSON.parse(b.data);d.handler(e)}catch(h){}return!0}})}var e=e||{},f=e.storage||localStorage;f.getItem||(f=a(f));var p="installed",o,n=[],s=[],u=new j,A={},w={registerService:b.registerService.bind(b),connect:function(b,a,d,e){function c(b){b=Error(b);b.name="timeout";a({method:"timeout",error:b})}var h={handler:a,url:b},k=setTimeout(c.bind(null,"Load timeout for: "+b),
e||15E3),l=document.createElement("iframe");l.name=b+"_"+(new Date).getTime();l.src=b;l.onload=function(){clearTimeout(k);k=setTimeout(c.bind(null,"Plugin handshake timeout for: "+b),5E3)};l.sandbox="allow-scripts allow-same-origin";l.style.width=l.style.height="100%";l.frameBorder=0;(d||o).appendChild(l);h.target=l.contentWindow;h.close=function(){clearTimeout(k);if(l){var b=l.parentNode;b&&b.removeChild(l);l=null}};s.push(h);return h},disconnect:function(b){for(var a=0;a<s.length;a++)if(b===s[a]){s.splice(a,
1);try{b.close()}catch(d){}break}},removePlugin:function(b){for(var a=0;a<n.length;a++)if(b===n[a]){n.splice(a,1);break}f.removeItem("plugin."+b.getLocation())},persist:function(b,a){f.setItem("plugin."+b,JSON.stringify(a))},postMessage:function(b,a){a.target.postMessage(a.useStructuredClone?b:JSON.stringify(b),a.url)},dispatchEvent:function(b){try{u.dispatchEvent(b)}catch(a){console&&console.log("PluginRegistry.dispatchEvent "+a)}},loadManifest:function(b){var a=new g,d=w.connect(b,function(b){d&&
b.method&&("manifest"===b.method||"plugin"===b.method?(b=b.params[0],w.disconnect(d),d=null,a.resolve(b)):"timeout"===b.method&&(w.disconnect(d),d=null,a.reject(b.error)))});return a.promise},getState:function(){return p},handleServiceError:function(b,a){if(a&&a.status===401){var d=b.getHeaders(),e=b.getName()||b.getLocation(),c=document.createElement("span");c.appendChild(document.createTextNode("Authentication required for: "+e+"."));if(d.login)c.appendChild(document.createTextNode(" ")),e=document.createElement("a"),
e.target="_blank",e.textContent="Login",e.href=d.login,h.test(e.href)?(c.appendChild(e),c.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+d.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(c)}}if(a.__isError){var k=a,a=Error(k.message);Object.keys(k).forEach(function(b){a[b]=k[b]});delete a.__isError}return a}};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=w.getState;this.init=function(){if(!(p==="starting"||p==="active"||p==="stopping")){addEventListener("message",i,!1);for(var b=[],a=0,d=f.length;a<d;a++)b.push(f.key(a));b.forEach(function(b){if(b.indexOf("plugin.")===0){var a=b.substring(7),b=JSON.parse(f.getItem(b));b.created&&n.push(new k(a,b,w))}});n.sort(function(b,a){return b._getCreated()<a._getCreated()?-1:1});if(e.parent)o=e.parent;else{o=document.createElement("div");
if(!e.visible)o.style.display="none",o.style.visibility="hidden";document.body.appendChild(o)}e.plugins&&Object.keys(e.plugins).forEach(function(b){b=c(b);if(!this.getPlugin(b)){var a=e.plugins[b];typeof a!=="object"&&(a={});a.autostart=a.autostart||e.defaultAutostart||"lazy";n.push(new k(b,a,w))}}.bind(this));p="starting"}};this.start=function(){p!=="starting"&&this.init();if(p!=="starting")return(new g).reject("Cannot start framework. Framework is already "+p+".");var b=[],a=(new Date).getTime();
n.forEach(function(d){var e=d._getAutostart();d.getLastModified()===0?b.push(d.update().then(function(){if("started"===e)return d.start({"transient":!0});if("lazy"===e)return d.start({lazy:!0,"transient":!0});d._resolve()})):"started"===e?b.push(d.start({"transient":!0})):"lazy"===e?(b.push(d.start({lazy:!0,"transient":!0})),a>d.getLastModified()+864E5&&d.update()):d._resolve()});return g.all(b,function(b){console.log("PluginRegistry.stop "+b)}).then(function(){p="active"})};this.stop=function(){if(p!==
"starting"&&p!=="active")return(new g).reject("Cannot stop registry. Registry is already "+p+".");p="stopping";var b=[];n.forEach(function(a){b.push(a.stop({"transient":!0}))});return g.all(b,function(b){console.log("PluginRegistry.stop "+b)}).then(function(){if(!e.parent){var b=o.parentNode;b&&b.removeChild(o)}o=null;removeEventListener("message",i);p="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};
this.installPlugin=function(b,a){var b=c(b),e=this.getPlugin(b);if(e)return(new g).resolve(e);if(A[b])return A[b];if(a)return e=new k(b,a,w),n.push(e),e._persist(),w.dispatchEvent(new d("installed",e)),(new g).resolve(e);var h=w.loadManifest(b).then(function(a){e=new k(b,a,w);n.push(e);e._persist();delete A[b];w.dispatchEvent(new d("installed",e));return e},function(a){delete A[b];throw a;});return A[b]=h};this.getPlugins=function(){return n.slice()};this.getPlugin=function(b){var a=null,b=c(b);n.some(function(d){if(b===
d.getLocation())return a=d,!0});return a};this.addEventListener=u.addEventListener.bind(u);this.removeEventListener=u.removeEventListener.bind(u);this.resolvePlugins=function(){var b=!0;n.forEach(function(a){b=b&&a._resolve()});return b}}}});
define("orion/serviceTracker",[],function(){function g(c,a){function i(a){var e=a.getProperty("service.id"),c=this.addingService(a);c&&(d[e]=a,b[e]=c)}function e(a){var e=a.getProperty("service.id"),c=b[e];delete d[e];delete b[e];this.removedService(a,c)}this.serviceRegistry=c;var d={},b={},k=j,h,l;this.close=function(){if(k!==f)throw"Already closed";k=j;c.removeEventListener("registered",h);c.removeEventListener("unregistering",l);l=h=null;var b=this;this.getServiceReferences().forEach(function(a){e.call(b,
a)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var b=Object.keys(d);return!b.length?null:b.map(function(b){return d[b]})};this.open=function(){if(k!==j)throw"Already open";k=f;var b=this;h=function(d){if(d.serviceReference.getProperty("objectClass").indexOf(a)!==-1&&(i.call(b,d.serviceReference),typeof b.onServiceAdded==="function"))return b.onServiceAdded(d.serviceReference,b.serviceRegistry.getService(d.serviceReference))};l=function(d){d.serviceReference.getProperty("objectClass").indexOf(a)!==
-1&&e.call(b,d.serviceReference)};c.addEventListener("registered",h);c.addEventListener("unregistering",l);c.getServiceReferences(a).forEach(function(a){i.call(b,a);if(typeof b.onServiceAdded==="function")return b.onServiceAdded(a,c.getService(a))});if(typeof this.onOpen==="function")this.onOpen()}}var j=0,f=1;g.prototype={addingService:function(c){return this.serviceRegistry.getService(c)},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 c=arguments[f],a;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(g[a]=c[a])}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 c,a,i,e,d,b="pid";c=function(a,d,e){function c(b,a,e){a.forEach(function(c,h){try{var k=b[h].getProperty("__plugin__"),m=k&&d.getPlugin(k);(!k||m&&m.getState()==="active")&&a[h].updated(e)}catch(i){typeof console!=="undefined"&&console.log(i)}})}j.call(this,a,"orion.cm.managedservice");var k={},i={},o=function(d){var c=[];d.plugin.getServiceReferences().forEach(function(d){if(d.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var k=d.getProperty(b),d=a.getService(d);k&&d&&(k=(k=e._find(k))&&k.getProperties(),c.push(d.updated(k)))}});return g.all(c)};this.addingService=function(d){var e=d.getProperty(b),c=a.getService(d);if(!e||!c)return null;k[e]||(k[e]=[]);i[e]||(i[e]=[]);k[e].push(d);i[e].push(c);return c};this.onServiceAdded=function(a,d){var h=a.getProperty(b),h=e._find(h);c([a],[d],h&&h.getProperties())};this.onOpen=function(){d.addEventListener("started",o)};this.onClose=function(){d.removeEventListener("started",
o)};this.notifyUpdated=function(b){var a=b.getPid();c(k[a]||[],i[a]||[],b.getProperties())};this.notifyDeleted=function(b){b=b.getPid();c(k[b]||[],i[b]||[],null)};this.removedService=function(a,d){var e=a.getProperty(b),c=k[e],h=i[e];c.length>1?c.splice(c.indexOf(a),1):delete k[e];h.length>1?h.splice(h.indexOf(d),1):delete i[e]}};a=function(){function b(a,d,h){this.store=new i(this,h);this.configAdmin=new e(this,this.store);this.tracker=new c(a,d,this.store)}b.prototype={getConfigurationAdmin:function(){var b=
this;return this.configAdmin._init().then(function(a){b.tracker.open();return a})},notifyDeleted:function(b){this.tracker.notifyDeleted(b)},notifyUpdated:function(b){this.tracker.notifyUpdated(b)}};return b}();e=function(){function b(a,d){this.factory=a;this.store=d}b.prototype={_init:function(){var b=this;return this.store._init().then(function(){return b})},getConfiguration:function(b){return this.store.get(b)},listConfigurations:function(){return this.store.list()}};return b}();var k="/cm/configurations";
i=function(){function a(e,c){this.factory=e;this.prefsService=c;this.configs=Object.create(null);this.pref=null;var h=this;this.initPromise=this.prefsService.getPreferences(k).then(function(a){h.pref=a;a.keys().forEach(function(e){if(!h.configs[e]){var c=a.get(e);typeof c==="object"&&c!==null&&Object.keys(c).length>0&&(c[b]=e,h.configs[e]=new d(h.factory,h,c))}})})}a.prototype={_init:function(){return this.initPromise},_find:function(b){return this.configs[b]||null},get:function(b){var a=this._find(b);
a||(a=new d(this.factory,this,b),this.configs[b]=a);return a},list:function(){var b=this,a=[];this.pref.keys().forEach(function(d){(d=b._find(d))&&d.getProperties()!==null&&a.push(d)});return a},remove:function(b){this.pref.remove(b);delete this.configs[b]},save:function(b,a){this.pref.put(b,a.getProperties(!0)||{})}};return a}();d=function(){function a(d,e){e=f.clone(e);delete e[b];d.properties=e}function d(e,c,k){this.factory=e;this.store=c;if(k!==null&&typeof k==="object")this.pid=k[b],a(this,
k);else if(typeof k==="string")this.pid=k,this.properties=null;else throw Error("Invalid pid/properties "+k);}d.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(a){this._checkRemoved();var d=null;if(this.properties&&(d=f.clone(this.properties),!a))d[b]=this.pid;return d},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(b){this._checkRemoved();a(this,b);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return d}();return{ConfigurationAdminFactory:a}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(g,j,f,c,a,i){var e;return{startup:function(){if(e)return e;e=new j;var d=new f.ServiceRegistry,b=new c.PreferencesService(d);return b.getPreferences("/plugins").then(function(c){var h={plugins:{}};c.keys().forEach(function(b){var a=g.toUrl(b);h.plugins[a]=c[b]});var l=new a.PluginRegistry(d,h);return l.start().then(function(){if(d.getServiceReferences("orion.core.preference.provider").length>
0)return b.getPreferences("/plugins",b.USER_SCOPE).then(function(b){var a=[];b.keys().forEach(function(b){b=g.toUrl(b);l.getPlugin(b)||a.push(l.installPlugin(b,{autostart:"lazy"}).then(function(b){return b.update().then(function(){return b.start({lazy:!0})})}))});return j.all(a,function(b){console.log(b)})})}).then(function(){return(new i.ConfigurationAdminFactory(d,l,b)).getConfigurationAdmin().then(d.registerService.bind(d,"orion.cm.configadmin"))}).then(function(){var b=d.getService("orion.core.auth");
if(b){var a=b.getUser().then(function(a){if(a)localStorage.setItem("lastLogin",(new Date).getTime());else return b.getAuthForm(window.location.href).then(function(b){setTimeout(function(){window.location=b},0)})}),e=localStorage.getItem("lastLogin");if(!e||e<(new Date).getTime()-9E5)return a}}).then(function(){var a={serviceRegistry:d,preferences:b,pluginRegistry:l};e.resolve(a);return a})})}}});
(function(){function g(a,c,e,d,b,k){c[a]&&(e.push(a),(c[a]===!0||c[a]===1)&&d.push(b+a+"/"+k))}function j(a,c,e,d,b){c=d+c+"/"+b;require._fileExists(a.toUrl(c+".js"))&&e.push(c)}function f(a,c,e){for(var d in c)c.hasOwnProperty(d)&&(!a.hasOwnProperty(d)||e)?a[d]=c[d]:typeof c[d]==="object"&&f(a[d],c[d],e)}var c=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(a){var i=a.config?a.config():{};return{version:"2.0.1+",load:function(a,d,b,k){k=k||{};if(k.locale)i.locale=k.locale;
var h=c.exec(a),l=h[1],m=h[4],q=h[5],r=m.split("-"),p=[],o={},n,s="";if(h[5])l=h[1],a=l+q;else{q=h[4];m=i.locale;if(!m)m=i.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();r=m.split("-")}if(k.isBuild){p.push(a);j(d,"root",p,l,q);for(n=0;n<r.length;n++)k=r[n],s+=(s?"-":"")+k,j(d,s,p,l,q);d(p,function(){b()})}else d([a],function(a){var e=[],c;g("root",a,e,p,l,q);for(n=0;n<r.length;n++)c=r[n],s+=(s?"-":"")+c,g(s,a,e,p,l,q);d(p,function(){var c,
h,k;for(c=e.length-1;c>-1&&e[c];c--){k=e[c];h=a[k];if(h===!0||h===1)h=d(l+k+"/"+q);f(o,h)}b(o)})})}}})})();
define("orion/i18n",[],function(){return{load:function(g,j,f,c){var c=c||{},a=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,i=a.exec(g);if(i){if(!j.defined||j.defined(g))try{f(j(g));return}catch(e){}if(c.isBuild||c.isTest)f({});else if(j.specified&&!j.specified("orion/bootstrap"))f({});else{var d=i[1],b=i[3]?i[2]:"",k=i[3]||i[2];j(["orion/bootstrap"],function(e){e.startup().then(function(e){var h=e.serviceRegistry,e=h.getServiceReferences("orion.i18n.message");if(b)e.some(function(b){return g===b.getProperty("name")?
(h.getService(b).getMessageBundle().then(function(b){f(b)},function(){f({})}),!0):!1})||f({});else{var q={},r;e.forEach(function(e){var h=e.getProperty("name");if((i=a.exec(h))&&d===i[1]&&k===(i[3]||i[2]))if(b=i[3]?i[2]:""){if((e=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&e.toLowerCase().indexOf(b.toLowerCase())===0)q[b]=!0,(!j.specified||!j.specified(h))&&define(h,["orion/i18n!"+h],function(b){return b})}else r=e});!j.specified||!j.specified(g)?r?
h.getService(r).getMessageBundle().then(function(b){Object.keys(q).forEach(function(a){typeof b[a]==="undefined"&&(b[a]=q[a])});define(g,[],b);f(b)},function(){define(g,[],q);f(q)}):(define(g,[],q),f(q)):f(q)}})})}}else f(null)}}});
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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});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,c=g.indexOf("Opera")!==-1?parseFloat(g.split("Version/")[1]):void 0,a=parseFloat(g.split("Chrome/")[1])||void 0,i=g.indexOf("Safari")!==-1&&!a,e=parseFloat(g.split("WebKit/")[1])||void 0,d=g.indexOf("Android")!==-1,b=g.indexOf("iPad")!==-1,g=g.indexOf("iPhone")!==-1,k=b||g,h=navigator.platform.indexOf("Mac")!==
-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==-1,q="ontouchstart"in document.createElement("input");return{formatMessage:function(b){var a=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(b,d){return a[(d<<0)+1]})},createElement:function(b,a){return b.createElementNS?b.createElementNS("http://www.w3.org/1999/xhtml",a):b.createElement(a)},isIE:j,isFirefox:f,isOpera:c,isChrome:a,isSafari:i,isWebkit:e,isAndroid:d,isIPad:b,isIPhone:g,isIOS:k,isMac:h,isWindows:l,
isLinux:m,isTouch:q,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(g){function j(b,a){a||(a=document);return a.querySelectorAll(b)}function f(b){var a=b.tabIndex;a===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}[b.nodeName.toLowerCase()]&&!b.attributes.tabIndex&&(a=-1);return a}function c(b){if(f(b)>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var d=c(b.childNodes[a]);if(d)return d}return null}function a(b){if(f(b)>=
0)return b;if(b.hasChildNodes())for(var d=b.childNodes.length-1;d>=0;d--){var e=a(b.childNodes[d]);if(e)return e}return null}function i(b,a){if(b.nodeType===3){var d=e.exec(b.nodeValue);d&&d.length>1&&a(b,d)}if(b.hasChildNodes())for(d=0;d<b.childNodes.length;d++)i(b.childNodes[d],a)}var e=/\$\{([^\}]+)\}/,d=null;return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:j,$$array:function(b,a){return Array.prototype.slice.call(j(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));
return a},contains:function(b,a){if(!b||!a)return!1;if(b===a)return!0;var d=b.compareDocumentPosition(a);return Boolean(d&16)},bounds:function(b){b=b.getBoundingClientRect();return{left:b.left+document.documentElement.scrollLeft,top:b.top+document.documentElement.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:c,lastTabbable:a,stop:function(b){if(window.document.all)b.keyCode=0;b.preventDefault&&(b.preventDefault(),b.stopPropagation())},
processTextNodes:function(b,a){i(b,function(b,d){b.parentNode.replaceChild(document.createTextNode(a[d[1]]||d[1]),b)})},processDOMNodes:function(b,a){i(b,function(b,d){var e=a[d[1]];if(e){var c=document.createRange(),i=d.index;c.setStart(b,i);c.setEnd(b,i+d[0].length);c.deleteContents();c.insertNode(e)}})},addAutoDismiss:function(b,a){function e(b){d.forEach(function(a){var d=!1,e=a.excludeNodes.some(function(a){return document.body.contains(a)?(d=!0,a.contains(b.target)):!1});if(d&&!e)try{a.dismiss(b)}catch(c){typeof console!==
"undefined"&&console&&console.error(c&&c.message)}});d=d.filter(function(b){return b.excludeNodes.some(function(b){return document.body.contains(b)})})}d===null&&(d=[],document.addEventListener("click",e,!0),g.isIOS&&document.addEventListener("touchend",function(b){function a(){b.target.removeEventListener("click",a)}b.touches.length===0&&b.target.addEventListener("click",a)},!1));d.push({excludeNodes:b,dismiss:a})},setFramesEnabled:function(b){for(var a=document.getElementsByTagName("iframe"),d=
0;d<a.length;d++)a[d].parentNode.style.pointerEvents=b?"":"none"},removeAutoDismiss:function(b){d=d.filter(function(a){return b!==a.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,c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,i=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,d=e&&location.protocol&&location.protocol.replace(/\:/,""),b=e&&location.hostname,k=e&&(location.port||void 0),h=[],l=g.config&&g.config()||{};j={version:"2.0.5",strip:function(b){if(b){var b=b.replace(a,""),d=b.match(i);d&&(b=d[1])}else b="";return b},
jsEscape:function(b){return b.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 b,a,d;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(a=0;a<3;a+=1){d=c[a];try{b=new ActiveXObject(d)}catch(e){}if(b){c=[d];break}}return b},parseName:function(b){var a,
d,e=!1,c=b.indexOf(".");a=b.indexOf("./")===0||b.indexOf("../")===0;c!==-1&&(!a||c>1)?(a=b.substring(0,c),d=b.substring(c+1,b.length)):a=b;b=d||a;c=b.indexOf("!");c!==-1&&(e=b.substring(c+1)==="strip",b=b.substring(0,c),d?d=b:a=b);return{moduleName:a,ext:d,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(b,a,d,e){var c,h;c=j.xdRegExp.exec(b);if(!c)return!0;b=c[2];c=c[3];c=c.split(":");h=c[1];c=c[0];return(!b||b===a)&&(!c||c.toLowerCase()===d.toLowerCase())&&(!h&&!c||h===e)},finishLoad:function(b,
a,d,e){d=a?j.strip(d):d;l.isBuild&&(h[b]=d);e(d)},load:function(a,c,h,i){if(i.isBuild&&!i.inlineText)h();else{l.isBuild=i.isBuild;var f=j.parseName(a),i=f.moduleName+(f.ext?"."+f.ext:""),g=c.toUrl(i),s=l.useXhr||j.useXhr;!e||s(g,d,b,k)?j.get(g,function(b){j.finishLoad(a,f.strip,b,h)},function(b){h.error&&h.error(b)}):c([i],function(b){j.finishLoad(f.moduleName+"."+f.ext,f.strip,b,h)})}},write:function(b,a,d){if(h.hasOwnProperty(a)){var e=j.jsEscape(h[a]);d.asModule(b+"!"+a,"define(function () { return '"+
e+"';});\n")}},writeFile:function(b,a,d,e,c){var a=j.parseName(a),h=a.ext?"."+a.ext:"",k=a.moduleName+h,l=d.toUrl(a.moduleName+h)+".js";j.load(k,d,function(){var a=function(b){return e(l,b)};a.asModule=function(b,a){return e.asModule(b,l,a)};j.write(b,k,a,c)},c)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),j.get=function(b,a){var d=f.readFileSync(b,"utf8");d.indexOf("\ufeff")===0&&(d=d.substring(1));a(d)};else if(l.env===
"xhr"||!l.env&&j.createXhr())j.get=function(b,a,d,e){var c=j.createXhr(),h;c.open("GET",b,!0);if(e)for(h in e)e.hasOwnProperty(h)&&c.setRequestHeader(h.toLowerCase(),e[h]);if(l.onXhr)l.onXhr(c,b);c.onreadystatechange=function(){var e;if(c.readyState===4)e=c.status,e>399&&e<600?(e=Error(b+" HTTP status: "+e),e.xhr=c,d(e)):a(c.responseText)};c.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")j.get=function(b,a){var d,e,c=new java.io.File(b),h=java.lang.System.getProperty("line.separator"),
c=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(c),"utf-8")),k="";try{d=new java.lang.StringBuffer;(e=c.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(e!==null&&d.append(e);(e=c.readLine())!==null;)d.append(h),d.append(e);k=String(d.toString())}finally{c.close()}a(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(c){var a=document.createElement("div");a.innerHTML=f;var i=j.$("#slideContainer",a);i.id=c+i.id;i=j.$("#pageCommandParameters",a);i.id=c+i.id;i=j.$("#pageCommandDismiss",a);i.id=c+i.id;return a.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(g){function j(c,a,i,e,d,b){this.type=b||"keydown";this.keyCode=typeof c==="string"&&this.type==="keydown"?c.toUpperCase().charCodeAt(0):c;this.mod1=a!==void 0&&a!==null?a:!1;this.mod2=i!==void 0&&i!==null?i:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=d!==void 0&&d!==null?d:!1}function f(c){this.keys=c}j.prototype={getKeys:function(){return[this]},match:function(c,a){if(a!==void 0){if(a!==0)return!1}else if(c instanceof Array){if(c.length>1)return!1;
c=c[0]}return c.type!==this.type?!1:this.keyCode===c.keyCode||this.keyCode===String.fromCharCode(g.isOpera?c.which:c.charCode!==void 0?c.charCode:c.keyCode)?this.mod1!==(g.isMac?c.metaKey:c.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==c.shiftKey?!1:this.mod3!==c.altKey?!1:g.isMac&&this.mod4!==c.ctrlKey?!1:!0:!1},equals:function(c){return!c?!1:this.keyCode!==c.keyCode?!1:this.mod1!==c.mod1?!1:this.mod2!==c.mod2?!1:this.mod3!==c.mod3?!1:this.mod4!==c.mod4?!1:this.type!==c.type?!1:!0}};f.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(c,a){var i=this.keys;if(a!==void 0)return a>i.length?!1:i[a].match(c)?a===i.length-1?!0:a+1:!1;else{c instanceof Array||(c=[c]);if(c.length>i.length)return!1;var e;for(e=0;e<c.length;e++)if(!i[e].match(c[e]))return!1;return e===i.length?!0:e}},equals:function(c){if(!c.keys)return!1;if(c.keys.length!==this.keys.length)return!1;for(var a=0;a<c.keys.length;a++)if(!c.keys[a].equals(this.keys[a]))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 c(a){f.attach(this);this._init(a)}c.prototype={_init:function(a){this._dropdownNode=j.node(a.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=a.populate;this._selectionClass=a.selectionClass;this._parentDropdown=a.parentDropdown;this._positioningNode=a.positioningNode;if(!this._parentDropdown)for(var c=this._dropdownNode.parentNode;c&&document!==c;){if(c.classList&&
c.classList.contains("dropdownMenu")){this._parentDropdown=c.dropdown;break}c=c.parentNode}this._triggerNode=a.triggerNode?a.triggerNode:j.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!a.skipTriggerEventListeners){var e=this;this._triggerNode.addEventListener("click",function(a){e.toggle(a)&&j.stop(a)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(a){if(a.keyCode===
j.KEY.ENTER||a.keyCode===j.KEY.SPACE)e.toggle(),j.stop(a)},!1)}this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},addTriggerNode:function(a){var c=this;a.addEventListener("click",function(a){c.toggle(a)&&j.stop(a)},!1)},toggle:function(a){return this.isVisible()?this.close():this.open(a)},isVisible:function(){return this._isVisible},open:function(a){var c=!1;if(!this.isVisible()){this.dispatchEvent({type:"triggered",dropdown:this,event:a});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),c=j.$$array(".dropdownSubMenu",this._dropdownNode),j.addAutoDismiss([this._triggerNode].concat(c),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(a);e[0].focus();c=!0;this._parentDropdown&&this._parentDropdown.submenuOpen(this)}}return c},_autoDismiss:function(a){if(this.close(!1)&&this._dropdownNode.contains(a.target))for(a=this._parentDropdown;a;)a.close(!1),a=a._parentDropdown},_positionDropdown:function(){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+
"px";else{var a=j.bounds(this._dropdownNode),c=j.bounds(document.body);if(a.left+a.width>c.left+c.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-a.width+"px";else{var e=j.bounds(this._boundingNode(this._triggerNode)),d=j.bounds(this._triggerNode);this._dropdownNode.style.left=d.left-e.left-a.width+d.width+"px"}a=a.top+a.height-(c.top+c.height);if(0<a)this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-a)+"px"}},_boundingNode:function(a){var c=
window.getComputedStyle(a,null);return c===null?a:c.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:this._boundingNode(a.parentNode)},close:function(a){var c=!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),a&&this._triggerNode.focus(),this._isVisible=!1,c=!0;return c},getItems:function(){var a=
[],c=this;j.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(e){e.parentNode.parentNode===c._dropdownNode&&a.push(e)});a.forEach(function(a){if(!a._hasDropdownMouseover)a.addEventListener("mouseover",function(d){a.dropdown?a.dropdown.open(d):(c._closeSelectedSubmenu(),j.stop(d))}),a._hasDropdownMouseover=!0});return a},empty:function(){var a=this;j.$$array("li",this._dropdownNode).forEach(function(c){c.parentNode===a._dropdownNode&&c.parentNode.removeChild(c)});
this._hookedAutoDismiss=!1},_dropdownKeyDown:function(a){if(a.keyCode===j.KEY.UP||a.keyCode===j.KEY.DOWN||a.keyCode===j.KEY.RIGHT||a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.LEFT){var c=this.getItems(),e=document.activeElement;if(c.length&&c.length>0&&e){var d=c.indexOf(e);d<0&&(d=c.indexOf(e.parentNode));d>=0&&(a.keyCode===j.KEY.UP&&d>0?(d--,c[d].focus()):a.keyCode===j.KEY.DOWN&&d<c.length-1?(d++,c[d].focus()):a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.RIGHT?e.classList.contains("dropdownTrigger")&&
e.dropdown&&e.dropdown.open():a.keyCode===j.KEY.LEFT&&e.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),j.stop(a))}}else a.keyCode===j.KEY.ESCAPE&&(this.close(!0),j.stop(a))},submenuOpen:function(a){if(a!==this._selectedSubmenu)this._closeSelectedSubmenu(),this._selectedSubmenu=a},_closeSelectedSubmenu:function(){for(var a=this._selectedSubmenu;a;)a.close(),a=a._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&j.removeAutoDismiss(this._boundAutoDismiss)}};
c.prototype.constructor=c;return{Dropdown:c}});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(c){this._init(c)}f.prototype={_init:function(c){this._node=j.node(c.node);if(!this._node)throw"no dom node for tooltip found";this._position=c.position||["right","above","below","left"];this._text=c.text;this._hideDelay=c.hideDelay===void 0?200:c.hideDelay;this._tailSize=c.tailSize||10;this._trigger=c.trigger||"mouseover";this._afterShowing=c.afterShowing;this._afterHiding=c.afterHiding;var a=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(e){e.target===a._node&&(a.show(),j.stop(e))},!1);else if(this._trigger==="mouseover"){this._showDelay=c.showDelay===void 0?500:c.showDelay;c=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(e){j.contains(a._node,e.target)&&(a.show(),j.stop(e))},!1);this._leaveHandler=function(e){j.contains(a._node,e.target)&&a.hide()};for(var f=0;f<c.length;f++)this._node.addEventListener(c[f],
this._leaveHandler,!1)}},_makeTipNode:function(){if(!this._tip){this._tip=document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("div");this._tipInner.classList.add("tooltip");if(this._text)this._tipTextContent=document.createElement("div"),this._tipTextContent.classList.add("textContent"),this._tipInner.appendChild(this._tipTextContent),this._tipTextContent.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var c=this;j.addAutoDismiss([this._tip,this._node],function(){c.hide()});if(this._trigger==="mouseover")this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(){if(c._timeout)window.clearTimeout(c._timeout),c._timeout=null;c._tip.addEventListener("mouseout",function(a){j.contains(c._tip,a.target)&&(c.hide(),j.stop(a))},
!1)},!1)}return this._tip},_positionTip:function(c,a){this._makeTipNode();c==="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),d;switch(c){case "above":d=e.top-f.height-this._tailSize-1;e=e.left-this._tailSize;break;case "below":d=e.top+e.height+this._tailSize+1;e=e.left-this._tailSize;break;case "left":d=e.top-this._tailSize/2;e=e.left-f.width-
this._tailSize-1;break;default:d=e.top-this._tailSize/2,e=e.left+e.width+this._tailSize+1}var b=j.bounds(document.documentElement);if(d+f.height>b.height)if(a)d=b.height-f.height-1;else return!1;if(e+f.width>b.width)if(a)e=b.width-f.width-1;else return!1;if(e<0)if(a)e=4;else return!1;if(d<0)if(a)d=4;else return!1;if(this._tail&&this._tail.previousPosition!==c)this._tip.removeChild(this._tail),this._tail=null;if(!this._tail){this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+
c);c==="above"||c==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner);if(c==="left")this._tail.style.left=f.width+"px";this._tail.previousPosition=c}this._tip.style.top=d+"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 c=!1,a=0;!c&&a<this._position.length;)c=this._positionTip(this._position[a]),a++;c||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(c){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(c===void 0)c=
this._hideDelay;var a=this;this._timeout=window.setTimeout(function(){a._tip.classList.remove("tooltipShowing");a._tip.removeAttribute("style");a._afterHiding&&a._afterHiding()},c)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tail=this._tipTextContent=this._tipInner=this._tip=null;if(this._node){this._node.removeEventListener("click",this._clickHandler,!1);this._node.removeEventListener("mouseover",
this._mouseoverHandler,!1);for(var c=["mouseout","click"],a=0;a<c.length;a++)this._node.removeEventListener(c[a],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,c,a,i,e,d){function b(b){var a=b.invocation;if(a){var d=b.command;if(d.hrefCallback)return b=d.hrefCallback.call(a.handler||window,a),b.then?b.then(function(b){window.open(b)}):window.open(b),!0;else if(a.commandRegistry)return a.commandRegistry._invoke(a),
!0;else if(d.onClick||d.callback)return window.setTimeout(function(){(d.onClick||d.callback).call(a.handler||window,a)},0),!0}return!1}function k(a,d){for(var e in d)if(d[e]&&d[e].keyBinding&&d[e].command&&d[e].keyBinding.match(a)){var c=d[e],h=c.keyBinding;if((!h.domScope||j.contains(j.node(h.domScope),a.target))&&b(c)){j.stop(a);break}}}function h(){var b={};if(s){var a,d,e;d=Object.keys(u);for(a=0;a<d.length;a++)e=d[a],b[e]=u[e];var c=s();d=Object.keys(c);for(a=0;a<d.length;a++)e=d[a],b[e]=c[e]}else b=
u;return b}function l(b){k(b,h())}function m(b,a){b=b||window.event;if(function(b){if(g.isMac){if(b.metaKey&&!b.altKey)return!b.shiftKey&&!b.ctrlKey&&(b.keyCode===65||b.keyCode===67||b.keyCode===86||b.keyCode===88||b.keyCode===90)?!0:!1;if(b.ctrlKey)return!1}else{if(b.ctrlKey&&!b.altKey)return!b.shiftKey&&(b.keyCode===65||b.keyCode===67||b.keyCode===86||b.keyCode===88||b.keyCode===90)?!0:!1;if(b.altKey&&!b.ctrlKey)return!1}if(b["char"])return b["char"].length>0;else if(b.charCode||b.keyCode)switch(b=
b.charCode||b.keyCode,b){case 8:case 9:case 13:case 46:return!0;default:return b>=32&&b<112||b>123}return!1}(b)){if(b.target.contentEditable==="true")return;var d=b.target.nodeName.toLowerCase();if(d==="input")switch(b.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(d==="textarea")return}a?a(b):l(b)}function q(){this._init()}
function r(b,a,d){a.classList.add("commandImage");var e;b.imageClass?b.addImageClassToElement?a.classList.add(b.imageClass):(e=document.createElement("span"),a.appendChild(e),e.classList.add(b.spriteClass),e.classList.add(b.imageClass)):(e=new Image,e.alt=b.name,e.name=d,e.id=d,e.src=b.image,a.appendChild(e));return e}function p(b,a){var d=document.createElement("span");d.classList.add("dropdownKeyBinding");d.appendChild(document.createTextNode(a));b.appendChild(d)}function o(b,a,d,e,c){this.commandRegistry=
c;this.handler=b;this.items=a;this.userData=d;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function n(b){this._init(b)}var s=null,u={};q.prototype={setProxy:function(b){this.proxy=b},setKeyBindings:function(b){this.bindings=b},_init:function(){var b=this;document.addEventListener("keydown",function(a){return m(a,function(a){var d=b.proxy,e=b.bindings;if(e&&d)for(var c=0;c<e.length;c++)e[c].match(a)&&(d.processKey({type:a.type,keyCode:a.keyCode,altKey:a.altKey,
ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey}),j.stop(a))})})}};window.document.addEventListener("keydown",m,!1);o.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(b){var a=new o(this.handler,this.items,this.userData,this.command,this.commandRegistry);a.domNode=this.domNode;a.domParent=this.domParent;if(b)a.parameters=b.makeCopy();else if(this.parameters)a.parameters=this.parameters.makeCopy();return a}};
o.prototype.constructor=o;n.prototype={_init:function(b){this.id=b.id;this.name=b.name;this.tooltip=b.tooltip;this.callback=b.callback;this.hrefCallback=b.hrefCallback;this.choiceCallback=b.choiceCallback;this.positioningNode=b.positioningNode;this.image=b.image||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC";this.imageClass=b.imageClass;this.addImageClassToElement=b.addImageClassToElement;this.selectionClass=
b.selectionClass;this.spriteClass=b.spriteClass||"commandSprite";this.visibleWhen=b.visibleWhen;this.parameters=b.parameters;this.isEditor=b.isEditor},populateChoicesMenu:function(b,a,d,e,c){var d=this.getChoices(a,d,e),h=d.some(function(b){return b.checked});d.forEach(function(d){if(d.name){var e=document.createElement("li");b.appendChild(e);var k=document.createElement("span");k.tabIndex=0;k.role="menuitem";k.classList.add("dropdownMenuItem");if(h){var l=document.createElement("span");l.classList.add("check");
l.appendChild(document.createTextNode(d.checked?"\u25cf":""));k.appendChild(l)}l=document.createTextNode(d.name);k.appendChild(l);e.appendChild(k);k.choice=d;k.addEventListener("click",function(b){b.target.choice&&b.target.choice.callback.call(b.target.choice,a)},!1);k.addEventListener("keydown",function(b){(b.keyCode===j.KEY.ENTER||b.keyCode===j.KEY.SPACE)&&b.target.choice&&b.target.choice.callback.call(b.target.choice,a)},!1)}else c._generateMenuSeparator(b)})},getChoices:function(b,a,d){return this.choiceCallback?
this.choiceCallback.call(a,b,d):null},makeChoiceCallback:function(b,a){return function(d){b.callback&&b.callback.call(b,a,d)}},hasImage:function(){return this.imageClass||this.image!=="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"}};n.prototype.constructor=n;return{Command:n,CommandInvocation:o,createDropdownMenu:function(b,d,e,h,k,l,m,i,o){b=j.node(b);if(!b)throw"no parent node was specified";
var g=document.createRange();g.selectNode(b);g=o?g.createContextualFragment(a):g.createContextualFragment(c);j.processTextNodes(g,{ButtonText:d});b.appendChild(g);var b=b.lastChild,p;o?(o=b.previousSibling,p=o.lastChild):o=b.previousSibling;h?o.classList.add(h):(o.classList.add("orionButton"),o.classList.add("commandButton"));if(k){if(!l)o.textContent="",o.setAttribute("aria-label",d);r({spriteClass:"commandSprite",imageClass:k},o,d);o.classList.add("orionButton")}o.dropdown=new f.Dropdown({dropdown:b,
populate:e,selectionClass:m,skipTriggerEventListeners:!!p,positioningNode:i});b.dropdown=o.dropdown;return{menuButton:o,menu:b,dropdown:o.dropdown,dropdownArrow:p}},createCheckedMenuItem:function(b,a,d,c){b=j.node(b);if(!b)throw"no parent node was specified";var h=document.createRange();h.selectNode(b);h=h.createContextualFragment(e);j.processTextNodes(h,{ItemText:a});b.appendChild(h);b=j.$(".checkedMenuItem",b.lastChild);b.checked=d;b.addEventListener("change",c,!1);return b},createCommandItem:function(b,
a,e,c,h,k,l){var f,k=k||!a.name&&a.hasImage();if(a.hrefCallback)f=document.createElement("a"),f.id=c,k&&a.hasImage()?r(a,f,c):(f.className="commandLink",f.appendChild(document.createTextNode(a.name))),l=a.hrefCallback.call(e.handler,e),l.then?l.then(function(b){f.href=b}):f.href=l?l:"#";else{f=document.createElement("button");f.className="orionButton";k?a.hasImage()?(r(a,f,c),a.name&&f.setAttribute("aria-label",a.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),
f.appendChild(document.createTextNode(a.name))):(f.classList.add("commandButton"),c=document.createTextNode(a.name),f.appendChild(c));var m=l||a.callback;if(m)a.onClick=m,f.addEventListener("click",function(){m.call(e.handler,e)},!1)}b.nodeName.toLowerCase()==="ul"?(l=document.createElement("li"),b.appendChild(l),b=l):f.classList.add("commandMargins");b.appendChild(f);if(a.tooltip)f.commandTooltip=new d.Tooltip({node:f,text:a.tooltip,position:["above","below","right","left"]});h&&(u[a.id]={keyBinding:h,
command:a,invocation:e});return f},createCommandMenuItem:function(b,a,e,c,h,k){var l,f=b.dropdown;if(a.hrefCallback){l=document.createElement("a");var m=document.createElement("span");m.appendChild(document.createTextNode(a.name));m.classList.add("dropdownCommandName");l.appendChild(m);h=a.hrefCallback.call(e.handler,e);h.then?h.then(function(b){l.href=b}):l.href=h?h:"#";l.addEventListener("keydown",function(b){(b.keyCode===j.KEY.ENTER||b.keyCode===j.KEY.SPACE)&&l.click()},!1)}else{l=document.createElement("span");
l.tabIndex=0;m=document.createElement("span");m.appendChild(document.createTextNode(a.name));m.classList.add("dropdownCommandName");l.appendChild(m);var i=h||a.callback;if(i)a.onClick=i,l.addEventListener("click",function(){f.close(!0);i.call(e.handler,e)},!1),l.addEventListener("keydown",function(b){if(b.keyCode===j.KEY.ENTER||b.keyCode===j.KEY.SPACE)b.preventDefault(),l.click()},!1)}l.className="dropdownMenuItem";l.role="menuitem";if(a.tooltip)l.commandTooltip=new d.Tooltip({node:l,text:a.tooltip,
position:["above","below","right","left"]});k&&p(l,k);k=document.createElement("li");b.appendChild(k);k.appendChild(l);c&&(u[a.id]={keyBinding:c,command:a,invocation:e});return l},executeBinding:b,setKeyBindingProvider:function(b){s=b},localKeyBindings:u,CommandsProxy:q,getKeyBindings:h,processKey:l,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:k}});
define("orion/explorers/navigationUtils",[],function(){function g(f,c){if(!j&&f)f.push({domNode:c}),c.tabIndex=-1,c.style.outline="none"}var j=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,c,a){f&&(f=f.getGridNavHolder(c,!0))&&g(f,a)},generateNavGrid:g,removeNavGrid:function(f,c){if(f)for(var a=0;a<f.length;a++)if(f[a].domNode===c){f.splice(a,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:""},c=g.indexOf("#");if(c!==-1&&(g=g.substring(c+1),g.length!==0)){g=g.split(",");f.resource=decodeURIComponent(g[0]);for(c=1;c<g.length;c++){var a=/([^=]*)(=?)(.*)/.exec(g[c]),i=decodeURIComponent(a[1]||""),a=decodeURIComponent(a[3]||"");i!==""&&i!=="resource"&&(f[i]=a)}}return f},
validateURLScheme:function(j,f){var c=j;if(j.indexOf("://")===-1){var a=document.createElement("a");a.href=j;c=a.href}a=!1;return(a=f?f.some(function(a){return RegExp("^"+a+":","i").test(c)}):g.test(c))?j:(console.log("Illegal URL Scheme: '"+j+"'"),"")}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(g){function j(c){var a="",f=navigator.platform.indexOf("Mac")!==-1;f?(c.mod4&&(a+="\u2303"),c.mod3&&(a+="\u2325"),c.mod2&&(a+="\u21e7"),c.mod1&&(a+="\u2318")):(c.mod1&&(a+="Ctrl+"),c.mod2&&(a+="Shift+"),c.mod3&&(a+="Alt+"));if(c.alphaKey)return a+c.alphaKey;if(c.type==="keypress")return a+c.keyCode;for(var e in g.KEY)if(typeof(g.KEY[e]==="number")&&g.KEY[e]===c.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 a+e}var d;switch(c.keyCode){case 59:d=c.mod2?":":";";break;case 61:d=c.mod2?
"+":"=";break;case 188:d=c.mod2?"<":",";break;case 190:d=c.mod2?">":".";break;case 191:d=c.mod2?"?":"/";break;case 192:d=c.mod2?"~":"`";break;case 219:d=c.mod2?"{":"[";break;case 220:d=c.mod2?"|":"\\";break;case 221:d=c.mod2?"}":"]";break;case 222:d=c.mod2?'"':"'"}return d?a+d:c.keyCode>=112&&c.keyCode<=123?a+"F"+(c.keyCode-111):a+String.fromCharCode(c.keyCode)}function f(c){var a=window.navigator.platform.indexOf("Mac")!==-1;return a&&c.metaKey||!a&&c.ctrlKey}return{getUserKeyString:function(c){for(var a=
"",c=c.getKeys(),f=0;f<c.length;f++)f!==0&&(a+=" "),a+=j(c[f]);return a},getUserText:function(c){var a=c.id,f=c.refNode,e=c.hideRefNode,d=c.initialText,b=c.onComplete,k=c.onEditDestroy,h=c.selectTo,l=c.isInitialValid,c=c.insertAsChild,m=!1,j=function(c){return function(h){if(!m){var j=g.node(a),q=j.value;if(j)if(c&&h.keyCode===g.KEY.ESCAPE){if(e)f.style.display="inline";m=!0;j.parentNode.removeChild(j);k&&k()}else if(!(c&&h.keyCode!==g.KEY.ENTER)){if(q.length===0||!l&&q===d){if(e)f.style.display=
"inline"}else if(b(q),e&&f.parentNode)f.style.display="inline";m=!0;j.parentNode&&j.parentNode.removeChild(j);k&&k()}}}},r=document.createElement("input");r.id=a;r.value=d||"";c?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(d){var b=g.node(a),e=h?d.indexOf(h):-1;if(e>0)if(b.createTextRange)b=b.createTextRange(),
b.collapse(!0),b.moveStart("character",0),b.moveEnd("character",e),b.select();else if(b.setSelectionRange)b.setSelectionRange(0,e);else{if(b.selectionStart!==void 0)b.selectionStart=0,b.selectionEnd=e}else b.select()}},0)},openInNewWindow:f,followLink:function(c,a){a&&f(a)?window.open(c):window.location=c},createButton:function(c,a){var f=document.createElement("button");f.className="orionButton commandButton commandMargins";f.addEventListener("click",function(e){a();g.stop(e)},!1);c&&f.appendChild(document.createTextNode(c));
return f},createDropdownButton:function(){},isFormElement:function(c){switch(c.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","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,c,a,i,e,d,b,k){function h(b){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(b);this._parameterCollector=
null}function l(b,a){this.token=b;this.parameterName=a}function m(b,a,d){this.event=b;this.handler=a;this.capture=d||!1}function q(b,a,d,e,c,h){this.name=b;this.type=a;this.label=d;this.value=e;this.lines=c||1;this.eventListeners=Array.isArray(h)?h:h?[h]:[]}function r(b,a,d){this._storeParameters(b);this._hasOptionalParameters=a&&a.hasOptionalParameters;this._options=a;this.optionsRequested=!1;this.getParameters=d;this.clientCollect=a&&a.clientCollect}h.prototype={_init:function(b){this._selectionService=
b.selection;var a=this;g.setKeyBindingProvider(function(){return a._activeBindings})},processURL:function(b){for(var a in this._urlBindings)if(this._urlBindings[a]&&this._urlBindings[a].urlBinding&&this._urlBindings[a].command){var d=this._urlBindings[a].urlBinding.match(b);if(d){var e=this._urlBindings[a],c=e.command,h=e.invocation;if(h&&h.parameters&&c.callback){h.parameters.setValue(d.parameterName,d.parameterValue);var k=this;window.setTimeout(function(){k._invoke(h)},0);break}}}},findCommand:function(b){return this._commandList[b]},
runCommand:function(b,a,d,e){a?(b=this._commandList[b])&&(b.visibleWhen?b.visibleWhen(a):1)&&b.callback&&this._invoke(new g.CommandInvocation(d,a,null,b,this),e):(a=this._urlBindings[b])&&a.command&&a.command.callback&&this._invoke(a.invocation,e)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(b){this._parameterCollector=b},openParameterCollector:function(b,a,d){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(b,
a,d))},confirm:function(b,a,d,e,c,h){var k=!1;if(this._parameterCollector&&!c){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(b,function(b,c){var h=document.createElement("span");h.classList.add("parameterPrompt");h.textContent=a;b.appendChild(h);h=document.createElement("button");h.addEventListener("click",function(){k=!0;l._parameterCollector.close()},!1);c.appendChild(h);h.appendChild(document.createTextNode(d));h.className="dismissButton";var f=document.createElement("button");
f.addEventListener("click",function(){k=!1;l._parameterCollector.close()},!1);c.appendChild(f);f.appendChild(document.createTextNode(e));f.className="dismissButton";return h},function(){h(k)}))return}k=window.confirm(a);h(k)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(b,a){return this._collectAndInvoke(b.makeCopy(a),!1)},_collectAndInvoke:function(b,a){if(b)if(this._parameterCollector&&
b.parameters&&b.parameters.hasParameters()&&(a||b.parameters.shouldCollectParameters())){var d=!1;b.parameters.updateParameters(b);if(b.parameters.shouldCollectParameters()&&(d=this._parameterCollector.collectParameters(b),!d)){var c=new e.Tooltip({node:b.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),d=c.contentContainer();d.classList.add("parameterPopup");var h=window.document.activeElement,k=this._parameterCollector.getFillFunction(b,
function(){h&&h.focus();c.destroy()})(d);c.show();window.setTimeout(function(){k.focus();k.select()},0);d=!0}d||b.command.callback.call(b.handler||window,b)}else b.command.callback.call(b.handler||window,b);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(b){this._collectAndInvoke(b,!0)},showKeyBindings:function(b){function a(b){return function(){g.executeBinding(b)}}var d={},e,h,k=[],l;for(l in this._activeBindings)(h=
this._activeBindings[l])&&h.keyBinding&&h.command&&(h.command.name||h.command.tooltip)&&k.push(h);k.sort(function(b,a){return(b.command.name||b.command.tooltip).localeCompare(a.command.name||a.command.tooltip)});for(l=0;l<k.length;l++)h=k[l],h.keyBinding.scopeName?(d[h.keyBinding.scopeName]||(d[h.keyBinding.scopeName]=[]),d[h.keyBinding.scopeName].push(h)):(e=c.getUserKeyString(h.keyBinding),b.createItem(e,h.command.name||h.command.tooltip,a(h)));for(var f in d)d[f].length&&d[f].length>0&&(b.createHeader(f),
d[f].forEach(function(d){e=c.getUserKeyString(d.keyBinding);b.createItem(e,d.command.name||d.command.tooltip,a(d))}))},addCommand:function(b){this._commandList[b.id]=b;var a=this._pendingBindings[b.id];if(a){var d=this;a.forEach(function(a){d._addBinding(b,a.type,a.binding,a.bindingOnly)});delete this._pendingBindings[b.id]}},addCommandGroup:function(b,a,d,e,c,h,k,l,f,m){this._contributionsByScopeId[b]||(this._contributionsByScopeId[b]={});b=this._contributionsByScopeId[b];c&&(b=this._createEntryForPath(b,
c));if(b[a]){if(e)b[a].title=e;if(d)b[a].position=d;if(k)b[a].imageClass=k;if(l)b[a].tooltip=l;if(f)b[a].selectionClass=f;m===!0?b[a].pretendDefaultActionId=!0:b[a].defaultActionId=m;b[a].emptyGroupMessage=h}else b[a]={title:e,position:d,emptyGroupMessage:h,imageClass:k,tooltip:l,selectionClass:f,defaultActionId:m===!0?null:m,pretendDefaultActionId:m===!0,children:{}},b.sortedContributions=null},_createEntryForPath:function(b,a){a&&a.split("/").forEach(function(a){if(a.length>1){if(!b[a])b[a]={position:0,
children:{}},b.sortedContributions=null;b=b[a].children}});return b},registerSelectionService:function(b,a){this._contributionsByScopeId[b]||(this._contributionsByScopeId[b]={});this._contributionsByScopeId[b].localSelectionService=a},registerCommandContribution:function(b,a,d,e,c,h,k){this._contributionsByScopeId[b]||(this._contributionsByScopeId[b]={});b=this._contributionsByScopeId[b];e&&(b=this._createEntryForPath(b,e));b[a]={position:d};h&&((d=this._commandList[a])?this._addBinding(d,"key",h,
c):this._addPendingBinding(a,"key",h,c));k&&((d=this._commandList[a])?this._addBinding(d,"url",k,c):this._addPendingBinding(a,"url",k,c));b.sortedContributions=null},unregisterCommandContribution:function(b,a,d){if(this._contributionsByScopeId[b]){delete this._commandList[a];delete this._activeBindings[a];delete this._urlBindings[a];delete this._pendingBindings[a];var e=this._contributionsByScopeId[b];d&&d.split("/").forEach(function(b){if(b.length>1&&e[b])e=e[b].children});delete e[a];e.sortedContributions=
null}},_addBinding:function(b,a,d,e){if(!b.id)throw Error("No command id: "+b);a==="key"?this._activeBindings[b.id]={command:b,keyBinding:d,bindingOnly:e}:a==="url"&&(this._urlBindings[b.id]={command:b,urlBinding:d,bindingOnly:e})},_addPendingBinding:function(b,a,d,e){this._pendingBindings[b]=this._pendingBindings[b]||[];this._pendingBindings[b].push({type:a,binding:d,bindingOnly:e})},_checkForTrailingSeparator:function(b,d,e){var c;if(d==="tool"||d==="button")if((c=b.childNodes.length>0?b.childNodes[b.childNodes.length-
1]:null)&&c.classList.contains("commandSeparator"))return e?(b.removeChild(c),!1):!0;if(d==="menu"&&(b=a.$$array("li > *",b),b.length>0&&b[b.length-1].classList.contains("dropdownSeparator")))if(c=b[b.length-1],e)c.parentNode.parentNode.removeChild(c.parentNode);else return!0;return!1},renderCommands:function(b,d,e,c,h,k,l){if(typeof b!=="string")throw"a scope id for rendering must be specified";d=a.node(d);if(!d)throw"no parent";var f=this._contributionsByScopeId[b];if(!e&&f){var e=f.localSelectionService||
this._selectionService,m=this;e&&e.getSelections(function(a){m.renderCommands(b,d,a,c,h,k)})}else f&&(this._render(f,d,e,c,h||"button",k,l),this._checkForTrailingSeparator(d,h,!0))},destroy:function(b){b=a.node(b);if(!b)throw"no parent";for(;b.hasChildNodes();){var d=b.firstChild;d.commandTooltip&&d.commandTooltip.destroy();d.emptyGroupTooltip&&d.emptyGroupTooltip.destroy();this.destroy(d);b.removeChild(d)}},_render:function(b,a,d,h,k,l,f){var m=b.sortedContributions;if(!m){var m=[],i=!1,q;for(q in b)if(Object.prototype.hasOwnProperty.call(b,
q)){var r=b[q];if(r&&typeof r.position==="number")r.id=q,m.push(r),i=!0}if(i)m.sort(function(b,a){return b.position-a.position}),b.sortedContributions=m}var D=0,t=this;m.forEach(function(b){var m;if(!b.imageClass)b.imageClass=null;if(b.children&&Object.getOwnPropertyNames(b.children).length>0){var i=b.children;if(k==="tool"||k==="button")if(b.title){var q;if(b.defaultActionId)(i=t._commandList[b.defaultActionId])&&(i.visibleWhen?i.visibleWhen(d):1)?(q=new g.CommandInvocation(h,d,l,i,t),q.domParent=
a):b.pretendDefaultActionId=!0;i=t._createDropdownMenu(a,b.title,null,null,b.imageClass,b.tooltip,b.selectionClass,null,q,b.pretendDefaultActionId);f&&j.generateNavGrid(f,i.menuButton);if(i)if(t._render(b.children,i.menu,d,h,"menu",l,f),t._checkForTrailingSeparator(i.menu,"menu",!0),i.menu.childNodes.length===0)if(b.emptyGroupMessage){if(!i.menuButton.emptyGroupTooltip)i.menuButton.emptyGroupTooltip=new e.Tooltip({node:i.menuButton,text:b.emptyGroupMessage,trigger:"click",position:["below","right",
"above","left"]})}else f&&j.removeNavGrid(f,i.menuButton),b=function(b){b&&b.parentNode&&b.parentNode.removeChild(b)},b(i.menu),b(i.menuButton),b(i.destroyButton);else i.menuButton.style.visibility="visible"}else{var r;a.childNodes.length>0&&!t._checkForTrailingSeparator(a,k)&&(r=t.generateSeparatorImage(a));t._render(i,a,d,h,k,l,f);a.childNodes.length>0&&a.childNodes[a.childNodes.length-1]!==r&&(r=t.generateSeparatorImage(a))}else if(b.title){if(b=t._createDropdownMenu(a,b.title,!0,null,null,b.imageClass))t._render(i,
b.menu,d,h,"menu",l,f),t._checkForTrailingSeparator(b.menu,"menu",!0),b.menu.childNodes.length===0&&b.destroyButton&&a.removeChild(b.destroyButton)}else a.childNodes.length>0&&t._generateMenuSeparator(a),t._render(i,a,d,h,k,l,f),t._generateMenuSeparator(a)}else{var p=t._commandList[b.id],i=p?!0:!1;q=b=null;if(p){m=new g.CommandInvocation(h,d,l,p,t);m.domParent=a;r=i&&(p.visibleWhen?p.visibleWhen(d):!0);if(t._activeBindings[p.id]&&t._activeBindings[p.id].keyBinding)b=t._activeBindings[p.id],b.invocation=
r?m:null,b.bindingOnly&&(i=!1);if(t._urlBindings[p.id]&&t._urlBindings[p.id].urlBinding)q=t._urlBindings[p.id],q.invocation=r?m:null,q.bindingOnly&&(i=!1);i=i&&r}if(i)p.choiceCallback?(k==="tool"||k==="button"?(b=a,i=!1,a.nodeName.toLowerCase()==="ul"&&(b=document.createElement("li"),a.appendChild(b))):(b=a,i=!0),t._createDropdownMenu(b,p.name,i,function(b){p.populateChoicesMenu(b,d,h,l,t)}.bind(p),p.imageClass,p.tooltip||p.title,p.selectionClass,p.positioningNode)):(m.handler=m.handler||this,m.domParent=
a,i=function(){t._invoke(m)},k==="menu"?(q=null,b&&b.keyBinding&&(q=c.getUserKeyString(b.keyBinding)),b=g.createCommandMenuItem(a,p,m,null,i,q)):(b=k+p.id+D,b=g.createCommandItem(a,p,m,b,null,k==="tool",i)),j.generateNavGrid(f,b),m.domNode=b,D++)}})},_createDropdownMenu:function(b,d,c,h,l,f,m,q,j,r){b=a.node(b);if(!b||!a.contains(document.body,b))return null;var G,D,t=b;if(c)f=document.createRange(),f.selectNode(b),f=f.createContextualFragment(k),a.processTextNodes(f,{ButtonText:d}),b.appendChild(f),
D=b.lastChild,l=D.lastChild,d=l.previousSibling,d.dropdown=new i.Dropdown({dropdown:l,populate:h,parentDropdown:b.dropdown}),l.dropdown=d.dropdown;else{b.nodeName.toLowerCase()==="ul"&&(t=document.createElement("li"),b.appendChild(t),D=t);b=null;l&&(b="dropdownButtonWithIcon",f=f||d);var f=l?f||d:f,z=g.createDropdownMenu(t,d,h,b,l,!1,m,q,j||r);G=z.dropdownArrow;d=z.menuButton;if(G){if(j)j.domNode=z.menuButton;var v=this;d.onclick=function(b){var d=a.bounds(G);b.clientX>=d.left&&z.dropdown?z.dropdown.toggle(b):
v._invoke(j)};if(z.dropdown)d.onkeydown=function(b){a.KEY.DOWN===b.keyCode&&(z.dropdown.toggle(b),a.stop(b))}}var l=z.menu,C;(h=j&&j.command&&(j.command.tooltip||j.command.name))?C=j.command.tooltip||j.command.name:h&&(C=f);if(C)d.commandTooltip=new e.Tooltip({node:d,text:C,position:["above","below","right","left"]})}return{menuButton:d,menu:l,dropdown:d.dropdown,destroyButton:D,dropdownArrow:G}},_generateMenuSeparator:function(b){if(!this._checkForTrailingSeparator(b,"menu")){var a=document.createElement("li");
a.classList.add("dropdownSeparator");var d=document.createElement("span");d.classList.add("dropdownSeparator");a.appendChild(d);b.appendChild(a)}},generateSeparatorImage:function(b){var a;a=b.nodeName.toLowerCase()==="ul"?document.createElement("li"):document.createElement("span");b.appendChild(a);a.classList.add("core-sprite-sep");a.classList.add("imageSprite");a.classList.add("commandSeparator");return a}};h.prototype.constructor=h;l.prototype={match:function(b){b=f.matchResourceParameters(b);return typeof b[this.token]!==
"undefined"?(this.parameterValue=b[this.token],this):null}};l.prototype.constructor=l;m.prototype.constructor=m;q.prototype={optionsRequested:function(){return this.optionsRequested}};q.prototype.constructor=q;r.prototype={_storeParameters:function(b){this.parameterTable=null;if(b){var a=this.parameterTable={};b.forEach(function(b){a[b.name]=b})}},updateParameters:function(b){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(b))},hasParameters:function(){return this.parameterTable!==
null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(b){return this.parameterTable[b]},valueFor:function(b){return(b=this.parameterTable[b])?b.value:null},setValue:function(b,a){var d=this.parameterTable[b];if(d)d.value=a},forEach:function(b){for(var a in this.parameterTable)this.parameterTable[a].type&&this.parameterTable[a].name&&b(this.parameterTable[a])},makeCopy:function(){var b=[];this.forEach(function(a){a=new q(a.name,a.type,a.label,
a.value,a.lines,a.eventListeners);b.push(a)});var a=new r(b,this._options,this.getParameters);a.clientCollect=this.clientCollect;return a},hasOptionalParameters:function(){return this._hasOptionalParameters}};r.prototype.constructor=r;return{CommandRegistry:h,URLBinding:l,ParametersDescription:r,CommandParameter:q,CommandEventListener:m}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,j,f){function c(a,c){this._activeContainer=null;this._getElementsFunction=a;this._toolbarLayoutFunction=c}c.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(a,c,e){typeof a==="string"&&(a=f.node(a));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===a)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(a))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=e;var d=c(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!d)return!1;this._activeElements.focusNode=d;a=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(a.length===0){c=this._activeElements.dismissArea||
this._activeElements.parameterArea;a=document.createElement("button");a.id="closebox";a.className="imageSprite core-sprite-close dismissButton";a.title=g.Close;c.appendChild(a);var b=this;a.addEventListener("click",function(){b.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(d)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){d.focus();d.select&&d.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(a,c){f.$$array("input",c).forEach(function(e){e.type==="checkbox"?a.parameters.setValue(e.parameterName,e.checked):e.type!=="button"&&a.parameters.setValue(e.parameterName,e.value.trim())});f.$$array("textArea",c).forEach(function(e){a.parameters.setValue(e.parameterName,e.value.trim())});a.command.callback&&a.command.callback.call(a.handler,a)},collectParameters:function(a){return a.parameters?
(a.domNode&&a.domNode.classList.add("commandMarker"),this.open(a.domNode||a.domParent,this.getFillFunction(a))):!1},getFillFunction:function(a,c){var e=this;return function(d,b){var k=null,h=function(){c&&c();e.close()},l=function(b){b.keyCode===f.KEY.ENTER&&e._collectAndCall(a,d);if(b.keyCode===f.KEY.ESCAPE||b.keyCode===f.KEY.ENTER)h(),f.stop(b)};a.parameters.forEach(function(b){var e=null;if(b.label)e=document.createElement("label"),e.classList.add("parameterInput"),e.setAttribute("for",b.name+
"parameterCollector"),e.textContent=b.label,d.appendChild(e);var c=b.name+"parameterCollector",m,e=e||d;if(b.type==="text"&&typeof b.lines==="number"&&b.lines>1)m=document.createElement("textarea"),m.rows=b.lines,m.type="textarea",m.id=c,e.appendChild(m),l=function(b){b.keyCode===f.KEY.ESCAPE&&(h(),f.stop(b))};else if(b.type==="boolean"){if(m=document.createElement("input"),m.type="checkbox",m.id=c,e.appendChild(m),b.value)m.checked=!0}else if(m=document.createElement("input"),m.type=b.type,m.id=
c,e.appendChild(m),b.value)m.value=b.value;m.classList.add("parameterInput");m.setAttribute("speech","speech");m.setAttribute("x-webkit-speech","x-webkit-speech");m.parameterName=b.name;k||(k=m);b.eventListeners.length>0&&b.eventListeners.forEach(function(b){m.addEventListener(b.event,function(d){return b.handler(d,a)},b.capture)});m.addEventListener("keydown",l,!1)});var m=b;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),d.appendChild(m));
var j=function(b,a){var d=document.createElement("button");a.appendChild(d);b&&d.appendChild(document.createTextNode(b));d.classList.add("dismissButton");return d};if(a.parameters.hasOptionalParameters())a.parameters.optionsRequested=!1,j(g.More,m).addEventListener("click",function(){a.parameters.optionsRequested=!0;e._collectAndCall(a,d);h()},!1);j(g.Submit,m).addEventListener("click",function(){e._collectAndCall(a,d);h()},!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(){h()},!1);return k}}};c.prototype.constructor=c;return{CommandParameterCollector:c}});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(b,a){function d(b,a,e,c){var e=a.filename.indexOf(e)>=0,h;h=c.toLowerCase();h=a.extension.indexOf(h)!==-1;if(e||h){if(!(h=!b))e&&(c=c.toLowerCase(),e=b.extension.indexOf(c)!==-1),h=e;if(h)return a}return b}if(typeof b!=="string")return null;for(var e=b&&b.split(".").pop(),c=null,f=0;f<a.length;f++){var i=a[f];d(c,i,b,e)===i&&(c=i)}return c}function j(b){return b===null||typeof b==="undefined"?[]:Array.isArray(b)?b:[b]}function f(b){return j(b).map(function(b){return String.prototype.toLowerCase.call(b)})}
function c(b){return{id:b.id,name:b.name,image:b.image,imageClass:b.imageClass,"extends":b["extends"],extension:f(b.extension),filename:j(b.filename)}}function a(b){var a=Object.create(null);b.map(c).forEach(function(b){Object.prototype.hasOwnProperty.call(a,b.id)||(a[b.id]=b)});return a}function i(c){if(c&&c.registerService){this.serviceRegistry=c;for(var h=c.getServiceReferences(d).concat(c.getServiceReferences(b)),l=[],f=0;f<h.length;f++)for(var i=j(h[f].getProperty("contentTypes")),g=0;g<i.length;g++)l.push(i[g]);
this.map=a(l);c.registerService(e,this)}else if(Array.isArray(c))this.serviceRegistry=null,this.map=a(c);else throw Error("Invalid parameter");}var e="orion.core.contentTypeRegistry",d="orion.core.contenttype",b="orion.file.contenttype";i.prototype={getContentTypes:function(){var b=this.getContentTypesMap(),a=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&a.push(b[d]);return a},getContentTypesMap:function(){return this.map},getFileContentType:function(b){return g(b.Name,this.getContentTypes())},
getFilenameContentType:function(b){return g(b,this.getContentTypes())},getContentType:function(b){return this.map[b]||null},isExtensionOf:function(b,a){b=typeof b==="string"?this.getContentType(b):b;a=typeof a==="string"?this.getContentType(a):a;if(!b||!a)return!1;if(b.id===a.id)return!0;else for(var d=b,e={};d&&(d=this.getContentType(d["extends"]));){if(d.id===a.id)return!0;if(e[d.id])throw Error("Cycle: "+d.id);e[d.id]=!0}return!1},isSomeExtensionOf:function(b,a){for(var d=0;d<a.length;d++)if(this.isExtensionOf(b,
a[d]))return!0;return!1}};return{ContentTypeRegistry:i,getFilenameContentType:g}});
define("orion/URITemplate",[],function(){function g(b){this._text=b}function j(b){return b.replace("%25","%")}function f(b,a){if(a==="U")return encodeURIComponent(b).replace(/[!'()*]/g,function(b){return"%"+b.charCodeAt(0).toString(16).toUpperCase()});if(a==="U+R")return encodeURI(b).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(k,j);if(a==="U+R-,")return encodeURI(b).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+a);}function c(b,a,d){for(var e=
[],c=0;c<b.length;c++)typeof b[c]!=="undefined"&&e.push(f(b[c],a));return e.join(d)}function a(b,a,d,e){for(var c=Object.keys(b),k=[],i=0;i<c.length;i++)typeof b[c[i]]!=="undefined"&&k.push(f(c[i],a)+d+f(b[c[i]],a));return k.join(e)}function i(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=d[a[0]])?a=a.substring(1):this._operator=d.NUL;for(var e=[],c=a.split(","),k=0;k<c.length;k++){var f=c[k].match(b);if(f===null)throw Error("Bad VarSpec: "+a);e.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=e}function e(b){for(var a=[],d=0,e=b.indexOf("{",d);e!==-1;){a.push(new g(b.substring(d,e)));d=b.indexOf("}",e+1);if(d===-1)throw Error("Invalid template: "+b);a.push(new i(b.substring(e+1,d)));d+=1;e=b.indexOf("{",d)}a.push(new g(b.substring(d)));this._templateComponents=a}var d={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-,"}},b=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,k=/%25[0-9A-F][0-9A-F]/g;g.prototype={expand:function(){return encodeURI(this._text)}};
i.prototype={expand:function(b){for(var d=[],e=0;e<this._varSpecList.length;e++){var k=this._varSpecList[e],i=k.name,g=b[i],j=typeof g;if(j!=="undefined"&&g!==null){var n=d.length===0?this._operator.first:this._operator.sep;if(j==="string")this._operator.named&&(n+=f(i,"U+R"),n+=g.length===0?this._operator.ifemp:"="),k.prefix!==-1&&k.prefix<g.length&&(g=g.substring(0,k.prefix)),n+=f(g,this._operator.allow);else if(Array.isArray(g)){if(g.length===0)continue;k.explode?n+=c(g,this._operator.allow,this._operator.sep):
(k=c(g,this._operator.allow,","),this._operator.named&&(n+=f(i,"U+R"),n+=k.length===0?this._operator.ifemp:"="),n+=k)}else if(j==="object"){if(Object.keys(g).length===0)continue;k.explode?n+=a(g,this._operator.allow,"=",this._operator.sep):(k=a(g,this._operator.allow,",",","),this._operator.named&&(n+=f(i,"U+R"),n+=k.length===0?this._operator.ifemp:"="),n+=k)}else throw Error("bad param type: "+i+" : "+j);d.push(n)}}return d.join("")}};e.prototype={expand:function(b){for(var a=[],d=0;d<this._templateComponents.length;d++)a.push(this._templateComponents[d].expand(b));
return a.join("")}};return e});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,j){function f(a){if(a=localStorage.getItem("orion/messageBundle/"+a))if(a=JSON.parse(a),a._expires&&a._expires>(new Date).getTime())return delete a._expires,a;return null}var c={};return{getMessageBundle:function(a){function i(b){b?g(["i18n!"+a],function(b){if(b){var e=a;b._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(b));delete b._expires}d.resolve(b)}):e(Error(a))}function e(b){d.reject(b)}
if(c[a])return c[a];var d=new j;c[a]=d;var b=f(a);if(b)return d.resolve(b),d;try{g([a],i,e)}catch(k){g(["orion/i18n!"+a],i,e)}return d},formatMessage:function(a){var c=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,d){return c[(d<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/objects,orion/URL-shim".split(","),function(g,j,f,c,a,i){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 d(b){var a={};b.getPropertyKeys().forEach(function(d){d!=="objectClass"&&d!=="service.names"&&d!=="service.id"&&d!=="__plugin__"&&(a[d]=b.getProperty(d))});return a}function b(b){return a.getMessageBundle(b.nls).then(function(a){b.textContent=
b.nameKey?a[b.nameKey]:b.name;return b},function(){b.textContent=b.nameKey||b.name;return b})}function k(a,h){var k=a.getServiceReferences(h||"orion.page.link"),l=f.matchResourceParameters(window.location.href),m={OrionHome:e(),Location:l.resource},i=[];k.forEach(function(a){a=d(a);if(a.uriTemplate&&(a.nls||a.name)){var e=(new c(a.uriTemplate)).expand(m),e=f.validateURLScheme(e);a.href=e;a.nls?i.push(b(a)):(a.textContent=a.name,i.push((new j).resolve(a)))}});return j.all(i)}function h(b){var a=this.categories=
Object.create(null);b.forEach(function(b){a[b.id]=b})}function l(b){this.allPageLinks=b;this.allPageLinks.sort(m)}function m(b,a){var d=b.textContent&&b.textContent.toLowerCase(),e=a.textContent&&a.textContent.toLowerCase();return d<e?-1:d>e?1:0}var q;i.mixin(h.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(b){return this.categories[b]||null}});i.mixin(l.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(b){var a=b.href,b=
b.textContent,d=document.createElement("a");d.href=a;d.target="_self";d.classList.add("targetSelector");d.textContent=b;return d})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(a){var e;return!q?(e=[],a.getServiceReferences("orion.page.link.category").forEach(function(a){a=d(a);if(a.id&&(a.name||a.nameKey))a.nls?e.push(b(a)):(a.textContent=a.name,e.push((new j).resolve(a)))}),j.all(e).then(function(b){return q=new h(b)})):(new j).resolve(q)},getPageLinksInfo:function(b,
a){return k(b,a).then(function(b){return new l(b)})},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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});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,c,a,i,e,d,b,k){function h(b){var a={};b.getPropertyKeys().forEach(function(d){a[d]=b.getProperty(d)});return a}var l={},m=b.getOrionHome();l._cloneItemWithoutChildren=function o(b){if(b===null||typeof b!=="object")return b;var a=b.constructor(),d;for(d in b)d!=="children"&&d!==
"Children"&&(a[d]=o(b[d]));return a};l._getOpenWithNavCommandExtensions=function(b){function a(b,d){for(var e=b.getServiceReferences("orion.navigate.openWith"),c=[],h=[],k=0;k<e.length;k++){var l=e[k];if(l.getProperty("editor")===d.id){var f=l.getProperty("contentType");f instanceof Array?c=c.concat(f):c.push(f||"*/*");l=l.getProperty("excludedContentTypes");l instanceof Array?h=h.concat(l):l!==null&&typeof l!=="undefined"&&h.push(l)}}0===c.length&&(c=null);0===h.length&&(h=null);return{contentTypes:c,
excludedContentTypes:h}}for(var d=function(){for(var a=b.getServiceReferences("orion.edit.editor"),d=[],e=0;e<a.length;e++){var c=a[e],h=c.getProperty("id");d.push({id:h,"default":c.getProperty("default")||!1,name:c.getProperty("name"),nameKey:c.getProperty("nameKey"),nls:c.getProperty("nls"),uriTemplate:c.getProperty("orionTemplate")||c.getProperty("uriTemplate"),validationProperties:c.getProperty("validationProperties")||[]})}return d}(),e=[],c=0;c<d.length;c++){var h=d[c],k=a(b,h);e.push({properties:{name:h.name||
h.id,nameKey:h.nameKey,id:"eclipse.openWithCommand."+h.id,contentType:k.contentTypes,excludedContentTypes:k.excludedContentTypes,uriTemplate:h.uriTemplate,nls:h.nls,forceSingleItem:!0,isEditor:h["default"]?"default":"editor",validationProperties:h.validationProperties},service:{}})}return e};l._makeValidator=function(b,d,e,c){function h(b,a,d,e){var c=d.match,k,l;if((k=a.indexOf("["))>=0){if((l=a.indexOf("]"))<0)return!1;var f=a.substring(0,k),m;if(!(m=b[f])||!Array.isArray(m))return!1;k=a.substring(k+
1,l);k=parseInt(k,10);if(isNaN(k))return!1;k<0&&(k+=m.length);a=a.substring(l+1);a=f+":"+String(k)+a}if(a.indexOf("|")>=0)return k=a.substring(0,a.indexOf("|")),a=a.substring(a.indexOf("|")+1),h(b,k,d,e)?!0:h(b,a,d,e);else if(a.indexOf(":")>=0)return k=a.substring(0,a.indexOf(":")),a=a.substring(a.indexOf(":")+1),b[k]?h(b[k],a,d,e):!1;else{a:{var f=!1,i;if(a.charAt(0)==="!")d=typeof b[a.substring(1)]==="undefined";else if(typeof b[a]!=="undefined"){if(typeof c==="undefined")i=b[a],f=!0;else if(typeof c===
"string"){if(!typeof(b[a]==="string")){d=!1;break a}if(d.variableName){if(c=RegExp(c).exec(b[a]))i=c[0],i=d.variableMatchPosition==="before"?b[a].substring(0,c.index):d.variableMatchPosition==="after"?b[a].substring(c.index+i.length):d.variableMatchPosition==="only"?i:b[a],f=!0}else{d=RegExp(c).test(b[a]);break a}}else b[a]===c&&(i=b[a],f=!0);if(f&&d.variableName&&(e[d.variableName]=i,e.itemCached=b,d.replacements))for(b=0;b<d.replacements.length;b++)i=!1,d.replacements[b].pattern?e[d.variableName]=
e[d.variableName].replace(RegExp(d.replacements[b].pattern),d.replacements[b].replacement||""):i=!0,i&&window.console.log("Invalid replacements specified in validation property.  "+d.replacements[b]);d=f}else d=!1}return d}}function k(d,e,c){if(c.info.validationProperties)for(var l=0;l<c.info.validationProperties.length;l++){var f=c.info.validationProperties[l];if(typeof f.source!=="undefined"){if(!h(d,f.source,f,c))return!1}else return window.console.log("Invalid validationProperties in "+b.id+".  No source property specified."),
!1}var l=!0,m=e?a.getFilenameContentType(d.Name,e):null,m=m||{id:"application/octet-stream"};c.info.excludedContentTypes&&e&&(l=c.info.excludedContentTypes.every(function(b){b=b.replace(/([*?])/g,".$1");return-1!==m.id.search(b)?!1:!0}));l&&c.info.contentType&&e&&(l=c.info.contentType.some(function(b){b=b.replace(/([*?])/g,".$1");return-1!==m.id.search(b)?!0:!1}));return l}return{info:b,validationFunction:function(b){typeof c==="function"&&(b=c.call(this,b));if(b){if(Array.isArray(b)){if((this.info.forceSingleItem||
this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var a=0;a<b.length;a++)if(!k(b[a],e,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(b){if(this.info.uriTemplate){var a={},d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);if(this.info.validationProperties)for(d=0;d<this.info.validationProperties.length;d++){var e=this.info.validationProperties[d];e.source&&e.variableName&&(this.itemCached===
b&&this[e.variableName]||h(b,e.source,e,this),b[e.variableName]?window.console.log("Variable name "+e.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):a[e.variableName]=this[e.variableName])}a.OrionHome=m;return(new i(this.info.uriTemplate)).expand(a)}return null}}};var q=k.UnnamedCommand;l._createCommandOptions=function(b,a,d,c,h,k){function f(e,m){var i=l._makeValidator(b,d,c,k);e.visibleWhen=i.validationFunction.bind(i);if(h)if(i.generatesURI.bind(i)())e.hrefCallback=
function(b){b=Array.isArray(b.items)?b.items[0]:b.items;return i.getURI.bind(i)(b)};else{var g=b;e.callback=function(b){var c;if(g.forceSingleItem)b=Array.isArray(b.items)?b.items[0]:b.items,c=l._cloneItemWithoutChildren(b);else if(Array.isArray(b.items)){c=[];for(var h=0;h<b.items.length;h++)c.push(l._cloneItemWithoutChildren(b.items[h]))}else c=l._cloneItemWithoutChildren(b.items);if(d)var k=d.getService("orion.page.progress");a.run?k?k.progress(a.run(c),"Running command: "+e.name):a.run(c):d&&
(k?k.progress(d.getService(a).run(c),"Running command: "+e.name):d.getService(a).run(c))}}m.resolve(e)}var m=new j;if(b.nls){var i=function(a){var d;a?(d=b.tooltipKey&&a[b.tooltipKey],a=b.nameKey&&a[b.nameKey]||b.name||q,d=d||b.tooltip||""):(a=b.name||b.nameKey||q,d=b.tooltip||b.tooltipKey||"");f({name:a,image:b.image,id:b.id||b.name,tooltip:d,isEditor:b.isEditor,showGlobally:b.showGlobally},m)};e.getMessageBundle(b.nls).then(i,i.bind(this,null))}else f({name:b.name,image:b.image,id:b.id||b.name,
tooltip:b.tooltip,isEditor:b.isEditor,showGlobally:b.showGlobally},m);return m};l.getOpenWithCommand=function(b,a,d){for(var e,b=d||l.getOpenWithCommands(b),d=0;d<b.length;d++)if(b[d].visibleWhen(a)){var c=b[d].isEditor==="default";if(!e||c)if(e=b[d],c)break}return e};l.getOpenWithCommands=function(b){var a=[],d;for(d in b._commandList){var e=b._commandList[d];e.isEditor&&a.push(e)}return a};var r;l.createAndPlaceFileCommandsExtension=function(b,a,d,e,c,h){return l.createFileCommands(b,null,h?"all":
void 0,!!h,a).then(function(b){c&&0<b.length&&(a.addCommandGroup(d,"eclipse.openWith",1E3,k.OpenWith,c,null,null,null,"dropdownSelection"),a.addCommandGroup(d,"eclipse.fileCommandExtensions",1E3,k.OpenRelated,c));b.forEach(function(b){var h=null;c&&(h=b.isEditor?c+"/eclipse.openWith":c+"/eclipse.fileCommandExtensions");a.registerCommandContribution(d,b.id,e,h)});return{}})};l.createFileCommands=function(b,a,d,e,c){var d=d===void 0?"global":d,e=e===void 0?!0:e,h=[];l._cachedFileCommands||l._createCachedFileCommands(b);
(d==="all"||d==="global")&&l._cachedFileCommands.forEach(function(b){var a=b.properties;(d==="all"||a.forceSingleItem&&a.showGlobally)&&h.push(b)});return j.when(function(){var d=b.getService("orion.core.contentTypeRegistry")||a;return r||j.when(d.getContentTypes(),function(b){return r=b})}(),function(){if(e){if(!l._cachedOpenWithExtensions)l._cachedOpenWithExtensions=l._getOpenWithNavCommandExtensions(b,r);h=h.concat(l._cachedOpenWithExtensions);c._addedOpenWithCommands=e}var a=h.map(function(a){var d=
a.properties,a=a.service,e=c.findCommand(d.id||d.name);return e?(new j).resolve(e):l._createCommandOptions(d,a,b,r,!0).then(function(b){b=new f.Command(b);c.addCommand(b);return b})});return j.all(a,function(b){return{_error:b}}).then(function(b){return b})})};l._createCachedFileCommands=function(b){var a=b.getServiceReferences("orion.navigate.command");l._cachedFileCommands=[];for(var d=0;d<a.length;d++)if(a[d].getProperty("id")!=="orion.navigateFromMetadata"){var e=b.getService(a[d]),c=h(a[d]);
l._cachedFileCommands.push({properties:c,service:e})}};l.getFileCommandIds=function(){var b=[];if(l._cachedFileCommands)l._cachedFileCommands.length&&(b=l._cachedFileCommands.map(function(b){return b.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return b};l.createOpenWithCommands=function(b,a,d){return d&&d._addedOpenWithCommands?(new j).resolve(l.getOpenWithCommands(d)):l.createFileCommands(b,a,"none",!0,d)};return l});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,j){function f(c){this._init(c)}f.prototype={_init:function(c){var a=j.node(c.container);if(!a)throw"no parent container";this._container=a;a.classList.remove("currentLocation");this._id=c.id||"eclipse.breadcrumbs";this._resource=c.resource||null;this._rootSegmentName=c.rootSegmentName;this._workspaceRootSegmentName=c.workspaceRootSegmentName;this._workspaceRootURL=c.workspaceRootURL;this._makeHref=c.makeHref;this._makeFinalHref=
c.makeFinalHref;this._maxLength=c.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var c;if(this._resource&&this._resource.Parents&&!this._resource.skip){c=document.createElement("a");var a=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(c,a):c.href=g.toUrl("edit/edit.html")+"#"+a}else c=document.createElement("span");j.empty(c);c.appendChild(document.createTextNode(this._workspaceRootSegmentName));
return c}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(c){var a=document.createElement("a");a.classList.add("breadcrumb");a.appendChild(document.createTextNode(c));return a},addSegmentHref:function(c,a){this._makeHref?this._makeHref(c,a.Location,a):c.href=g.toUrl("edit/edit.html")+"#"+a.ChildrenLocation},buildSegments:function(c,a){if(this._resource.Parents){var f=this._resource.Parents.slice(0),e,d;f&&(f=f.slice(0),a==="reverse"&&(f=f.reverse().slice(0)),
f.forEach(function(b){if(!b.skip)c?(d=c,c=null):d=b.Name,e=this.buildSegment(d),this.path+=b.Name,this.addSegmentHref(e,b),e.include=!1,this.segments.push(e)}.bind(this)))}},addDivider:function(){var c=document.createElement("span");c.appendChild(document.createTextNode(" / "));this.path+="/";c.classList.add("breadcrumbSeparator");this.append(c)},refresh:function(){(this.crumbs=j.node(this._id))?j.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),
this.dirty=document.createElement("span"),this.dirty.id="dirty",this.dirty.className="modifiedFileMarker",this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(c){this.crumbs.appendChild(c)},addTitle:function(c,a){var f=a||document.title;this.crumbs.childNodes.length===0&&(c=document.createElement("span"),c.appendChild(document.createTextNode(f)),
c.classList.add("breadcrumb"),c.classList.add("currentLocation"),this.append(c))},finalSegment:function(c,a){if(!this._resource.skip){var f;f=a?a:this._resource.Name;this._makeFinalHref?(c=this.buildSegment(f),this.addSegmentHref(c,this._resource)):(c=document.createElement("span"),c.appendChild(document.createTextNode(f)));c.classList.add("currentLocation");this.path+=this._resource.Name;this.append(c)}},firstSegment:function(c){if(c)if(this.append(c),this._resource&&this._resource.Parents&&!this._resource.skip)c.classList.add("breadcrumb"),
this.addDivider();else{if(!this._resource.skip)c.href="";c.classList.add("currentLocation")}},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(c){c.include===!0&&(this.append(c),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var c=this.segments.slice(0).reverse();c.forEach(function(a){this.append(a);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?a.include=!0:this.INCLUDE_FIRST_SECTION=
!1}.bind(this));this.segments=c.reverse()}},measure:function(){var c=this._container;c.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:c.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var c=this.getNavigatorWorkspaceRootSegment(),a=this._rootSegmentName;if(a)this.addTitle(c,a);else if(this.finalSegment(c,a),this._resource&&this._resource.Parents&&(this.buildSegments(a,"reverse"),this.measureSegments(),this.firstSegment(c)),this.crumbs.offsetWidth>=
this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var c=this.getNavigatorWorkspaceRootSegment(),a=this._rootSegmentName;a?this.addTitle(c,a):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(c),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(c,a)));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 c(a){j.attach(this);this._init(a)}c.prototype={_init:function(a){this._tracking=null;this._animationDelay=501;this._closeReversely=a.closeReversely;this.$node=f.node(a.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(a.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(a.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=a.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(a.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 a.closeByDefault!=="undefined")this._closeByDefault=a.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(a){this.addEventListener("resize",function(c){a(c.node)})},_initializeFromStoredSettings:function(){var a=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof a==="string"?a==="closed":this._closeByDefault;var a=f.bounds(this.$node.parentNode),c=f.bounds(this.$node),e;if(this._vertical)if(e=localStorage.getItem(this._prefix+"/yPosition")){if(this._splitTop=parseInt(e,10),this._splitTop>a.top+a.height-c.height)this._splitTop=a.top+a.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>a.left+a.width-c.width)this._splitLeft=a.left+a.width/2}else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var a=f.bounds(this.$node),c=f.bounds(this.$node.parentNode);return this.vertical?a.top-c.top:a.left-c.left},_adjustToSplitPosition:function(a){var c=
f.bounds(this.$node),e=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=c.height;if(a||!this._splitTop)this._splitTop=c.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);a=this._splitTop;this.$node.parentNode.style.position==="relative"&&(a=this._splitTop-e.top);this.$sideNode.style.height=a+"px";this.$sideNode.style.display="block";this.$node.style.top=a+"px"}else{this._splitWidth=c.width;if(a||!this._splitLeft)this._splitLeft=c.left,localStorage.setItem(this._prefix+
"/xPosition",this._splitLeft);a=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(a=this._splitLeft-e.left);this.$sideNode.style.width=a+"px";this.$sideNode.style.display="block";this.$node.style.left=a+"px"}this._resize()},_resize:function(a,c,e){var a=a||0,d=f.bounds(this.$node.parentNode),b=f.bounds(this.$node);this._vertical?(e===void 0&&(e=b.top-d.top),e+=b.height,this.$mainNode.style.top=e+"px"):(c===void 0&&(c=b.left-d.left),c+=b.width,this.$mainNode.style.left=c+"px");var k=
this;window.setTimeout(function(){k._notifyResizeListeners(k.$mainNode);k._notifyResizeListeners(k.$sideNode)},a)},_notifyResizeListeners:function(a){this.dispatchEvent({type:"resize",node:a})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(a,c){a||this._addAnimation();var e=this._splitTop,d=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")e=d=this._initialSplit}else if(this._closed=
!0,this._closeReversely){var b=f.bounds(this.$node.parentNode),k=f.bounds(this.$node);this._vertical?e=b.height-k.height:d=b.width-k.width}else e=d=0;this._vertical?(this.$sideNode.style.height=e+"px",this.$node.style.top=e+"px"):(this.$sideNode.style.width=d+"px",this.$node.style.left=d+"px");this._resize(this._animationDelay,d,e);a||this._removeAnimation();c||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var h=this;window.setTimeout(function(){h._notifyToggleListeners()},
this._animationDelay)},_removeAnimation:function(){var a=this;window.setTimeout(function(){a.$sideNode.classList.remove(a._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");a.$mainNode.classList.remove(a._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");a.$node.classList.remove(a._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(a){if(a.target===this._thumb)return f.stop(a),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(a)},_mouseMove:function(a){if(this._tracking){var c=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=a.clientY;if(this._splitTop<c.top+5)this._splitTop=c.top+5;else if(this._splitTop>c.top+c.height-5)this._splitTop=c.top+c.height-5;var e=this._splitTop,e=this._splitTop-c.top;this.$node.style.top=e+"px"}else{this._splitLeft=a.clientX;if(this._splitLeft<c.left+5)this._splitLeft=c.left+5;else if(this._splitLeft>
c.left+c.width-5)this._splitLeft=c.left+c.width-5;e=this._splitLeft;e=this._splitLeft-2*c.left;this.$node.style.left=e+"px"}this._adjustToSplitPosition(!0);f.stop(a)}},_mouseUp:function(a){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(a)}};c.prototype.constructor=c;return{Splitter:c}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(g,j,f){function c(a){this.commandRegistry=a.commandRegistry;this.create();this._filterString="";this._providers=[]}c.prototype={addProvider:function(a){this._providers.push(a)},create:function(){var a=this._keyAssistDiv=document.createElement("div");a.id="keyAssist";a.style.display="none";a.classList.add("keyAssistFloat");a.setAttribute("role","menu");var c=this._keyAssistInput=document.createElement("input");
c.classList.add("keyAssistInput");c.type="text";c.placeholder=g["Filter bindings"];a.appendChild(c);var e=this._keyAssistContents=document.createElement("div");e.classList.add("keyAssistContents");if(f.isIOS||f.isAndroid)e.style.overflowY="auto";a.appendChild(e);var d=this._keyAssistTable=document.createElement("table");d.tabIndex=0;d.classList.add("keyAssistList");e.appendChild(d);document.body.appendChild(a);c.addEventListener("keydown",function(b){this._keyDown(b)}.bind(this));d.addEventListener("keydown",
function(b){this._keyDown(b)}.bind(this));c.addEventListener("input",function(){this.filterChanged()}.bind(this));e.addEventListener(f.isFirefox?"DOMMouseScroll":"mousewheel",function(b){this._scrollWheel(b)}.bind(this));document.addEventListener("keydown",function(b){b.keyCode===j.KEY.ESCAPE&&this.hide()}.bind(this));j.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){j.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var a=this._idCount=
this._keyAssistContents.scrollTop=0;a<this._providers.length;a++)this._providers[a].showKeyBindings(this);this.createHeader(g.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(a,c,e){if(this._filterString){var d=this._filterString.toLowerCase(),b;d!==this._filterString?(d=this._filterString,b=function(b){return b}):b=function(b){return b.toLowerCase()};if(b(c).indexOf(d)===-1&&b(a).indexOf(d)===-1&&b(this._lastHeader).indexOf(d)===-1)return}var k=this._keyAssistTable.insertRow(-1);
k.id="keyAssist-keyBinding-"+this._idCount++;k.setAttribute("role","menuitem");k._execute=e;k.classList.add("keyAssistItem");k.addEventListener("click",function(b){this._selectedRow=k;this.execute();b.preventDefault()}.bind(this));e=k.insertCell(-1);e.classList.add("keyAssistName");e.appendChild(document.createTextNode(c));e=k.insertCell(-1);e.classList.add("keyAssistAccel");e.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var c=this._keyAssistTable.insertRow(-1);
c.classList.add("keyAssistSection");var c=c.insertCell(-1),e=document.createElement("h2");e.appendChild(document.createTextNode(a));c.appendChild(e)},execute:function(){window.setTimeout(function(){this.hide();var a=this._selectedRow;this._selectedRow=null;a&&a._execute&&a._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var a=this._keyAssistInput.value;if(this._filterString!==a)this._filterString=
a,this.createContents()}.bind(this),100)},hide:function(){if(this.isVisible()){var a=document.activeElement,c=this._keyAssistDiv,a=c===a||(c.compareDocumentPosition(a)&16)!==0;c.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},removeProvider:function(a){a=this._providers.indexOf(a);a!==-1&&this._providers.splice(a,
1)},select:function(a){var c=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(c.length===0)this._selectedIndex=-1;else{var e=this._selectedIndex;e+=a?1:-1;e%=c.length;e<0&&(e=c.length-1);if(this._selectedIndex!==-1)a=c[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=e;if(this._selectedIndex!==-1){this._selectedRow=a=c[this._selectedIndex];a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();
var c=a.getBoundingClientRect(),d=this._keyAssistContents,b=d.getBoundingClientRect();a.offsetTop<d.scrollTop?e===0?d.scrollTop=0:a.scrollIntoView(!0):c.bottom>b.bottom&&a.scrollIntoView(!1)}}},show:function(){if(!this.isVisible())this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*0.75)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),
this._keyAssistInput.select()},_keyDown:function(a){if(a.keyCode===40)this.select(!0);else if(a.keyCode===38)this.select(!1);else if(a.keyCode===13)this.execute();else return;a.preventDefault()},_scrollWheel:function(a){var c=0,c=f.isIE||f.isOpera?-a.wheelDelta:f.isFirefox?a.detail*40:-a.wheelDeltaY,e=this._keyAssistContents,d=e.scrollTop;e.scrollTop+=c;if(d!==e.scrollTop)return a.preventDefault&&a.preventDefault(),!1}};return{KeyAssistPanel:c}});
define("orion/widgets/themes/ThemePreferences",[],function(){function g(g,f){this._preferences=g;this._themeData=f;var c=f.getThemeStorageInfo();this._themeVersion=c.version;var a=g.listenForChangedSettings(c.storage,2,function(c){c.key===a&&this.apply()}.bind(this))}g.prototype={_initialize:function(g,f,c){var a,i;this._themeVersion===void 0||c.get("version")===this._themeVersion?(a=c.get(g.styleset),(i=c.get("selected"))&&(i=JSON.parse(i))):i=a=null;a||(a=f.getStyles(),c.put(g.styleset,JSON.stringify(a)));
if(!i||i[g.selectedKey]===void 0)i=i||{},i[g.selectedKey]=g.defaultTheme,c.put("selected",JSON.stringify(i));c.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(g){var f=this._themeData,c=f.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(a){this._initialize(c,f,a);var i=JSON.parse(a.get("selected")),a=JSON.parse(a.get(c.styleset)),e;if(a)for(var d=0;d<a.length;d++)if(a[d].name===i[c.selectedKey]){e=a[d];break}g({style:e,styles:a})}.bind(this))},
setTheme:function(g,f){var c=this._themeData,a=c.getThemeStorageInfo();this._preferences.getPreferences(a.storage,2).then(function(i){this._initialize(a,c,i);var e=JSON.parse(i.get("selected"));g||(g=e[a.selectedKey]);e[a.selectedKey]=g;i.put("selected",JSON.stringify(e));f?i.put(a.styleset,JSON.stringify(f)):f=JSON.parse(i.get(a.styleset));for(var d=0;d<f.length;d++)if(f[d].name===e[a.selectedKey]){c.processSettings(f[d]);break}i.put("version",this._themeVersion)}.bind(this))},setFontSize:function(g){var f=
this._themeData,c=f.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(a){this._initialize(c,f,a);var i=JSON.parse(a.get("selected")),e=JSON.parse(a.get(c.styleset)),d;if(e)for(var b=0;b<e.length;b++)e[b].fontSize=g,e[b].name===i[c.selectedKey]&&(d=e[b]);a.put(c.styleset,JSON.stringify(e));f.processSettings(d)}.bind(this))}};return{ThemePreferences:g}});
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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/editor/eventTarget",[],function(){function g(){}g.addMixin=function(j){var f=g.prototype,c;for(c in f)f.hasOwnProperty(c)&&(j[c]=f[c])};g.prototype={addEventListener:function(g,f,c){if(!this._eventTypes)this._eventTypes={};var a=this._eventTypes[g];a||(a=this._eventTypes[g]={level:0,listeners:[]});a.listeners.push({listener:f,useCapture:c})},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 c=this._eventTypes?this._eventTypes[g]:null;if(c){var a=c.listeners;try{if(c.level++,a)for(var i=0,e=a.length;i<e;i++)if(a[i]){var d=a[i].listener;typeof d==="function"?d.call(this,f):d.handleEvent&&typeof d.handleEvent==="function"&&d.handleEvent(f)}}finally{if(c.level--,c.compact&&c.level===0){for(i=a.length-1;i>=0;i--)a[i]||a.splice(i,1);a.length===0&&delete this._eventTypes[g];c.compact=!1}}}},isListening:function(g){return!this._eventTypes?!1:this._eventTypes[g]!==void 0},removeEventListener:function(g,
f,c){if(this._eventTypes){var a=this._eventTypes[g];if(a){for(var i=a.listeners,e=0,d=i.length;e<d;e++){var b=i[e];if(b&&b.listener===f&&b.useCapture===c){a.level!==0?(i[e]=null,a.compact=!0):i.splice(e,1);break}}i.length===0&&delete this._eventTypes[g]}}}};return{EventTarget:g}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(g,j,f){function c(a){a=a||{};this._document=a.document||document}var a={};c.getTheme=function(f){var f=f||"default",e=a[f];e||(e=a[f]=new c);return e};c.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(a,e){var d=this,b=d._themeClass;d._themeClass=a;this._load(a,e,function(){d.onThemeChanged({type:"ThemeChanged",oldValue:b,newValue:d.getThemeClass()})})},onThemeChanged:function(a){return this.dispatchEvent(a)},
buildStyleSheet:function(a,e){function d(d,e,c){e&&(b.push("."+a+" ."+d+" {"),b.push("\t"+(c?"background-color":"color")+": "+e+";"),b.push("}"))}var b=[];b.push("");b.push("."+a+" {");e.fontFamily&&b.push("\tfont-family: "+e.fontFamily+";");e.fontSize&&b.push("\tfont-size: "+e.fontSize+";");e.fontSize&&b.push("\tcolor: "+e.text+";");b.push("}");b.push("."+a+".textview {");e.background&&b.push("\tbackground-color: "+e.background+";");b.push("}");d("ruler.annotations",e.annotationRuler,!0);d("ruler.lines",
e.annotationRuler,!0);d("ruler.folding",e.annotationRuler,!0);d("ruler.overview",e.overviewRuler,!0);d("rulerLines",e.lineNumber,!1);d("rulerLines.even",e.lineNumberEven,!1);d("rulerLines.odd",e.lineNumberOdd,!1);d("annotationLine.currentLine",e.currentLine,!0);d("entity-name-tag",e.keyword,!1);d("entity-other-attribute-name",e.attribute,!1);d("string-quoted",e.string,!1);d("meta.annotation.currentLine",e.currentLine,!0);d("keyword",e.keyword,!1);d("string",e.string,!1);d("comment",e.comment,!1);
d("comment.block.documentation",e.comment,!1);d("keyword.other.documentation.markup",e.comment,!1);return b.join("\n")},_createStyle:function(a,e,d,b){var c=this._document,a="orion-theme-"+a,h=c.getElementById(a);if(h){if(b||h.firstChild.data===e)return;h.removeChild(h.firstChild);h.appendChild(c.createTextNode(e))}else b?(h=f.createElement(c,"link"),h.rel="stylesheet",h.type="text/css",h.href=e,h.addEventListener("load",function(){d()})):(h=f.createElement(c,"style"),h.appendChild(c.createTextNode(e))),
h.id=a,(c.getElementsByTagName("head")[0]||c.documentElement).appendChild(h);b||d()},_load:function(a,e,d){if(a)if(typeof e==="string")this._createStyle(a,e,d);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(a,e,d,!0);else{var b=this;g(["text!"+e],function(e){b._createStyle(a,e,d,!1)})}else d()}};j.EventTarget.addMixin(c.prototype);return{TextTheme:c}});
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="",c=[],a=new g.ThemeClass("orionPage");
a.style.backgroundColor="#fdfdfd";a.style.width="100%";a.style.height="100%";c.push(a);a=new g.ThemeClass("topRowBanner");a.style.margin="0";a.style.border="0";a.style.backgroundColor=this.navbar;a.style.height="16px";a.style.padding="10px";a.style.paddingLeft="6px";a.style.paddingRight="2px";a.style.borderBottom="none";a.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";a.style.zIndex="100";c.push(a);a=new g.ThemeClass("a");a.style.textDecoration="none";a.style.color=
this.content;c.push(a);a=new g.ThemeClass("navlink");a.style.display="inline-block";a.style.padding="2px";a.style.color=this.content;a.style.verticalAlign="bottom";c.push(a);a=new g.ThemeClass("primaryNav");a.style.color=this.navtext;a.style.fontSize="8pt";a.style.fontWeight="normal";a.style.paddingTop="0";a.style.verticalAlign="baseline";c.push(a);a=new g.ThemeClass("primaryNav a");a.style.fontSize="8pt";a.style.color=this.navtext;a.style.marginRight="6px";a.style.marginLeft="6px";a.style.verticalAlign=
"baseline";a.style.textDecoration="none";c.push(a);a=new g.ThemeClass("primaryNav a:hover");a.style.color="#bfbfbf";a.style.cursor="hand";a.style.color="white";a.style.fontWeight="normal";c.push(a);for(var i in c)f+=c[i].toString();return f};j.prototype.writeLocationStyle=function(){var f="",c=[],a=new g.ThemeClass("titleArea");a.style.margin="0";a.style.paddingTop="5px";a.style.border="0";a.style.background=this.location;a.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";a.style.borderBottom="1px solid "+this.location;a.style.minHeight="20px";c.push(a);a=new g.ThemeClass("breadcrumb");a.style.fontSize="8pt";a.style.textDecoration="none";a.style.color="#f1f1f2;";a.style.paddingTop="2px";c.push(a);a=new g.ThemeClass("a.breadcrumb:hover");a.style.textDecoration="none";a.style.borderBottom="1px dotted";a.style.color="#F58B0F";a.style.cursor="pointer";c.push(a);a=new g.ThemeClass("breadcrumbSeparator");a.style.fontSize=
"8pt";a.style.textDecoration="none";a.style.color=this.separator;a.style.fontWeight="bold";c.push(a);a=new g.ThemeClass("currentLocation");a.style.fontWeight="bold";a.style.fontSize="8pt";a.style.color=this.breadcrumb;a.style.textDecoration="none";a.style.textWrap="normal";a.style.lineHeight="10pt";c.push(a);a=new g.ThemeClass("a.currentLocation:hover");a.style.fontWeight="bold";a.style.fontSize="10pt";a.style.color="#666666";a.style.textDecoration="none";a.style.borderBottom="0";c.push(a);a=new g.ThemeClass("navlinkonpage");
a.style.color=this.content;a.style.verticalAlign="middle";c.push(a);if(this.bannerProgress)a=new g.ThemeClass("topRowBanner .progressPane_running"),a.style.borderColor=this.bannerProgress,c.push(a);for(var i in c)f+=c[i].toString();return f};j.prototype.writeButtonStyle=function(){var f="",c=[],a=new g.ThemeClass("commandButton");a.style.color="#666";a.style.border="1px solid #dedede";a.style.backgroundColor="#ddd";a.style.textAlign="center";a.style.verticalAlign="middle";a.style.cursor="pointer";
a.style.display="inline-block";a.style.padding="4px 6px";a.style.borderRadius="3px";a.style.lineHeight="12px";a.style.fontSize="9pt";a.style.userSelect="none";c.push(a);a=new g.ThemeClass("commandButton:over");a.style.backgroundColor="#e6e6e6";a.style.border="1px solid #808080";c.push(a);a=new g.ThemeClass("commandMenu");a.style.color="#222";a.style.display="inline-block";a.style.verticalAlign="baseline";a.style.margin="0";a.style.fontSize="8pt";a.style.fontWeight="normal";a.style.border="1px solid #dedede";
a.style.backgroundColor="#efefef";a.style.cursor="pointer";a.style.borderRadius="1px";c.push(a);a=new g.ThemeClass("commandMenuItem");a.style.border="0";a.style.padding="0";a.style.margin="0";c.push(a);for(var i in c)f+=c[i].toString();return f};j.prototype.writeMainStyle=function(){var f="",c=[],a=new g.ThemeClass("searchbox");a.style.backgroundImage="url(../images/core_sprites.png)";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="4px -297px";a.style.width="12px";a.style.height=
"12px";a.style.backgroundColor=this.search;a.style.border="1px solid "+this.search;a.style.fontSize="11px";a.style.width="15em";a.style.height="16px";a.style.borderRadius="10px";a.style.color="#999";a.style.padding="0";a.style.paddingLeft="20px";a.style.marginLeft="5px";a.style.marginTop="6px !important";a.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";c.push(a);a=new g.ThemeClass("searchbox:focus");a.style.color="white";a.style.outline=
"none";c.push(a);a=new g.ThemeClass("checkedRow");a.style.cssText="background-color:"+this.selection+" !important;";c.push(a);a=new g.ThemeClass("navbar-item-selected");a.style.background=this.selection;a.style.color=this.content;c.push(a);a=new g.ThemeClass("auxpane");a.style.border="0";a.style.background=this.sidepanel;c.push(a);a=new g.ThemeClass("mainpane");a.style.background=this.mainpanel;a.style.border=0;c.push(a);a=new g.ThemeClass("mainToolbar");a.style.background=this.toolpanel;c.push(a);
for(var i in c)f+=c[i].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 c(){}function a(){this.styles=[];var a=new c;a.name="Orion";a.navbar="white";a.button="#EFEFEF";a.location="#efefef";a.selection="FEC";a.sidepanel="#FBFBFB";a.mainpanel="white";a.toolpanel="white";a.navtext="#bfbfbf";a.content="#3087B3";a.search="#444";a.breadcrumb="#3087B3";a.separator="#333";a.bannerProgress="whitesmoke";
this.styles.push(a);a=new c;a.name="Orion2014";a.navbar="white";a.button="#EFEFEF";a.location="#EFEFEF";a.selection="FEC";a.sidepanel="#EEEEEE";a.mainpanel="#EEEEEE";a.toolpanel="#EEEEEE";a.navtext="#BFBFBF";a.content="#333333";a.search="#444444";a.breadcrumb="#333333";a.separator="#333333";a.bannerProgress="orange";this.styles.push(a);a=new c;a.name="Green Zone";a.navbar="seagreen";a.button="lavender";a.location="darkseagreen";a.selection="moccasin";a.sidepanel="aliceblue";a.mainpanel="white";a.toolpanel=
"white";a.navtext="#FBFBFB";a.content="darkgreen";a.search="darkgreen";a.breadcrumb="#3087B3";a.separator="seagreen";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name="Pretty In Pink";a.navbar="plum";a.button="lavender";a.location="pink";a.selection="lavender";a.sidepanel="seashell";a.mainpanel="white";a.toolpanel="white";a.navtext="#FBFBFB";a.content="mediumorchid";a.search="violet";a.breadcrumb="#3087B3";a.separator="plum";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name=
"Blue Monday";a.navbar="cornflowerblue";a.button="lavender";a.location="skyblue";a.selection="lavender";a.sidepanel="aliceblue";a.mainpanel="white";a.toolpanel="white";a.navtext="#FBFBFB";a.content="royalblue";a.search="royalblue";a.breadcrumb="#3087B3";a.separator="cornflowerblue";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name="Vanilla Skies";a.navbar="sandybrown";a.button="lemmonchiffon";a.location="cornsilk";a.selection="lemonchiffon";a.sidepanel="white";a.mainpanel="white";a.toolpanel=
"white";a.navtext="lemonchiffon";a.content="chocolate";a.search="moccasin";a.breadcrumb="#3087B3";a.separator="sandybrown";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name="Beetlejuice";a.navbar="indigo";a.button="slateblue";a.location="darkslateblue";a.selection="silver";a.sidepanel="lavender";a.mainpanel="white";a.toolpanel="white";a.navtext="#FBFBFB";a.content="mediumslateblue";a.search="#444";a.breadcrumb="#3087B3";a.separator="indigo";a.bannerProgress="#F2F2F2";this.styles.push(a);
a=new c;a.name="Red";a.navbar="#CD2127";a.button="#777777";a.location="#D85F56";a.selection="lightcoral";a.sidepanel="#EFDAB2";a.mainpanel="#FDFADD";a.toolpanel="#FDFADD";a.navtext="#FBFBFB";a.content="darkred";a.search="#D85F56";a.breadcrumb="darkred";a.separator="#CD2127";a.bannerProgress="#F2F2F2";this.styles.push(a)}function i(){return this.styles}c.prototype.name="Orion";c.prototype.navbar="#404648";c.prototype.button="#EFEFEF";c.prototype.location="#333";c.prototype.breadcrumb="#3087B3";c.prototype.separator=
"#333";c.prototype.selection="FEC";c.prototype.sidepanel="#FBFBFB";c.prototype.mainpanel="white";c.prototype.toolpanel="white";c.prototype.navtext="#bfbfbf";c.prototype.content="#3087B3";c.prototype.search="#444";c.prototype.bannerProgress="white";a.prototype.styles=[];a.prototype.getStyles=i;a.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};a.prototype.getViewData=function(){var a={top:10,left:10,
width:350,height:350};a.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 d=0;d<3;d++)a.shapes.push({type:"TEXT",name:g.Content,label:"org.eclipse.orion.content",x:170,y:127+20*d,fill:"#3087B3",family:"content"});for(d=0;d<3;d++)a.shapes.push({type:"TEXT",name:g.Content,label:"Item",x:25,y:115+20*d,fill:"#3087B3",family:"content"});for(d=0;d<3;d++)a.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+d*20,x2:165,y2:124+d*20,x3:160,y3:127+d*20,family:"navbar",fill:"#333"});a.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return a};a.prototype.processSettings=function(a){var d=new f.ThemeSheetWriter;(new j.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",d.getSheet(a))};return{ThemeData:a,getStyles:i}});
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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(g){function j(f,c,a){this.elements=a;this.taskPanel=document.createElement("div");this.taskPanel.className="UAContainer";this.taskPanel.innerHTML='<header class="UAHeader">Develop software from within the cloud</header>';this.elementNode=document.createElement("div");this.switchesContainer=document.createElement("div");this.switches=document.createElement("span");this.radioButtons=[];this.elementNode.className="UAContainer-body";
this.taskPanel.appendChild(this.elementNode);this.switchesContainer.className="UAContainer-switch-body";this.switches.className="UAContainer-switches";this.switchesContainer.innerHTML="";this.switchesContainer.appendChild(this.switches);this.taskPanel.appendChild(this.switchesContainer);c===!0?(this.container=document.createElement("div"),this.container.className="UAModal",this.container.appendChild(this.taskPanel),this.backdrop=document.createElement("div"),this.backdrop.className="UAModalBackground",
document.body.appendChild(this.backdrop),document.body.appendChild(this.container),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 c=document.createElement("span");c.className="UAContainer-icon";c.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>";c.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;document.getElementById(f.label+"LabelNode").className="UALabel-live";c.className="UAContainer-icon-live"};
c.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";c.className="UAContainer-icon"};var a=this;c.onclick=function(){a.showMedia(f)};this.elementNode.appendChild(c)};j.prototype.clearElements=function(){this.elementNode.innerHTML=""};j.prototype.showMedia=function(f){this.clearElements();this.addElement(f);var c=document.createElement("span");c.className="UAContainer-media";c.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
f.media+'" alt="'+f.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(c);setTimeout(function(){c.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 c;c=f?f.label+"switch":"indexSwitch";var a=document.createElement("span");a.className="workingSpan";a.innerHTML='<div class="circle" id ="'+c+'"></div>';var g=this;a.onclick=
f?function(){g.showMedia(f)}:function(){g.initialize();g.chosenSwitch.firstChild.className="circle";g.chosenSwitch=a;g.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(a);return this.radioButtons[this.radioButtons.length]=a};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,c){function a(){}var i=null;a.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 a=document.body;this.$frameParent=a;this.$$modalExclusions=this.$$modalExclusions||[];var d=document.createRange();d.selectNode(a);d=d.createContextualFragment(this.CONTAINERTEMPLATE);a.appendChild(d);this.$frame=a.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);
d=document.createRange();d.selectNode(this.$parent);a=d.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(a,this.messages);this.$parent.appendChild(a);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE?b.hide():a.keyCode===f.KEY.ENTER&&typeof b._defaultCallback==="function"&&b._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 a=this;this.buttons.forEach(function(d){var b=c.createButton(d.text,d.callback);if(d.id)b.id=d.id,a["$"+b.id]=b;if(d.isDefault)a._defaultCallback=d.callback,a._defaultButton=b;a.$buttonContainer.appendChild(b)})}},_makeModal:function(){var a=this;this.$frame.addEventListener("blur",function(b){a.$lastFocusedElement=b.target},!0);this._modalListener=function(b){var d=!f.contains(a.$frame,
b.target);if(d)for(var c=0;c<a.$$modalExclusions.length;c++)if(f.contains(a.$$modalExclusions[c],b.target)){d=!1;break}d&&(window.setTimeout(function(){(a.$lastFocusedElement||a.$parent).focus()},0),f.stop(b))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var d=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var c=0;c<d.length;c++){for(var h=0;h<this.$$modalExclusions.length;h++)if(f.contains(this.$$modalExclusions[h],
d[c])){b=!0;break}!b&&d[c]!==a.$frame&&d[c].classList&&!d[c].classList.contains("tooltipContainer")&&(h=d[c],h.classList.contains("modalBackdrop")||(h.classList.add("modalBackdrop"),this._addedBackdrop.push(h)))}(d=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&d.addEventListener("keydown",function(b){if(b.keyCode===f.KEY.TAB){var d=a._getFirstFocusField();d&&d!==b.target&&d.focus();f.stop(b)}},!1)},_addChildDialog:function(a){this.$$modalExclusions.push(a.$frame||a.$parent)},
_inModalExclusion:function(a){return this.$$modalExclusions.some(function(d){return a.$frame===d||a.$parent===d})},_bindElements:function(a){for(var d=0;d<a.childNodes.length;d++){var b=a.childNodes[d];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(a){!a&&i===this&&(i=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 d=this;this.keepAlive||window.setTimeout(function(){d.destroy()},0)},show:function(a){if(this.modal)if(i){if(!i._inModalExclusion(this)){this.hide(!0);return}}else i=this;typeof this._beforeShowing==="function"&&this._beforeShowing();f.setFramesEnabled(!1);var d=f.bounds(this.$frame),b=f.bounds(document.documentElement),c;a?(c=f.bounds(a),a=c.top+c.height+4,c=c.left+
4,a+d.height>b.height&&(a=Math.max(0,b.height-d.height-4)),c+d.width>b.width&&(c=Math.max(0,b.width-d.width-4))):(c=Math.max(0,(b.width-d.width)/2),a=Math.max(0,(b.height-d.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=a+"px";this.$frame.style.left=c+"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)i===this&&(i=null),f.setFramesEnabled(!0),this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(a){a.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}};a.prototype.constructor=
a;return{Dialog:a}});
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,c,a){function i(a){this._displaySignOut=!0;this._init(a)}i.prototype={_init:function(a){this._dropdownNode=f.node(a.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=a.dropdown;this._serviceRegistry=a.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=a.noSeparator;this._dropDownItemClass=a.dropDownItemClass;this._keyAssistClass=a.keyAssistClass;if(a.signOut!==void 0)this._displaySignOut=a.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(a){var d=0,b;for(b in a)a.hasOwnProperty(b)&&d++;return d},_makeMenuItem:function(a,
d){var b=document.createElement("span");b.role="menuitem";b.tabIndex=0;var c=document.createTextNode(a);b.appendChild(c);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&b.classList.add(this._dropDownItemClass):b.classList.add("dropdownMenuItem");b.addEventListener("click",d,!1);b.addEventListener("keydown",function(b){(b.keyCode===f.KEY.ENTER||b.keyCode===f.KEY.SPACE)&&d()},!1);return b},_renderAuthenticatedService:function(a){var d=this,b=this.authenticatedServices[a].authService;
if(b&&b.logout&&this._displaySignOut){var c=document.createElement("li"),h=this._makeMenuItem(g["Sign Out"],function(){b.logout().then(function(){d.addUserItem(a,b,d.authenticatedServices[a].label);localStorage.removeItem(a);localStorage.removeItem("lastLogin");for(var c=localStorage.length-1;c>=0;c--){var h=localStorage.key(c);h&&h.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(h)}b.getAuthForm(window.location.href).then(function(b){window.location=b})})});c.appendChild(h);this._dropdownNode.appendChild(c)}},
renderServices:function(){function a(c){b[c]||(b[c]=d.createDocumentFragment());return b[c]}var d=document,b=[],k=this._serviceRegistry;c.getPageLinksInfo(k,"orion.page.link.user").then(function(c){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);c.getAllLinks().forEach(function(b){var c,h;if(b.category&&(h=/user\.(\d+)/.exec(b.category)))c=parseInt(h[1],10);if(typeof c!=="number"||isNaN(c))c=1;c=a(c);h=d.createElement("li");var k=d.createElement("a");k.role="menuitem";
typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&k.classList.add(this._dropDownItemClass):k.classList.add("dropdownMenuItem");k.href=b.href;k.textContent=b.textContent;h.appendChild(k);c.appendChild(h);k.addEventListener("keydown",function(b){(b.keyCode===f.KEY.ENTER||b.keyCode===f.KEY.SPACE)&&k.click()},!1)}.bind(this));if(this.keyAssistFunction){var c=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");c.appendChild(l);a(0).appendChild(c)}if(c=k.getServiceReferences("orion.page.getstarted")[0])l=c.getProperty("data"),c=document.createElement("li"),l=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,l)),c.appendChild(l),a(0).appendChild(c);var m=this;b.sort(function(b,a){return b-a}).forEach(function(a,d){if(d<b.length-1&&!this._noSeparator){var c=document.createElement("li");
c.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");c.appendChild(e);a.appendChild(c)}m._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var i in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(i)&&this._renderAuthenticatedService(i,0)}.bind(this))},getStartedDialog:function(c){new a(null,!0,c)},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(a,d,b,c){c?
(this.unauthenticatedServices[a]&&delete this.unauthenticatedServices[a],this.authenticatedServices[a]={authService:d,label:b,data:c}):(this.authenticatedServices[a]&&delete this.authenticatedServices[a],this.unauthenticatedServices[a]=this.unauthenticatedServices[a]?{authService:d,label:b,pending:this.unauthenticatedServices[a].pending}:{authService:d,label:b});this.renderServices()}};i.prototype.constructor=i;return{UserMenu:i}});
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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(g,j,f,c,a,i){function e(b,a,d){var c="";d&&(c="^");if(c=f.parse("/"+c+b.searchStr+"/"))d=c.pattern,c=c.flags,c.indexOf("i")===-1&&!a.caseSensitive&&(c+="i"),b.regExp={pattern:d,flags:c},b.wildCard=!0}var d={ALL_FILE_TYPE:"*.*"};d.doSearch=function(b,a,c,e){if(b){var f=!0;c==="*"&&(c="");c===""&&(f=e&&e.type!==d.ALL_FILE_TYPE);if(f)c!==""&&d.addRecentSearch(a,
c,e?e.regEx:!1),b=b.createSearchParams(c,!1,!1,e),b=d.generateSearchHref(b),window.location=b}else window.alert(g["Can't search: no search service is available"])};d.generateSearchHelper=function(b,a){var c=b.keyword,f=c,m={};b.fileType&&b.fileType!==d.ALL_FILE_TYPE&&c===""&&(f="*."+b.fileType);if(b.regEx)m.searchStr=c,e(m,b,a);else{var g=c.indexOf("*")>-1,i=c.indexOf("?")>-1;g&&(c=c.split("*").join(".*"));i&&(c=c.split("?").join("."));!g&&!i&&!b.nameSearch?(m.searchStr=b.caseSensitive?c.split("\\").join(""):
c.split("\\").join("").toLowerCase(),m.wildCard=!1):(m.searchStr=b.caseSensitive?c:c.toLowerCase(),e(m,b,a),m.wildCard=!0)}m.searchStrLength=m.searchStr.length;return{params:b,inFileQuery:m,displayedSearchTerm:f}};d.convertSearchParams=function(b){if(b.rows!==void 0)b.rows=parseInt(b.rows,10);if(b.start!==void 0)b.start=parseInt(b.start,10);if(typeof b.regEx==="string")b.regEx=b.regEx.toLowerCase()==="true";if(typeof b.caseSensitive==="string")b.caseSensitive=b.caseSensitive.toLowerCase()==="true";
if(typeof b.nameSearch==="string")b.nameSearch=b.nameSearch.toLowerCase()==="true"};d.copySearchParams=function(b,a){var d={},c;for(c in b)if(b[c]!==void 0&&b[c]!==null&&(a||c!=="replace"))d[c]=b[c];return d};d.generateSearchHref=function(b){var a=j.toUrl("search/search.html"),b=d.copySearchParams(b,!0),c=b.resource;b.resource=void 0;return typeof b.keyword!=="undefined"?(new i(a+"#{,resource,params*}")).expand({resource:c,params:b}):(new i(a+"#{,resource}")).expand({resource:c})};d.generateFindURLBinding=
function(b,a,d,c,e){b={find:a.searchStr,regEx:a.wildCard?!0:void 0,caseSensitive:b.caseSensitive?!0:void 0,replaceWith:typeof c==="string"?c:void 0,atLine:typeof d==="number"?d:void 0};return e?b:","+(new i("{,params*}")).expand({params:b})};d.convertFindURLBinding=function(b){if(typeof b.regEx==="string")b.regEx=b.regEx.toLowerCase()==="true";if(typeof b.caseSensitive==="string")b.caseSensitive=b.caseSensitive.toLowerCase()==="true";if(typeof b.atLine==="string")b.atLine=parseInt(b.atLine,10)};d.replaceRegEx=
function(b,a,d){return b.replace(RegExp(a.pattern,a.flags),d)};d.replaceStringLiteral=function(b,a,c){a=f.parse("/"+a+"/gim");return d.replaceRegEx(b,a,c)};d.searchOnelineLiteral=function(b,a,d){var c;c=0;for(var e=!1,f=[];;)if(c=a.indexOf(b.searchStr,c),c<0)break;else{f.push({startIndex:c,length:b.searchStrLength});e=!0;if(d)break;c+=b.searchStrLength}return e?f:null};d.findRegExp=function(b,a,d,c){if(!a)return null;d=d||"";d+=(d.indexOf("g")===-1?"g":"")+(d.indexOf("m")===-1?"m":"");var e=null;
return(e=RegExp(a,d).exec(b.substring(c)))&&{startIndex:e.index+c,length:e[0].length}};d.searchOnelineRegEx=function(b,a,c){for(var e=0,f=!1,g=[];;)if(e=d.findRegExp(a,b.regExp.pattern,b.regExp.flags,e)){g.push(e);f=!0;if(c)break;e=e.startIndex+e.length}else break;return f?g:null};d.generateNewContents=function(b,a,c,e,f,g){if(e&&a){if(!b)c.contents=[];for(var i=0;i<a.length;i++){for(var j=a[i],o=!1,n=!1,s=[],u,A=0,w=0;w<e.children.length;w++)if(e.children[w].lineNumber-1===i){A=w;for(o=0;o<e.children[w].matches.length;o++)e.children[w+
o].checked!==!1&&s.push(o);n=s.length>0;u=e.children[w].matches;o=!0;break}if(o){if(n){s=d.replaceCheckedMatches(j,f,u,s,g);j=s.replacedStr;for(o=0;o<e.children[A].matches.length;o++)e.children[A+o].newMatches=s.newMatches}else for(o=0;o<e.children[A].matches.length;o++)e.children[A+o].newMatches=e.children[A+o].matches;b?c.contents[i]=j:c.contents.push(j)}else b||c.contents.push(j)}}};d.generateMatchContext=function(b,a,d){var c=[],e=b*2+1,f;a.length<=e?(f=0,b=a.length-1):(f=d-b,f<0?(f=0,b=f+e-1):
(b=d+b,b>a.length-1&&(b=a.length-1,f=b-e+1)));for(e=f;e<=b;e++)c.push({context:a[e],current:e===d});return c};d.splitFile=function(b){for(var a=0,d=0,c=0,e=0,f=[];;){a!==-1&&a<=c&&(a=b.indexOf("\r",c));d!==-1&&d<=c&&(d=b.indexOf("\n",c));if(d===-1&&a===-1){f.push(b.substring(e));break}var g=1;a!==-1&&d!==-1?a+1===d?(g=2,c=d+1):c=(a<d?a:d)+1:c=a!==-1?a+1:d+1;f.push(b.substring(e,c-g));e=c}return f};d.searchWithinFile=function(b,a,c,e,f,g){c=d.splitFile(c);if(f)a.contents=c;if(a){a.children=[];for(var i=
e=0;i<c.length;i++){var j=c[i];if(j&&j.length>0){var o=g?j:j.toLowerCase();if(o=b.wildCard?d.searchOnelineRegEx(b,o):d.searchOnelineLiteral(b,o)){var n,s=i+1;if(f)for(var u=0;u<o.length;u++)n=u+1,n={parent:a,checked:a.checked,type:"detail",matches:o,lineNumber:s,matchNumber:n,name:j,location:a.location+"-"+s+"-"+n},a.children.push(n);else n={parent:a,context:d.generateMatchContext(2,c,i),checked:a.checked,type:"detail",matches:o,lineNumber:s,name:j,location:a.location+"-"+s},a.children.push(n);e+=
o.length}}}a.totalMatches=e}};d.replaceCheckedMatches=function(b,a,d,c,e){for(var f=0,g="",i=[],j=0;j<d.length;j++){f!==d[j].startIndex&&(g+=b.substring(f,d[j].startIndex));if(d[j].length)e=d[j].length;for(var f=!1,n=0;n<c.length;n++)if(c[n]===j){f=!0;break}f?(i.push({startIndex:g.length,length:a.length}),g+=a):(i.push({startIndex:g.length,length:e}),g+=b.substring(d[j].startIndex,d[j].startIndex+e));f=d[j].startIndex+e}f<b.length&&(g+=b.substring(f));return{replacedStr:g,newMatches:i}};d.fullPathNameByMeta=
function(b){var a=b.length,d="";if(a>0)for(a-=1;a>-1;a--)d=d+(d===""?"":"/")+b[a].Name;return d};d.path2FolderName=function(b,a,d){return b.substring(0,b.length-a.length-(d?0:1))};d._storeRecentSearch=function(b,a,d,c){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("recentSearch",a);d&&window.setTimeout(function(){d.dispatchEvent({type:"inputDataListChanged",deleting:c})}.bind(this),20)})};d.addRecentSearch=function(b,a,c){typeof a==="string"&&a&&
b.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===a)return;e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:a,regEx:c});d._storeRecentSearch(b,e)})};d.removeRecentSearch=function(b,a,c){typeof a==="string"&&a&&b.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===a){e.splice(f,1);d._storeRecentSearch(b,e,c,!0);break}})};d.getSearches=function(b,a,d){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b=b.get(a);typeof b==="string"&&(b=JSON.parse(b));b&&d&&d(b)})};d.getMixedSearches=function(b,a,c,e){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var f=b.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));a&&(b=
b.get("search"),typeof b==="string"&&(b=JSON.parse(b)),b&&b.forEach(function(b){if(c){var a=d.parseQueryStr(b.query);f.some(function(b){return a.searchStrTitle===b.name})||f.push({name:a.searchStrTitle,label:b.name})}else f.push({name:null,label:b.name,value:b.query})}));f&&e&&e(f)})};d.getOpenSearchPref=function(b,a){b.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(b){b=b.get("nav.config");a(b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?!0:!1:!1)})};
d.setOpenSearchPref=function(b,a){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("openSearchPref",{openInNewTab:a})})};return d});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(g,j,f,c,a,i){function e(a,b,e,h){this.registry=a;this.fileClient=b;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=h&&h.searchOnName;this._buildSkeletonOnly=h&&h.buildSkeletonOnly;this._fetchChildrenCallBack=h&&h.fetchChildrenCallBack;this._searchParams=e;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:c.generateSearchHelper(e);this._location=h&&h.location;this._childrenLocation=h&&h.childrenLocation?h.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(a){var b=this.registry.getService("orion.core.contentTypeRegistry");
this._onSearchComplete=a;this._cancelled=!1;this._deferredArray=[];b.getContentTypes().then(function(b){this.contentTypesCache=b;var a=this;this._visitRecursively(this._childrenLocation).then(function(){a._cancelled||a._reportResult()}.bind(a),function(b){a._reportResult();a._statusService&&b.name==="Cancel"&&(console.log("Crawling search cancelled. Deferred array length : "+a._deferredArray.length),a._statusService.setProgressResult({Message:g["Search cancelled by user"],Severity:"Warning"}))}.bind(a))}.bind(this))};
e.prototype.searchName=function(a,b){if(a)this._searchParams=a,this.searchHelper=c.generateSearchHelper(a,!0);if(b)this.onSearchNameComplete=b;var e=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var h=0;h<this.fileSkeleton.length;h++){var f=this.fileSkeleton[h].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(e.push(this.fileSkeleton[h]),
e.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:e.length,docs:e}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};e.prototype.buildSkeleton=function(a,b){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var e=this;a();c.getContentTypes().then(function(a){e.contentTypesCache=a;e._visitRecursively(e._childrenLocation).then(function(){e._buildingSkeleton=!1;
b();e.searchHelper&&!e._buildSkeletonOnly&&e.searchName()})})};e.prototype._sort=function(a){a.sort(function(b,a){var d,e;if(this._searchParams.sort==="Path asc"){d=b.Location&&b.Location.toLowerCase();d=c.path2FolderName(d,b.Name&&b.Name.toLowerCase(),!0);e=a.Location&&a.Location.toLowerCase();e=c.path2FolderName(e,a.Name&&a.Name.toLowerCase(),!0);if(d<e)return-1;if(d>e)return 1}return this._sortOnNameSingle(b,a)}.bind(this))};e.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})};e.prototype._sortOnNameSingle=function(a,b){var c=a.Name&&a.Name.toLowerCase(),e=b.Name&&b.Name.toLowerCase();return c<e?-1:c>e?1:0};e.prototype._onFileType=function(a){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===c.ALL_FILE_TYPE?!0:a.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};e.prototype._visitRecursively=function(d){var b=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(d);return(c._progressService?this._progressService.progress(c.fileClient.fetchChildren(d),
"Crawling search for children of "+d):c.fileClient.fetchChildren(d)).then(function(d){for(var e=0;e<d.length;e++)if(d[e].Directory!==void 0&&d[e].Directory===!1)if(c._searchOnName)b.push(c._buildSingleSkeleton(d[e]));else if(c._buildSkeletonOnly)b.push(c._buildSingleSkeleton(d[e]));else{if(!c._cancelled){var f=a.getFilenameContentType(d[e].Name,c.contentTypesCache);if(f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&c._onFileType(f))f=c._sniffSearch(d[e]),b.push(f),c._deferredArray.push(f)}}else if(d[e].Location)if(c._cancelled)break;
else f=c._visitRecursively(d[e].ChildrenLocation),b.push(f),c._deferredArray.push(f);return i.all(b)})};e.prototype._hitOnceWithinFile=function(a){a=this._searchParams.caseSensitive?a:a.toLowerCase();return this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,a,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,a,!0)};e.prototype._reportSingleHit=function(a){if(!this._cancelled)a.LastModified=a.LocalTimeStamp,this.fileLocations.push(a),this._hitCounter++,
this._sort(this.fileLocations),this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};e.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(a){a.cancel()})};e.prototype._sniffSearch=function(a){this._totalCounter++;var b=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(a),this._statusService&&this._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return(b._progressService?b._progressService.progress(b.fileClient.read(a.Location),"Reading file "+a.Location):b.fileClient.read(a.Location)).then(function(c){b._hitOnceWithinFile(c)&&b._reportSingleHit(a);b._statusService&&b._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],b._hitCounter,b._totalCounter)},g.Cancel)},function(b){b&&b.message&&b.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+
b.message)})};e.prototype._buildSingleSkeleton=function(a){this._totalCounter++;this.fileSkeleton.push(a);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();a=new i;a.resolve(this._totalCounter);return a};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,c,a,i,e){function d(b){this._init(b)}d.prototype=new e.Dialog;d.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+
c.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:250px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';d.prototype._init=function(b){this.title=b.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=b.searcher;this._progress=b.progress;this._onHide=b.onHide;this._contentTypeService=new f.ContentTypeRegistry(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=b.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=b.initialText;this._message=b.message;this._nameSearch=!0;if(b.nameSearch!==void 0)this._nameSearch=b.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(g["Missing required argument: fileService"]);this._searchRenderer=b.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(g["Missing required argument: searchRenderer"]);this._initialize()};d.prototype._bindToDom=function(b){var d=this;d.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",g["FileName FolderName"]):this.$fileName.setAttribute("placeholder",g.Search);this.$fileName.addEventListener("input",function(){d._time=+new Date;d._timeoutId&&clearTimeout(d._timeoutId);d._timeoutId=setTimeout(d.checkSearch.bind(d),
0)},!1);this.$fileName.addEventListener("keydown",function(b){if(b.keyCode===a.KEY.ENTER){var c=a.$("a",d.$results);if(c)a.stop(b),(i.isMac?b.metaKey:b.ctrlKey)?window.open(c.href):(window.location.href=c.href,d.hide())}},!1);b.addEventListener("keydown",function(b){var c,e,f;if(b.keyCode===a.KEY.DOWN||b.keyCode===a.KEY.UP)c=a.$$array("a",d.$results),e=document.activeElement,f=c.indexOf(e),b.keyCode===a.KEY.DOWN?f>=0?(e.classList.remove("treeIterationCursor"),c=f<c.length-1?c[f+1]:c[0],c.focus(),
c.classList.add("treeIterationCursor")):c.length>0&&(c=-1<c.length-1?c[0]:c[0],c.focus(),c.classList.add("treeIterationCursor")):f>=0?(e.classList.remove("treeIterationCursor"),e=d.$fileName,c=f>0?c[f-1]:e,c.focus(),f>0&&c.classList.add("treeIterationCursor")):c.length>0&&(c[c.length-1].focus(),c[c.length-1].classList.add("treeIterationCursor")),a.stop(b)});b.addEventListener("mouseup",function(b){b.target.focus()},!1);setTimeout(function(){if(d._forceUseCrawler||!d._fileService.getService(d._searcher.getSearchLocation()).search){var b=
d._searchOnRoot?d._searcher.getSearchRootLocation():d._searcher.getChildrenLocation(),b=new j.SearchCrawler(d._searcher.registry,d._fileService,"",{searchOnName:!0,location:b});d._searcher.setCrawler(b);b.buildSkeleton(function(){d.$crawlingProgress.style.display="inline";d.$progress.appendChild(document.createTextNode(g["Building file skeleton..."]))},function(){d.$crawlingProgress.style.display="none";d.$progress.removeChild(d.$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()};d.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var b=(new Date).getTime();b-this._time>this._searchDelay?(this._time=b,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};d.prototype._detectFolderKeyword=function(b){var a,d=b,c=null;if(this._nameSearch&&(a=/(\S+)\s*(.*)/,(b=a.exec(b))&&b.length===3))b[1]&&
(d=b[1]),b[2]&&(c=b[2]);return{keyword:d,folderKeyword:c}};d.prototype.doSearch=function(){var b=this.$fileName.value;if(b){var d=this._detectFolderKeyword(b),c=this._searcher.createSearchParams(d.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..."]:i.formatMessage(g["Searching for occurrences of"],
b)));a.empty(this.$results);this.$results.appendChild(f);this._searcher.search(c,d.folderKeyword,function(){e===this.currentSearch&&e.apply(null,arguments)}.bind(this))}};d.prototype.decorateResult=function(b){function d(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&c.hide()}for(var c=this,b=a.$$array("a",b),e=0;e<b.length;e++)b[e].addEventListener("click",d,!1)};d.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};d.prototype._afterHiding=function(){this._onHide&&this._onHide()};d.prototype.constructor=
d;return{OpenResourceDialog:d}});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(c,a,f){if(c=j.node(c))this._parent=c;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;c=document.createElement("div");c.classList.add("dropDownContainer");c.id=this.navDropDownId;c.style.display="none";this._parent.appendChild(c);this._dropdownMenu=c;if(a=j.node(a))this._triggerNode=
a;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(a){a.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(c){this._dropdownMenu.innerHTML=c},getContentNode:function(){return this._dropdownMenu},updateContent:function(c,a){a()},_positionDropdown:function(){this._dropdownMenu.style.right="";var c=j.bounds(this._dropdownMenu),a=j.bounds(document.body);if(c.left+c.width>a.left+a.width)c=j.bounds(this._boundingNode(this._triggerNode)),a=j.bounds(this._triggerNode),this._dropdownMenu.style.right=c.width-(a.left-c.left+a.width)+"px"},_boundingNode:function(c){var a=window.getComputedStyle(c,
null);return a===null?c:a.getPropertyValue("position")==="absolute"||!c.parentNode||c===document.body?c:this._boundingNode(c.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},isVisible:function(){return this._dropdownMenu.style.display!=="none"&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){if(this._parent)j.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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,j,f){function c(a,d,b){if(!a[d])throw d+g[" is not supported in this file system"];return a[d].apply(a,b)}function a(e,d,b,f){if(!e.readBlob)throw g["source file service does not support binary read"];if(!b.writeBlob)throw g["target file service does not support binary write"];if(d[d.length-1]!=="/")return c(e,"readBlob",[d]).then(function(a){return c(b,"writeBlob",[f,a])});var h=f.substring(0,
f.length-1),l=decodeURIComponent(h.substring(h.lastIndexOf("/")+1)),h=h.substring(0,h.lastIndexOf("/")+1);return c(b,"createFolder",[h,l]).then(function(){},function(){}).then(function(){return c(e,"fetchChildren",[d]).then(function(d){for(var c=[],h=0;h<d.length;++h){var g=d[h].Location,l=g;d[h].Directory&&(l=g.substring(0,g.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+1));l=f+encodeURIComponent(l);d[h].Directory&&(l+="/");c[h]=a(e,g,b,l)}return j.all(c)})})}function i(a,d){function b(b){var a=
new j;a.reject(g["No Matching FileService for location:"]+b);return a}var c=a.getServiceReferences("orion.core.file"),h=c;if(d)for(var h=[],l=0;l<c.length;++l)d(c[l])&&h.push(c[l]);for(var m=[],i=[],r=[],p=[],o={fetchChildren:function(){var b=new j;b.resolve(p);return b},createWorkspace:function(){var b=new j;b.reject(g["no file service"]);return b},loadWorkspaces:function(){var b=new j;b.reject(g["no file service"]);return b},loadWorkspace:function(){var b=new j;window.setTimeout(function(){b.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:p,ChildrenLocation:"/"})},100);return b},search:b,createProject:b,createFolder:b,createFile:b,deleteFile:b,moveFile:b,copyFile:b,read:b,write:b},c=0;c<h.length;++c)p[c]={Directory:!0,Length:0,LocalTimeStamp:0,Location:h[c].getProperty("top"),ChildrenLocation:h[c].getProperty("top"),Name:h[c].getProperty("Name")},l=h[c].getProperty("pattern")||h[c].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),l[0]!=="^"&&(l=
"^"+l),m[c]=RegExp(l),i[c]=a.getService(h[c]),r[c]=h[c].getProperty("Name"),h[c].getProperty("NameKey")&&h[c].getProperty("nls")&&f.getMessageBundle(h[c].getProperty("nls")).then(function(b,a){p[b].Name=a[h[b].getProperty("NameKey")];r[b]=a[h[b].getProperty("NameKey")]}.bind(this,c));this._getServiceIndex=function(b){if(b==="/")return-1;else if(!b||b.length&&b.length===0)return i[0]?0:-1;for(var a=0;a<m.length;++a)if(m[a].test(b))return a;throw g["No Matching FileService for location:"]+b;};this._getService=
function(b){b=this._getServiceIndex(b);return b===-1?o:i[b]};this._getServiceName=function(b){b=this._getServiceIndex(b);return b===-1?o.Name:r[b]};this._getServiceRootURL=function(b){b=this._getServiceIndex(b);return b===-1?o.Location:p[b].Location}}i.prototype={getService:function(a){return this._getService(a)},fileServiceName:function(a){return this._getServiceName(a)},fileServiceRootURL:function(a){return this._getServiceRootURL(a)},fetchChildren:function(a){return c(this._getService(a),"fetchChildren",
arguments)},createWorkspace:function(a){return c(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return c(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(a){return c(this._getService(a),"loadWorkspace",arguments)},createProject:function(a,d,b,f){return c(this._getService(a),"createProject",arguments)},createFolder:function(a,d){return c(this._getService(a),"createFolder",arguments)},createFile:function(a,d){return c(this._getService(a),"createFile",
arguments)},deleteFile:function(a){return c(this._getService(a),"deleteFile",arguments)},moveFile:function(e,d,b){var f=this._getService(e),h=this._getService(d);if(f===h)return c(f,"moveFile",arguments);var g=e[e.length-1]==="/",m=d;m[m.length-1]!=="/"&&(m+="/");if(b)m+=encodeURIComponent(b);else{var i=e;g&&(i=i.substring(0,i.length-1));m+=i.substring(i.lastIndexOf("/")+1)}g&&m[m.length-1]!=="/"&&(m+="/");return a(f,e,h,m).then(function(){return c(f,"deleteFile",[e])})},copyFile:function(e,d,b){var f=
this._getService(e),h=this._getService(d);if(f===h)return c(f,"copyFile",arguments);var g=e[e.length-1]==="/",m=d;m[m.length-1]!=="/"&&(m+="/");if(b)m+=encodeURIComponent(b);else{var i=e;g&&(i=i.substring(0,i.length-1));m+=i.substring(i.lastIndexOf("/")+1)}g&&m[m.length-1]!=="/"&&(m+="/");return a(f,e,h,m)},read:function(a,d){return c(this._getService(a),"read",arguments)},readBlob:function(a){return c(this._getService(a),"readBlob",arguments)},write:function(a,d,b){return c(this._getService(a),"write",
arguments)},remoteImport:function(a,d){return c(this._getService(a),"remoteImport",arguments)},remoteExport:function(a,d){return c(this._getService(a),"remoteExport",arguments)},search:function(a){return c(this._getService(a.resource),"search",arguments)}};i.prototype.constructor=i;return{FileClient:i}});
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,c,a,i,e,d){function b(b,a){this.parentNode=f.node(b);this.contentNode=f.node(a);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 k(b){return!b.isRelatedLink}function h(b,a){var d=b.order,c=a.order;if(d<c)return-1;else if(c<d)return 1;return 0}function l(b,a){var d=b.source.order,c=a.source.order,d=typeof d==="number"?d:100,c=typeof c==="number"?
c:100;return d===c?b.textContent.localeCompare(a.textContent):d<c?-1:1}var m=d.isTouch;j.mixin(b.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(b,a,d){var c=this.anchor,b=this.createListItem(b,a);d&&b.classList.add("sideMenuItemActive");c.appendChild(b);this.menuitems[a]=b},setSideMenu:function(){var b=this.getDisplayState(),a=this.parentNode;if(a){if(b===this.CLOSED_STATE){this.setPageContentLeft("0");
if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){a.style.display="none"},this.TRANSITION_DURATION_MS);a.classList.add("animating")}if(b===this.OPEN_STATE){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;a.classList.remove("animating");a.style.display="block";a.style.width=this.SIDE_MENU_OPEN_WIDTH;this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH)}}},setPageContentLeft:function(b){var a=this.contentNode;if(a)a.style.left=
b},toggleSideMenu:function(){var b=this.getDisplayState(),a=this.contentNode;a&&a.classList.add("content-fixedHeight-animation");b=b===this.OPEN_STATE?this.CLOSED_STATE:this.OPEN_STATE;b===this.DEFAULT_STATE?localStorage.removeItem(this.LOCAL_STORAGE_NAME):localStorage.setItem(this.LOCAL_STORAGE_NAME,b);this.setSideMenu()},clearMenuItems:function(){this.menuitems=[];f.empty(this.anchor)},getMenuItems:function(){var b=this.menuitems;return Object.keys(b).map(function(a){return b[a]})},getMenuItem:function(b){return this.menuitems[b]},
getDisplayState:function(){var b=localStorage.getItem(this.LOCAL_STORAGE_NAME);if(!b)b=this.DEFAULT_STATE;return b},createListItem:function(b,a){var d=document.createElement("li");d.className=b;d.classList.add("sideMenuItem");d.categoryId=a;return d},setCategories:function(b){this.categories=b;this.links=Object.create(null)},setPageLinks:function(b){this.pageLinks=b;var a=this,d=b.createLinkElements();b.getAllLinks().forEach(function(b,c){var e=d[c];e.source=b;a._getLinksBin(b.category).push(e)});
this._renderLinks()},setRelatedLinks:function(b,a){this.relatedLinks=b;var d=this;Object.keys(this.links).forEach(function(b){var a=d._getLinksBin(b);d.links[b]=a.filter(k)});var c=document.createDocumentFragment();b.forEach(function(b){var a=b.relatedLink,e=d._getLinksBin(a.category),b=g.createCommandMenuItem(c,b.command,b.invocation);b.classList.remove("dropdownMenuItem");b.isRelatedLink=!0;b.source=a;e.push(b)});this._renderLinks(a)},_getLinksBin:function(b){if(b){var a=this.links;a[b]=a[b]||[];
return a[b]}else return[]},_sort:function(){var b=this.links;Object.keys(b).forEach(function(a){b[a].sort(l)})},_renderCategories:function(){var b=this.categories,d=this,e=new URL(window.location.href),f=a.matchResourceParameters();f.OrionHome=c.getOrionHome();var k=!1;this.clearMenuItems();b.getCategoryIDs().map(function(a){return b.getCategory(a)}).sort(h).forEach(function(b){var a=d._getLinksBin(b.id);a.length&&(k?d.addMenuItem(b.imageClass,b.id,!1):(a=a.some(function(b){if(!b.source.uriTemplate)return!1;
b=new i(b.source.uriTemplate);b=new URL(b.expand(f),window.location);return b.protocol===e.protocol&&b.host===e.host&&b.hostname===e.hostname&&b.port===e.port&&b.pathname===e.pathname&&b.search===e.search?k=!0:!1}),d.addMenuItem(b.imageClass,b.id,a)))})},_renderLinks:function(b){b=b||[];this._sort();this._renderCategories();var a=this,d=window.location.href;Object.keys(this.menuitems).forEach(function(c){var e=a.getMenuItem(c);if(e){for(var f=a._getLinksBin(c).slice(),f=f.filter(function(a){var c=
a.source;return b.indexOf(c.id)>=0||!c.default&&!c.force&&a.href===d?!1:!0}),f=f.filter(function(b){b=b.source;return!(f.length>1&&b.default&&!b.force)}),h=f.length-1;h>0;h--)f[h].href===f[h-1].href&&f.splice(h,1);if(f.length){e.appendChild(a._createCategoryElement(c,e,f[0]));var k=document.createElement("ul");k.className="sideMenuSubMenu";f.forEach(function(b){var a=document.createElement("li");a.className="sideMenuSubMenuItem";var d=document.createElement("a");d.href=b;d.className="sideMenuSubMenuItemLink";
var c=document.createElement("span");c.innerHTML=b.innerHTML;c.className="sideMenuSubMenuItemSpan";d.appendChild(c);a.appendChild(d);k.appendChild(a)});e.appendChild(k)}}})},_createCategoryElement:function(b,a,d){var b=this.categories.getCategory(b),c;m?(c=document.createElement("button"),c.type="button"):(c=document.createElement("a"),c.href=d.href);c.className+=b.imageClass;c.classList.add("submenu-trigger");c.tabIndex="0";a.classList.remove(b.imageClass);return c},_handleEvent:function(b){var a=
b.target,b=b.type==="focus";if(a.tagName!=="A"||b)a.classList.contains("submenu-trigger")&&(m||b)&&this._expandMenu(f.$(".sideMenuSubMenu",a.parentNode))},_expandMenu:function(b){this.getMenuItems().forEach(function(a){a=f.$(".sideMenuSubMenu",a);b!==a&&a.classList.remove("expanded")});b&&b.classList.toggle("expanded")}});return b});
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,c,a,i,e,d,b,k,h,l,m,q,r,p,o,n,s,u,A,w,B,x,H,G,D,t,z,v,C,y,E,O,F){var R,P,K,L,M,S,N,V;function ea(b,a){if(b.getLabel)return b.getLabel();else{var d=new B;d.resolve(a.properties.name);return d}}function ga(b){m.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(b=b.getService("orion.page.progress"))&&b.init.bind(b)("progressPane")}function fa(b,a){var d=b.getServiceReferences("orion.core.auth");ba=[];var c=R.apply(this,arguments);if(c)for(var e=
0;e<d.length;e++){var f=d[e],h=b.getService(f);ea(h,f).then(function(b){h.getKey().then(function(a){ba.push(a);h.getUser().then(function(d){c.addUserItem(a,h,b,d)},function(d,e){c.addUserItem(a,h,b,e)});window.addEventListener("storage",function(){aa[a]!==localStorage.getItem(a)&&(aa[a]=localStorage.getItem(a),h.getUser().then(function(d){c.addUserItem(a,h,b,d)},function(){c.addUserItem(a,h,b)}))},!1)})})}}function W(b){return b}function X(a,d,c,f,h){function k(b){for(var a={},d=b.getPropertyKeys(),
c,e=0;e<d.length;e++)c=d[e],a[c]=b.getProperty(c);return a}function g(b,a){var d=null;b.some(function(b){return a===b.getProperty("id")?!!(d=b):!1});return d}function l(b){var a=b.command;if(!a.visibleWhen||a.visibleWhen(d))return b.invocation=new e.CommandInvocation(d,d,null,a,f),(new B).resolve(b);else if(typeof h==="function")return q||(q=h()),B.when(q,function(c){if(c&&d===ca&&(!a.visibleWhen||a.visibleWhen(c)))return b.invocation=new e.CommandInvocation(c,c,null,a,f),b});return(new B).resolve()}
function m(b,a,d){return d?(new B).resolve({relatedLink:b,command:d}):a.then(function(a){return{relatedLink:b,command:new e.Command(a)}})}var i=arguments,j,q,r=a&&a.getServiceReferences("orion.page.link.related");if(r&&r.length!==0){var s=this;B.when(function(){if(j)return j;var b=a.getService("orion.core.contentTypeRegistry");b||(b=new o.ContentTypeRegistry(a),b=a.getService("orion.core.contentTypeRegistry"));return b.getContentTypes().then(function(b){return j=b})}(),function(){if(P.apply(s,i)){var d=
a.getServiceReferences("orion.navigate.command"),e=[];r.forEach(function(c){var h=k(c);if(h.id){var l;if((h.nls&&h.nameKey||h.name)&&h.uriTemplate)l=b._createCommandOptions(h,c,a,j,!0),e.push(m(h,l,null));else if(l=g(d,h.id)){var i=k(l),c={};F.mixin(c,i,h);(h=f.findCommand(h.id))?e.push(m(c,null,h)):(l=b._createCommandOptions(i,l,a,j,!0),e.push(m(c,l,null)))}}});B.all(e,W).then(function(b){b.sort(function(b,a){return b.command.name.localeCompare(a.command.name)});return B.all(b.map(l),W).then(function(a){var d=
[],a=a.filter(function(a,c){if(a)return!0;d.push(b[c]);return!1});K.call(s,f,a,d,c);L.apply(s,i)})})}})}}function ha(b){var a=m.node("globalActions");a&&(b.destroy(a),b.renderCommands(a.id,a,{},{},"tool"))}function Y(b){var a=window.getComputedStyle(b,null);return a===null?b:a.getPropertyValue("position")==="absolute"||!b.parentNode||b===document.body?b:Y(b.parentNode)}function Z(b){var a={},d=null;typeof b==="string"&&(b=m.node(b));b||(b=m.node("pageActions"));for(var c=b;c&&c.classList;){if(c.classList.contains("toolComposite")){d=
c;break}c=c.parentNode}if(b.classList.contains("commandMarker"))a.commandNode=b;if(d&&(a.slideContainer=m.$(".slideParameters",d),a.parameterArea=m.$(".parameters",d),a.dismissArea=m.$(".parametersDismiss",d),a.notifications=m.$("#notificationArea",d),d.parentNode&&(a.toolbarTarget=m.$(".toolbarTarget",d.parentNode),a.toolbarTarget)))b=m.bounds(a.toolbarTarget),c=m.bounds(Y(a.toolbarTarget.parentNode)),a.toolbarTargetY=b.top-c.top,a.toolbar=d;return a}function $(b){if(b=b.slideContainer)if(b.style.left=
"",b.style.top="",b.classList.contains("slideContainerActive")){var a=m.bounds(b),d=m.bounds(b.parentNode);b.style.left=(d.width-a.width)/2+"px";b.style.top="0"}}var i=function(b){var a=document.createElement("a");a.href=b;return a.href}(j.toUrl("auth/NotifyAuthentication.html")),aa={},J=null;R=y.createMenuGenerator||function(b,a){if(m.node("userMenu")){var d=m.node("userDropdown"),c=new r.Dropdown({dropdown:d}),d=new x.UserMenu({dropdownNode:d,dropdown:c,serviceRegistry:b}),c=m.node("userTrigger");
new p.Tooltip({node:c,text:g.Options,position:["below","left"]});var c=document.getElementById("userTrigger"),e=c.className;e+=" imageSprite core-sprite-silhouette";c.className=e;d.setKeyAssist(a);return d}};P=y.beforeGenerateRelatedLinks||function(){return!0};K=y.addRelatedLinkCommands||function(b,a,d,c){this.sideMenu&&this.sideMenu.setRelatedLinks(a,c)};L=y.afterGenerateRelatedLinks||function(){};M=y.afterSetPageTarget||function(){};S=y.generateNavigationMenu||function(){var b=m.node("sideMenu");
if(b){var a=m.node("centralNavigation");new p.Tooltip({node:a,text:g.CentralNavTooltip,position:["right"]});J=this.sideMenu=new O(b,m.node("pageContent"));a.addEventListener("click",J.toggleSideMenu.bind(J));(b=m.node("sideMenuToggle"))&&b.addEventListener("click",J.toggleSideMenu.bind(J))}};N=y.afterGenerateNavigationMenu||function(){};V=y.afterGenerateBanner||function(){};var ba=[],ca,U=[],I,T=null,Q=null,da=new a;return{generateBanner:function(b,a,h,k,l,i,r,p){function o(b){b.registerService("orion.cm.managedservice",
{updated:function(b){for(var b=b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?"_blank":"_self":"_self",a=m.$$array(".targetSelector"),d=0;d<a.length;d++)a[d].target=b}},{pid:"nav.config"})}(new A.ThemePreferences(k,new w.ThemeData)).apply();var n=m.node(b);if(!n)throw g["could not find banner parent, id was "]+b;var u=document.createRange();u.selectNode(n);u=u.createContextualFragment(D);m.processTextNodes(u,g);n.firstChild?n.insertBefore(u,n.firstChild):n.appendChild(u);n=m.node("home");n.href=
j.toUrl("edit/edit.html");n.setAttribute("aria-label",g["Orion Home"]);m.node("progressPane").src=e.NO_IMAGE;if(n=m.node("pageToolbar"))n.classList.add("toolbarLayout"),n.innerHTML=z+f.slideoutHTMLFragment("mainToolbar");(n=m.node("closeNotifications"))&&n.setAttribute("aria-label",g["Close notification"]);if(C.isFirefox<=17&&(n=m.node("staticBanner")))n.style.width="100%",n.style.MozBoxSizing="border-box";if(n=m.node("footer"))n.innerHTML=t,m.processTextNodes(n,g);h.setParameterCollector(new d.CommandParameterCollector(Z,
$));document.addEventListener("keydown",function(b){b.keyCode===m.KEY.ESCAPE&&(b=a.getService("orion.page.message"))&&b.setProgressMessage("")},!1);S.apply(this,arguments);N.apply(this,arguments);n=H.getCategoriesInfo(a);u=H.getPageLinksInfo(a,"orion.page.link");B.all([n,u]).then(function(b){if(J){var a=b[1];J.setCategories(b[0]);J.setPageLinks(a);J.setSideMenu()}});if(n=m.$(".split")){var u=m.$(".sidePanelLayout"),x=m.$(".mainPanelLayout");if(u&&x)T={side:u,main:x},T.splitter=new q.Splitter({node:n,
sidePanel:u,mainPanel:x,toggle:!0,closeByDefault:p}),n=new e.Command({name:g["Toggle side panel"],tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){T.splitter.toggleSidePanel()}}),h.addCommand(n),h.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new c.KeyBinding("l",C.isMac?!1:!0,!0,!1,C.isMac?!0:!1))}var v=!1,y=function(b,a){if(!v){var d=a.getService("orion.page.progress"),c=new G.OpenResourceDialog({searcher:b,progress:d,searchRenderer:b.defaultRenderer,
onHide:function(){v=!1}});window.setTimeout(function(){v=!0;c.show()},0)}},n=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(){y(l,a)}});h.addCommand(n);h.registerCommandContribution("globalActions","orion.openResource",100,null,!0,new c.KeyBinding("f",!0,!0));n=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 b=
m.node("banner"),a=m.node("footer"),d=m.node("sideMenu"),c=m.$(".content-fixedHeight"),e=b.style.visibility==="hidden";e?(b.style.visibility="visible",a.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized"),d&&d.classList.remove("sideMenu-maximized")):(b.style.visibility="hidden",a.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"),d&&d.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!e});return!0}});h.addCommand(n);
h.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new c.KeyBinding("m",!0,!0));n=new e.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return j.toUrl("help/about.html")}});h.addCommand(n);h.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new c.KeyBinding(112,!0,!0));n=new e.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],
id:"orion.backgroundOperations",hrefCallback:function(){return j.toUrl("operations/list.html")}});h.addCommand(n);h.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new c.KeyBinding("o",!0,!0));Q=new s.KeyAssistPanel({commandRegistry:h});n=new e.Command({name:g["Show Keys"],tooltip:g["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){Q.isVisible()?Q.hide():Q.show();return!0}});h.addCommand(n);h.registerCommandContribution("globalActions",
"orion.keyAssist",100,null,!0,new c.KeyBinding(191,!1,!0));ha(h);fa(a,n.callback);ga(a);window.addEventListener("hashchange",function(){h.processURL(window.location.href)},!1);window.setTimeout(function(){o(a)},0);V.apply(this,arguments)},getToolbarElements:Z,getMainSplitter:function(){return T},getKeyAssist:function(){return Q},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,setPageTarget:function(b){var a,d,c=b.breadcrumbRootName,e=b.serviceRegistry;b.target?(b.searchService&&
b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(d=c?c+" ":"",d+=b.fileService.fileServiceName(b.target.Location),c=null),a=b.name||b.target.Name,ca=b.target,X.call(this,e,b.target,U,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(c=c||b.task||b.name),a=b.name,X.call(this,e,{NoTarget:""},U,b.commandService,b.makeAlternate));(I=b.title)||(I=a?a+" - "+b.task:b.task);window.document.title=I;M.apply(this,arguments);if(a=b.breadCrumbContainer?m.node(b.breadCrumbContainer):
m.node("location")){m.empty(a);var h=e&&new E.FileClient(e),e=b.breadcrumbTarget||b.target,h=h&&e&&e.Location?h.fileServiceRootURL(e.Location):null;new l.BreadCrumbs({container:a,resource:e,rootSegmentName:c,workspaceRootSegmentName:d,workspaceRootURL:h,makeFinalHref:b.makeBreadcrumFinalLink,makeHref:b.makeBreadcrumbLink})}},setDirtyIndicator:function(b){if(I)I.charAt(0)==="*"&&!b&&(I=I.substring(1)),b&&I.charAt(0)!=="*"&&(I="*"+I),window.document.title=I;var a=m.node("dirty");if(a)a.textContent=
b?"*":""},setPageCommandExclusions:function(b){U=b},notifyAuthenticationSite:i}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(g){return{detectValidURL:function(j){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,c=f.exec(j),a=[],i=0;c;){if(c.length===3&&c[2].length>0){var e=new URL(c[2]);e.protocol!==":"&&g.validateURLScheme(e.href)&&(c.index>i&&a.push({segmentStr:j.substring(i,c.index)}),a.push({segmentStr:c[1].length>0?c[1]:c[2],urlStr:c[2]}),i=c.index+c[0].length)}c=f.exec(j)}if(i===0)return null;i<j.length-1&&a.push({segmentStr:j.substring(i)});return a},processURLSegments:function(g,
f){f.forEach(function(c){if(c.urlStr){var a=document.createElement("a");a.href=c.urlStr;a.appendChild(document.createTextNode(c.segmentStr))}else a=document.createElement("span"),a.textContent=c.segmentStr;g.appendChild(a)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(g,j,f,c){function a(a,d,b,c,h){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this._operationsClient=d;this.notificationContainerDomId=h;this.domId=b;this.progressDomId=c||b;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var i;a.prototype={_init:function(){var a=j.node("closeNotifications");if(a&&
!this._hookedClose){a.style.cursor="pointer";this._hookedClose=!0;var d=j.node(this.notificationContainerDomId);j.addAutoDismiss([d],function(){this._clickToDisMiss&&this.close()}.bind(this));a.addEventListener("click",function(){this.close()}.bind(this));d.addEventListener("click",function(b){b&&b.target&&b.target.nodeName.toLowerCase()==="a"&&(b=j.$$("a",d))&&b.length&&b.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var a=j.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&a?(a.innerHTML="",a.classList.remove("cancelButton"),a.classList.add("dismissButton"),a.classList.add("core-sprite-close"),a.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(a,d,b){this._init();this.currentMessage=a;var c=j.node(this.domId);
if(typeof b==="boolean"){var h=c.getAttribute("aria-live");c.setAttribute("aria-live",b?"polite":"off");window.setTimeout(function(){a===this.currentMessage&&(j.empty(c),c.appendChild(document.createTextNode(a)),window.setTimeout(function(){c.setAttribute("aria-live",h)},100))}.bind(this),100)}else j.empty(c),c.appendChild(document.createTextNode(a));typeof d==="number"&&window.setTimeout(function(){a===this.currentMessage&&(j.empty(c),c.appendChild(document.createTextNode("")))}.bind(this),d)},setErrorMessage:function(a){this._clickToDisMiss=
!0;this.currentMessage=a;this._init();var d=a.responseText||a.message||a;if(typeof d==="string")try{d=JSON.parse(d)}catch(b){}var a=d.Message||d,c="red";if(d.Severity)switch(d.Severity){case "Warning":c="#FFCC00";break;case "Error":c="red";break;case "Info":case "Ok":c="green"}d=document.createElement("span");d.style.color=c;d.appendChild(document.createTextNode(a));a=j.node(this.domId);j.empty(a);a.appendChild(d)},setProgressMessage:function(a){this._clickToDisMiss=!1;this._init();this.currentMessage=
a;var d=document.createElement("span");d.classList.add("progressIcon");var b=j.node(this.progressDomId);j.empty(b);b.appendChild(d);b.appendChild(document.createTextNode(a));d=j.node(this.notificationContainerDomId);d.classList.remove("notificationHide");if(a&&a.length>0)d.classList.add("progressNormal"),d.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else d.classList.remove("notificationShow"),d.classList.add("notificationHide")},
setCancelFunction:function(a){this._cancelFunc=a},setProgressResult:function(a,d){this._clickToDisMiss=!1;this._cancelMsg=d;this.currentMessage=a;var b=a.responseText||a;if(typeof b==="string")try{b=JSON.parse(b)}catch(f){}this._init();var h=b.Message||b.toString(),l=g.UnknownError,m="core-sprite-information",i="progressNormal",r=document.createElement("span");r.classList.add("imageSprite");r.classList.add("progressIcon");var p=[];if(b.Severity)switch(b.Severity){case "Warning":l=g.UnknownWarning;
m="core-sprite-warning";i="progressWarning";p.push("progressInfo");p.push("progressError");p.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":m="core-sprite-error";i="progressError";p.push("progressWarning");p.push("progressInfo");p.push("progressNormal");this._clickToDisMiss=!0;break;default:i="progressNormal",p.push("progressWarning"),p.push("progressError"),p.push("progressNormal")}p.push("notificationHide");r.classList.add(m);var o=j.node(this.progressDomId),m=j.node(this.notificationContainerDomId);
j.empty(o);o.appendChild(r);h===Object.prototype.toString()&&(h=l);if(b.HTML)b=document.createElement("span"),b.innerHTML=h,o.appendChild(b);else{if(l=c.detectValidURL(h))h=document.createDocumentFragment(),c.processURLSegments(h,l),Array.prototype.forEach.call(j.$$("a",h),function(b){b.target="_blank"});else{if(b.Severity!=="Warning"&&b.Severity!=="Error"&&!d)this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),
5E3);h=document.createTextNode(h)}o.appendChild(h)}if(i&&this.progressDomId!==this.domId){m.classList.add(i);for(i=0;i<p.length;i++)m.classList.remove(p[i])}m.classList.add("notificationShow");if(p=j.node("closeNotifications"))this._cancelMsg?(p.classList.add("cancelButton"),p.classList.remove("dismissButton"),p.classList.remove("core-sprite-close"),p.classList.remove("imageSprite"),p.innerHTML=this._cancelMsg):(p.innerHTML="",p.classList.remove("cancelButton"),p.classList.add("dismissButton"),p.classList.add("core-sprite-close"),
p.classList.add("imageSprite"))},showWhile:function(a,d){var b=this;if(d){b.setProgressMessage(d);var c=function(){d===b.currentMessage&&b.setProgressMessage("")};a.then(c,c)}return a},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(a,d){return new i(this,++this._lastProgressId,a,d)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var a="",d=!0,b;for(b in this._progressMonitors)this._progressMonitors[b].status&&(d||(a+=", "),a+=this._progressMonitors[b].status,
d=!1);this.setProgressMessage(a)}else this.setProgressMessage("")},_beginProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._renderOngoingMonitors()},_doneProgressMonitor:function(a){delete this._progressMonitors[a.progressId];this._progressMonitors.length--;a.status?this.setProgressResult(a.status):this._renderOngoingMonitors()}};a.prototype.constructor=
a;i=function(a,d,b,c){this.statusService=a;this.progressId=d;if(b){this.deferred=b;this.begin(c);var h=this;b.then(function(){h.done.bind(h)()},function(){h.done.bind(h)()})}};i.prototype.begin=function(a){this.status=a;this.statusService._beginProgressMonitor(this)};i.prototype.done=function(a){this.status=a;this.statusService._doneProgressMonitor(this)};i.prototype.worked=function(a){this.status=a;this.statusService._workedProgressMonitor(this)};i.prototype.constructor=i;return{StatusReportingService:a,
ProgressMonitor:i}});
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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,j,f,c){function a(){}a.prototype={_initialize:function(a,e,d,b,k){this._tooltip=new c.Tooltip({node:a,hideDelay:k||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:d,trigger:b?b:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";a=document.createRange();a.selectNode(this.$parent);a=a.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(a,g);this.$parent.appendChild(a);var h=this._tooltip;this.$parent.addEventListener("keydown",function(b){b.keyCode===f.KEY.ESCAPE&&h.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(a){for(var c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];d.id&&(this["$"+d.id]=d);this._bindElements(d)}},_afterShowingFunction:function(a){return function(){a&&a.bind(this)();if(!this.customFocus){var c=
f.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};a.prototype.constructor=a;return{PopupDialog:a}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,j,f,c){var a={};(function(){var i=!1;a.updateNavTools=function(a,d,b,c,h,l){var m=f.node(c);if(m)d.destroy(m);else throw g["could not find toolbar "]+c;d.renderCommands(c,m,l,b,"button");if(h&&(c=f.node(h)))d.destroy(c),d.renderCommands(h,c,null,b,"button");i||(i=!0,a.getService("orion.page.selection").addEventListener("selectionChanged",function(a){var c=f.node(h);
c&&(d.destroy(c),d.renderCommands(h,c,a.selections,b,"button"))}))};a.createOperationsCommands=function(a,d,b){function f(b){return!b.operation||!b.operation.type?!1:b.operation.type==="loadstart"||b.operation.type==="progress"}var h=new c.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){b.removeCompletedOperations().then(function(){d.loadOperations.bind(d)()})},visibleWhen:function(){return!0}});a.addCommand(h);
h=new c.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],c=0;c<a.length;c++){var e=a[c];b.removeOperation.bind(b)(e.Location).then(function(){d.loadOperations.bind(d)()},function(){d.loadOperations.bind(d)()})}},visibleWhen:function(b){if(!Array.isArray(b)||b.length===0)return!f(b);for(var a in b)if(f(b[a]))return!1;return!0}});a.addCommand(h);
h=new c.Command({name:g.Cancel,tooltip:g["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],a=0;a<b.length;a++){var d=b[a];d.deferred&&d.deferred.cancel()}},visibleWhen:function(b){if(!Array.isArray(b)||b.length===0)return f(b)&&(b.operation&&b.operation.cancelable?!0:!1);for(var a in b)if(!f(b[a])||!b[a].operation||!b[a].operation.cancelable)return!1;return!0}});a.addCommand(h)}})();
return a});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,j,f,c,a){function i(a){this._options=a}i.prototype=new c.PopupDialog;i.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>';i.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;a.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};i.prototype._bindToDom=function(){this.$allOperationsLink.href=j.toUrl("operations/list.html");this._setOperationsVisibility()};i.prototype.setOperations=function(a,d){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(a)for(var b in a)this._myOperations.push(a[b]),this._operationsDeferreds.push(d[b]);this._renderOperations()};i.prototype.parseProgressResult=function(a){if(!a)return{};a=a.responseText||a;try{a=JSON.parse(a)}catch(d){}var b={Message:a.Message||a,Severity:a.Severity};if(a.DetailedMessage&&a.DetailedMessage!==b.Message)b.DetailedMessage=a.DetailedMessage;return b};i.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};i.prototype._renderOperationsTable=function(a,d,b){f.empty(a);for(var c=0;c<d.length;c++){var h=d[c],l=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px";i.style.paddingRight="5px";i.textContent=h.Name;l.appendChild(i);var j=document.createElement("div");i.appendChild(j);i=document.createElement("span");i.style.paddingRight="5px";i.classList.add("imageSprite");switch(h.type){case "Warning":i.classList.add("core-sprite-warning");i.setAttribute("aria-label",
g["Operation resulted in a warning."]);break;case "error":i.classList.add("core-sprite-error");i.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":i.classList.add("core-sprite-start");i.setAttribute("aria-label",g["Operation is running."]);break;case "abort":i.classList.add("core-sprite-stop");i.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":i.classList.add("core-sprite-ok"),i.setAttribute("aria-label","Operation ok.")}j.appendChild(i);
i=document.createElement("span");i.classList.add("operationStatus");i.textContent=h.Name;j.appendChild(i);if(h.error){var r=h.error.Message||h.error;h.error.DetailedMessage&&h.error.DetailedMessage!==""&&(r+=": "+h.error.DetailedMessage);i.textContent=r;i.classList.remove("operationStatus");i.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",j,{operation:h,deferred:b[c]},this,"tool");a.appendChild(l)}this._setOperationsVisibility()};i.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"};i.prototype.constructor=i;return{OperationsDialog:i}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,j,f,c,a){function i(d,b){if(!this._progressPane){this._progressPane=c.node(d);this._operationsDialog=new a.OperationsDialog({triggerNode:this._progressPane,commandRegistry:b});var e=this;this._progressPane.addEventListener("keydown",function(b){(b.charOrCode===" "||b.keyCode===c.KEY.ENTER)&&e._operationsDialog.show()})}}function e(a,b,c,e){this._serviceRegistry=
a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=b;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=e}i.prototype={_switchIconTo:function(a){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=a;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(a,b){var c=
{},e;for(e in a)a[e].progressMonitor||(c[e]=a[e]);if(this._isEmpty(c))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 f="";for(e in c){var i=c[e];if(i.type&&(i.type==="loadstart"||i.type==="progress")){f="running";break}}switch(f){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(c,b)},_isEmpty:function(a){for(var b in a)return!1;return!0}};
i.prototype.constructon=i;e.prototype={init:function(a){if(!this._progressMonitorClass)this._progressMonitorTool=new i(a,this._commandRegistry)},progress:function(a,b,c){var e=this,f=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(b));a.then(function(){if(e._operations[f]){var g=e._operations[f];if(b)g.Name=b;e._lastOperation=g;g.type="loadend";if(c)g.progressMonitor=c;e.writeOperation.bind(e)(f,g,a);g.Location||e._removeOperationFromTheList.bind(e)(f)}},
function(g){if(e._operations[f]){var i=e._operations[f];if(b)i.Name=b;if(c)i.progressMonitor=c;e._lastOperation=i;i.type=g.canceled?"abort":"error";i.error=g;e.writeOperation.bind(e)(f,i,a);i.Location||e._removeOperationFromTheList.bind(e)(f)}},function(g){if(b)g.Name=b;if(c)g.progressMonitor=c;e.writeOperation.bind(e)(f,g,a)});return a},removeOperation:function(a){for(var b in this._operations)if(this._operations[b].Location&&this._operations[b].Location===a){this._removeOperationFromTheList(b);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(a)},_removeOperationFromTheList:function(a){var b=this._operations[a].progressMonitor;delete this._operations[a];delete this._operationDeferrds[a];b?b.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var a in this._operations){var b=this._operations[a];if(b.type&&b.type!=="loadstart"&&b.type!=="progress")(b=this._operations[a].progressMonitor)&&
b.done(),delete this._operations[a],delete this._operationDeferrds[a]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(a,b,c){b&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(b);var e=this;a.then(function(){e._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(b){c?e._serviceRegistry.getService("orion.page.message").setProgressMessage(""):
e.setProgressResult.bind(e)(b);return b});return this.progress(a,b)},writeOperation:function(a,b,c){this._operations[a]=b;this._operationDeferrds[a]=c;b.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(a){a.put(b.Location,{Name:b.Name,expires:b.expires})});b.progressMonitor?b.progressMonitor.progress(b.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,j){function f(a,d,b){return a[d].apply(a,b)}function c(a){this._location=a}function a(){var a=new j;a.reject(g["No Matching OperationService for location:"]+this._location);return a}function i(a){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=a.getService("orion.core.preference");for(var d=a.getServiceReferences("orion.core.operation"),
b=0;b<d.length;b++){var f=a.getService(d[b]);this._services[b]=f;f=d[b].getProperty("pattern")||".*";f[0]!=="^"&&(f="^"+f);this._patterns[b]=RegExp(f)}this._getService=function(b){if(!b)return this._services[0];for(var a=0;a<this._patterns.length;++a)if(this._patterns[a].test(b))return this._services[a];this._operations.remove(b);return new c(b)}}c.prototype={getOperation:a,getOperations:a,removeCompletedOperations:a,removeOperation:a,cancelOperation:a};c.prototype.constructor=c;i.prototype={getOperations:function(){var a=
new j;if(this._operations)return a.resolve(this._operations),a;var d=this;this._preferenceService.getPreferences("/operations").then(function(b){d._operations=b;a.resolve(d._operations)});return a},getOperation:function(a){return f(this._getService(a),"getOperation",arguments)},removeCompletedOperations:function(){for(var a=[],d=this,b=0;b<this._services.length;b++){var c=this._patterns[b],h=new j;a[b]=h.promise;f(this._services[b],"removeCompletedOperations").then(function(b){return function(a){Array.isArray(a)&&
d.getOperations.bind(d)().then(function(d){for(var e=d.keys(),f=0;f<e.length;f++){var h=e[f];c.test(h)&&a.indexOf(h)<0&&d.remove(h)}b.resolve()})}}(h),function(b){return function(a){b.reject(a)}}(h))}return j.all(a)},removeOperation:function(a){var d=this;return f(this._getService(a),"removeOperation",arguments).then(function(){d.getOperations.bind(d)().then(function(b){b.remove(a)})},function(b){return b},function(b){return b})}};i.prototype.constructor=i;return{OperationsClient:i}});
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(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,j){function f(c){this._init(c)}f.prototype={_init:function(c){var a=c.parent,f=this,a=j.node(a);if(!a)throw g["no parent"];if(!c.model)throw g["no tree model"];if(!c.renderer)throw g["no renderer"];this._parent=a;this._treeModel=c.model;this._onComplete=c.onComplete;this._renderer=c.renderer;this._showRoot=c.showRoot===void 0?!1:c.showRoot;this._indent=c.indent===void 0?16:c.indent;this._onCollapse=c.onCollapse;
this._labelColumnIndex=c.labelColumnIndex===void 0?0:c.labelColumnIndex;this._id=c.id===void 0?"treetable":c.id;this._tableStyle=c.tableStyle;this._tableElement=c.tableElement||"table";this._tableBodyElement=c.tableBodyElement||"tbody";this._tableRowElement=c.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(a){f._showRoot?(a._depth=0,f._generate([a],0)):f._treeModel.getChildren(a,function(a){f.destroyed||f._generate(a,0)})})},destroy:function(){this.destroyed=!0},_generate:function(c,
a){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";c.length===0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(c,a);e.appendChild(this._bodyElement);f.appendChild(e);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(c,a,f){for(var e=0;e<c.length;e++){var d=document.createElement(this._tableRowElement);d.id=this._treeModel.getId(c[e]);d._depth=a;d._item=c[e];this._renderer.render(c[e],d);d.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*a+"px";this._renderer.rowCallback&&this._renderer.rowCallback(d,c[e]);f?(this._bodyElement.insertBefore(d,f.nextSibling),f&&(f=d)):this._bodyElement.appendChild(d)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(c,a,f){var e=this._treeModel.getId(c),d;if(e===this._id)this._removeChildRows(e),this._generateChildren(a,0),this._rowsChanged();else{var b=j.node(e);b?(b._item=c,
b&&(f||b._expanded)?(this._removeChildRows(e),a?(b._expanded=!0,this._renderer.updateExpandVisuals(b,!0),this._generateChildren(a,b._depth+1,b),this._rowsChanged()):(d=this,this._renderer.updateExpandVisuals(b,"progress"),a=this._treeModel.getChildren(b._item,function(a){if(!d.destroyed&&(d._renderer.updateExpandVisuals(b,!0),!b._expanded))b._expanded=!0,d._generateChildren(a,b._depth+1,b),d._rowsChanged()}))):this._renderer.updateExpandVisuals(b,!1)):console.log(g["could not find table row "]+e)}},
getItem:function(c){var a=j.node(c);return a&&a._item?a._item:c},toggle:function(c){var a=j.node(c);a&&(a._expanded?this.collapse(c):this.expand(c))},isExpanded:function(c){c=typeof c==="string"?c:this._treeModel.getId(c);return(c=j.node(c))?c._expanded:!1},expand:function(c,a,f){var c=typeof c==="string"?c:this._treeModel.getId(c),e=j.node(c);if(e)if(e._expanded)a&&a.apply(d,f);else{var d=this;this._renderer.updateExpandVisuals(e,"progress");this._treeModel.getChildren(e._item,function(b){if(!d.destroyed){d._renderer.updateExpandVisuals(e,
!0);if(!e._expanded)e._expanded=!0,d._generateChildren(b,e._depth+1,e),d._rowsChanged();a&&a.apply(d,f)}})}},_removeChildRows:function(c){for(var a=c===this._id,f=!1,e=-1,d=[],b=j.$$array(".treeTableRow",this._parent),g=0;g<b.length;g++){var h=b[g];if(f)break;if(a)h._depth>e?d.push(h):f=!0;else if(h.id===c)a=!0,e=h._depth}for(c=0;c<d.length;c++)a=d[c],a.parentNode.removeChild(a)},collapse:function(c){var c=typeof c==="string"?c:this._treeModel.getId(c),a=j.node(c);if(a){if(!a._expanded)return;a._expanded=
!1;this._renderer.updateExpandVisuals(a,!1);this._removeChildRows(c);this._rowsChanged()}this._onCollapse&&this._onCollapse(a._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,c){this.firstLevelChildren=f;this.reset();this._init(c)}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 c=this._getChildren(f),c=c&&c.length>0;this.isExpanded&&c&&(c=this.isExpanded(f));return c},_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 c=this._diveIn(this._cursor);
if(!c){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var a=this;return this.forceExpandFunc(this._cursor,"first",function(c){c&&a.setCursor(c)})}(c=this._findSibling(this._cursor,!0))&&this.setCursor(c)}return c},_backward:function(f){if(!this._cursor)return null;var c=this._findSibling(this._cursor,!1);c&&c!==this._cursor.parent&&(c=this._drillToLast(c));if(f&&c&&this._expandable(c)&&this.forceExpandFunc&&c!==this._cursor.parent){var a=this;return this.forceExpandFunc(c,"last",function(c){c&&
a.setCursor(c)})}c&&this.setCursor(c);return c},_findSibling:function(f,c){for(var a=this.topLevel(f),g=this._getChildren(f.parent),g=a?this.firstLevelChildren:g,e=0;e<g.length;e++)if(g[e]===f)return e===0&&!c?a?null:f.parent:e===g.length-1&&c?a?null:this._findSibling(f.parent,c):c?g[e+1]:g[e-1];return null},_inParentChain:function(f,c){for(var a=f.parent;a;){if(a===c)return!0;a=a.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,c,a){this.setCursor(c);var g=[];for(g.push(c);;){if(this.iterate(f))g.push(this.cursor());else break;if(a===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,c){var a=this.cursor(),
g=this._scan(!0,f,c);g||(g=this._scan(!1,f,c));this.setCursor(a);return g},iterate:function(f,c){return f?this._forward(c):this._backward(c)},iterateOnTop:function(f,c){var a=this._findSibling(this._getTopLevelParent(this.cursor()),f);a?this.setCursor(a):c&&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 c={},a=navigator.userAgent.indexOf("iPad")!==-1,i=window.navigator.platform.indexOf("Mac")!==-1;c.ExplorerNavHandler=function(){function c(a,b,e){this.explorer=a;this.model=this.explorer.model;this._navDict=b;this._listeners=[];this._selections=[];this._currentColumn=0;a=this._getEventListeningDiv();a.tabIndex=0;a.classList.add("selectionModelContainer");var h=this;this._modelIterator=
new j.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:e.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(b){return h.explorer.renderer.isExpandable(b)}:function(b){return h.isExpandable(b)},forceExpandFunc:this.explorer.forceExpandFunc?function(b,a,c){return h.explorer.forceExpandFunc(b,a,c)}:void 0});this._init(e);(!e||e.setFocus!==!1)&&a.focus();e=function(b){if(f.isFormElement(b.target))return!0;if(h.explorer.preventDefaultFunc&&h.explorer.preventDefaultFunc(b,
h._modelIterator.cursor()))return!0;if(b.keyCode===g.KEY.DOWN)return h.onDownArrow(b);else if(b.keyCode===g.KEY.UP)return h.onUpArrow(b);else if(b.keyCode===g.KEY.RIGHT)return h.onRightArrow(b);else if(b.keyCode===g.KEY.LEFT)return h.onLeftArrow(b);else if(b.keyCode===g.KEY.SPACE)return h.onSpace(b);else if(b.keyCode===g.KEY.ENTER)return h.onEnter(b)};a.addEventListener("keydown",e,!1);this._listeners.push({type:"keydown",listener:e});e=function(){if(h.explorer.onFocus)h.explorer.onFocus(!1);else h.toggleCursor(null,
!1)};a.addEventListener("blur",e,!1);this._listeners.push({type:"blur",listener:e});e=function(){if(h.explorer.onFocus)h.explorer.onFocus(!0);else h.toggleCursor(null,!0)};a.addEventListener("focus",e,!1);this._listeners.push({type:"focus",listener:e});this._parentDiv=a}c.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(a){this._linearGridMove=!1;if(a)this._selectionPolicy=a.selectionPolicy,this.gridClickSelectionPolicy=
a.gridClickSelectionPolicy||"none",this.preventDefaultFunc=a.preventDefaultFunc,this.postDefaultFunc=a.postDefaultFunc},_ctrlKeyOn:function(a){return i?a.metaKey:a.ctrlKey},removeListeners:function(){if(this._listeners)for(var a=0;a<this._listeners.length;a++)this._parentDiv.removeEventListener(this._listeners[a].type,this._listeners[a].listener,!1)},focus:function(){var a=this._getEventListeningDiv();a&&a.focus()},_getEventListeningDiv:function(a){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv===
"function"?this.explorer.keyEventListeningDiv(a):g.node(this.explorer._parentId)},isExpandable:function(a){return!a?!1:g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)))?!0:!1},isExpanded:function(a){return!a?!1:this.explorer.myTree.isExpanded(this.model.getId(a))},refreshSelection:function(a,b){var c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(e){c._clearSelection(b);for(var f=0;f<e.length;f++)c._selections.push(e[f]);c._selections.length>0?
c.cursorOn(c._selections[0],!0,!1,a):c.cursorOn(null,!1,!1,a);if(!(c._shiftSelectionAnchor&&c._inSelection(c._shiftSelectionAnchor)>=0))c._shiftSelectionAnchor=null})},refreshModel:function(a,b,c,e){this._currentColumn=0;this.topIterationNodes=[];this.model=b;this._navDict=a;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(c)this.topIterationNodes=c;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(a){for(var a=this.model.getId(a),b=0;b<this._selections.length;b++)if(a===this.model.getId(this._selections[b]))return b;return-1},_clearSelection:function(a){if(a)for(a=0;a<this._selections.length;a++)this._checkRow(this._selections[a],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(a){if(this._selectionPolicy!==
a)this._selectionPolicy=a,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(a,b,c){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(a,!0);else if(this._isRowSelectable(a)){!b||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(a,!1),this._selections.push(a),this._lastSelection=a):(b=this._inSelection(a),b>=0?(this._checkRow(a,!0),this._selections.splice(b,1)):(this._checkRow(a,
!1),this._selections.push(a),this._lastSelection=a));if(c)this._shiftSelectionAnchor=this._lastSelection;this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(a,b){a||(a=this.currentModel());var c=this._getGridChildren(a);if(c&&c.length>1||b===0&&c){b!==0&&this.toggleCursor(a,!1);var e=this._currentColumn,f=!0;e+=b;e<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?a=this.currentModel():f=!1),
e=f?c.length-1:this._currentColumn):e>=c.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?a=this.currentModel():f=!1),e=f?0:this._currentColumn);this._currentColumn=e;b!==0&&this.toggleCursor(a,!0);return!0}return!1},_getGridChildren:function(a){return this._navDict?this._navDict.getGridNavHolder(a):null},getCurrentGrid:function(a){a||(a=this.currentModel());return(a=this._getGridChildren(a))&&a.length>0?a[this._currentColumn]:null},getAriaContainerElement:function(a){for(var b=
this._parentDiv,c;a&&a!==b&&(c=a.getAttribute("role"))!=="grid"&&c!=="tree"&&c!=="treegrid";)a=a.parentNode;return a===b?null:a},toggleCursor:function(a,b){var c=this.getRowDiv(a),e=this.getCurrentGrid(a);e?(c&&(b?c.classList.add("treeIterationCursorRow"):c.classList.remove("treeIterationCursorRow")),e.domNode&&(c=this.getAriaContainerElement(e.domNode),b?(e.domNode.classList.add("treeIterationCursor"),c&&c.setAttribute("aria-activedescendant",e.domNode.id)):e.domNode.classList.remove("treeIterationCursor"))):
c&&(b?c.classList.add("treeIterationCursorRow_Dotted"):c.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(a,b,c,e){var f,g;if(a||b){if(g===this._modelIterator.cursor())return;f=this._modelIterator.cursor();g=a;this._modelIterator.setCursor(g)}else f=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();if(f!==g||b)if(this.toggleCursor(f,!1),!b||g){this.moveColumn(null,0);this.toggleCursor(g,!0);if((a=this.getRowDiv())&&
!e){e=a.parentNode;for(b=document.documentElement;e&&e!==b;){var i=window.getComputedStyle(e,null);if(!i)break;i=i.getPropertyValue("overflow-y");if(i==="auto"||i==="scroll")break;e=e.parentNode}e&&(b=!0,a.offsetTop<=e.scrollTop?(b=!1,c===void 0&&(c=!1)):a.offsetTop+a.offsetHeight>=e.scrollTop+e.clientHeight&&(b=!1,c===void 0&&(c=!0)),b||a.scrollIntoView(!c))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(f,g)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var a=
[],b=0;b<this._selections.length;b++)a.push(this.model.getId(this._selections[b]));return a},getRowDiv:function(a){a=a?a:this._modelIterator.cursor();if(!a)return null;var a=this.model.getId(a),b=this._navDict.getValue(a);return b&&b.rowDomNode?b.rowDomNode:g.node(a)},iterate:function(a,b,c,e){var f=null;if(this.topIterationNodes&&this.topIterationNodes.length!==0)if(e){e=this.currentModel();for((f=this._modelIterator.iterate(a,b))&&this._setCursorOnItem(a,c);f&&f.isNotSelectable;)(f=this._modelIterator.iterate(a,
b))&&this._setCursorOnItem(a,c);f||(this.cursorOn(e,!0,!1,!0),this._setCursorOnItem(a,c))}else(f=this._modelIterator.iterate(a,b))&&this._setCursorOnItem(a,c)},_setCursorOnItem:function(a,b){this.cursorOn(null,!1,a);if(b){var c=this._inSelection(this._modelIterator.prevCursor()),e=this._inSelection(this._modelIterator.cursor());c>=0&&e>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(a,b){if(this.explorer.renderer._useCheckboxSelection&&
this._selectionPolicy!=="singleSelection"){var c=this.getRowDiv(a);if(c){var e=g.node(this.explorer.renderer.getCheckBoxId(c.id)),f=b?!e.checked:!0;if(f!==e.checked)this.explorer.renderer.onCheck(c,e,f,!0)}}else this._select(a,b)},_select:function(a){a||(a=this._modelIterator.cursor());var b=this.getRowDiv(a);b&&(this._inSelection(a)<0?b.classList.add("checkedRow"):b.classList.remove("checkedRow"))},_onModelGrid:function(a,b){var c=this._getGridChildren(a);if(c)for(var e=0;e<c.length;e++)if(b.target===
c[e].domNode)return!0;return!1},onClick:function(c,b){if(this.isDisabled(this.getRowDiv(c)))g.stop(b);else{var e=g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));if(b.target!==e&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(c,b)))if(this.cursorOn(c,!0,!1,!0),a)this.setSelection(c,!0);else if(this._ctrlKeyOn(b))this.setSelection(c,!0,!0);else if(b.shiftKey&&this._shiftSelectionAnchor){if(e=this._modelIterator.scan(this._shiftSelectionAnchor,c)){this._clearSelection(!0);
for(var f=0;f<e.length;f++)this.setSelection(e[f],!0)}}else this.setSelection(c,!1,!0)}},onCollapse:function(a){this._modelIterator.collapse(a)&&this.cursorOn()},onUpArrow:function(a){this.iterate(!1,!1,a.shiftKey,!0);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1,!0);a.preventDefault();return!1},onDownArrow:function(a){this.iterate(!0,!1,a.shiftKey,!0);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1,!0);a.preventDefault();return!1},_shouldMoveColumn:function(a){var b=
this.currentModel(),c=this._getGridChildren(b);return c&&c.length>1?this.isExpandable(b)?this._ctrlKeyOn(a):!0:!1},onLeftArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,-1),a.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),a.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),
this.setSelection(b.parent,!1,!0))},onRightArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,1),a.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),this.explorer.postUserExpand&&this.explorer.postUserExpand(this.model.getId(b)),a.preventDefault(),!1},_isRowSelectable:function(a){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(a):!0},onSpace:function(a){this.setSelection(this.currentModel(),
!0,!0);a.preventDefault()},onEnter:function(a){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();else typeof b.widget.focus==="function"&&b.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(a),!1,!1,!1,0,null);b.domNode.dispatchEvent(c)}else if(b=this._modelIterator.cursor()){if(this.explorer.renderer.getRowActionElement&&(c=this.explorer.renderer.getRowActionElement(this.model.getId(b)),
c.href))this._ctrlKeyOn(a)?window.open(c.href):window.location.href=c.href;if(this.explorer.renderer.performRowAction)return this.explorer.renderer.performRowAction(a,b),a.preventDefault(),!1}},setIsNotSelectable:function(a,b){a.isNotSelectable=b},disableItem:function(a){var b=this.getRowDiv(a);this.isExpandable(a)&&this.isExpanded(a)&&(this._modelIterator.collapse(a),this.explorer.myTree.toggle(b.id));b.classList.remove("checkedRow");b.classList.add("disabledNavRow");this.setIsNotSelectable(a,!0)},
isDisabled:function(a){return a.classList.contains("disabledNavRow")},enableItem:function(a){var b=this.getRowDiv(a);b&&(b.classList.remove("disabledNavRow"),this.setIsNotSelectable(a,!1))}};return c}();c.ExplorerNavDict=function(){function a(c){this._dict={};this._model=c}a.prototype={addRow:function(a,b){this._dict[this._model.getId(a)]={model:a,rowDomNode:b}},getValue:function(a){return this._dict[a]},getGridNavHolder:function(a,b){if(!a)return null;var c=this._model.getId(a);if(this._dict[c]){if(!this._dict[c].gridChildren&&
b)this._dict[c].gridChildren=[];return this._dict[c].gridChildren}return null},initGridNavHolder:function(a){if(!a)return null;a=this._model.getId(a);if(this._dict[a])this._dict[a].gridChildren=null}};return a}();return c});
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,c,a,i){var e={};e.Explorer=function(){function d(b,a,c,d){this.registry=b;this.renderer=c;this.selection=a;this.commandService=d;if(this.renderer)this.renderer.explorer=this;this.myTree=null}d.prototype={destroy:function(){this._navHandler&&this._navHandler.destroy();this.model&&this.model.destroy();this.myTree&&
this.myTree.destroy();this.destroyed=!0},changedItem:function(b,a){this.myTree&&this.myTree.refresh.bind(this.myTree)(b,a,!0)},updateCommands:function(b){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(b)},makeNewItemPlaceHolder:function(b,a,c,d){b=this.getRow(b);if(c)return b=b.childNodes[c],b.appendChild(document.createElement("br")),d=document.createElement("span"),d.id=a+"placeHolderRow",b.appendChild(d),{tempNode:d,refNode:d};if(b){var e=document.createElement("tr");
e.id=a+"placeHolderRow";c=document.createElement("td");c.id=a+"placeHolderCol";e.appendChild(c);d?(b.parentNode.insertBefore(e,b.nextSibling),b=parseInt(b.firstChild.style.paddingLeft),c.style.paddingLeft=this.myTree.getIndent()+b+"px"):b.appendChild(e);d=f.node(a+"placeHolderRow");b=f.node(a+"placeHolderCol");if(d&&b)return{tempNode:d,refNode:b}}return null},getRow:function(b){if(b=this.model.getId(b))return f.node(b)},collapseAll:function(){for(var b=this._navHandler.getTopLevelNodes(),a=0;a<b.length;a++)this.myTree.collapse(b[a])},
expandAll:function(b){if(b)this._expandRecursively(b);else if(this._navHandler)for(var b=this._navHandler.getTopLevelNodes(),a=0;a<b.length;a++)this._expandRecursively(b[a])},_expandRecursively:function(b){if(this._navHandler&&this._navHandler.isExpandable(b)){var a=this;this.myTree.expand(b,function(){a.model.getChildren(b,function(b){if(!(b===void 0||b===null))for(var c=b.length,d=0;d<c;d++)a._expandRecursively(b[d])})})}},createTree:function(b,d,e){b=typeof b==="string"?b:b.id||b;this.selection&&
this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=b+"innerTree",i=f.node(g);i&&f.empty(i);if(d)d.rootId=g;this.model=d;this._parentId=b;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new a.ExplorerNavDict(this.model);this.myTree=new c.TableTree({id:g,model:d,parent:b,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 b=this.getNavHandler(),a=[];
if(b&&this.getNavDict())for(var c=b.getSelection(),d=0;d<c.length;d++){var e=b.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&a.push(e.model))}this.selection.setSelections(a)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var b=this._treeOptions;if(!b||b&&!b.noSelection){if(!this.getNavHandler())this._navHandler=b&&b.navHandlerFactory&&typeof b.navHandlerFactory.createNavHandler===
"function"?b.navHandlerFactory.createNavHandler(this,this._navDict,b):new a.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:b?b.getChildrenFunc:null,setFocus:b&&b.setFocus,selectionPolicy:b?b.selectionPolicy:null});var c=this;this.model.getRoot(function(a){a instanceof Array?c.getNavHandler().refreshModel(c.getNavDict(),c.model,a):a.children&&a.children instanceof Array&&c.getNavHandler().refreshModel(c.getNavDict(),c.model,a.children);b&&b.setFocus&&c.getNavHandler().cursorOn(null,!1,!1,!0)})}},
_lastHash:null,checkbox:!1};return d}();e.createExplorerCommands=function(a,b){function c(a){return typeof a.getItemCount==="function"?a.getItemCount()>0?b?b(a):!0:!1:!1}var e=new i.Command({tooltip:g["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),f=new i.Command({tooltip:g["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",
groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});a.addCommand(e);a.addCommand(f)};e.ExplorerModel=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.idPrefix=d||""}a.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var c=this;this.fetchItems(this.rootPath).then(function(d){c.root=d;a(d)})},getChildren:function(a,c){a.Children?c(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(d){a.Children=
d;c(d)}):c([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),c=this.idPrefix,d=0;d<a.length;d++)c+=a[d].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(d):a[d];return c}};return a}();e.ExplorerFlatModel=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.root=d}a.prototype=new e.ExplorerModel;a.prototype.getRoot=function(a){if(this.root)a(this.root);else{var c=this;this.fetchItems(this.rootPath).then(function(d){c.root=
d;a(d)})}};a.prototype.getChildren=function(a,c){a===this.root?c(this.root):c([])};return a}();e.ExplorerRenderer=function(){function a(b,c){this.explorer=c;this._init(b);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite"}a.prototype={_init:function(a){if(a){this._useCheckboxSelection=a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?
"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=a.actionScopeId;if(!this.commandService)this.commandService=a.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,c){this.tableTree=c;this.tableNode=
a;f.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,c,d,e,f){var d=d||"tool",g=document.createElement("td");g.id=c.id+"actionswrapper";e&&g.classList.add(e);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,g,a,this.explorer,d,null,f&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return g},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,c){if(this._useCheckboxSelection){var d=document.createElement("td"),e=document.createElement("span");e.id=this.getCheckBoxId(c.id);e.classList.add("core-sprite-check");e.classList.add("selectionCheckmarkSprite");e.rowId=c.id;if(this.getCheckedFunc)e.checked=this.getCheckedFunc(a),e.checked?(this._highlightSelection&&c.classList.add("checkedRow"),e.classList.add("core-sprite-check_on")):
(this._highlightSelection&&c.classList.remove("checkedRow"),e.classList.remove("core-sprite-check_on"));d.appendChild(e);var f=this;e.addEventListener("click",function(a){f.onCheck(c,a.target,a.target.checked?!1:!0,!0)},!1);return d}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,c,d,e,f){(c.checked=d)?c.classList.add("core-sprite-check_on"):c.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(c.rowId,d,e);this.explorer.getNavHandler()&&f&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),c=this._getUIStatePreferencePath();c&&window.sessionStorage&&(window.sessionStorage[c+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){var c=this.explorer.getNavDict(),d=this.explorer.getNavHandler();if(d&&c&&d.getSelectionPolicy()!=="cursorOnly"&&(a=window.sessionStorage[a+"selection"],typeof a==="string"&&(a=a.length>0?JSON.parse(a):null),a)){for(var e=[],d=0;d<
a.length;d++){var g=c.getValue(a[d]);if(g&&g.rowDomNode&&g.model&&(e.push(g.model),this._highlightSelection&&g.rowDomNode.classList.add("checkedRow"),g=f.node(this.getCheckBoxId(g.rowDomNode.id))))g.checked=!0,g.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(e),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var c=
!1,d=window.sessionStorage[a+"expanded"];typeof d==="string"&&(d=d.length>0?JSON.parse(d):null);var e;if(d)for(e=0;e<d.length;e++)if(f.node(d[e])){this._expanded.push(d[e]);var g=this;this.tableTree.expand(d[e],function(){g._restoreSelections(a)});c=!0}return!c},_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,c){var d=f.node(this.expandCollapseImageId(a.id));d&&(d.classList.remove(this._expandImageClass),d.classList.remove(this._collapseImageClass),d.classList.remove(this._progressImageClass),d.classList.add(c==="progress"?this._progressImageClass:c?this._expandImageClass:this._collapseImageClass))},getExpandImage:function(a,c,d,e){var f=document.createElement("span");f.id=this.expandCollapseImageId(a.id);c.appendChild(f);f.classList.add(this._twistieSpriteClass);
f.classList.add(this._collapseImageClass);if(d){var g=document.createElement("span");c.appendChild(g);g.classList.add(e||"imageSprite");g.classList.add(d)}var i=this;f.onclick=function(){if(!i.explorer.getNavHandler().isDisabled(a)){i.tableTree.toggle(a.id);if(i.tableTree.isExpanded(a.id))i._expanded.push(a.id),i.explorer.postUserExpand&&i.explorer.postUserExpand(a.id);else for(var c in i._expanded)if(i._expanded[c]===a.id){i._expanded.splice(c,1);break}(c=i._getUIStatePreferencePath())&&window.sessionStorage&&
i._storeExpansions(c)}};return f},render:function(a,c){c.classList.add("navRow");this.renderRow(a,c)},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,c){var d=!(c%2)?"darkSectionTreeTableRow":"lightSectionTreeTableRow",e=d==="darkSectionTreeTableRow"?"lightSectionTreeTableRow":
"darkSectionTreeTableRow";a.classList.add(d);a.classList.remove(e)})},updateCommands:function(){if(this.commandService)for(var a=f.$$array(".treeTableRow"),c=0;c<a.length;c++){var d=a[c],e=f.node(d.id+"actionswrapper");this.commandService.destroy(e);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,e,d._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};
return a}();e.SelectionRenderer=function(){function a(b,c){this._init(b);this.explorer=c}a.prototype=new e.ExplorerRenderer;a.prototype.renderTableHeader=function(a){var c=document.createElement("thead"),d=document.createElement("tr");c.classList.add("navTableHeading");this._useCheckboxSelection&&d.appendChild(this.initCheckboxColumn(a));for(var e=0,f=this.getCellHeaderElement(e);f;)f.innerHTML.length>0&&f.classList.add("navColumn"),d.appendChild(f),f=this.getCellHeaderElement(++e);c.appendChild(d);
e>0&&a.appendChild(c)};a.prototype.renderRow=function(a,c){c.verticalAlign="baseline";c.classList.add("treeTableRow");var d=this.explorer.getNavDict();if(d){d.addRow(a,c);var e=this;c.addEventListener("click",function(c){if(e.explorer.getNavHandler())e.explorer.getNavHandler().onClick(a,c)},!1)}if(d=this.getCheckboxColumn(a,c))d.classList.add("checkColumn"),c.appendChild(d);for(var d=0,f=this.getCellElement(d,a,c);f;)c.appendChild(f),d===0?this.getPrimColumnStyle?f.classList.add(this.getPrimColumnStyle(a)):
f.classList.add("navColumn"):this.getSecondaryColumnStyle?f.classList.add(this.getSecondaryColumnStyle()):f.classList.add("secondaryColumn"),f=this.getCellElement(++d,a,c)};a.prototype.getCellHeaderElement=function(){};a.prototype.getCellElement=function(){};return a}();e.SimpleFlatModel=function(){function a(b,c,d){this.items=b;this.getKey=d;this.idPrefix=c;this.root={children:b}}a.prototype=new e.ExplorerModel;a.prototype.getRoot=function(a){a(this.root)};a.prototype.getId=function(a){for(var a=
this.getKey(a).replace(/[\\\/]/g,""),c="",d=0;d<a.length;d++)c+=a[d].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(d):a[d];return this.idPrefix+c};a.prototype.getChildren=function(a,c){a===this.root?c(this.items):c([])};return a}();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,c,a,i,e,d){function b(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 k(c,d,f,g,h,k,s,u,A){var d=i.clone(d),w;if(d.Directory)w=document.createElement("a"),
w.className="navlinkonpage",w.href=!c?l:(new e(c+"#{,resource,params*}")).expand({resource:d.ChildrenLocation}),d.Name&&w.appendChild(document.createTextNode(d.Name));else{h||(h=a.getOpenWithCommands(f));w=document.createElement("a");w.className="navlink targetSelector";k&&typeof k==="object"&&Object.keys(k).forEach(function(a){w[a]=k[a]});var B=null,x=null;if(B=u?u.holderDom:w)x=document.createElement("span"),x.className="core-sprite-file modelDecorationSprite thumbnail",B.appendChild(x);d.Name&&
w.appendChild(document.createTextNode(d.Name));var H=d.Location;if(s&&typeof s==="object")d.params={},i.mixin(d.params,s);(c=a.getOpenWithCommand(f,d,h))&&(H=c.hrefCallback({items:d}));j.when(g.getFileContentType(d),function(a){if(B){var c=B,e=x;if(a){var f,g=a.imageClass,h=a.image;if(g)f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail");else if(h)f=document.createElement("img"),f.src=h,f.classList.add("thumbnail");f&&c.replaceChild(f,e)}}w.href=H;A&&typeof A.updateFileNode===
"function"&&A.updateFileNode(d,w,b(a))})}return w}function h(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*}");h.prototype=new f.SelectionRenderer;h.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};h.prototype.tableCallback=function(a){a.setAttribute("aria-label",g.Navigator);a.setAttribute("role","presentation")};h.prototype.rowCallback=
function(a){a.setAttribute("role","treeitem")};h.prototype.emptyCallback=function(a){var b=document.createElement("tr"),c=document.createElement("td");c.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));d.processDOMNodes(e,[f]);c.appendChild(e);b.appendChild(c);a.appendChild(b)};h.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"}};h.prototype.setTarget=function(a){this.target=a};h.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};h.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=k(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};h.prototype.updateFileNode=function(){};h.prototype.showFolderLinks=!0;h.prototype.getCellElement=function(b,d,e){switch(b){case 0:var b=document.createElement("td"),f=document.createElement("span");f.id=e.id+"MainCol";f.setAttribute("role","presentation");b.appendChild(f);b.setAttribute("role","presentation");f.className="mainNavColumn";var g;if(d.Directory)this.getExpandImage(e,f),g=this.createFolderNode(d),f.appendChild(g),this.explorer._makeDropTarget(d,
g),this.explorer._makeDropTarget(d,e);else{if(!this.openWithCommands)this.openWithCommands=a.getOpenWithCommands(this.commandService);g=k("",d,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&&(c.addNavGrid(this.explorer.getNavDict(),d,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,d,this.explorer,
"tool",null,!0);return b;case 1:if(this.oneColumn)return null;e=document.createElement("td");if(d.LocalTimeStamp)e.textContent=(new Date(d.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!d.Directory&&typeof d.Length==="number")d=parseInt(d.Length,10)/1024,e.textContent=Math.ceil(d).toLocaleString()+" KB";e.style.textAlign="right";return e}};h.prototype.constructor=h;return{NavigatorRenderer:h,isImage:b,createLink:k}});
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,c,a,i,e,d,b){function k(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function h(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new k(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}k.prototype.makeRenderFunction=function(h,i,k,r,p){var o=this.serviceRegistry,n=this.commandRegistry;this.openWithCommands=this.openWithCommands||d.createOpenWithCommands(o,h,n);var s=this;return function(d,o,w,B){b.when(s.openWithCommands,function(b){if(w)f.empty(i),b=document.createElement("div"),b.appendChild(document.createTextNode(g["Search failed."])),i.appendChild(b),typeof r==="function"&&r(i);else{var s=
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)}}}(),G=!1;f.empty(i);if(d&&d.length>0){var D=document.createElement("table");D.setAttribute("role","presentation");for(var t=0;t<d.length;t++){var z=
d[t],v;if(!G&&(G=!0,k))v=D.insertRow(0).insertCell(0),v.textContent=k;v=D.insertRow(-1).insertCell(0);v.colspan=2;p&&p(v);var C={Name:z.name,Directory:z.directory,Location:z.path||z.location},y=null;if(typeof z.LineNumber==="number")y={},y.line=z.LineNumber;if(B&&B.keyword&&!B.nameSearch){var E=a.generateSearchHelper(B),y=y||{};y.find=E.inFileQuery.searchStr;y.regEx=E.inFileQuery.wildCard?!0:void 0}C=e.createLink(j.toUrl("edit/edit.html"),C,n,h,b,{"aria-describedby":(z.folderName?z.folderName:z.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},y);z.LineNumber&&C.appendChild(document.createTextNode(" (Line "+z.LineNumber+")"));v.appendChild(C);s(v,z)}i.appendChild(D);typeof r==="function"&&r(i)}!G&&o&&(b=c.formatMessage(g["No matches found for ${0}"],o),f.empty(i),i.appendChild(document.createTextNode(b)),typeof r==="function"&&r(i))}})}};h.prototype={search:function(b,c,d){var e=function(b){for(var d=[],e=0;e<b.response.docs.length;e++){var f=b.response.docs[e],g=f.Location,h=a.path2FolderName(f.Path?
f.Path:f.Location,f.Name),i=h?h:g;(c?i.indexOf(c)>=0:1)&&d.push({name:f.Name,path:g,folderName:h,directory:f.Directory,lineNumber:f.LineNumber})}return d};if(this._crawler&&b.nameSearch)this._crawler.searchName(b,function(a){d(e(a),b.keyword,null,b)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(b),"Searching "+b.keyword).then(function(a){var c=b.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(a),c,null,b)},function(a){d(null,
null,a,null)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(b,function(a){d(e(a),null,null,b)}):typeof f==="string"&&f.indexOf("search")>-1&&!b.nameSearch?(new i.SearchCrawler(this.registry,this._fileService,b,{childrenLocation:this.getChildrenLocation()})).search(function(a){d(e(a),null,null,b)}):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 d="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?e=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(e=a);if(e)this.setLocationbyURL(e.Location),d=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),
d=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;e=f.node("search");d||(d="");if(e&&e.placeholder){e.value="";var h=c.formatMessage(g["Search ${0}"],d);e.placeholder=h.length>30?h.substring(0,27)+"...":c.formatMessage(g["Search ${0}"],d)}if(e&&e.title)e.title=g["Type a keyword or wild card to search in "]+d},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=
a},getSearchLocation:function(){return this._searchLocation?this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",
rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(g){return{makeRelative:function(g){if(!g)return g;var f=window.location.protocol+"//"+window.location.host;return g.indexOf(f)===0?g.substring(f.length):g},isAtRoot:function(j){if(!j)return!1;if(j==="/workspace")return!0;var f=new URL(g.toUrl("workspace"),window.location.href);return(new URL(j,window.location.href)).href.indexOf(f.href)===0}}});
define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(g,j,f){return{generateEditSiteHref:function(c){var a=g.toUrl("sites/site.html");return(new f(a+"#{,resource,params*}")).expand({resource:j.makeRelative(c.Location)})}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",
Save:"Save","Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026",ConvertToSelfHostingTitle:"Locate Required Folders",SelectRequiredFoldersSingle:"Locate the following required folder in your workspace.",SelectRequiredFolders:"Locate the following required folders in your workspace.",LocateFolderTitle:"Locate ${0}",FolderPrompt:"${0} (${1}):",orionClientLabel:"Orion client repository","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration",
"There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?","There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",
ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at ${0}",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",
URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",
Stopped:"Stopped",Sites:"Sites",Mappings:"Mappings","SitesExplorer.NoSitesText":"You have no sites. Click ${0} to create a site."});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(g,j){var f={root:j};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(g,j,f,c){function a(a,b,c){var d=a[b],e=new f;if(typeof d!=="function")throw g["Service method missing: "]+b;d.apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function i(a,b){return new c.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function e(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
this._selfHostConfig=c.getProperty("selfHostingConfig");this._sitePattern=c.getProperty("sitePattern");this._filePattern=c.getProperty("filePattern");this._name=c.getProperty("name");this._id=c.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return i(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function d(b,c){b[c]=function(){return a(this._getService(),
c,Array.prototype.slice.call(arguments))}}function b(a,b,c){for(var d=a.getServiceReferences("orion.site"),f=[],i=[],j=[],o=0;o<d.length;o++){var n=d[o].getProperty(b),n=n[0]!=="^"?"^"+n:n;f.push(d[o]);i.push(RegExp(n));j.push(a.getService(d[o]))}c=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var c=0;c<i.length;c++)if(i[c].test(a))return c;throw g["No Matching SiteService for "]+b+": "+a;}(c);return new e(a,j[c],f[c])}e.prototype={getSelfHostingConfig:function(){return this._selfHostConfig},
isFileMapped:function(a,b){if(!a){var c=new f;c.resolve(!1);return c}return this.getURLOnSite(a,b).then(function(a){return a!==null})},mapOnSiteAndStart:function(a,b,c){function d(c,g,i){return e.isFileMapped(a,b).then(function(a){a||i.push({Source:c,Target:g,FriendlyPath:c});a=new f;a.resolve();return a})}var e=this,g="/"+b.Name,i;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";i=e.toInternalForm(b.Location).then(function(b){return d(g,b,a.Mappings).then(function(){return e.updateSiteConfiguration(a.Location,
a).then(function(a){return e.updateSiteConfiguration(a.Location,{HostingStatus:{Status:"started"}})})})})}else{var j=b.Name+" site";i=e.toInternalForm(b.Location).then(function(a){var b=[];return d(g,a,b).then(function(){return e.createSiteConfiguration(j,c,b,null,{Status:"started"}).then(function(a){return a})})})}return i.then(function(a){return e.getURLOnSite(a,b)})}};"createSiteConfiguration,getSiteConfigurations,deleteSiteConfiguration,loadSiteConfiguration,updateSiteConfiguration,toFileLocation,toInternalForm,getMappingObject,getMappingProposals,updateMappingsDisplayStrings,parseInternalForm,isSelfHostingSite,convertToSelfHosting,getURLOnSite".split(",").forEach(function(a){d(e.prototype,
a)});e.prototype.constructor=e;return{forLocation:function(a,c){return b(a,"pattern",c)},forFileLocation:function(a,c){return b(a,"filePattern",c)},getFileClient:i,SiteClient:e}});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages,require,orion/commandRegistry,orion/commands,orion/sites/siteUtils,orion/sites/siteClient,orion/Deferred,orion/i18nUtil".split(","),function(g,j,f,c,a,i,e,d){function b(a){return a instanceof Array?a:[a]}function k(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var h=c.Command,l=d.formatMessage;return{createSiteServiceCommands:function(b,d,e){var e=e||{},h=new c.Command({name:g.Create,tooltip:g["Create a new site configuration"],
id:"orion.site.create",parameters:new f.ParametersDescription([new f.CommandParameter("name","text",g.Name)]),visibleWhen:function(){return!0},callback:function(c){var d=c.items,f=b.getService(d),d=i.getFileClient(b,d.getProperty("filePattern")),g=c.parameters&&c.parameters.valueFor("name"),c=b.getService("orion.page.progress");(c?c.progress(d.loadWorkspaces(),"Loading workspaces"):d.loadWorkspaces()).then(function(b){(b=b&&b[0]&&b[0].Id)&&g&&f.createSiteConfiguration(g,b).then(function(b){e.createCallback(a.generateEditSiteHref(b),
b)},e.errorCallback)})}});d.addCommand(h)},createSiteCommands:function(c,d){var f=c.getService("orion.page.dialog"),j=c.getService("orion.page.progress"),o=new h({name:g.Edit,tooltip:g["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&a.length===1&&(a=a[0]);return a.HostingStatus},hrefCallback:function(b){return a.generateEditSiteHref(b.items instanceof Array?b.items[0]:b.items)}});d.addCommand(o);o=new h({name:g.Start,tooltip:g["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(a){return b(a).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(a){var d=b(a.items),f=a.userData;if(f.site&&d.length>1)throw Error("userData.site requires a single site configuration to act upon");d=d.map(function(a){var b=f.site||{};b.HostingStatus={Status:"started"};a=a.Location;return i.forLocation(c,a).updateSiteConfiguration(a,b)});j.showWhile(e.all(d)).then(k(a.items)).then(f.startCallback,
f.errorCallback)}});d.addCommand(o);var n=function(a,b){var d=a?b:{};d.HostingStatus={Status:"stopped"};var e=b.Location;return i.forLocation(c,e).updateSiteConfiguration(e,d)},o=new h({name:g.Stop,tooltip:g["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(a){return b(a).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(a){var c=b(a.items),d=a.userData;if(d.site&&c.length>1)throw Error("userData.site requires a single site configuration to act upon");
c=c||[d.site];c=c.map(n.bind(null,!!d.site));j.showWhile(e.all(c)).then(k(a.items)).then(d.stopCallback,d.errorCallback)}});d.addCommand(o);o=new h({name:g.Delete,tooltip:g["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(a){return b(a).length>0},callback:function(a){var d=b(a.items),h=a.userData,j=d.length===1?l(g.ConfirmDeleteSingle,d[0].Name):l(g.ConfirmDeleteMultiple,d.length);f.confirm(j,function(b){b&&(b=d.map(function(a){var b=a.HostingStatus&&
a.HostingStatus.Status!=="stopped"?n(!1,a):a;return e.when(b).then(function(){var b=a.Location;return i.forLocation(c,b).deleteSiteConfiguration(b)})}),e.all(b).then(k(a.items)).then(h.deleteCallback,h.errorCallback))})}});d.addCommand(o)},createViewOnSiteCommands:function(a,b){var c=a.getService("orion.core.file");b.addCommand(new h({name:g["Add to site"],tooltip:g["Add the file to this site"],id:"orion.site.add-to",imageClass:"core-sprite-add",visibleWhen:function(a){return!a.IsFileRunningOn},callback:function(b){var d=
b.userData.file,e=b.items.SiteConfiguration,f=a.getService("orion.page.progress");return(f?f.progress(c.loadWorkspaces(),"Loading workspaces"):c.loadWorkspaces()).then(function(b){return i.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new h({name:g.View,tooltip:g["View the file on the site"],id:"orion.site.view-on-link",visibleWhen:function(a){return a.IsFileRunningOn},hrefCallback:function(b){var c=b.userData.file,
b=b.items.SiteConfiguration;return i.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(g){function j(f,c){c||(c="orion.page.selection");this._serviceRegistry=f;g.attach(this);this._serviceRegistration=f.registerService(c,this);this._selections=null}j.prototype={getSelection:function(f){var c=this._getSingleSelection();typeof f==="function"&&f(c);return c},getSelections:function(f){var c=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(c);return c},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var c=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};j.prototype.constructor=j;return{Selection:j}});
define("orion/sites/viewOnSiteTree","i18n!orion/sites/nls/messages,orion/i18nUtil,orion/Deferred,orion/commandRegistry,orion/globalCommands,orion/selection,orion/sites/siteUtils,orion/sites/siteClient,orion/sites/siteCommands,orion/webui/treetable,orion/webui/littlelib".split(","),function(g,j,f,c,a,i,e,d,b,k,h){var l=j.formatMessage,m=k.TableTree,q=function(){function a(b,c){this._siteService=b;this._root={};this._id=c}a.prototype={getRoot:function(a){a(this._root)},getChildren:function(a,b){if(a.children)b(a.children);
else if(a===this._root)this._siteService.getSiteConfigurations().then(function(c){a.children=c;b(c)});else return b([])},getId:function(a){return a===this._root||a===this._id?this._id:a.Id}};return a}(),r=function(){function a(b){this._commandService=b.commandRegistry;this._options=b}a.prototype={initTable:function(a){a.classList.add("treetable")},render:function(a,b){b.className+="treeTableRow addsitesTableRow";var c=document.createElement("td");c.id=b.id+"col1";var d=document.createElement("td");
d.id=b.id+"col4";var f=e.generateEditSiteHref(a),h=document.createElement("a");h.href=f;c.appendChild(h);h.textContent=a.Name;f=document.createElement("span");f.style.padding="0 10px 0 10px";c.appendChild(f);h=a.HostingStatus;typeof h==="object"?h.Status==="started"?(f.appendChild(document.createTextNode(g.Started)),f=document.createElement("a"),f.href=h.URL,f.textContent=h.URL,c.appendChild(f)):(h=h.Status.substring(0,1).toUpperCase()+h.Status.substring(1),f.appendChild(document.createTextNode(h))):
f.appendChild(document.createTextNode(g.Unknown));f=document.createElement("span");f.id=b.id+"actionswrapper";f.classList.add("sectionTableItemActions");d.appendChild(f);var i=this._options;this._commandService.renderCommands(i.actionScopeId,f,a,null,"tool",{startCallback:i.startCallback,stopCallback:i.stopCallback,deleteCallback:i.deleteCallback,errorCallback:function(a){i.serviceRegistry.getService("orion.page.message").setProgressResult(a)}});b.appendChild(c);b.appendChild(d)},rowsChanged:function(){h.$$array(".treeTableRow").forEach(function(a,
b){var c=b%2?"darkTreeTableRow":"lightTreeTableRow",d=c==="darkTreeTableRow"?"lightTreeTableRow":"darkTreeTableRow";a.classList.add(c);a.classList.remove(d)})},labelColumnIndex:0};return a}(),p=function(){function a(b,c){function d(a,b){this.SiteConfiguration=a;this.Id="ViewOnSite"+a.Id;this.IsFileRunningOn=b}var e=[];e.push({Id:"newsite",Placeholder:!0});for(var f=0;f<b.length;f++)e.push(new d(b[f],c[f]));return e}function b(a,c,d){return a.isFileMapped(c,d).then(function(a){var b=c.HostingStatus&&
c.HostingStatus.Status==="started";return c&&d&&b&&a})}function c(a,b,d){q.call(this,a,b);this._file=d}c.prototype={getRoot:q.prototype.getRoot,getId:q.prototype.getId,getChildren:function(a,b){a.children?b(a.children):a===this._root?c.createViewOnSiteModelItems(this._siteService,this._file).then(function(c){a.children=c;b(c)}):b([])}};c.createViewOnSiteModelItems=function(c,d){return c.getSiteConfigurations().then(function(e){return f.all(e.map(function(a){return b(c,a,d)})).then(function(b){return a(e,
b)})})};return c}(),o=function(){function a(b){r.apply(this,Array.prototype.slice.call(arguments));this.serviceRegistry=b.serviceRegistry;this._commandService=b.commandRegistry;this.file=b.file;this.addToCallback=b.addToCallback;this.errorCallback=b.errorCallback}a.prototype={initTable:function(a,b){this.tableTree=b;a.classList.add("treetable");a.classList.add("viewOnSiteTable");var c=document.createElement("thead"),d=document.createElement("th");c.appendChild(d);var e=document.createElement("th");
c.appendChild(e);d.textContent=g.Name;e.textContent=g.Actions;a.appendChild(c)},render:function(a,b){var c=a.SiteConfiguration;b.classList.add("treeTableRow");b.classList.add("sitesTableRow");a.Placeholder&&b.classList.add("newSiteRow");var d=document.createElement("td");d.id=b.id+"col1";a.Placeholder&&d.classList.add("newSiteCol");var e=document.createElement("td");e.id=b.id+"col2";d.textContent=a.Placeholder?g["New Site"]:c.Name;c=document.createElement("span");c.id=b.id+"actionswrapper";e.appendChild(c);
this._commandService.renderCommands("viewOnSiteScope",c,a,null,"button",{file:this.file,addToCallback:this.addToCallback,errorCallback:this.errorCallback});b.appendChild(d);b.appendChild(e)},rowsChanged:r.prototype.rowsChanged,labelColumnIndex:0};return a}();return function(){function b(c){var e=c.serviceRegistry,f=c.commandRegistry,h=e.getService("orion.page.progress"),i=this.siteService=d.forFileLocation(e,c.fileLocation),j=c.fileClient.read(c.fileLocation,!0);h&&h.progress(j,"Reading file metadata "+
c.fileLocation);j.then(function(b){c.siteService=i;c.model=new p(i,c.id,b);c.file=this.file=b;f.registerCommandContribution("viewOnSiteScope","orion.site.add-to",10);f.registerCommandContribution("viewOnSiteScope","orion.site.view-on-link",20);a.setPageTarget({task:g.ViewOnSiteTitle,target:b,serviceRegistry:e,commandService:f});var d=this;c.addToCallback=function(){d.refresh()};c.errorCallback=function(a){c.serviceRegistry.getService("orion.page.message").setErrorMessage(a)};c.renderer=new o(c);if(c.label)document.getElementById(c.label).textContent=
l(g.ViewOnSiteCaption,b.Name);b=this.model=c.model||new q(i,c.id);this.treeWidget=new m({id:c.id,parent:c.parent,model:b,showRoot:!1,renderer:c.renderer||new r(c)})}.bind(this))}b.prototype={refresh:function(){var a=this;p.createViewOnSiteModelItems(a.siteService,a.file).then(function(b){a.treeWidget.refresh(a.model._id,b,!0)})}};return b}()});
define('built-view.js',"orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/sites/siteUtils,orion/sites/siteCommands,orion/sites/viewOnSiteTree,orion/PageUtil,orion/webui/littlelib".split(","),function(g,j,f,c,a,i,e,d,b,k,h,l,m){g.startup().then(function(b){function g(){var a=l.matchResourceParameters().file;a&&(u&&m.empty(document.getElementById("table")),u=new h({id:"view-on-site-table",parent:"table",
label:"viewOnSiteCaption",serviceRegistry:p,commandRegistry:n,fileClient:s,fileLocation:a}),k.createViewOnSiteCommands(p,n))}var p=b.serviceRegistry,b=b.preferences,o=new i.OperationsClient(p);new j.StatusReportingService(p,o,"statusPane","notifications","notificationArea");var n=new c.CommandRegistry({});new f.ProgressService(p,o,n);var s=new a.FileClient(p),o=new e.Searcher({serviceRegistry:p,commandService:n,fileService:s}),u;window.addEventListener("hashchange",g());g();d.generateBanner("orion-viewSites",
p,n,b,o)})});