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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*******************************************************************************
 * @license
 * Copyright (c) 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) 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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:  IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation
*/
(function(){function f(d,e,c,b,a,l){e[d]&&(c.push(d),(e[d]===!0||e[d]===1)&&b.push(a+d+"/"+l))}function k(d,e,c,b,a){e=b+e+"/"+a;require._fileExists(d.toUrl(e+".js"))&&c.push(e)}function i(d,e,c){for(var b in e)e.hasOwnProperty(b)&&(!d.hasOwnProperty(b)||c)?d[b]=e[b]:typeof e[b]==="object"&&i(d[b],e[b],c)}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(d){var j=d.config?d.config():{};return{version:"2.0.1+",load:function(c,b,a,l){l=l||{};if(l.locale)j.locale=l.locale;
var h=e.exec(c),g=h[1],m=h[4],d=h[5],q=m.split("-"),o=[],t={},s,p="";if(h[5])g=h[1],c=g+d;else{d=h[4];m=j.locale;if(!m)m=j.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();q=m.split("-")}if(l.isBuild){o.push(c);k(b,"root",o,g,d);for(s=0;s<q.length;s++)l=q[s],p+=(p?"-":"")+l,k(b,p,o,g,d);b(o,function(){a()})}else b([c],function(h){var l=[],m;f("root",h,l,o,g,d);for(s=0;s<q.length;s++)m=q[s],p+=(p?"-":"")+m,f(p,h,l,o,g,d);b(o,function(){var m,
c,o;for(m=l.length-1;m>-1&&l[m];m--){o=l[m];c=h[o];if(c===!0||c===1)c=b(g+o+"/"+d);i(t,c)}a(t)})})}}})})();
define("orion/i18n",[],function(){return{load:function(f,k,i,e){var e=e||{},d=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,j=d.exec(f);if(j){if(!k.defined||k.defined(f))try{i(k(f));return}catch(c){}if(e.isBuild||e.isTest)i({});else{var b=j[1],a=j[3]?j[2]:"",l=j[3]||j[2];k(["orion/bootstrap"],function(h){h.startup().then(function(g){var h=g.serviceRegistry,g=h.getServiceReferences("orion.i18n.message");if(a)g.some(function(a){return f===a.getProperty("name")?(h.getService(a).getMessageBundle().then(function(a){i(a)},
function(){i({})}),!0):!1})||i({});else{var c={},q;g.forEach(function(g){var h=g.getProperty("name");if((j=d.exec(h))&&b===j[1]&&l===(j[3]||j[2]))if(a=j[3]?j[2]:""){if((g=e.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&g.toLowerCase().indexOf(a.toLowerCase())===0)c[a]=!0,(!k.specified||!k.specified(h))&&define(h,["orion/i18n!"+h],function(a){return a})}else q=g});!k.specified||!k.specified(f)?q?h.getService(q).getMessageBundle().then(function(a){Object.keys(c).forEach(function(g){typeof a[g]===
"undefined"&&(a[g]=c[g])});define(f,[],a);i(a)},function(){define(f,[],c);i(c)}):(define(f,[],c),i(c)):i(c)}})})}}else i(null)}}});
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","Choose Orion Source Folder":"Choose Orion Source Folder",SelectRepoSourceFolder:"Select the folder where you checked out the ${0} 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",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","Started at ":"Started at ",EnterPortNumber:"Enter the HTTP port number that the Orion server is running on (default is ${0}):",
Sites:"Sites",Mappings:"Mappings"});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
(function(f,k){typeof define==="function"&&define.amd?define("orion/Deferred",k):typeof exports==="object"?module.exports=k():(f.orion=f.orion||{},f.orion.Deferred=k())})(this,function(){function f(){for(var c;c=d.shift();)c();j=!1}function k(c){d.push(c);j||(j=!0,setTimeout(f,0))}function i(c){return function(){c.apply(void 0,arguments)}}function e(){function c(){for(var a;a=m.shift();){var b=a.deferred,l=g==="fulfilled"?"resolve":"reject";if(typeof a[l]==="function")try{var c=(0,a[l])(h),e=c&&(typeof c===
"object"||typeof c==="function")&&c.then;if(typeof e==="function")if(c===b.promise)b.reject(new TypeError);else{var n=c.cancel;typeof n==="function"?b._protected(d).parentCancel=n.bind(c):delete b._protected(d).parentCancel;e.call(c,i(b.resolve),i(b.reject),i(b.progress))}else b.resolve(c)}catch(j){b.reject(j)}else b[l](h)}}function b(a){delete j.parentCancel;g="rejected";h=a;m.length&&k(c)}function a(l){function d(a){return function(b){i||(i=!0,a(b))}}var i=!1;delete j.parentCancel;try{var f=l&&
(typeof l==="object"||typeof l==="function")&&l.then;if(typeof f==="function")if(l===n)b(new TypeError);else{g="assumed";var y=l&&l.cancel;if(typeof y!=="function"){var u=new e,l=u.promise;try{f(u.resolve,u.reject,u.progress)}catch(r){u.reject(r)}y=l.cancel;f=l.then}h=l;f.call(l,d(a),d(b));j.parentCancel=y.bind(l)}else g="fulfilled",h=l,m.length&&k(c)}catch(z){d(b)(z)}}function l(){var a=j.parentCancel;if(a)delete j.parentCancel,a();else if(!g)a=Error("Cancel"),a.name="Cancel",b(a)}var h,g,m=[],n=
this,j={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==d)throw Error("protected");return j}});this.resolve=function(b){g||a(b);return n};this.reject=function(a){g||b(a);return n};this.progress=function(a){g||m.forEach(function(b){if(b.progress)try{b.progress(a)}catch(g){}});return n.promise};this.cancel=function(){j.parentCancel?setTimeout(l,0):l();return n};this.then=function(a,b,h){a={resolve:a,reject:b,progress:h,deferred:new e};m.push(a);a.deferred._protected(d).parentCancel=
n.promise.cancel.bind(n);(g==="fulfilled"||g==="rejected")&&k(c);return a.deferred.promise};this.promise={then:n.then,cancel:n.cancel}}var d=[],j=!1;e.all=function(c,b){function a(a,b){m||(g[a]=b,--h===0&&d.resolve(g))}function l(g,h){if(!m){if(b)try{a(g,b(h));return}catch(l){h=l}d.reject(h)}}var h=c.length,g=[],m=!1,d=new e;d.then(void 0,function(){m=!0;c.forEach(function(a){a.cancel&&a.cancel()})});h===0?d.resolve(g):c.forEach(function(b,g){b.then(a.bind(void 0,g),l.bind(void 0,g))});return d.promise};
e.when=function(c,b,a,l){var h;if(!(c&&typeof c.then==="function"))h=new e,h.resolve(c),c=h.promise;return c.then(b,a,l)};return e});
define("orion/EventTarget",[],function(){function f(){this._namedListeners={}}f.prototype={dispatchEvent:function(f){if(!f.type)throw Error("unspecified type");var i=this._namedListeners[f.type];i&&i.forEach(function(e){try{typeof e==="function"?e(f):e.handleEvent(f)}catch(d){typeof console!=="undefined"&&console.log(d)}});return!f.defaultPrevented},addEventListener:function(f,i){if(typeof i==="function"||i.handleEvent)this._namedListeners[f]=this._namedListeners[f]||[],this._namedListeners[f].push(i)},
removeEventListener:function(f,i){var e=this._namedListeners[f];if(e)for(var d=0;d<e.length;d++)if(e[d]===i){e.length===1?delete this._namedListeners[f]:e.splice(d,1);break}}};f.prototype.constructor=f;f.attach=function(k){var i=new f;k.dispatchEvent=i.dispatchEvent.bind(i);k.addEventListener=i.addEventListener.bind(i);k.removeEventListener=i.removeEventListener.bind(i)};return f});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(f,k){function i(b,a,l){this._properties=l||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function e(b,a,l){this._serviceId=b;this._serviceReference=a;this._internalRegistry=l}function d(b,a){function l(g){return function(){var h;try{if(!a())throw Error("Service was unregistered");var l=b[g].apply(b,Array.prototype.slice.call(arguments));if(l&&typeof l.then==="function")return l;
else h=new f,h.resolve(l)}catch(c){h=new f,h.reject(c)}return h.promise}}for(var h in b)typeof b[h]==="function"&&(this[h]=l(h))}function j(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new k;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var l=b._entries[a];if(!l)throw Error("Service has already been unregistered: "+a);var h=l.reference;b._serviceEventTarget.dispatchEvent(new j("unregistering",
h));b._entries[a]=null;h.getProperty("objectClass").forEach(function(a){for(var l=b._namedReferences[a],c=0;c<l.length;c++)if(l[c]===h){l.length===1?delete b._namedReferences[a]:l.splice(c,1);break}})},modifyService:function(a){var l=b._entries[a];if(!l)throw Error("Service not found while trying to send modified event: "+a);b._serviceEventTarget.dispatchEvent(new j("modified",l.reference))}}}i.prototype={getPropertyKeys:function(){var b=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&
b.push(a);return b},getProperty:function(b){return this._properties[b]}};i.prototype.constructor=i;e.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(b){var a=this._serviceReference._properties;this._serviceReference._properties=b||{};b["service.id"]=this._serviceId;
b.objectClass=a.objectClass;b["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};e.prototype.constructor=e;c.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(b){a=this._entries[b.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:
[];var a=[];this._entries.forEach(function(b){b&&a.push(b.reference)});return a},registerService:function(b,a,l){if(typeof a==="undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var h=this._entries.length,g=new i(h,b,l),c=this._namedReferences;b.forEach(function(a){c[a]=c[a]||[];c[a].push(g)});b=new d(a,this._internalRegistry.isRegistered.bind(null,h));this._entries.push({reference:g,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new j("registered",
g));return new e(h,g,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};c.prototype.constructor=c;return{ServiceRegistry:c}});
define("orion/xhr",["orion/Deferred"],function(f){function k(i,e,d,j){var c=typeof d.response!=="undefined"?d.response:d.responseText,b;try{b=d.status}catch(a){b=0}i={args:e,response:c,responseText:typeof c==="string"?c:null,status:b,url:i,xhr:d};if(typeof j!=="undefined")i.error=j;return i}return function(i,e,d){var d=d||{},j=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new f,b=d.headers||{},a=d.log||!1,l;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof d.data!=="undefined"&&(i==="POST"||i==="PUT"))l=d.data;var h=!1,g=!1;c.promise.then(void 0,function(a){h=!0;!g&&a instanceof Error&&a.name==="Cancel"&&j.abort()});j.onabort=function(){g=!0;if(!h){var a=Error("Cancel");a.name="Cancel";c.reject(a)}};j.onload=function(){var b=k(e,d,j);200<=j.status&&j.status<400?c.resolve(b):(c.reject(b),a&&typeof console!=="undefined"&&console.log(Error(j.statusText)))};j.onerror=function(){var b=k(e,d,j);c.reject(b);a&&typeof console!=="undefined"&&console.log(Error(j.statusText))};
j.onprogress=function(a){a.xhr=j;c.progress(a)};try{j.open(i,e,!0);if(typeof d.responseType==="string")j.responseType=d.responseType;if(typeof d.timeout==="number")if(typeof j.timeout==="number")j.timeout=d.timeout,j.addEventListener("timeout",function(){c.reject(k(e,d,j,"Timeout exceeded"))});else{var m=setTimeout(function(){c.reject(k(e,d,j,"Timeout exceeded"))},d.timeout);c.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(b).forEach(function(a){j.setRequestHeader(a,
b[a])});j.send(l||null)}catch(n){c.reject(k(e,d,j,n))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(f,k,i){function e(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function d(a,b){return{get:function(g,c){if(b===0)return null;var d=localStorage.getItem(a+g);if(d===null)return null;d=JSON.parse(d);return c||b===-1||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(g,c){if(b!==0){if(b!==-1)c._expires=(new Date).getTime()+
1E3*b;if(Object.keys(c).length===0)localStorage.removeItem(a+g);else{var d=JSON.stringify(c);localStorage.setItem(a+g,d);delete c._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function j(a){this._currentPromises={};this._cache=new d("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");if(b.length>0)this._service=a.getService(b[0])}return!!this._service}}function c(a){this._location=
a;this._currentPromise=null;this._cache=new d("/orion/preferences/default",3600)}function b(){this._cache=new d("/orion/preferences/local",-1)}function a(a,h){this._userProvider=new j(a);this._localProvider=new b;h=h||"defaults.pref";h.indexOf("://")===-1&&(h=f.toUrl(h));this._defaultsProvider=new c(h);this._serviceRegistration=a.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var g=this._stores[b];this._dirty.indexOf(g)!==-1&&
a.push(this._providers[b].put(this._name,g));if(this._pendingDeletes[b]&&this._pendingDeletes[b].length>0){for(g=0;g<this._pendingDeletes[b].length;g++)a.push(this._providers[b].remove(this._name,this._pendingDeletes[b][g]));delete this._pendingDeletes[b]}}this._dirty=[];return k.all(a)},_scheduleFlush:function(a){a&&this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),
0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var b=this._stores[a],g;for(g in b)b.hasOwnProperty(g)&&typeof this._cached[g]==="undefined"&&(this._cached[g]=b[g])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var g=this._stores[0];if(g[a]!==b)g[a]=b,this._cached=null,this._scheduleFlush(g)}},remove:function(a){for(var b=0;b<
this._stores.length;++b){var g=this._stores[b];if(g.hasOwnProperty(a))return delete g[a],this._pendingDeletes[b]||(this._pendingDeletes[b]=[]),this._pendingDeletes[b].push(a),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]={},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,g=[],c=0;c<this._providers.length;++c)g.push(this._providers[c].get(this._name,
a).then(function(a){return function(g){b._stores[a]=g}}(c)));return k.all(g).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};j.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var g=new k,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(c!==null)g.resolve(c);else{this._currentPromises[a]=g;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];g.resolve(b)},function(b){b.status===
404?(b={},d._cache.set(a,b),delete d._currentPromises[a],g.resolve(b)):(delete d._currentPromises[a],g.resolve(d._cache.get(a,!0)||{}))})}return g},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)},remove:function(a,b){var g=this._cache.get(a);delete g[b];this._cache.set(a,g);return this._service.remove(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;var g=new k,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(c!==null)g.resolve(c);
else{this._currentPromise=g;var d=this;i("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);d._cache.set(a,b[a]||{});d._currentPromise=null;g.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(d._cache.set(a,{}),d._currentPromise=null,g.resolve({})):(d._currentPromise=null,b=d._cache.get(a,!0),b!==null?g.resolve(b[a]||{}):g.resolve({}))})}return g},put:function(){var a=new k;a.resolve();return a},remove:function(a,b){var g=
this._cache.get(a);delete g[b];this.put(a,g)}};b.prototype={get:function(a){var b=new k,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var g=new k;this._cache.set(a,b);g.resolve();return g},remove:function(a,b){var g=this._cache.get(a);delete g[b];this.put(a,g)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,c,g){if(!c||typeof c!=="number"||c>7||c<1)g=c,c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
g,!1);if((a.USER_SCOPE&c)!==0)return"/orion/preferences/user"+b;else if((a.LOCAL_SCOPE&c)!==0)return"/orion/preferences/local"+b;return"/orion/preferences/default"+b},getPreferences:function(b,c){if(!c||typeof c!=="number"||c>7||c<1)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var g=[];a.USER_SCOPE&c&&this._userProvider.available()&&g.push(this._userProvider);a.LOCAL_SCOPE&c&&g.push(this._localProvider);a.DEFAULT_SCOPE&c&&g.push(this._defaultsProvider);var d=new e(b,g);return d.sync().then(function(){return d})},
getSetting:function(a,b,g){for(var c,d=0;d<a.length;d++)if(a[d].label===b)for(var e=0;e<a[d].data.length;e++)if(a[d].data[e].label===g){c=a[d].data[e].value;break}return c}};return{PreferencesService:a}});
(function(){function f(a){if(typeof a!=="string")throw new TypeError;}function k(a){return a?a.split("&"):[]}function i(a){return a.length===0?"":a.join("&")}function e(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function d(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function j(a,b){var g="",c=[],d=0;return{next:function(){if(g!==a.query)g=a.query,c=k(g);if(d<c.length){var h=e(c[d++]);
switch(b){case "keys":return h[0];case "values":return h[1];case "keys+values":return[h[0],h[1]];default:throw new TypeError;}}throw v;}}}function c(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function b(a){var b=[];a.split("/").forEach(function(a){a===".."?b.pop():a!=="."&&b.push(a)});return b.join("/")}function a(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function l(g,c){if(typeof g!=="string")throw new TypeError;var g=a(g),d=n.exec(g);
if(!d)return null;var h={};h.scheme=d[1]||"";if(h.scheme&&!o.test(h.scheme))return null;var m=d[2];if(m&&(m=q.exec(m),h.userinfo=m[1],h.host=m[2],h.port=m[3],h.port&&!t.test(h.port)))return null;h.path=d[3];h.query=d[4];h.fragment=d[5];if(!h.scheme&&c&&(h.scheme=c.scheme,!h.host&&c.host))h.userinfo=c.userinfo,h.host=c.host,h.port=c.port,h.pathRelative=!0;if(h.pathRelative)if(h.path){if(h.path[0]!=="/")d=/^(.*\/)[^\/]*$/.exec(c.path)[1]||"/",h.path=d+h.path}else h.path=c.path;if(h.scheme)h.scheme=
h.scheme.toLowerCase();if(h.port)h.port=/[1-9]\d*$/.exec(h.port)[0];if(h.host&&h.path)h.path=b(h.path);return h}function h(a,b){var g;if(b){b=b.href||b;g=l(b);if(!g||!g.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:g})}g=l(a,g);if(!g)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:g,writable:!0});var h=new c(this);Object.defineProperty(this,"query",{get:function(){return this._url?h:null},enumerable:!0})}
try{var g;if(typeof window.URL==="function"&&window.URL.length!==0&&(g=new window.URL("http://www.w3.org?q")).protocol==="http:"&&g.query)return}catch(m){}var n=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,q=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,o=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,t=/^\d*$/,s=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,p=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,y=/^([^?#\s]*)$/,u=/^([^\s]*)$/,r=/^\S*$/,z=/([^:]*):?(.*)/,v=typeof StopIteration!=="undefined"?
StopIteration:Error("Stop Iteration"),F={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(c.prototype,{get:{value:function(a){f(a);var b;k(this._url.query).some(function(g){g=e(g);if(g[0]===a)return b=g[1],!0});return b},enumerable:!0},set:{value:function(a,b){f(a);f(b);var g=k(this._url.query);g.some(function(c,h){var m=e(c);if(m[0]===a)return m[1]=b,g[h]=d(m),!0})||g.push(d([a,b]));this._url.query=i(g)},enumerable:!0},has:{value:function(a){f(a);
return k(this._url.query).some(function(b){if(e(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){f(a);var b=k(this._url.query),g=b.filter(function(b){return e(b)[0]!==a});return g.length!==b.length?(this._url.query=i(g),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,b){if(typeof a!=="function")throw new TypeError;var g=j(this._url,"keys+values");try{for(;;){var c=g.next();a.call(b,c[1],c[0],this)}}catch(h){if(h!==v)throw h;
}},enumerable:!0},keys:{value:function(){return j(this._url,"keys")},enumerable:!0},values:{value:function(){return j(this._url,"values")},enumerable:!0},items:{value:function(){return j(this._url,"keys+values")}},size:{get:function(){return k(this._url.query).length},enumerable:!0},getAll:{value:function(a){f(a);var b=[];k(this._url.query).forEach(function(g){g=e(g);g[0]===a&&b.push(g[1])});return b},enumerable:!0},append:{value:function(a,b){f(a);f(b);var g=k(this._url.query);g.push(d([a,b]));this._url.query=
i(g)},enumerable:!0}});Object.defineProperties(h.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var b=a.scheme?a.scheme+":":"";a.host&&(b+="//",a.userinfo&&(b+=a.userinfo+"@"),b+=a.host,a.port&&(b+=":"+a.port));b+=a.path;a.query&&(b+="?"+a.query);a.fragment&&(b+="#"+a.fragment);a=b}else a=this._input;return a},set:function(a){f(a);this._input=a;this._url=l(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:
""},enumerable:!0},protocol:{get:function(){return this._url?this._url.scheme+":":":"},set:function(a){f(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,o.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){f(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=z.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){f(a);if(this._url){var b=
z.exec(this._userinfo),a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=z.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){f(a);if(this._url){var b=[z.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},
set:function(a){f(a);if(this._url&&(a=p.exec(a)))this._url.host=a[1],this._url.port=/[1-9]\d*$/.exec(a[2])[0]},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){f(a);if(this._url&&s.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===F[this.protocol]&&(a="");return a},set:function(a){f(a);if(this._url&&t.exec(a))this._url.port=/[1-9]\d*$/.exec(a)[0]},enumerable:!0},pathname:{get:function(){return this._url?
this._url.path:""},set:function(a){f(a);if(this._url&&y.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(a){f(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),u.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){f(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),r.exec(a)))this._url.fragment=
a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(h,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(h,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=h})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(f,k){function i(a,b){var c=Object.keys(a),h=Object.keys(b);if(c.length!==h.length)return!1;c.sort();h.sort();for(var d=0,l=c.length;d<l;d++){var e=c[d];if(e!==h[d])return!1;var j=a[e],e=b[e];if(j!==e&&JSON.stringify(j)!==JSON.stringify(e))return!1}return!0}function e(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(b){}return a}function d(a){var b=null,c={key:function(c){return(b=
b||Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,h){a[c]=h;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}};Object.defineProperty(c,"length",{get:function(){return(b=b||Object.keys(a)).length}});return c}function j(a,b){if(b&&b instanceof XMLHttpRequest){var c,h;try{c=b.status,h=b.statusText}catch(d){c=0,h=""}return{status:c||0,statusText:h}}return b}function c(a){var b=a?JSON.parse(JSON.stringify(a,
j)):a;if(a instanceof Error)b.__isError=!0,b.message=b.message||a.message,b.name=b.name||a.name;return b}function b(a,b){this.type=a;this.plugin=b}function a(a,b){this.__objectId=a;this.__methods=b}function l(g,h,d){function l(a){D&&d.postMessage(a,D)}function e(b){if(!D)return(new f).reject(Error("plugin not connected"));b.id=String(R++);var g=new f;N[b.id]=g;g.then(null,function(a){x==="active"&&a instanceof Error&&a.name==="Cancel"&&l({requestId:b.id,method:"cancel",params:a.message?[a.message]:
[]})});var c=Object.prototype.toString;b.params.forEach(function(d,h){if(c.call(d)==="[object Object]"&&!(d instanceof a)){var l,e;for(l in d)c.call(d[l])==="[object Function]"&&(e=e||[],e.push(l));if(e){var m=P++;H[m]=d;l=function(){delete H[m]};g.then(l,l);b.params[h]=new a(m,e)}}});d.postMessage(b,D);return g.promise}function t(a,b){a||a===0?l({id:a,result:null,error:b}):console.log(b)}function j(a,b,g,d){d.forEach(function(a,b){if(a&&typeof a.__objectId!=="undefined"){var g={};a.__methods.forEach(function(b){g[b]=
function(){return e({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});d[b]=g}});var h=typeof a===void 0?null:{id:a,result:null,error:null};try{var m=g.apply(b,d);if(h)m&&typeof m.then==="function"?(I[a]=m,m.then(function(b){delete I[a];h.result=b;l(h)},function(b){if(I[a])delete I[a],h.error=c(b),l(h)},function(){l({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(h.result=m,l(h))}catch(t){if(h)h.error=c(t),l(h)}}function p(a){try{if(a.method){var b=
a.method,g=a.params||[];if("serviceId"in a){var c=Q[a.serviceId];c||t(a.id,"service not found");b in c?j(a.id,c,c[b],g):t(a.id,"method not found")}else if("objectId"in a){var h=H[a.objectId];h||t(a.id,"object not found");b in h?j(a.id,h,h[b],g):t(a.id,"method not found")}else if("requestId"in a){var l=I[a.requestId];l&&b==="cancel"&&l.cancel&&l.cancel.apply(l,g)}else if("responseId"in a){var m=N[a.responseId];m&&b==="progress"&&m.progress&&m.progress.apply(m,g)}else if("plugin"===a.method){var e=
a.params[0];M({headers:e.headers,services:e.services}).then(function(){B.resolve(v)})}else if("timeout"===a.method)B&&B.reject(a.error);else throw Error("Bad method: "+a.method);}else{var o=N[String(a.id)];delete N[String(a.id)];if(a.error){var i=d.handleServiceError(v,a.error);o.reject(i)}else o.resolve(a.result)}}catch(q){console.log("Plugin._messageHandler "+q)}}function y(b){var g={};if(b.methods&&(b.methods.forEach(function(a){g[a]=function(){var g={serviceId:b.serviceId,method:a,params:Array.prototype.slice.call(arguments)};
return x==="active"?e(g):v.start({"transient":!0}).then(function(){return e(g)})}}),g.addEventListener&&g.removeEventListener)){var c=new k,h=P++;H[h]={handleEvent:c.dispatchEvent.bind(c)};var d=new a(h,["handleEvent"]),l=g.addEventListener;g.addEventListener=function(a,b){c._namedListeners[a]||l(a,d);c.addEventListener(a,b)};var m=g.removeEventListener;g.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]||m(a,d)}}return g}function u(a){var b=JSON.parse(JSON.stringify(a.properties));
b.__plugin__=g;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);b.objectClass=a;return b}function r(a){var b=y(a),g=u(a),g=d.registerService(a.names||a.type,b,g);E[a.serviceId]={registration:g,proxy:b}}function z(){d.persist(g,{created:F,headers:J,services:G,autostart:w,lastModified:C})}var v=this,h=h||{},F=h.created||(new Date).getTime(),J=h.headers||{},G=h.services||[],w=h.autostart,C=h.lastModified||0,x="installed",A,B,D,E={},R=0,P=0,I={},N={},H={},Q={},M;this._persist=z;this._resolve=function(){x=
"resolved";d.dispatchEvent(new b("resolved",v))};this._getAutostart=function(){return w};this._getCreated=function(){return F};this.getLocation=function(){return g};this.getHeaders=function(){return JSON.parse(JSON.stringify(J))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return C};this.getServiceReferences=function(){var a=[];Object.keys(E).forEach(function(b){a.push(E[b].registration.getReference())});
return a};this.getState=function(){return x};this.start=function(a){if(x==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(A)return A.promise.then(this.start.bind(this,a));if(x==="active")return(new f).resolve();if(!a||!a.transient){var c=a&&a.lazy?"lazy":"started";c!==w&&(w=c,z())}c=d.getState();if(c!=="starting"&&c!=="active")return a.transient?(new f).reject(Error("start transient error")):(new f).resolve();if(x==="installed")try{this._resolve()}catch(h){return(new f).reject(h)}x===
"resolved"&&G.forEach(function(a){r(a)});if(a&&a.lazy)return x!=="starting"&&(x="starting",d.dispatchEvent(new b("lazy activation",v))),(new f).resolve();var l=new f;A=l;x="starting";d.dispatchEvent(new b("starting",v));B=new f;D=d.connect(g,p);B.then(function(){B=null;x="active";d.dispatchEvent(new b("started",v));A=null;l.resolve()},function(){B=null;x="stopping";d.dispatchEvent(new b("stopping",v));Object.keys(E).forEach(function(a){E[a].registration.unregister();delete E[a]});d.disconnect(D);
D=null;x="resolved";A=null;d.dispatchEvent(new b("stopped",v));l.reject(Error("plugin activation error"))});return l.promise};this.stop=function(a){if(x==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(A)return A.promise.then(this.stop.bind(this,a));if((!a||!a.transient)&&"stopped"!==w)w="stopped",z();if(x!=="active"&&x!=="starting")return(new f).resolve();A=a=new f;x="stopping";d.dispatchEvent(new b("stopping",v));Object.keys(E).forEach(function(a){E[a].registration.unregister();
delete E[a]});D&&(d.disconnect(D),D=null);x="resolved";A=null;d.dispatchEvent(new b("stopped",v));a.resolve();return a.promise};M=function(a){if(x==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(!a)return C===0&&(C=(new Date).getTime(),z()),d.loadManifest(g).then(M);var c=J,h=G,l=w;J=a.headers||{};G=a.services||{};w=a.autostart||w;a.lastModified?C=a.lastModified:(C=(new Date).getTime(),z());if(i(J,c)&&i(G,h)&&w===l)return(new f).resolve();if(x==="active"||x==="starting"){var m=
[];Object.keys(G).forEach(function(a){var b=G[a];m.push(a);var g=E[a];if(g){if(i(b.methods,Object.keys(g.proxy))){var a=u(b),c=g.registration.getReference(),h={};c.getPropertyKeys().forEach(function(a){h[a]=c.getProperty(a)});i(a,h)||g.registration.setProperties(a);return}g.registration.unregister();delete E[a]}r(b)});Object.keys(E).forEach(function(a){m.indexOf(a)===-1&&(E[a].registration.unregister(),delete E[a])})}x==="active"&&(d.disconnect(D),B=new f,D=d.connect(g,p),B.then(function(){B=null},
function(){B=null;x="stopping";d.dispatchEvent(new b("stopping"),v);Object.keys(E).forEach(function(a){E[a].registration.unregister();delete E[a]});d.disconnect(D);D=null;x="resolved";d.dispatchEvent(new b("stopped",v))}));return(new f).resolve()};this.update=function(a){return M(a).then(function(){d.dispatchEvent(new b("updated",v))})};this.uninstall=function(){if(x==="uninstalled")return(new f).reject(Error("Plugin is uninstalled"));if(x==="active"||x==="starting"||x==="stopping")return this.stop().then(this.uninstall.bind(this),
this.uninstall.bind(this));d.removePlugin(this);x="uninstalled";d.dispatchEvent(new b("uninstalled",v));return(new f).resolve()}}var h=/^http[s]?/i;return{Plugin:l,PluginRegistry:function(a,c){function j(a){var b=a.source;s.some(function(g){if(b===g.target){try{var c;if(typeof g.useStructuredClone==="undefined"){var h=typeof a.data!=="string";c=h?a.data:JSON.parse(a.data);g.useStructuredClone=h}else c=g.useStructuredClone?a.data:JSON.parse(a.data);g.handler(c)}catch(d){}return!0}})}var c=c||{},i=
c.storage||localStorage;i.getItem||(i=d(i));var o="installed",t=[],s=[],p=new k,y={},u={registerService:a.registerService.bind(a),connect:function(a,b,g){function h(a){a=Error(a);a.name="timeout";b({method:"timeout",error:a})}var d={handler:b,url:a},l=setTimeout(h.bind(null,"Load timeout for: "+a),g||15E3),e=document.createElement("iframe");e.name=a+"_"+(new Date).getTime();if(!c.visible)e.style.display="none",e.style.visibility="hidden";e.src=a;e.onload=function(){clearTimeout(l);setTimeout(h.bind(null,
"Plugin handshake timeout for: "+a),5E3)};e.sandbox="allow-scripts allow-same-origin";document.body.appendChild(e);d.target=e.contentWindow;d.close=function(){e&&(document.body.removeChild(e),e=null)};s.push(d);return d},disconnect:function(a){for(var b=0;b<s.length;b++)if(a===s[b]){s.splice(b,1);try{a.close()}catch(g){}break}},removePlugin:function(a){for(var b=0;b<t.length;b++)if(a===t[b]){t.splice(b,1);break}i.removeItem("plugin."+a.getLocation())},persist:function(a,b){i.setItem("plugin."+a,JSON.stringify(b))},
postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{p.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new f,g=u.connect(a,function(a){g&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],u.disconnect(g),g=null,b.resolve(a)):"timeout"===a.method&&(u.disconnect(g),g=null,b.reject(a.error)))});return b.promise},getState:function(){return o},handleServiceError:function(a,
b){if(b&&b.status===401){var g=a.getHeaders(),c=a.getName()||a.getLocation(),d=document.createElement("span");d.appendChild(document.createTextNode("Authentication required for: "+c+"."));if(g.login)d.appendChild(document.createTextNode(" ")),c=document.createElement("a"),c.target="_blank",c.textContent="Login",c.href=g.login,h.test(c.href)?(d.appendChild(c),d.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+g.login);return{Severity:"Error",HTML:!0,
Message:(new XMLSerializer).serializeToString(d)}}if(b.__isError){var l=b,b=Error(l.message);Object.keys(l).forEach(function(a){b[a]=l[a]});delete b.__isError}return b}};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=u.getState;this.init=function(){if(!(o==="starting"||o==="active"||o==="stopping")){addEventListener("message",j,
!1);for(var a=[],b=0,g=i.length;b<g;b++)a.push(i.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(i.getItem(a));a.created&&t.push(new l(b,a,u))}});t.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});c.plugins&&Object.keys(c.plugins).forEach(function(a){a=e(a);if(!this.getPlugin(a)){var b=c.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||c.defaultAutostart||"lazy";t.push(new l(a,b,u))}}.bind(this));o="starting"}};this.start=function(){o!==
"starting"&&this.init();if(o!=="starting")return(new f).reject("Cannot start framework. Framework is already "+o+".");var a=[],b=(new Date).getTime();t.forEach(function(g){var c=g._getAutostart();g.getLastModified()===0?a.push(g.update().then(function(){if("started"===c)return g.start({"transient":!0});if("lazy"===c)return g.start({lazy:!0,"transient":!0});g._resolve()})):"started"===c?a.push(g.start({"transient":!0})):"lazy"===c?(a.push(g.start({lazy:!0,"transient":!0})),b>g.getLastModified()+864E5&&
g.update()):g._resolve()});return f.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){o="active"})};this.stop=function(){if(o!=="starting"&&o!=="active")return(new f).reject("Cannot stop registry. Registry is already "+o+".");o="stopping";var a=[];t.forEach(function(b){a.push(b.stop({"transient":!0}))});return f.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",j);o="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};
this.uninstall=function(){return(new f).reject("Cannot uninstall registry")};this.installPlugin=function(a,g){var a=e(a),c=this.getPlugin(a);if(c)return(new f).resolve(c);if(y[a])return y[a];if(g)return c=new l(a,g,u),t.push(c),c._persist(),u.dispatchEvent(new b("installed",c)),(new f).resolve(c);var h=u.loadManifest(a).then(function(g){c=new l(a,g,u);t.push(c);c._persist();delete y[a];u.dispatchEvent(new b("installed",c));return c},function(b){delete y[a];throw b;});return y[a]=h};this.getPlugins=
function(){return t.slice()};this.getPlugin=function(a){var b=null,a=e(a);t.some(function(g){if(a===g.getLocation())return b=g,!0});return b};this.addEventListener=p.addEventListener.bind(p);this.removeEventListener=p.removeEventListener.bind(p);this.resolvePlugins=function(){var a=!0;t.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function f(e,d){function j(g){var c=g.getProperty("service.id"),h=this.addingService(g);h&&(b[c]=g,a[c]=h)}function c(g){var c=g.getProperty("service.id"),h=a[c];delete b[c];delete a[c];this.removedService(g,h)}this.serviceRegistry=e;var b={},a={},l=k,h,g;this.close=function(){if(l!==i)throw"Already closed";l=k;e.removeEventListener("registered",h);e.removeEventListener("unregistering",g);g=h=null;var a=this;this.getServiceReferences().forEach(function(b){c.call(a,
b)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=Object.keys(b);return!a.length?null:a.map(function(a){return b[a]})};this.open=function(){if(l!==k)throw"Already open";l=i;var a=this;h=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(d)!==-1&&(j.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};g=function(b){b.serviceReference.getProperty("objectClass").indexOf(d)!==
-1&&c.call(a,b.serviceReference)};e.addEventListener("registered",h);e.addEventListener("unregistering",g);e.getServiceReferences(d).forEach(function(b){j.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var k=0,i=1;f.prototype={addingService:function(e){return this.serviceRegistry.getService(e)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return f});
define("orion/objects",[],function(){function f(f){for(var i=1;i<arguments.length;i++){var e=arguments[i],d;for(d in e)Object.prototype.hasOwnProperty.call(e,d)&&(f[d]=e[d])}return f}return{clone:function(k){if(Array.isArray(k))return Array.prototype.slice.call(k);var i=Object.create(Object.getPrototypeOf(k));f(i,k);return i},mixin:f,toArray:function(f){return Array.isArray(f)?f:[f]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(f,k,i){var e,d,j,c,b,a="pid";e=function(b,g,c){function d(a,b,c){b.forEach(function(h,d){try{var l=a[d].getProperty("__plugin__"),e=l&&g.getPlugin(l);(!l||e&&e.getState()==="active")&&b[d].updated(c)}catch(m){typeof console!=="undefined"&&console.log(m)}})}k.call(this,b,"orion.cm.managedservice");var l={},e={},t=function(g){var d=[];g.plugin.getServiceReferences().forEach(function(g){if(g.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var l=g.getProperty(a),g=b.getService(g);l&&g&&(l=(l=c._find(l))&&l.getProperties(),d.push(g.updated(l)))}});return f.all(d)};this.addingService=function(g){var c=g.getProperty(a),d=b.getService(g);if(!c||!d)return null;l[c]||(l[c]=[]);e[c]||(e[c]=[]);l[c].push(g);e[c].push(d);return d};this.onServiceAdded=function(b,g){var h=b.getProperty(a),h=c._find(h);d([b],[g],h&&h.getProperties())};this.onOpen=function(){g.addEventListener("started",t)};this.onClose=function(){g.removeEventListener("started",
t)};this.notifyUpdated=function(a){var b=a.getPid();d(l[b]||[],e[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(l[a]||[],e[a]||[],null)};this.removedService=function(b,g){var c=b.getProperty(a),d=l[c],h=e[c];d.length>1?d.splice(d.indexOf(b),1):delete l[c];h.length>1?h.splice(h.indexOf(g),1):delete e[c]}};d=function(){function a(b,d,h){this.store=new j(this,h);this.configAdmin=new c(this,this.store);this.tracker=new e(b,d,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();c=function(){function a(b,c){this.factory=b;this.store=c}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var l="/cm/configurations";
j=function(){function c(g,d){this.factory=g;this.prefsService=d;this.configs=Object.create(null);this.pref=null;var h=this;this.initPromise=this.prefsService.getPreferences(l).then(function(g){h.pref=g;g.keys().forEach(function(c){if(!h.configs[c]){var d=g.get(c);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[a]=c,h.configs[c]=new b(h.factory,h,d))}})})}c.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var c=this._find(a);
c||(c=new b(this.factory,this,a),this.configs[a]=c);return c},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&c.getProperties()!==null&&b.push(c)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return c}();b=function(){function b(c,g){g=i.clone(g);delete g[a];c.properties=g}function c(g,d,l){this.factory=g;this.store=d;if(l!==null&&typeof l==="object")this.pid=l[a],b(this,
l);else if(typeof l==="string")this.pid=l,this.properties=null;else throw Error("Invalid pid/properties "+l);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(b){this._checkRemoved();var c=null;if(this.properties&&(c=i.clone(this.properties),!b))c[a]=this.pid;return c},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(a){this._checkRemoved();b(this,a);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return c}();return{ConfigurationAdminFactory:d}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(f,k,i,e,d,j){var c;return{startup:function(){if(c)return c;c=new k;var b=new i.ServiceRegistry,a=new e.PreferencesService(b);return a.getPreferences("/plugins").then(function(l){var h={plugins:{}};l.keys().forEach(function(a){var b=f.toUrl(a);h.plugins[b]=l[a]});var g=new d.PluginRegistry(b,h);return g.start().then(function(){if(b.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=f.toUrl(a);g.getPlugin(a)||b.push(g.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return k.all(b,function(a){console.log(a)})})}).then(function(){return(new j.ConfigurationAdminFactory(b,g,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");
if(a){var c=a.getUser().then(function(b){if(b)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),g=localStorage.getItem("lastLogin");if(!g||g<(new Date).getTime()-9E5)return c}}).then(function(){var d={serviceRegistry:b,preferences:a,pluginRegistry:g};c.resolve(d);return d})})}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer",
"Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it","Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown",
"Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was ",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy","Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"I20131030-1703","LOG: ":"LOG: ",View:"View","no parent":"no parent",
"no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?",Operations:"Operations","Operations running":"Operations running","Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry",
Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Regular expression":"Regular expression","Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",
"Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Sidebar":"Toggle Sidebar","Sample HTML5 Site":"Sample HTML5 Site","Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin",
"Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion.",Raw:"Raw","Open the raw file or folder in the browser":"Open the raw file or folder in the browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred."});
define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/util",[],function(){var f=navigator.userAgent,k=f.indexOf("MSIE")!==-1||f.indexOf("Trident")!==-1?document.documentMode:void 0,i=parseFloat(f.split("Firefox/")[1]||f.split("Minefield/")[1])||void 0,e=f.indexOf("Opera")!==-1,d=parseFloat(f.split("Chrome/")[1])||void 0,j=f.indexOf("Safari")!==-1&&!d,c=parseFloat(f.split("WebKit/")[1])||void 0,b=f.indexOf("Android")!==-1,a=f.indexOf("iPad")!==-1,f=f.indexOf("iPhone")!==-1,l=a||f,h=navigator.platform.indexOf("Mac")!==-1,g=navigator.platform.indexOf("Win")!==
-1,m=navigator.platform.indexOf("Linux")!==-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:k,isFirefox:i,isOpera:e,isChrome:d,isSafari:j,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:f,isIOS:l,isMac:h,isWindows:g,isLinux:m,platformDelimiter:g?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(f){function k(b,a){a||(a=document);return a.querySelectorAll(b)}function i(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=i(b.childNodes[a]);if(c)return c}return null}function e(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var c=e(b.childNodes[a]);if(c)return c}return null}function d(b,a){if(b.nodeType===3){var c=j.exec(b.nodeValue);c&&c.length>1&&a(b,
c)}if(b.hasChildNodes())for(c=0;c<b.childNodes.length;c++)d(b.childNodes[c],a)}var j=/\$\{([^\}]+)\}/,c=null;return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:k,$$array:function(b,a){return Array.prototype.slice.call(k(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 c=b.compareDocumentPosition(a);return Boolean(c&16)},bounds:function(b){b=b.getBoundingClientRect();return{left:b.left+
document.body.scrollLeft,top:b.top+document.body.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:i,lastTabbable:e,stop:function(b){if(window.document.all)b.keyCode=0;b.preventDefault&&(b.preventDefault(),b.stopPropagation())},processTextNodes:function(b,a){d(b,function(b,c){b.parentNode.replaceChild(document.createTextNode(a[c[1]]||c[1]),b)})},processDOMNodes:function(b,a){d(b,function(b,c){var g=a[c[1]];if(g){var d=document.createRange(),
e=c.index;d.setStart(b,e);d.setEnd(b,e+c[0].length);d.deleteContents();d.insertNode(g)}})},addAutoDismiss:function(b,a){function d(a){c.forEach(function(b){var c=!1,d=b.excludeNodes.some(function(b){return document.body.contains(b)?(c=!0,b.contains(a.target)):!1});if(c&&!d)try{b.dismiss()}catch(l){typeof console!=="undefined"&&console&&console.error(l&&l.message)}});c=c.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}c===null&&(c=[],document.addEventListener("click",
d,!0),f.isIOS&&document.addEventListener("touchend",function(a){function b(){a.target.removeEventListener("click",b)}a.touches.length===0&&a.target.addEventListener("click",b)},!1));c.push({excludeNodes:b,dismiss:a})},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(f){var k,i,e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,j=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,b=c&&location.protocol&&location.protocol.replace(/\:/,""),a=c&&location.hostname,l=c&&(location.port||void 0),h=[],g=f.config&&f.config()||{};k={version:"2.0.5",strip:function(a){if(a){var a=a.replace(d,""),b=a.match(j);b&&(a=b[1])}else a="";return a},
jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:g.createXhr||function(){var a,b,c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(b=0;b<3;b+=1){c=e[b];try{a=new ActiveXObject(c)}catch(g){}if(a){e=[c];break}}return a},parseName:function(a){var b,
c,g=!1,d=a.indexOf(".");b=a.indexOf("./")===0||a.indexOf("../")===0;d!==-1&&(!b||d>1)?(b=a.substring(0,d),c=a.substring(d+1,a.length)):b=a;a=c||b;d=a.indexOf("!");d!==-1&&(g=a.substring(d+1)==="strip",a=a.substring(0,d),c?c=a:b=a);return{moduleName:b,ext:c,strip:g}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,c,g){var d,h;d=k.xdRegExp.exec(a);if(!d)return!0;a=d[2];d=d[3];d=d.split(":");h=d[1];d=d[0];return(!a||a===b)&&(!d||d.toLowerCase()===c.toLowerCase())&&(!h&&!d||h===g)},finishLoad:function(a,
b,c,d){c=b?k.strip(c):c;g.isBuild&&(h[a]=c);d(c)},load:function(d,h,e,o){if(o.isBuild&&!o.inlineText)e();else{g.isBuild=o.isBuild;var j=k.parseName(d),o=j.moduleName+(j.ext?"."+j.ext:""),i=h.toUrl(o),f=g.useXhr||k.useXhr;!c||f(i,b,a,l)?k.get(i,function(a){k.finishLoad(d,j.strip,a,e)},function(a){e.error&&e.error(a)}):h([o],function(a){k.finishLoad(j.moduleName+"."+j.ext,j.strip,a,e)})}},write:function(a,b,c){if(h.hasOwnProperty(b)){var g=k.jsEscape(h[b]);c.asModule(a+"!"+b,"define(function () { return '"+
g+"';});\n")}},writeFile:function(a,b,c,g,d){var b=k.parseName(b),h=b.ext?"."+b.ext:"",l=b.moduleName+h,e=c.toUrl(b.moduleName+h)+".js";k.load(l,c,function(){var b=function(a){return g(e,a)};b.asModule=function(a,b){return g.asModule(a,e,b)};k.write(a,l,b,d)},d)}};if(g.env==="node"||!g.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)i=require.nodeRequire("fs"),k.get=function(a,b){var c=i.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)};else if(g.env===
"xhr"||!g.env&&k.createXhr())k.get=function(a,b,c,d){var h=k.createXhr(),l;h.open("GET",a,!0);if(d)for(l in d)d.hasOwnProperty(l)&&h.setRequestHeader(l.toLowerCase(),d[l]);if(g.onXhr)g.onXhr(h,a);h.onreadystatechange=function(){var g;if(h.readyState===4)g=h.status,g>399&&g<600?(g=Error(a+" HTTP status: "+g),g.xhr=h,c(g)):b(h.responseText)};h.send(null)};else if(g.env==="rhino"||!g.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")k.get=function(a,b){var c,g,d=new java.io.File(a),h=java.lang.System.getProperty("line.separator"),
d=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(d),"utf-8")),l="";try{c=new java.lang.StringBuffer;(g=d.readLine())&&g.length()&&g.charAt(0)===65279&&(g=g.substring(1));for(c.append(g);(g=d.readLine())!==null;)c.append(h),c.append(g);l=String(c.toString())}finally{d.close()}b(l)};return k});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(f,k,i){return{slideoutHTMLFragment:function(e){var d=document.createElement("div");d.innerHTML=i;var j=k.$("#slideContainer",d);j.id=e+j.id;j=k.$("#pageCommandParameters",d);j.id=e+j.id;j=k.$("#pageCommandDismiss",d);j.id=e+j.id;return d.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(f){function k(e,d,j,c,b,a){this.type=a||"keydown";this.keyCode=typeof e==="string"&&this.type==="keydown"?e.toUpperCase().charCodeAt(0):e;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=j!==void 0&&j!==null?j:!1;this.mod3=c!==void 0&&c!==null?c:!1;this.mod4=b!==void 0&&b!==null?b:!1}function i(e){this.keys=e}k.prototype={getKeys:function(){return[this]},match:function(e,d){if(d!==void 0){if(d!==0)return!1}else if(e instanceof Array){if(e.length>1)return!1;
e=e[0]}return e.type!==this.type?!1:this.keyCode===e.keyCode||this.keyCode===String.fromCharCode(f.isOpera?e.which:e.charCode!==void 0?e.charCode:e.keyCode)?this.mod1!==(f.isMac?e.metaKey:e.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==e.shiftKey?!1:this.mod3!==e.altKey?!1:f.isMac&&this.mod4!==e.ctrlKey?!1:!0:!1},equals:function(e){return!e?!1:this.keyCode!==e.keyCode?!1:this.mod1!==e.mod1?!1:this.mod2!==e.mod2?!1:this.mod3!==e.mod3?!1:this.mod4!==e.mod4?!1:this.type!==e.type?!1:!0}};i.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(e,d){var j=this.keys;if(d!==void 0)return d>j.length?!1:j[d].match(e)?d===j.length-1?!0:d+1:!1;else{e instanceof Array||(e=[e]);if(e.length>j.length)return!1;var c;for(c=0;c<e.length;c++)if(!j[c].match(e[c]))return!1;return c===j.length?!0:c}},equals:function(e){if(!e.keys)return!1;if(e.keys.length!==this.keys.length)return!1;for(var d=0;d<e.keys.length;d++)if(!e.keys[d].equals(this.keys[d]))return!1;return!0}};return{KeyBinding:k,KeyStroke:k,
KeySequence:i}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(f,k){function i(e){this._init(e)}i.prototype={_init:function(e){this._dropdownNode=k.node(e.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=k.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=e.populate;this._selectionClass=e.selectionClass;var d=this;this._triggerNode.addEventListener("click",function(e){d.toggle()&&
k.stop(e)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(e){if(e.keyCode===k.KEY.ENTER||e.keyCode===k.KEY.SPACE)d.toggle(),k.stop(e)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this.isVisible()?this.close():this.open()},isVisible:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")},open:function(){if(!this.isVisible()){this._populate&&(this.empty(),
this._populate(this._dropdownNode));var e=this.getItems();if(e.length>0){if(!this._hookedAutoDismiss){var d=k.$$(".dropdownSubMenu",this._dropdownNode);k.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(d)),function(){if(this.isVisible()){this.close();for(var d=this._dropdownNode.parentNode;d;)d.dropdown&&typeof d.dropdown.close==="function"&&d.dropdown.close(),d=d.parentNode}}.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._selectionClass&&
this._triggerNode.classList.add(this._selectionClass);this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();e[0].focus();return!0}return!1}},_positionDropdown:function(){this._dropdownNode.style.left="";var e=k.bounds(this._dropdownNode),d=k.bounds(document.body);if(e.left+e.width>d.left+d.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-e.width+"px";else{var d=k.bounds(this._boundingNode(this._triggerNode)),j=k.bounds(this._triggerNode);
this._dropdownNode.style.left=j.left-d.left-e.width+j.width+"px"}},_boundingNode:function(e){var d=window.getComputedStyle(e,null);return d===null?e:d.getPropertyValue("position")==="absolute"||!e.parentNode||e===document.body?e:this._boundingNode(e.parentNode)},close:function(e){if(this.isVisible())return this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),
e&&this._triggerNode.focus(),!0},getItems:function(){var e=[],d=this;k.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(j){j.parentNode.parentNode===d._dropdownNode&&e.push(j)});return e},empty:function(){var e=this;k.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===e._dropdownNode&&d.parentNode.removeChild(d)})},_dropdownKeyDown:function(e){if(e.keyCode===k.KEY.UP||e.keyCode===k.KEY.DOWN||e.keyCode===k.KEY.RIGHT||e.keyCode===k.KEY.ENTER||
e.keyCode===k.KEY.LEFT){var d=this.getItems(),j=document.activeElement;if(d.length&&d.length>0&&j){var c=d.indexOf(j);c<0&&(c=d.indexOf(j.parentNode));c>=0&&(e.keyCode===k.KEY.UP&&c>0?(c--,d[c].focus()):e.keyCode===k.KEY.DOWN&&c<d.length-1?(c++,d[c].focus()):e.keyCode===k.KEY.ENTER||e.keyCode===k.KEY.RIGHT?j.classList.contains("dropdownTrigger")&&j.dropdown&&j.dropdown.open():e.keyCode===k.KEY.LEFT&&j.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),k.stop(e))}}else e.keyCode===
k.KEY.ESCAPE&&(this.close(!0),k.stop(e))}};i.prototype.constructor=i;return{Dropdown:i}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<span class="dropdownArrowDown core-sprite-downarrow"></span></button><ul class="dropdownMenu"></ul>'});define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0">${ButtonText}<span class="dropdownArrowRight core-sprite-closedarrow"></span></span><ul class="dropdownMenu"></ul></li>'});
define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(f,k){function i(e){this._init(e)}i.prototype={_init:function(e){this._node=k.node(e.node);if(!this._node)throw"no dom node for tooltip found";this._position=e.position||["right","above","below","left"];this._text=e.text;this._hideDelay=e.hideDelay===void 0?200:e.hideDelay;this._tailSize=e.tailSize||10;this._trigger=e.trigger||"mouseover";this._afterShowing=e.afterShowing;this._afterHiding=e.afterHiding;var d=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(c){c.target===d._node&&(d.show(),k.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=e.showDelay===void 0?500:e.showDelay;e=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(c){k.contains(d._node,c.target)&&(d.show(),k.stop(c))},!1);this._leaveHandler=function(c){k.contains(d._node,c.target)&&d.hide()};for(var j=0;j<e.length;j++)this._node.addEventListener(e[j],
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 e=this;k.addAutoDismiss([this._tip,this._node],function(){e.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(e._timeout)window.clearTimeout(e._timeout),e._timeout=null;e._tip.addEventListener("mouseout",function(d){k.contains(e._tip,d.target)&&(e.hide(),k.stop(d))},
!1)},!1)}return this._tip},_positionTip:function(e,d){this._makeTipNode();e==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var j=this._node,c;for(c=k.bounds(j);j&&!c.width&&!c.height;j=j.parentNode)c=k.bounds(j);var j=k.bounds(this._tipInner),b;switch(e){case "above":b=c.top-j.height-this._tailSize-1;c=c.left-this._tailSize;break;case "below":b=c.top+c.height+this._tailSize+1;c=c.left-this._tailSize;break;case "left":b=c.top-this._tailSize/2;c=c.left-j.width-
this._tailSize-1;break;default:b=c.top-this._tailSize/2,c=c.left+c.width+this._tailSize+1}var a=k.bounds(document.documentElement);if(b+j.height>a.height)if(d)b=a.height-j.height-1;else return!1;if(c+j.width>a.width)if(d)c=a.width-j.width-1;else return!1;if(c<0)if(d)c=4;else return!1;if(b<0)if(d)b=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+e),e==="above"||e==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,
this._tipInner),e==="left"))this._tail.style.left=j.width+"px";this._tip.style.top=b+"px";this._tip.style.left=c+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var e=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var d=!1,j=0;!d&&j<e._position.length;)d=e._positionTip(e._position[j]),j++;d||e._positionTip(e._position[0],
!0);e._tip.classList.add("tooltipShowing");e._afterShowing&&e._afterShowing()},this._showDelay)}},hide:function(e){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(e===void 0)e=this._hideDelay;var d=this;this._timeout=window.setTimeout(function(){d._tip.classList.remove("tooltipShowing");d._tip.removeAttribute("style");d._afterHiding&&d._afterHiding()},e)}},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 e=["mouseout","click"],d=0;d<e.length;d++)this._node.removeEventListener(e[d],this._leaveHandler,!1)}}};i.prototype.constructor=i;return{Tooltip:i}});
define("orion/commands","require,orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(f,k,i,e,d,j,c,b){function a(a){var b=a.invocation;if(b){var c=a.command;if(c.hrefCallback)return a=c.hrefCallback.call(b.handler||window,b),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;else if(b.commandRegistry)return b.commandRegistry._invoke(b),
!0;else if(c.onClick||c.callback)return window.setTimeout(function(){(c.onClick||c.callback).call(b.handler||window,b)},0),!0}return!1}function l(b,c){for(var g in c)if(c[g]&&c[g].keyBinding&&c[g].command&&c[g].keyBinding.match(b)){var d=c[g],h=d.keyBinding;if((!h.domScope||i.contains(i.node(h.domScope),b.target))&&a(d)){i.stop(b);break}}}function h(a,b,c){b.classList.add("commandImage");var g;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(g=document.createElement("span"),b.appendChild(g),
g.classList.add(a.spriteClass),g.classList.add(a.imageClass)):(g=new Image,g.alt=a.name,g.name=c,g.id=c,g.src=a.image,b.appendChild(g));return g}function g(a,b,c,g,d){this.commandRegistry=d;this.handler=a;this.items=b;this.userData=c;this.command=g;if(g.parameters)this.parameters=g.parameters.makeCopy();this.id=g.id}function m(a){this._init(a)}var n=null,q={};window.document.addEventListener("keydown",function(a){a=a||window.event;if(function(a){if(k.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&
!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;else if(a.charCode||a.keyCode)switch(a=a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable==="true")return;
var b=a.target.nodeName.toLowerCase();if(b==="input")switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(b==="textarea")return}b={};if(n){var c,g,d;g=Object.keys(q);for(c=0;c<g.length;c++)d=g[c],b[d]=q[d];var h=n();g=Object.keys(h);for(c=0;c<g.length;c++)d=g[c],b[d]=h[d]}else b=q;l(a,b)},!1);g.prototype=
{collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new g(this.handler,this.items,this.userData,this.command,this.commandRegistry);b.domNode=this.domNode;b.domParent=this.domParent;if(a)b.parameters=a.makeCopy();else if(this.parameters)b.parameters=this.parameters.makeCopy();return b}};g.prototype.constructor=g;m.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;
this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||f.toUrl("images/none.png");this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.selectionClass=a.selectionClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},populateChoicesMenu:function(a,b,c,g,d){this.getChoices(b,c,g).forEach(function(c){if(c.name){var g=document.createElement("li");a.appendChild(g);var h=document.createElement("span");
h.tabIndex=0;h.role="menuitem";h.classList.add("dropdownMenuItem");var l=document.createTextNode(c.name);h.appendChild(l);g.appendChild(h);h.choice=c;h.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);h.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else d._generateMenuSeparator(a)})},getChoices:function(a,b,c){return this.choiceCallback?
this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==f.toUrl("images/none.png")}};m.prototype.constructor=m;return{Command:m,CommandInvocation:g,createDropdownMenu:function(a,b,c,g,l,m,j){a=i.node(a);if(!a)throw"no parent node was specified";var n=document.createRange();n.selectNode(a);n=n.createContextualFragment(d);i.processTextNodes(n,{ButtonText:b});a.appendChild(n);
a=a.lastChild;n=a.previousSibling;g?n.classList.add(g):(n.classList.add("orionButton"),n.classList.add("commandButton"));if(l){if(!m)n.textContent="",n.setAttribute("aria-label",b);h({spriteClass:"commandSprite",imageClass:l},n,b);n.classList.add("orionButton")}n.dropdown=new e.Dropdown({dropdown:a,populate:c,selectionClass:j});a.dropdown=n.dropdown;return{menuButton:n,menu:a,dropdown:n.dropdown}},createCheckedMenuItem:function(a,b,g,d){a=i.node(a);if(!a)throw"no parent node was specified";var h=
document.createRange();h.selectNode(a);h=h.createContextualFragment(c);i.processTextNodes(h,{ItemText:b});a.appendChild(h);a=i.$(".checkedMenuItem",a.lastChild);a.checked=g;a.addEventListener("change",d,!1);return a},createCommandItem:function(a,c,g,d,l,e,m){var j,e=e||!c.name&&c.hasImage();if(c.hrefCallback)j=document.createElement("a"),j.id=d,e&&c.hasImage()?h(c,j,d):(j.className="commandLink",j.appendChild(document.createTextNode(c.name))),m=c.hrefCallback.call(g.handler,g),m.then?m.then(function(a){j.href=
a}):j.href=m?m:"#";else{j=document.createElement("button");j.className="orionButton";e?c.hasImage()?(h(c,j,d),c.name&&j.setAttribute("aria-label",c.name)):(j.classList.add("commandButton"),j.classList.add("commandMissingImageButton"),j.appendChild(document.createTextNode(c.name))):(j.classList.add("commandButton"),d=document.createTextNode(c.name),j.appendChild(d));var i=m||c.callback;if(i)c.onClick=i,j.addEventListener("click",function(){i.call(g.handler,g)},!1)}a.nodeName.toLowerCase()==="ul"?(m=
document.createElement("li"),a.appendChild(m),a=m):j.classList.add("commandMargins");a.appendChild(j);if(c.tooltip)j.commandTooltip=new b.Tooltip({node:j,text:c.tooltip,position:["above","below","right","left"]});l&&(q[c.id]={keyBinding:l,command:c,invocation:g});return j},createCommandMenuItem:function(a,c,g,d,h){var l,e=a.dropdown;if(c.hrefCallback)l=document.createElement("a"),l.appendChild(document.createTextNode(c.name)),h=c.hrefCallback.call(g.handler,g),h.then?h.then(function(a){l.href=a}):
l.href=h?h:"#",l.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&l.click()},!1);else{l=document.createElement("span");l.tabIndex=0;l.appendChild(document.createTextNode(c.name));var m=h||c.callback;if(m)c.onClick=m,l.addEventListener("click",function(){e.close(!0);m.call(g.handler,g)},!1),l.addEventListener("keydown",function(a){if(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)a.preventDefault(),l.click()},!1)}if(c.tooltip)l.commandTooltip=new b.Tooltip({node:l,
text:c.tooltip,position:["right","left","above","below"]});l.className="dropdownMenuItem";l.role="menuitem";h=document.createElement("li");a.appendChild(h);h.appendChild(l);d&&(q[c.id]={keyBinding:d,command:c,invocation:g});return l},executeBinding:a,setKeyBindingProvider:function(a){n=a},localKeyBindings:q,_testMethodProcessKey:l}});
define("orion/explorers/navigationUtils",[],function(){function f(i,e){if(!k&&i)i.push({domNode:e}),e.tabIndex=-1,e.style.outline="none"}var k=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(i,e,d){i&&(i=i.getGridNavHolder(e,!0))&&f(i,d)},generateNavGrid:f,removeNavGrid:function(i,e){if(i)for(var d=0;d<i.length;d++)if(i[d].domNode===e){i.splice(d,1);break}}}});
define("orion/PageUtil",[],function(){var f=/^http[s]?/i;return{hash:function(){var f=window.location.href.split("#")[1];return f?"#"+f:""},matchResourceParameters:function(f){var f=f||window.location.toString(),i={resource:""},e=f.indexOf("#");if(e!==-1&&(f=f.substring(e+1),f.length!==0)){f=f.split(",");i.resource=decodeURIComponent(f[0]);for(e=1;e<f.length;e++){var d=/([^=]*)(=?)(.*)/.exec(f[e]),j=decodeURIComponent(d[1]||""),d=decodeURIComponent(d[3]||"");j!==""&&j!=="resource"&&(i[j]=d)}}return i},
validateURLScheme:function(k,i){var e=k;if(k.indexOf("://")===-1){var d=document.createElement("a");d.href=k;e=d.href}d=!1;return(d=i?i.some(function(d){return RegExp("^"+d+":","i").test(e)}):f.test(e))?k:(console.log("Illegal URL Scheme: '"+k+"'"),"")}}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(f,k){function i(d){var e="",c=navigator.platform.indexOf("Mac")!==-1;d.mod1&&(e+=c?"Cmd+":"Ctrl+");d.mod2&&(e+="Shift+");d.mod3&&(e+="Alt+");d.mod4&&c&&(e+="Ctrl+");if(d.alphaKey)return e+d.alphaKey;if(d.type==="keypress")return e+d.keyCode;for(var b in k.KEY)if(typeof(k.KEY[b]==="number")&&k.KEY[b]===d.keyCode)return e+b;var a;switch(d.keyCode){case 59:a=d.mod2?":":";";break;case 61:a=d.mod2?"+":"=";break;case 188:a=
d.mod2?"<":",";break;case 190:a=d.mod2?">":".";break;case 191:a=d.mod2?"?":"/";break;case 192:a=d.mod2?"~":"`";break;case 219:a=d.mod2?"{":"[";break;case 220:a=d.mod2?"|":"\\";break;case 221:a=d.mod2?"}":"]";break;case 222:a=d.mod2?'"':"'"}return a?e+a:d.keyCode>=112&&d.keyCode<=123?e+"F"+(d.keyCode-111):e+String.fromCharCode(d.keyCode)}function e(d){var e=window.navigator.platform.indexOf("Mac")!==-1;return e&&d.metaKey||!e&&d.ctrlKey}return{getUserKeyString:function(d){for(var e="",d=d.getKeys(),
c=0;c<d.length;c++)c!==0&&(e+=" "),e+=i(d[c]);return e},getUserText:function(d,e,c,b,a,l,h,g,m){var i=!1,h=function(g){return function(h){if(!i){var f=k.node(d),q=f.value;if(f)if(g&&h.keyCode===k.KEY.ESCAPE){if(c)e.style.display="inline";i=!0;f.parentNode.removeChild(f);l&&l()}else if(!(g&&h.keyCode!==k.KEY.ENTER)){if(q.length===0||!m&&q===b){if(c)e.style.display="inline"}else if(a(q),c&&e.parentNode)e.style.display="inline";i=!0;f.parentNode&&f.parentNode.removeChild(f);l&&l()}}}},f=document.createElement("input");
f.id=d;f.value=b||"";e.parentNode.insertBefore(f,e.nextSibling);f.classList.add("userEditBoxPrompt");if(c)e.style.display="none";f.addEventListener("keydown",h(!0),!1);f.addEventListener("blur",h(!1),!1);window.setTimeout(function(){f.focus();if(b){var a=k.node(d),c=g?b.indexOf(g):-1;if(c>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",c),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,c);else{if(a.selectionStart!==void 0)a.selectionStart=
0,a.selectionEnd=c}else a.select()}},0)},openInNewWindow:e,followLink:function(d,j){j&&e(j)?window.open(d):window.location=d},createButton:function(d,e){var c=document.createElement("button");c.className="orionButton commandButton commandMargins";c.addEventListener("click",function(b){e();k.stop(b)},!1);d&&c.appendChild(document.createTextNode(d));return c},createDropdownButton:function(){},isFormElement:function(d){switch(d.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","require,orion/commands,orion/explorers/navigationUtils,orion/PageUtil,orion/uiUtils,orion/webui/littlelib,orion/webui/dropdown,orion/webui/tooltip,text!orion/webui/checkedmenuitem.html,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html".split(","),function(f,k,i,e,d,j,c,b,a,l,h){function g(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function m(a,b){this.token=a;this.parameterName=b}function n(a,b,c,g,d){this.name=a;this.type=b;this.label=c;this.value=g;this.lines=d||1}function q(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}g.prototype={_init:function(a){this._selectionService=a.selection;var b=this;k.setKeyBindingProvider(function(){return b._activeBindings})},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&
this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var g=this._urlBindings[b],d=g.command,h=g.invocation;if(h&&h.parameters&&d.callback){h.parameters.setValue(c.parameterName,c.parameterValue);var e=this;window.setTimeout(function(){e._invoke(h)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,c,g){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new k.CommandInvocation(c,
b,null,a,this),g):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,g)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},confirm:function(a,b,c,g,d,h){var e=!1;if(this._parameterCollector&&!d){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,d){var h=document.createElement("span");h.classList.add("parameterPrompt");h.textContent=b;a.appendChild(h);h=document.createElement("button");h.addEventListener("click",function(){e=!0;l._parameterCollector.close()},!1);d.appendChild(h);h.appendChild(document.createTextNode(c));h.className="dismissButton";var m=document.createElement("button");m.addEventListener("click",function(){e=!1;l._parameterCollector.close()},!1);d.appendChild(m);m.appendChild(document.createTextNode(g));m.className=
"dismissButton";return h},function(){h(e)}))return}e=window.confirm(b);h(e)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,c){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(c||a.parameters.shouldCollectParameters())){var g=!1;a.parameters.updateParameters(a);
if(a.parameters.shouldCollectParameters()&&(g=this._parameterCollector.collectParameters(a),!g)){var d=new b.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),g=d.contentContainer();g.classList.add("parameterPopup");var h=window.document.activeElement,e=this._parameterCollector.getFillFunction(a,function(){h&&h.focus();d.destroy()})(g);d.show();window.setTimeout(function(){e.focus();e.select()},0);g=!0}g||a.command.callback.call(a.handler||
window,a)}else a.command.callback.call(a.handler||window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){function b(a){return function(){k.executeBinding(a)}}var c={},g,h,e=[],l;for(l in this._activeBindings)(h=this._activeBindings[l])&&h.keyBinding&&h.command&&(h.command.name||h.command.tooltip)&&e.push(h);e.sort(function(a,b){return(a.command.name||
a.command.tooltip).localeCompare(b.command.name||b.command.tooltip)});for(l=0;l<e.length;l++)h=e[l],h.keyBinding.scopeName?(c[h.keyBinding.scopeName]||(c[h.keyBinding.scopeName]=[]),c[h.keyBinding.scopeName].push(h)):(g=d.getUserKeyString(h.keyBinding),a.createItem(g,h.command.name||h.command.tooltip,b(h)));for(var m in c)c[m].length&&c[m].length>0&&(a.createHeader(m),c[m].forEach(function(c){g=d.getUserKeyString(c.keyBinding);a.createItem(g,c.command.name||c.command.tooltip,b(c))}))},addCommand:function(a){this._commandList[a.id]=
a;var b=this._pendingBindings[a.id];if(b){var c=this;b.forEach(function(b){c._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,c,g,d,h,e,l,m){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));if(a[b]){if(g)a[b].title=g;if(c)a[b].position=c;if(e)a[b].imageClass=e;if(l)a[b].tooltip=l;if(m)a[b].selectionClass=m;a[b].emptyGroupMessage=h}else a[b]={title:g,
position:c,emptyGroupMessage:h,imageClass:e,tooltip:l,selectionClass:m,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){if(b.length>1)a[b]||(a[b]={position:0,children:{}}),a=a[b].children});return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,g,d,h,e){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];g&&(a=this._createEntryForPath(a,g));a[b]={position:c};h&&((c=this._commandList[b])?this._addBinding(c,"key",h,d):this._addPendingBinding(b,"key",h,d));e&&((c=this._commandList[b])?this._addBinding(c,"url",e,d):this._addPendingBinding(b,"url",e,d));a.sortedContributions=null},_addBinding:function(a,b,c,g){if(!a.id)throw Error("No command id: "+a);b==="key"?this._activeBindings[a.id]={command:a,keyBinding:c,bindingOnly:g}:b==="url"&&
(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:g})},_addPendingBinding:function(a,b,c,g){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:c,bindingOnly:g})},_checkForTrailingSeparator:function(a,b,c){var g;if(b==="tool"||b==="button")if((g=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&g.classList.contains("commandSeparator"))return c?(a.removeChild(g),!1):!0;if(b==="menu"&&(a=j.$$array("li > *",a),a.length>0&&a[a.length-
1].classList.contains("dropdownSeparator")))if(g=a[a.length-1],c)g.parentNode.parentNode.removeChild(g.parentNode);else return!0;return!1},renderCommands:function(a,b,c,g,d,h,e){if(typeof a!=="string")throw"a scope id for rendering must be specified";b=j.node(b);if(!b)throw"no parent";var l=this._contributionsByScopeId[a];if(!c&&l){var c=l.localSelectionService||this._selectionService,m=this;c&&c.getSelections(function(c){m.renderCommands(a,b,c,g,d,h)})}else l&&(this._render(this._contributionsByScopeId[a],
b,c,g,d||"button",h,e),this._checkForTrailingSeparator(b,d,!0))},destroy:function(a){a=j.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&b.emptyGroupTooltip.destroy();this.destroy(b);a.removeChild(b)}},_render:function(a,c,g,d,h,e,l){var m=a.sortedContributions;if(!m){var m=[],j=!1,f;for(f in a)if(Object.prototype.hasOwnProperty.call(a,f)){var n=a[f];if(n&&typeof n.position==="number")n.id=f,m.push(n),j=!0}if(j)m.sort(function(a,
b){return a.position-b.position}),a.sortedContributions=m}var q=0,w=this;m.forEach(function(a){var m,j;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){m=a.children;var f;if(h==="tool"||h==="button")if(a.title)f=w._createDropdownMenu(c,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass),l&&i.generateNavGrid(l,f.menuButton),window.setTimeout(function(){w._render(a.children,f.menu,g,d,"menu",e,l);w._checkForTrailingSeparator(f.menu,"menu",!0);
if(f.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!f.menuButton.emptyGroupTooltip)f.menuButton.emptyGroupTooltip=new b.Tooltip({node:f.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else l&&i.removeNavGrid(l,f.menuButton),f.menu.parentNode&&f.menu.parentNode.removeChild(f.menu),f.destroyButton&&f.destroyButton.parentNode&&f.destroyButton.parentNode.removeChild(f.destroyButton);else f.menuButton.style.visibility="visible"},0);else{var n;c.childNodes.length>
0&&!w._checkForTrailingSeparator(c,h)&&(n=w.generateSeparatorImage(c));w._render(m,c,g,d,h,e,l);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==n&&(n=w.generateSeparatorImage(c))}else if(a.title){if(n=w._createDropdownMenu(c,a.title,!0,null,null,a.imageClass))w._render(m,n.menu,g,d,"menu",e,l),n.menu.childNodes.length===0&&n.destroyButton&&c.removeChild(n.destroyButton)}else c.childNodes.length>0&&w._generateMenuSeparator(c),w._render(m,c,g,d,h,e,l),w._generateMenuSeparator(c)}else{var o=
w._commandList[a.id];m=o?!0:!1;var v=null,v=null;if(o){j=new k.CommandInvocation(d,g,e,o,w);j.domParent=c;n=m&&(o.visibleWhen?o.visibleWhen(g):!0);if(w._activeBindings[o.id]&&w._activeBindings[o.id].keyBinding)v=w._activeBindings[o.id],v.invocation=n?j:null,v.bindingOnly&&(m=!1);if(w._urlBindings[o.id]&&w._urlBindings[o.id].urlBinding)v=w._urlBindings[o.id],v.invocation=n?j:null,v.bindingOnly&&(m=!1);m=m&&n}if(m)o.choiceCallback?(h==="tool"||h==="button"?(m=c,n=!1,c.nodeName.toLowerCase()==="ul"&&
(m=document.createElement("li"),c.appendChild(m))):(m=c,n=!0),w._createDropdownMenu(m,o.name,n,function(a){o.populateChoicesMenu(a,g,d,e,w)}.bind(o),o.imageClass,o.tooltip||o.title,o.selectionClass)):(j.handler=j.handler||this,j.domParent=c,n=function(){w._invoke(j)},h==="menu"?m=k.createCommandMenuItem(c,o,j,null,n):(m=h+o.id+q,m=k.createCommandItem(c,o,j,m,null,h==="tool",n)),i.generateNavGrid(l,m),j.domNode=m,q++)}})},_createDropdownMenu:function(a,g,d,e,l,m,i){a=j.node(a);if(!a||!j.contains(document.body,
a))return null;var f,n=a;if(d)m=document.createRange(),m.selectNode(a),m=m.createContextualFragment(h),j.processTextNodes(m,{ButtonText:g}),a.appendChild(m),f=a.lastChild,a=f.lastChild,g=a.previousSibling,g.dropdown=new c.Dropdown({dropdown:a,populate:e}),a.dropdown=g.dropdown;else if(a.nodeName.toLowerCase()==="ul"&&(n=document.createElement("li"),a.appendChild(n),f=n),a=null,l&&(a="dropdownButtonWithIcon",m=m||g),m=l?m||g:m,e=k.createDropdownMenu(n,g,e,a,l,!1,i),g=e.menuButton,a=e.menu,m)g.commandTooltip=
new b.Tooltip({node:g,text:m,position:["above","below","right","left"]});return{menuButton:g,menu:a,dropdown:g.dropdown,destroyButton:f}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=a.nodeName.toLowerCase()==="ul"?document.createElement("li"):
document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};g.prototype.constructor=g;m.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;n.prototype={optionsRequested:function(){return this.optionsRequested}};n.prototype.constructor=n;q.prototype={_storeParameters:function(a){this.parameterTable=
null;if(a){var b=this.parameterTable={};a.forEach(function(a){b[a.name]=a})}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var c=this.parameterTable[a];
if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new n(b.name,b.type,b.label,b.value,b.lines);a.push(b)});var b=new q(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};q.prototype.constructor=q;return{CommandRegistry:g,URLBinding:m,ParametersDescription:q,
CommandParameter:n}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(f,k,i){function e(d,e){this._activeContainer=null;this._getElementsFunction=d;this._toolbarLayoutFunction=e}e.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&i.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&i.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(d,e,c){typeof d==="string"&&(d=i.node(d));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===d)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(d))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=c;var b=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;d=i.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(d.length===0){e=this._activeElements.dismissArea||
this._activeElements.parameterArea;d=document.createElement("button");d.id="closebox";d.className="imageSprite core-sprite-close dismissButton";d.title=f.Close;e.appendChild(d);var a=this;d.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(b)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select&&b.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(d,e){i.$$array("input",e).forEach(function(c){c.type==="checkbox"?d.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&d.parameters.setValue(c.parameterName,c.value.trim())});i.$$array("textArea",e).forEach(function(c){d.parameters.setValue(c.parameterName,c.value.trim())});d.command.callback&&d.command.callback.call(d.handler,d)},collectParameters:function(d){return d.parameters?
(d.domNode&&d.domNode.classList.add("commandMarker"),this.open(d.domNode||d.domParent,this.getFillFunction(d))):!1},getFillFunction:function(d,e){var c=this;return function(b,a){var l=null,h=function(){e&&e();c.close()},g=function(a){a.keyCode===i.KEY.ENTER&&c._collectAndCall(d,b);if(a.keyCode===i.KEY.ESCAPE||a.keyCode===i.KEY.ENTER)h(),i.stop(a)};d.parameters.forEach(function(a){var c=null;if(a.label)c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",a.name+
"parameterCollector"),c.textContent=a.label,b.appendChild(c);var d=a.name+"parameterCollector",e=c||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)c=document.createElement("textarea"),c.rows=a.lines,c.type="textarea",c.id=d,e.appendChild(c),g=function(a){a.keyCode===i.KEY.ESCAPE&&(h(),i.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",c.id=d,e.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=d,
e.appendChild(c),a.value)c.value=a.value;c.classList.add("parameterInput");c.setAttribute("speech","speech");c.setAttribute("x-webkit-speech","x-webkit-speech");c.parameterName=a.name;l||(l=c);c.addEventListener("keydown",g,!1)});var m=a;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),b.appendChild(m));var n=function(a,b){var c=document.createElement("button");b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismissButton");
return c};if(d.parameters.hasOptionalParameters())d.parameters.optionsRequested=!1,n(f.More,m).addEventListener("click",function(){d.parameters.optionsRequested=!0;c._collectAndCall(d,b);h()},!1);n(f.Submit,m).addEventListener("click",function(){c._collectAndCall(d,b);h()},!1);m=n(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=f.Close;m.addEventListener("click",function(){h()},!1);return l}}};e.prototype.constructor=e;return{CommandParameterCollector:e}});
define("orion/regex",[],function(){return{escape:function(f){return f.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(f){return(f=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(f))?{pattern:f[1],flags:f[2]}:null}}});
define("orion/contentTypes",[],function(){function f(d,c){function b(a,b,c,g){var c=b.filename.indexOf(c)>=0,d;d=g.toLowerCase();d=b.extension.indexOf(d)!==-1;if(c||d){if(!(d=!a))c&&(g=g.toLowerCase(),c=a.extension.indexOf(g)!==-1),d=c;if(d)return b}return a}if(typeof d!=="string")return null;for(var a=d&&d.split(".").pop(),e=null,h=0;h<c.length;h++){var g=c[h];b(e,g,d,a)===g&&(e=g)}return e}function k(j){this.serviceRegistry=j;this.map=function(c){function b(a){return a===null||typeof a==="undefined"?
[]:Array.isArray(a)?a:[a]}function a(a){return b(a).map(function(a){return String.prototype.toLowerCase.call(a)})}for(var c=c.getServiceReferences(e).concat(c.getServiceReferences(d)),l={},h=0;h<c.length;h++)for(var g=b(c[h].getProperty("contentTypes")),m=0;m<g.length;m++){var j=g[m];l[j.id]||(l[j.id]={id:j.id,name:j.name,image:j.image,"extends":j["extends"],extension:a(j.extension),filename:b(j.filename)})}return l}(j);j.registerService(i,this)}var i="orion.core.contentTypeRegistry",e="orion.core.contenttype",
d="orion.file.contenttype";k.prototype={getContentTypes:function(){var d=this.getContentTypesMap(),c=[],b;for(b in d)Object.prototype.hasOwnProperty.call(d,b)&&c.push(d[b]);return c},getContentTypesMap:function(){return this.map},getFileContentType:function(d){return f(d.Name,this.getContentTypes())},getFilenameContentType:function(d){return f(d,this.getContentTypes())},getContentType:function(d){return this.map[d]||null},isExtensionOf:function(d,c){d=typeof d==="string"?this.getContentType(d):d;
c=typeof c==="string"?this.getContentType(c):c;if(!d||!c)return!1;if(d.id===c.id)return!0;else for(var b=d,a={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(a[b.id])throw Error("Cycle: "+b.id);a[b.id]=!0}return!1},isSomeExtensionOf:function(d,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(d,c[b]))return!0;return!1}};return{ContentTypeRegistry:k,getFilenameContentType:f}});
define("orion/URITemplate",[],function(){function f(a){this._text=a}function k(a){return a.replace("%25","%")}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(l,k);if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function e(a,b,c){for(var d=
[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&d.push(i(a[e],b));return d.join(c)}function d(a,b,c,d){for(var e=Object.keys(a),l=[],j=0;j<e.length;j++)typeof a[e[j]]!=="undefined"&&l.push(i(e[j],b)+c+i(a[e[j]],b));return l.join(d)}function j(c){if(c.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=b[c[0]])?c=c.substring(1):this._operator=b.NUL;for(var g=[],d=c.split(","),e=0;e<d.length;e++){var l=d[e].match(a);if(l===null)throw Error("Bad VarSpec: "+c);g.push({name:l[1],
explode:!!l[2],prefix:l[3]?parseInt(l[3],10):-1})}this._varSpecList=g}function c(a){for(var b=[],c=0,d=a.indexOf("{",c);d!==-1;){b.push(new f(a.substring(c,d)));c=a.indexOf("}",d+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new j(a.substring(d+1,c)));c+=1;d=a.indexOf("{",c)}b.push(new f(a.substring(c)));this._templateComponents=b}var b={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},
"/":{first:"/",sep:"/",named:!1,ifemp:"",allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:!0,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:!0,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},a=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,l=/%25[0-9A-F][0-9A-F]/g;f.prototype={expand:function(){return encodeURI(this._text)}};
j.prototype={expand:function(a){for(var b=[],c=0;c<this._varSpecList.length;c++){var l=this._varSpecList[c],j=l.name,f=a[j],k=typeof f;if(k!=="undefined"&&f!==null){var s=b.length===0?this._operator.first:this._operator.sep;if(k==="string")this._operator.named&&(s+=i(j,"U+R"),s+=f.length===0?this._operator.ifemp:"="),l.prefix!==-1&&l.prefix<f.length&&(f=f.substring(0,l.prefix)),s+=i(f,this._operator.allow);else if(Array.isArray(f))l.explode?s+=e(f,this._operator.allow,this._operator.sep):(this._operator.named&&
(s+=i(j,"U+R"),s+=f.length===0?this._operator.ifemp:"="),s+=e(f,this._operator.allow,","));else if(k==="object")l.explode?s+=d(f,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(s+=i(j,"U+R"),s+=Object.keys(f).length===0?this._operator.ifemp:"="),s+=d(f,this._operator.allow,",",","));else throw Error("bad param type: "+j+" : "+k);b.push(s)}}return b.join("")}};c.prototype={expand:function(a){for(var b=[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));
return b.join("")}};return c});
define("orion/i18nUtil",["require","orion/Deferred"],function(f,k){function i(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var e={};return{getMessageBundle:function(d){function j(){f(["i18n!"+d],function(a){if(a){var b=d;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}c.resolve(a)})}if(e[d])return e[d];var c=new k;e[d]=
c;var b=i(d);if(b)return c.resolve(b),c;try{f([d],j)}catch(a){f(["orion/i18n!"+d],j)}return c},formatMessage:function(d){var e=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(c,b){return e[(b<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(f,k,i,e,d){function j(){return(new URL(f.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function c(b,a){var c=b.getServiceReferences(a||"orion.page.link"),h=i.matchResourceParameters(window.location.href),g={OrionHome:j(),Location:h.resource},m=[];c.forEach(function(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});if(b.uriTemplate&&
b.nls&&(b.name||b.nameKey)){var c=new k;d.getMessageBundle(b.nls).then(function(a){var d=(new e(b.uriTemplate)).expand(g),d=i.validateURLScheme(d);b.href=d;b.textContent=b.nameKey?a[b.nameKey]:b.name;c.resolve(b)});m.push(c)}else if(b.uriTemplate&&b.name){var h=(new e(b.uriTemplate)).expand(g),h=i.validateURLScheme(h);b.href=h;b.textContent=b.name;m.push((new k).resolve(b))}});return k.all(m)}return{createPageLinks:function(b,a){return c(b,a).then(function(a){a.sort(function(a,b){var c=a.textContent&&
a.textContent.toLowerCase(),d=b.textContent&&b.textContent.toLowerCase();return c<d?-1:c>d?1:0});return a.map(function(a){var b=a.href,a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:c,getOrionHome:j}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks".split(","),function(f,k,i,e,d,j,c,b,a){var l={},h=a.getOrionHome();l._cloneItemWithoutChildren=function n(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=n(a[c]));return b};l._getOpenWithNavCommandExtensions=function(a){function b(a,c){for(var g=a.getServiceReferences("orion.navigate.openWith"),
d=[],h=0;h<g.length;h++){var e=g[h];e.getProperty("editor")===c.id&&(e=e.getProperty("contentType"),e instanceof Array?d=d.concat(e):e!==null&&typeof e!=="undefined"&&d.push(e))}return d}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],g=0;g<b.length;g++){var d=b[g],h=d.getProperty("id");c.push({id:h,name:d.getProperty("name"),nameKey:d.getProperty("nameKey"),nls:d.getProperty("nls"),uriTemplate:d.getProperty("orionTemplate")||d.getProperty("uriTemplate"),validationProperties:d.getProperty("validationProperties")||
[]})}return c}(),g=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),d=[],h=0;h<c.length;h++){var e=c[h],l=g&&g.editor===e.id,j=b(a,e);j.length&&d.push({properties:{name:e.name||e.id,nameKey:e.nameKey,id:"eclipse.openWithCommand."+e.id,tooltip:e.name,tooltipKey:e.nameKey,contentType:j,uriTemplate:e.uriTemplate,nls:e.nls,forceSingleItem:!0,isEditor:l?"default":"editor",validationProperties:e.validationProperties},
service:{}})}return d};l._makeValidator=function(a,b,c,g){function e(a,b,c,g){var d=c.match,h;if(b.indexOf("[")===0){if(b.indexOf("]")<0)return!1;if(!Array.isArray(a))return!1;h=b.replace("[","").replace("]","");for(b=0;b<a.length;b++)if(e(a[b],h,c,g))return!0}else if(b.indexOf("|")>=0)return h=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),e(a,h,c,g)?!0:e(a,b,c,g);else if(b.indexOf(":")>=0)return h=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[h]?e(a[h],b,c,g):!1;
else{a:{h=!1;var l;if(b.charAt(0)==="!")c=typeof a[b.substring(1)]==="undefined";else if(typeof a[b]!=="undefined"){if(typeof d==="undefined")l=a[b],h=!0;else if(typeof d==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(d=RegExp(d).exec(a[b]))h=d[0],l=c.variableMatchPosition==="before"?a[b].substring(0,d.index):c.variableMatchPosition==="after"?a[b].substring(d.index+h.length):c.variableMatchPosition==="only"?h:a[b],h=!0}else{c=RegExp(d).test(a[b]);break a}}else a[b]===
d&&(l=a[b],h=!0);if(h&&c.variableName&&(g[c.variableName]=l,g.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?g[c.variableName]=g[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+c.replacements[a]);c=h}else c=!1}return c}}return{info:a,validationFunction:function(b){typeof g==="function"&&(b=g.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 h=0;h<b.length;h++){var l;a:{var j=b[h],i=c;if(this.info.validationProperties)for(l=0;l<this.info.validationProperties.length;l++){var f=this.info.validationProperties[l];if(typeof f.source!=="undefined"){if(!e(j,f.source,f,this)){l=!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");l=!1;break a}}if(this.info.contentType&&i){f=!1;if(j=d.getFilenameContentType(j.Name,
i))for(l=0;l<this.info.contentType.length;l++)if(j.id===this.info.contentType[l]){f=!0;break}l=f}else l=!0}if(!l)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var g=this.info.validationProperties[c];g.source&&g.variableName&&(this.itemCached===a&&this[g.variableName]||
e(a,g.source,g,this),a[g.variableName]?window.console.log("Variable name "+g.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[g.variableName]=this[g.variableName])}b.OrionHome=h;return(new j(this.info.uriTemplate)).expand(b)}return null}}};l._createCommandOptions=function(a,b,g,d,h,e){function j(c,i){var f=l._makeValidator(a,g,d,e);c.visibleWhen=f.validationFunction.bind(f);if(h)if(f.generatesURI.bind(f)())c.hrefCallback=function(a){a=
Array.isArray(a.items)?a.items[0]:a.items;return f.getURI.bind(f)(a)};else{var k=a;c.callback=function(a){var d;if(k.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,d=l._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){d=[];for(var h=0;h<a.items.length;h++)d.push(l._cloneItemWithoutChildren(a.items[h]))}else d=l._cloneItemWithoutChildren(a.items);if(g)var e=g.getService("orion.page.progress");b.run?e?e.progress(b.run(d),"Running command: "+c.name):b.run(d):g&&(e?e.progress(g.getService(b).run(d),
"Running command: "+c.name):g.getService(b).run(d))}}i.resolve(c)}var i=new k;a.nls?c.getMessageBundle(a.nls).then(function(b){j({name:a.nameKey?b[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?b[a.tooltipKey]:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},i)}):j({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},i);return i};l.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var g=a._commandList[c];
g.isEditor&&b.push(g)}return b};var g;l.createAndPlaceFileCommandsExtension=function(a,b,c,g,d,h){var e=!!h;return l.createFileCommands(a,null,h?"all":void 0,e).then(function(a){b._addedOpenWithCommands=e;var h=!1,l=!1;a.forEach(function(a){b.addCommand(a);d&&!h&&(h=!0,b.addCommandGroup(c,"eclipse.fileCommandExtensions",1E3,null,d));d&&!l&&(l=!0,b.addCommandGroup(c,"eclipse.openWith",1E3,"Open With",d+"/eclipse.fileCommandExtensions"));this.isEditor?b.registerCommandContribution(c,a.id,g+this.index,
d?d+"/eclipse.fileCommandExtensions/eclipse.openWith":null):b.registerCommandContribution(c,a.id,g+this.index,d?d+"/eclipse.fileCommandExtensions":null)});return{}})};l.createFileCommands=function(a,b,c,d){var c=c===void 0?"global":c,d=d===void 0?!0:d,h=a.getServiceReferences("orion.navigate.command"),e=[];if(c==="all"||c==="global")for(var j=0;j<h.length;j++)if(h[j].getProperty("id")!=="orion.navigateFromMetadata"){for(var f=a.getService(h[j]),r={},z=h[j].getPropertyKeys(),v=0;v<z.length;v++)r[z[v]]=
h[j].getProperty(z[v]);(c==="all"||r.forceSingleItem&&r.showGlobally)&&e.push({properties:r,service:f})}return k.when(function(){var c=a.getService("orion.core.contentTypeRegistry")||b;return g||k.when(c.getContentTypes(),function(a){return g=a})}(),function(){e=d?e.concat(l._getOpenWithNavCommandExtensions(a,g)):e;var b=e.map(function(b){var c=b.properties;return l._createCommandOptions(c,b.service,a,g,!0).then(function(a){a=new i.Command(a);if(c.isEditor)a.isEditor=c.isEditor;return a})});return k.all(b,
function(a){return{_error:a}}).then(function(a){return a})})};l.createOpenWithCommands=function(a,b,c){return c&&c._addedOpenWithCommands?(new k).resolve(l.getOpenWithCommands(c)):l.createFileCommands(a,b,"none",!0)};return l});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(f,k){function i(e){this._init(e)}i.prototype={_init:function(e){var d=k.node(e.container);if(!d)throw"no parent container";this._container=d;d.classList.remove("currentLocation");this._id=e.id||"eclipse.breadcrumbs";this._resource=e.resource||null;this._rootSegmentName=e.rootSegmentName;this._workspaceRootSegmentName=e.workspaceRootSegmentName;this._workspaceRootURL=e.workspaceRootURL;this._makeHref=e.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var e;if(this._resource&&this._resource.Parents){e=document.createElement("a");var d=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(e,d):e.href=f.toUrl("edit/edit.html")+"#"+d}else e=document.createElement("span");k.empty(e);e.appendChild(document.createTextNode(this._workspaceRootSegmentName));return e}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(e){var d=
document.createElement("a");d.classList.add("breadcrumb");d.appendChild(document.createTextNode(e));return d},addSegmentHref:function(e,d){this._makeHref?this._makeHref(e,d.Location,d):e.href=f.toUrl("edit/edit.html")+"#"+d.ChildrenLocation},buildSegments:function(e,d){if(this._resource.Parents){var j=this._resource.Parents.slice(0),c,b;j&&(j=j.slice(0),d==="reverse"&&(j=j.reverse().slice(0)),j.forEach(function(a){e?(b=e,e=null):b=a.Name;c=this.buildSegment(b);this.path+=a.Name;this.addSegmentHref(c,
a);c.include=!1;this.segments.push(c)}.bind(this)))}},addDivider:function(){var e=document.createElement("span");e.appendChild(document.createTextNode(" / "));this.path+="/";e.classList.add("breadcrumbSeparator");this.append(e)},refresh:function(){(this.crumbs=k.node(this._id))?k.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(e){this.crumbs.appendChild(e)},addTitle:function(e,d){var j=d||document.title;this.crumbs.childNodes.length===0&&(e=document.createElement("span"),e.appendChild(document.createTextNode(j)),e.classList.add("breadcrumb"),e.classList.add("currentLocation"),this.append(e))},finalSegment:function(e,
d){e=document.createElement("span");d?e.appendChild(document.createTextNode(d)):e.appendChild(document.createTextNode(this._resource.Name));e.classList.add("currentLocation");this.path+=this._resource.Name;this.append(e)},firstSegment:function(e){if(e)this.append(e),this._resource&&this._resource.Parents?(e.classList.add("breadcrumb"),this.addDivider()):(e.href="",e.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(e){e.include===
!0&&(this.append(e),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var e=this.segments.slice(0).reverse();e.forEach(function(d){this.append(d);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?d.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=e.reverse()}},measure:function(){var e=document.getElementById("location");e.style.width="auto";this.MAX_LENGTH=e.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility=
"hidden";var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;if(d)this.addTitle(e,d);else if(this.finalSegment(e,d),this._resource&&this._resource.Parents&&(this.buildSegments(d,"reverse"),this.measureSegments(),this.firstSegment(e)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;d?this.addTitle(e,d):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(e),
this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(e,d)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};i.prototype.constructor=i;return{BreadCrumbs:i}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(f,k,i){function e(d){k.attach(this);this._init(d)}e.prototype={_init:function(d){this._tracking=null;this._animationDelay=501;this.$node=i.node(d.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(d.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(d.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=
d.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(d.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 d.closeByDefault!=="undefined")this._closeByDefault=d.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(d){this.addEventListener("resize",function(e){d(e.node)})},_initializeFromStoredSettings:function(){var d=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof d==="string"?d==="closed":this._closeByDefault;if(this._vertical)if(d=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(d,10);else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(d=localStorage.getItem(this._prefix+
"/xPosition"))this._splitLeft=parseInt(d,10);else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var d=i.bounds(this.$node),e=i.bounds(this.$node.parentNode);return this.vertical?d.top-e.top:d.left-e.left},_adjustToSplitPosition:function(d){var e=i.bounds(this.$node),c=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=e.height;if(d||!this._splitTop)this._splitTop=e.top,localStorage.setItem(this._prefix+"/yPosition",
this._splitTop);d=this._splitTop;this.$node.parentNode.style.position==="relative"&&(d=this._splitTop-c.top);this.$sideNode.style.height=d+"px";this.$sideNode.style.display="block";this.$node.style.top=d+"px"}else{this._splitWidth=e.width;if(d||!this._splitLeft)this._splitLeft=e.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);d=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(d=this._splitLeft-c.left);this.$sideNode.style.width=d+"px";this.$sideNode.style.display=
"block";this.$node.style.left=d+"px"}this._resize()},_resize:function(d,e,c){var d=d||0,b=i.bounds(this.$node.parentNode),a=i.bounds(this.$node);if(this._vertical){if(c===void 0)c=a.top,this.$node.parentNode.style.position==="relative"&&(c-=b.top);c+=a.height;this.$mainNode.style.top=c+"px"}else{if(e===void 0)e=a.left,this.$node.parentNode.style.position==="relative"&&(e-=b.left);e+=a.width;this.$mainNode.style.left=e+"px"}var l=this;window.setTimeout(function(){l._notifyResizeListeners(l.$mainNode);
l._notifyResizeListeners(l.$sideNode)},d)},_notifyResizeListeners:function(d){this.dispatchEvent({type:"resize",node:d})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(d,e){d||this._addAnimation();var c=this._splitTop,b=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")c=b=this._initialSplit}else this._closed=!0,c=b=0;this._vertical?(this.$sideNode.style.height=
c+"px",this.$node.style.top=c+"px"):(this.$sideNode.style.width=b+"px",this.$node.style.left=b+"px");this._resize(this._animationDelay,b,c);d||this._removeAnimation();e||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var a=this;window.setTimeout(function(){a._notifyToggleListeners()},this._animationDelay)},_removeAnimation:function(){var d=this;window.setTimeout(function(){d.$sideNode.classList.remove(d._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");
d.$mainNode.classList.remove(d._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");d.$node.classList.remove(d._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(d){if(d.target===this._thumb)return i.stop(d),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),i.stop(d)},_mouseMove:function(d){if(this._tracking){var e=i.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=d.clientY;if(this._splitTop<
e.top+5)this._splitTop=e.top+5;else if(this._splitTop>e.top+e.height-5)this._splitTop=e.top+e.height-5;var c=this._splitTop;this.$node.parentNode.style.position==="relative"&&(c=this._splitTop-e.top);this.$node.style.top=c+"px"}else{this._splitLeft=d.clientX;if(this._splitLeft<e.left+5)this._splitLeft=e.left+5;else if(this._splitLeft>e.left+e.width-5)this._splitLeft=e.left+e.width-5;c=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(c=this._splitLeft-e.left);this.$node.style.left=
c+"px"}this._adjustToSplitPosition(!0);i.stop(d)}},_mouseUp:function(d){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),i.stop(d)}};e.prototype.constructor=e;return{Splitter:e}});
define("orion/widgets/themes/ThemePreferences",[],function(){function f(f,i){this._preferences=f;this._themeData=i;var e=i.getThemeStorageInfo(),d=f.listenForChangedSettings(e.storage,2,function(e){e.key===d&&this.apply()}.bind(this))}f.prototype={_initialize:function(f,i,e){var d=e.get(f.styleset);d||(d=i.getStyles(),e.put(f.styleset,JSON.stringify(d)));(i=e.get("selected"))&&(i=JSON.parse(i));if(!i||i[f.selectedKey]===void 0)i=i||{},i[f.selectedKey]=f.defaultTheme,e.put("selected",JSON.stringify(i))},
apply:function(){this.setTheme()},getTheme:function(f){var i=this._themeData,e=i.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,i,d);var j=JSON.parse(d.get("selected")),d=JSON.parse(d.get(e.styleset)),c;if(d)for(var b=0;b<d.length;b++)if(d[b].name===j[e.selectedKey]){c=d[b];break}f({style:c,styles:d})}.bind(this))},setTheme:function(f,i){var e=this._themeData,d=e.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(j){this._initialize(d,
e,j);var c=JSON.parse(j.get("selected"));f||(f=c[d.selectedKey]);c[d.selectedKey]=f;j.put("selected",JSON.stringify(c));i?j.put(d.styleset,JSON.stringify(i)):i=JSON.parse(j.get(d.styleset));for(j=0;j<i.length;j++)if(i[j].name===c[d.selectedKey]){e.processSettings(i[j]);break}}.bind(this))},setFontSize:function(f){var i=this._themeData,e=i.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,i,d);var j=JSON.parse(d.get("selected")),c=JSON.parse(d.get(e.styleset)),
b;if(c)for(var a=0;a<c.length;a++)c[a].fontSize=f,c[a].name===j[e.selectedKey]&&(b=c[a]);d.put(e.styleset,JSON.stringify(c));i.processSettings(b)}.bind(this))}};return{ThemePreferences:f}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile","Git Settings":"Git Settings",General:"General",Navigation:"Navigation",Links:"Links","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",Color:"Color",
Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address","Email Confirmed":"Email Confirmed",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",
Password:"Password",OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git User Settings":"Update Git User Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.",
"Git user data successfully updated.":"Git user data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.","Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL",
"Plugin URL:":"Plugin URL:",Disable:"Disable",DisableTooltip:"Disable the plugin",Enable:"Enable",EnableTooltip:"Enable the plugin","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin","Find More Orion Plugins":"Find More Orion Plugins","Get Plugins":"Get Plugins",Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration",
"Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value","JavaScript Object":"JavaScript Object","click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item",
"Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",general:"General",validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}",Editor:"Editor",editorSettings:"Settings",
EditorThemes:"Themes",Import:"Import","Import a theme":"Import a theme",fileManagement:"File Management",typing:"Typing",autoSave:"Auto Save",autoSaveTimeout:"Save interval (ms)",autoLoad:"Auto Load",saveDiffs:"Save file as diffs",trimTrailingWhiteSpace:"Trim Trailing Whitespace on Save",Restore:"Restore Defaults",Default:"Default",keys:"Keys",tabs:"Tabs",tabSize:"Tab Size",expandTab:"Insert spaces for tabs",smoothScrolling:"Smooth Scrolling",scrollAnimation:"Scrolling Animation",scrollAnimationTimeout:"Scrolling Duration (ms)",
keyBindings:"Key Bindings",rulers:"Rulers",annotationRuler:"Show Annotation Ruler",lineNumberRuler:"Show Line Number Ruler",foldingRuler:"Show Folding Ruler",overviewRuler:"Show Overview Ruler",whitespaces:"White Spaces",wrapping:"Wrapping",wordWrap:"Word Wrap",showMargin:"Show Margin",marginOffset:"Margin Column",showTabs:"Show Tabs",showSpaces:"Show Spaces",autoSaveTimeoutInvalid:"Invalid save interval.",scrollAnimationTimeoutInvalid:"Invalid scrolling duration.",tabSizeInvalid:"Invalid tab size.",
localSettingsTooltip:"Toggle whether this setting is shown in local editor settings drop down.",autoPairParentheses:"Autopair (Parentheses)",autoPairBraces:"Autopair {Braces}",autoPairSquareBrackets:"Autopair [Square] Brackets",autoPairAngleBrackets:"Autopair <Angle> Brackets",autoPairQuotations:'Autopair "Strings"',autoCompleteComments:"Autocomplete /** Block Comments */",smartIndentation:"Smart Indentation",sourceControl:"Source Control",showBlame:"Show Blame","Editor preferences updated":"Editor preferences updated",
"Editor defaults restored":"Editor defaults restored",Theme:"Theme","Font Size":"Font Size","New Theme Name:":"New Theme Name:","Font Size:":"Font Size:","UI Theme":"UI Theme","Navigation Bar":"Navigation Bar","Navigation Text":"Navigation Text","Search Box":"Search Box","Tool Panel":"Tool Panel","Selection Bar":"Selection Bar",Location:"Location",Content:"Content","Main Panel":"Main Panel",Button:"Button","Button Text":"Button Text","Section Text":"Section Text","Side Panel":"Side Panel","Line Color":"Line Color",
"Line Numbers":"Line Numbers",Foreground:"Foreground","Current Line":"Current Line","HTML Attribute":"HTML Attribute","Overview Ruler":"Overview Ruler","HTML Tag":"HTML Tag","Annotation Ruler":"Annotation Ruler","Show Guide":"Show Guide","Check Guide":"Check Guide",Cancel:"Cancel","Revert Theme":"Revert Theme","Update Theme":"Update Theme","Theme:":"Theme:",clickDiagram:"Click diagram to style.",clickUpdate:"Click Update button to save preview.","CSS Class Name":"CSS Class Name","CSS Attribute":"CSS Attribute",
"CSS Value":"CSS Value","CSS Text":"CSS Text","COLOR:":"Color:","NEW COLOR:":"New Color:",Ok:"Ok","OR HEX:":"Or Hex: "});define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/editor/eventTarget",[],function(){function f(){}f.addMixin=function(k){var i=f.prototype,e;for(e in i)i.hasOwnProperty(e)&&(k[e]=i[e])};f.prototype={addEventListener:function(f,i,e){if(!this._eventTypes)this._eventTypes={};var d=this._eventTypes[f];d||(d=this._eventTypes[f]={level:0,listeners:[]});d.listeners.push({listener:i,useCapture:e})},dispatchEvent:function(f){var i=f.type;this._dispatchEvent("pre"+i,f);this._dispatchEvent(i,f);this._dispatchEvent("post"+i,f)},_dispatchEvent:function(f,
i){var e=this._eventTypes?this._eventTypes[f]:null;if(e){var d=e.listeners;try{if(e.level++,d)for(var j=0,c=d.length;j<c;j++)if(d[j]){var b=d[j].listener;typeof b==="function"?b.call(this,i):b.handleEvent&&typeof b.handleEvent==="function"&&b.handleEvent(i)}}finally{if(e.level--,e.compact&&e.level===0){for(j=d.length-1;j>=0;j--)d[j]||d.splice(j,1);d.length===0&&delete this._eventTypes[f];e.compact=!1}}}},isListening:function(f){return!this._eventTypes?!1:this._eventTypes[f]!==void 0},removeEventListener:function(f,
i,e){if(this._eventTypes){var d=this._eventTypes[f];if(d){for(var j=d.listeners,c=0,b=j.length;c<b;c++){var a=j[c];if(a&&a.listener===i&&a.useCapture===e){d.level!==0?(j[c]=null,d.compact=!0):j.splice(c,1);break}}j.length===0&&delete this._eventTypes[f]}}}};return{EventTarget:f}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(f,k,i){function e(d){d=d||{};this._document=d.document||document}var d={};e.getTheme=function(f){var f=f||"default",c=d[f];c||(c=d[f]=new e);return c};e.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(d,c){var b=this,a=b._themeClass;b._themeClass=d;this._load(d,c,function(){b.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:b.getThemeClass()})})},onThemeChanged:function(d){return this.dispatchEvent(d)},
buildStyleSheet:function(d,c){function b(b,c,g){c&&(a.push("."+d+" ."+b+" {"),a.push("\t"+(g?"background-color":"color")+": "+c+";"),a.push("}"))}var a=[];a.push("");a.push("."+d+" {");c.fontFamily&&a.push("\tfont-family: "+c.fontFamily+";");c.fontSize&&a.push("\tfont-size: "+c.fontSize+";");c.fontSize&&a.push("\tcolor: "+c.text+";");a.push("}");a.push("."+d+".textview {");c.background&&a.push("\tbackground-color: "+c.background+";");a.push("}");b("ruler.annotations",c.annotationRuler,!0);b("ruler.lines",
c.annotationRuler,!0);b("ruler.folding",c.annotationRuler,!0);b("ruler.overview",c.overviewRuler,!0);b("rulerLines",c.lineNumber,!1);b("rulerLines.even",c.lineNumberEven,!1);b("rulerLines.odd",c.lineNumberOdd,!1);b("annotationLine.currentLine",c.currentLine,!0);b("entity-name-tag",c.keyword,!1);b("entity-other-attribute-name",c.attribute,!1);b("string-quoted",c.string,!1);b("line_caret",c.currentLine,!0);b("token_keyword",c.keyword,!1);b("token_string",c.string,!1);b("token_singleline_comment",c.comment,
!1);b("token_multiline_comment",c.comment,!1);b("token_doc_comment",c.comment,!1);b("token_doc_html_markup",c.comment,!1);return a.join("\n")},_createStyle:function(d,c,b,a){var e=this._document,d="orion-theme-"+d,h=e.getElementById(d);if(h){if(a||h.firstChild.data===c)return;h.removeChild(h.firstChild);h.appendChild(e.createTextNode(c))}else a?(h=i.createElement(e,"link"),h.rel="stylesheet",h.type="text/css",h.href=c,h.addEventListener("load",function(){b()})):(h=i.createElement(e,"style"),h.appendChild(e.createTextNode(c))),
h.id=d,(e.getElementsByTagName("head")[0]||e.documentElement).appendChild(h);a||b()},_load:function(d,c,b){if(d)if(typeof c==="string")this._createStyle(d,c,b);else if(c=c.href,c.substring(c.length-4)!==".css"&&(c+=".css"),/^\//.test(c)||/[a-zA-Z0-9]+:\/\//i.test(c)||!f.toUrl)this._createStyle(d,c,b,!0);else{var a=this;f(["text!"+c],function(c){a._createStyle(d,c,b,!1)})}else b()}};k.EventTarget.addMixin(e.prototype);return{TextTheme:e}});
define("orion/widgets/themes/ThemeClass",[],function(){function f(f){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=f;this.classString="."+f+"{ "}f.prototype.className=null;f.prototype.classString=void 0;f.prototype.style=void 0;f.prototype.closeString=" }\n";f.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:f}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(f){function k(){}k.prototype.navbar="#333";k.prototype.button="#777777";k.prototype.location="#EFEFEF";k.prototype.selection="FEC";k.prototype.sidepanel="#FBFBFB";k.prototype.mainpanel="white";k.prototype.navtext="#bfbfbf";k.prototype.content="#3087B3";k.prototype.search="#444";k.prototype.toolpanel="white";k.prototype.writeNavigationStyle=function(){var i="",e=[],d=new f.ThemeClass("orionPage");
d.style.backgroundColor="#fdfdfd";d.style.width="100%";d.style.height="100%";e.push(d);d=new f.ThemeClass("topRowBanner");d.style.margin="0";d.style.border="0";d.style.backgroundColor=this.navbar;d.style.height="16px";d.style.padding="10px";d.style.paddingLeft="6px";d.style.paddingRight="2px";e.push(d);d=new f.ThemeClass("a");d.style.textDecoration="none";d.style.color=this.content;e.push(d);d=new f.ThemeClass("navlink");d.style.display="inline-block";d.style.padding="2px";d.style.color=this.content;
e.push(d);d=new f.ThemeClass("primaryNav");d.style.color=this.navtext;d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.paddingTop="0";d.style.verticalAlign="baseline";e.push(d);d=new f.ThemeClass("primaryNav a");d.style.fontSize="8pt";d.style.color=this.navtext;d.style.marginRight="6px";d.style.marginLeft="6px";d.style.verticalAlign="baseline";d.style.textDecoration="none";e.push(d);d=new f.ThemeClass("primaryNav a:hover");d.style.color="#bfbfbf";d.style.cursor="hand";d.style.color="white";
d.style.fontWeight="normal";e.push(d);for(var j in e)i+=e[j].toString();return i};k.prototype.writeLocationStyle=function(){var i="",e=[],d=new f.ThemeClass("titleArea");d.style.margin="0";d.style.paddingTop="5px";d.style.border="0";d.style.background=this.location;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+"), color-stop(100%,"+this.location+"))";d.style.borderBottom="1px solid "+this.location;d.style.minHeight="20px";e.push(d);d=new f.ThemeClass("breadcrumb");
d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color="#f1f1f2;";d.style.paddingTop="2px";e.push(d);d=new f.ThemeClass("a.breadcrumb:hover");d.style.textDecoration="none";d.style.borderBottom="1px dotted";d.style.color="#F58B0F";d.style.cursor="pointer";e.push(d);d=new f.ThemeClass("breadcrumbSeparator");d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color="#f1f1f2";d.style.fontWeight="bold";e.push(d);d=new f.ThemeClass("currentLocation");d.style.fontWeight="bold";d.style.fontSize=
"8pt";d.style.color="#f1f1f2";d.style.textDecoration="none";d.style.textWrap="normal";d.style.lineHeight="10pt";e.push(d);d=new f.ThemeClass("a.currentLocation:hover");d.style.fontWeight="bold";d.style.fontSize="10pt";d.style.color="#666666";d.style.textDecoration="none";d.style.borderBottom="0";e.push(d);d=new f.ThemeClass("navlinkonpage");d.style.color=this.content;e.push(d);d=new f.ThemeClass("progressPane_running");d.style.background="url(../images/progress_running_dark.gif) no-repeat center";
d.style.width="16px";d.style.height="16px";e.push(d);for(var j in e)i+=e[j].toString();return i};k.prototype.writeButtonStyle=function(){var i="",e=[],d=new f.ThemeClass("commandButton");d.style.color="#666";d.style.border="1px solid #dedede";d.style.backgroundColor="#ddd";d.style.textAlign="center";d.style.verticalAlign="baseline";d.style.cursor="pointer";d.style.display="inline-block";d.style.padding="4px 6px";d.style.borderRadius="3px";d.style.lineHeight="12px";d.style.fontSize="8pt";d.style.userSelect=
"none";e.push(d);d=new f.ThemeClass("commandButton:over");d.style.backgroundColor="#e6e6e6";d.style.border="1px solid #808080";e.push(d);d=new f.ThemeClass("commandMenu");d.style.color="#222";d.style.display="inline-block";d.style.verticalAlign="baseline";d.style.margin="0";d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.border="1px solid #dedede";d.style.backgroundColor="#efefef";d.style.cursor="pointer";d.style.borderRadius="1px";e.push(d);d=new f.ThemeClass("commandMenuItem");d.style.border=
"0";d.style.padding="0";d.style.margin="0";e.push(d);for(var j in e)i+=e[j].toString();return i};k.prototype.writeMainStyle=function(){var i="",e=[],d=new f.ThemeClass("searchbox");d.style.backgroundImage="url(../images/core_sprites.png)";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="4px -297px";d.style.width="12px";d.style.height="12px";d.style.backgroundColor=this.search;d.style.border="1px solid "+this.search;d.style.fontSize="11px";d.style.width="15em";d.style.height="16px";
d.style.borderRadius="10px";d.style.color="#999";d.style.padding="0";d.style.paddingLeft="20px";d.style.marginLeft="5px";d.style.marginTop="6px !important";d.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";e.push(d);d=new f.ThemeClass("searchbox:focus");d.style.color="white";d.style.outline="none";e.push(d);d=new f.ThemeClass("checkedRow");d.style.cssText="background-color:"+this.selection+" !important;";e.push(d);d=new f.ThemeClass("navbar-item-selected");
d.style.background=this.selection;d.style.color=this.content;e.push(d);d=new f.ThemeClass("auxpane");d.style.border="0";d.style.background=this.sidepanel;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";d.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";e.push(d);d=new f.ThemeClass("mainpane");d.style.background=this.mainpanel;d.style.border=0;e.push(d);d=new f.ThemeClass("mainToolbar");
d.style.background=this.toolpanel;d.style.height="32px";d.style.borderBottom="1px solid #ebebeb";d.style.paddingTop="3px";e.push(d);for(var j in e)i+=e[j].toString();return i};k.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};k.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.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);return this.writeNavigationStyle()+this.writeLocationStyle()+
this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:k}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(f,k,i){function e(){}function d(){this.styles=[];var c=new e;c.name="Orion";c.navbar="#404648";c.button="#EFEFEF";c.location="#efefef";c.selection="FEC";c.sidepanel="#FBFBFB";c.mainpanel="white";c.toolpanel="white";c.navtext="#bfbfbf";c.content="#3087B3";c.search="#444";c.breadcrumb="#3087B3";c.separator="#333";this.styles.push(c);
c=new e;c.name="Green Zone";c.navbar="seagreen";c.button="lavender";c.location="darkseagreen";c.selection="moccasin";c.sidepanel="aliceblue";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="darkgreen";c.search="darkgreen";c.breadcrumb="#3087B3";c.separator="seagreen";this.styles.push(c);c=new e;c.name="Pretty In Pink";c.navbar="plum";c.button="lavender";c.location="pink";c.selection="lavender";c.sidepanel="seashell";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";
c.content="mediumorchid";c.search="violet";c.breadcrumb="#3087B3";c.separator="plum";this.styles.push(c);c=new e;c.name="Blue Monday";c.navbar="cornflowerblue";c.button="lavender";c.location="skyblue";c.selection="lavender";c.sidepanel="aliceblue";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="royalblue";c.search="royalblue";c.breadcrumb="#3087B3";c.separator="cornflowerblue";this.styles.push(c);c=new e;c.name="Vanilla Skies";c.navbar="sandybrown";c.button="lemmonchiffon";
c.location="cornsilk";c.selection="lemonchiffon";c.sidepanel="white";c.mainpanel="white";c.toolpanel="white";c.navtext="lemonchiffon";c.content="chocolate";c.search="moccasin";c.breadcrumb="#3087B3";c.separator="sandybrown";this.styles.push(c);c=new e;c.name="Beetlejuice";c.navbar="indigo";c.button="slateblue";c.location="darkslateblue";c.selection="silver";c.sidepanel="lavender";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="mediumslateblue";c.search="#444";c.breadcrumb="#3087B3";
c.separator="indigo";this.styles.push(c);c=new e;c.name="Red";c.navbar="#CD2127";c.button="#777777";c.location="#D85F56";c.selection="lightcoral";c.sidepanel="#EFDAB2";c.mainpanel="#FDFADD";c.toolpanel="#FDFADD";c.navtext="#FBFBFB";c.content="darkred";c.search="#D85F56";c.breadcrumb="darkred";c.separator="#CD2127";this.styles.push(c)}function j(){return this.styles}e.prototype.name="Orion";e.prototype.navbar="#404648";e.prototype.button="#EFEFEF";e.prototype.location="#333";e.prototype.breadcrumb=
"#3087B3";e.prototype.separator="#333";e.prototype.selection="FEC";e.prototype.sidepanel="#FBFBFB";e.prototype.mainpanel="white";e.prototype.toolpanel="white";e.prototype.navtext="#bfbfbf";e.prototype.content="#3087B3";e.prototype.search="#444";d.prototype.styles=[];d.prototype.getStyles=j;d.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};d.prototype.getViewData=function(){var c={top:10,left:10,width:350,height:350};
c.shapes=[{type:"RECTANGLE",name:f["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:f["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:f["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:f["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:f["Selection Bar"],
x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:f.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:f["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:f.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:f.Content,label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",
order:9},{type:"TEXT",name:f.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:f["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:f.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:f["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:f["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:f["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:f["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:f["Line Color"],x1:20,y1:100,x2:140,
y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:f["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:f["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 b=0;b<3;b++)c.shapes.push({type:"TEXT",name:f.Content,label:"org.eclipse.orion.content",x:170,y:127+20*b,fill:"#3087B3",family:"content"});for(b=0;b<3;b++)c.shapes.push({type:"TEXT",name:f.Content,label:"Item",x:25,y:115+20*b,fill:"#3087B3",family:"content"});for(b=0;b<3;b++)c.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+b*20,x2:165,y2:124+b*20,x3:160,y3:127+b*20,family:"navbar",fill:"#333"});c.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return c};d.prototype.processSettings=function(c){var b=new i.ThemeSheetWriter;(new k.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",b.getSheet(c))};return{ThemeData:d,getStyles:j}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",
test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:","Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination",
"Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'.","Main Pages":"Main Pages","Related Links":"Related Links"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(f){function k(i,e,d){this.elements=d;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);e===!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),f.addAutoDismiss([this.container],this.destroy.bind(this))):i.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}k.prototype.elementNode=null;k.prototype.switchesContainer=null;k.prototype.switches=null;k.prototype.radioButtons=null;k.prototype.chosenSwitch=null;k.prototype.addElement=
function(f){var e=document.createElement("span");e.className="UAContainer-icon";e.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>";e.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;document.getElementById(f.label+"LabelNode").className="UALabel-live";e.className="UAContainer-icon-live"};
e.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";e.className="UAContainer-icon"};var d=this;e.onclick=function(){d.showMedia(f)};this.elementNode.appendChild(e)};k.prototype.clearElements=function(){this.elementNode.innerHTML=""};k.prototype.showMedia=function(f){this.clearElements();this.addElement(f);var e=document.createElement("span");e.className="UAContainer-media";e.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
f.media+'" alt="'+f.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(e);setTimeout(function(){e.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};k.prototype.createSwitch=function(f){var e;e=f?f.label+"switch":"indexSwitch";var d=document.createElement("span");d.className="workingSpan";d.innerHTML='<div class="circle" id ="'+e+'"></div>';var j=this;d.onclick=
f?function(){j.showMedia(f)}:function(){j.initialize();j.chosenSwitch.firstChild.className="circle";j.chosenSwitch=d;j.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(d);return this.radioButtons[this.radioButtons.length]=d};k.prototype.initialize=function(){this.clearElements();this.elements.forEach(this.addElement.bind(this))};k.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return k});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(f,k,i,e){function d(){}d.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 d=document.body;this.$frameParent=d;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(d);c=c.createContextualFragment(this.CONTAINERTEMPLATE);d.appendChild(c);this.$frame=d.lastChild;this.title&&i.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=i.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=i.$(".dialogContent",this.$frame);
c=document.createRange();c.selectNode(this.$parent);d=c.createContextualFragment(this.TEMPLATE);this.messages&&i.processTextNodes(d,this.messages);this.$parent.appendChild(d);this.$buttonContainer=i.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===i.KEY.ESCAPE?b.hide():a.keyCode===i.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 d=this;this.buttons.forEach(function(c){var b=e.createButton(c.text,c.callback);if(c.id)b.id=c.id,d["$"+b.id]=b;if(c.isDefault)d._defaultCallback=c.callback,d._defaultButton=b;d.$buttonContainer.appendChild(b)})}},_makeModal:function(){var d=this;this.$frame.addEventListener("blur",function(a){d.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var b=!i.contains(d.$frame,
a.target);if(b)for(var c=0;c<d.$$modalExclusions.length;c++)if(i.contains(d.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(d.$lastFocusedElement||d.$parent).focus()},0),i.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var a=0;a<c.length;a++){for(var e=0;e<this.$$modalExclusions.length;e++)if(i.contains(this.$$modalExclusions[e],
c[a])){b=!0;break}!b&&c[a]!==d.$frame&&c[a].classList&&!c[a].classList.contains("tooltipContainer")&&(e=c[a],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(c=i.lastTabbable(this.$buttonContainer)||i.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===i.KEY.TAB){var b=d._getFirstFocusField();b&&b!==a.target&&b.focus();i.stop(a)}},!1)},_addChildDialog:function(d){this.$$modalExclusions.push(d.$frame||d.$parent)},
_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding==="function"&&this._afterHiding();var d=this;this.keepAlive||
window.setTimeout(function(){d.destroy()},0)},show:function(d){typeof this._beforeShowing==="function"&&this._beforeShowing();var c=i.bounds(this.$frame),b=i.bounds(document.documentElement),a;d?(a=i.bounds(d),d=a.top+a.height+4,a=a.left+4,d+c.height>b.height&&(d=Math.max(0,b.height-c.height-4)),a+c.width>b.width&&(a=Math.max(0,b.width-c.width-4))):(a=Math.max(0,(b.width-c.width)/2),d=Math.max(0,(b.height-c.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=d+"px";this.$frame.style.left=
a+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return i.firstTabbable(this.$parent)||this._defaultButton||i.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(d){d.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}};d.prototype.constructor=d;return{Dialog:d}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,orion/webui/littlelib,orion/PageLinks,orion/widgets/userAssistance/UATaskPanel,orion/webui/dialog".split(","),function(f,k,i,e,d){function j(c){this._displaySignOut=!0;this._init(c)}j.prototype={_init:function(c){this._dropdownNode=i.node(c.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=c.dropdown;this._serviceRegistry=c.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=c.noSeparator;this._dropDownItemClass=c.dropDownItemClass;this._keyAssistClass=c.keyAssistClass;if(c.signOut!==void 0)this._displaySignOut=c.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(c){var b=0,a;for(a in c)c.hasOwnProperty(a)&&b++;return b},_makeMenuItem:function(c,
b){var a=document.createElement("span");a.role="menuitem";a.tabIndex=0;var d=document.createTextNode(c);a.appendChild(d);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&a.classList.add(this._dropDownItemClass):a.classList.add("dropdownMenuItem");a.addEventListener("click",b,!1);a.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&b()},!1);return a},_renderAuthenticatedService:function(c){var b=this,a=this.authenticatedServices[c].authService;
if(a&&a.logout&&this._displaySignOut){var d=document.createElement("li"),e=this._makeMenuItem(f["Sign Out"],function(){a.logout().then(function(){b.addUserItem(c,a,b.authenticatedServices[c].label);localStorage.removeItem(c);localStorage.removeItem("lastLogin");for(var d=localStorage.length-1;d>=0;d--){var e=localStorage.key(d);e&&e.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(e)}a.getAuthForm(window.location.href).then(function(a){window.location=a})})});d.appendChild(e);this._dropdownNode.appendChild(d)}},
renderServices:function(){function c(c){a[c]||(a[c]=b.createDocumentFragment());return a[c]}var b=document,a=[],d=this._serviceRegistry;e.getPageLinksInfo(d,"orion.page.link.user").then(function(e){this._dropdown?this._dropdown.empty():this._dropdownNode&&i.empty(this._dropdownNode);e.forEach(function(a){var d=c(typeof a.category==="number"?a.category:1),g=b.createElement("li"),e=b.createElement("a");e.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&e.classList.add(this._dropDownItemClass):
e.classList.add("dropdownMenuItem");e.href=a.href;e.textContent=a.textContent;g.appendChild(e);d.appendChild(g);e.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&e.click()},!1)}.bind(this));if(this.keyAssistFunction){var e=document.createElement("li"),g=this._makeMenuItem(f["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&g.classList.add(this._keyAssistClass):g.classList.add("key-assist-menuitem");
e.appendChild(g);c(0).appendChild(e)}if(e=d.getServiceReferences("orion.page.getstarted")[0])g=e.getProperty("data"),e=document.createElement("li"),g=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,g)),e.appendChild(g),c(0).appendChild(e);var m=this;a.sort(function(a,b){return a-b}).forEach(function(b,c){if(c<a.length-1&&!this._noSeparator){var d=document.createElement("li");d.classList.add("dropdownSeparator");var g=document.createElement("span");g.classList.add("dropdownSeparator");
d.appendChild(g);b.appendChild(d)}m._dropdownNode.appendChild(b)}.bind(this));if(this.isSingleService())for(var j in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(j)&&this._renderAuthenticatedService(j,0)}.bind(this))},getStartedDialog:function(c){new d(null,!0,c)},setKeyAssist:function(c){this.keyAssistFunction=c;this.renderServices()},addUserItem:function(c,b,a,d){d?(this.unauthenticatedServices[c]&&delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:b,
label:a,data:d}):(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?{authService:b,label:a,pending:this.unauthenticatedServices[c].pending}:{authService:b,label:a});this.renderServices()}};j.prototype.constructor=j;return{UserMenu:j}});
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(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(f,k,i,e,d,j){function c(a,b,c){var d="";c&&(d="^");if(d=i.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var b={ALL_FILE_TYPE:"*.*"};b.doSearch=function(a,c,d,g){if(a){var e=!0;d==="*"&&(d="");d===""&&(e=g&&g.type!==b.ALL_FILE_TYPE);if(e){d!==""&&b.addRecentSearch(c,
d,g?g.regEx:!1);var a=a.createSearchParams(d,!1,!1,g),i=b.generateSearchHref(a);b.getOpenSearchPref(c,function(a){a?window.open(i):window.location=i})}}else window.alert(f["Can't search: no search service is available"])};b.generateSearchHelper=function(a,d){var e=a.keyword,g=e,m={};a.fileType&&a.fileType!==b.ALL_FILE_TYPE&&e===""&&(g="*."+a.fileType);if(a.regEx)m.searchStr=e,c(m,a,d);else{var f=e.indexOf("*")>-1,i=e.indexOf("?")>-1;f&&(e=e.split("*").join(".*"));i&&(e=e.split("?").join("."));!f&&
!i&&!a.nameSearch?(m.searchStr=a.caseSensitive?e.split("\\").join(""):e.split("\\").join("").toLowerCase(),m.wildCard=!1):(m.searchStr=a.caseSensitive?e:e.toLowerCase(),c(m,a,d),m.wildCard=!0)}m.searchStrLength=m.searchStr.length;return{params:a,inFileQuery:m,displayedSearchTerm:g}};b.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows,10);if(a.start!==void 0)a.start=parseInt(a.start,10);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive===
"string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};b.copySearchParams=function(a,b){var c={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(b||d!=="replace"))c[d]=a[d];return c};b.generateSearchHref=function(a){var c=k.toUrl("search/search.html"),a=b.copySearchParams(a,!0),d=a.resource;a.resource=void 0;return typeof a.keyword!=="undefined"?(new j(c+"#{,resource,params*}")).expand({resource:d,params:a}):
(new j(c+"#{,resource}")).expand({resource:d})};b.generateFindURLBinding=function(a,b,c,d,e){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof d==="string"?d:void 0,atLine:typeof c==="number"?c:void 0};return e?a:","+(new j("{,params*}")).expand({params:a})};b.convertFindURLBinding=function(a){if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()===
"true";if(typeof a.atLine==="string")a.atLine=parseInt(a.atLine,10)};b.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};b.replaceStringLiteral=function(a,c,d){c=i.parse("/"+c+"/gim");return b.replaceRegEx(a,c,d)};b.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var e=!1,f=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{f.push({startIndex:d,length:a.searchStrLength});e=!0;if(c)break;d+=a.searchStrLength}return e?f:null};b.findRegExp=function(a,b,c,d){if(!b)return null;
c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(b,c).exec(a.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};b.searchOnelineRegEx=function(a,c,d){for(var g=0,e=!1,f=[];;)if(g=b.findRegExp(c,a.regExp.pattern,a.regExp.flags,g)){f.push(g);e=!0;if(d)break;g=g.startIndex+g.length}else break;return e?f:null};b.generateNewContents=function(a,c,d,g,e,f){if(g&&c){if(!a)d.contents=[];for(var i=0;i<c.length;i++){for(var j=c[i],k=!1,s=!1,p=[],y,u=0,r=
0;r<g.children.length;r++)if(g.children[r].lineNumber-1===i){u=r;for(k=0;k<g.children[r].matches.length;k++)g.children[r+k].checked!==!1&&p.push(k);s=p.length>0;y=g.children[r].matches;k=!0;break}if(k){if(s){p=b.replaceCheckedMatches(j,e,y,p,f);j=p.replacedStr;for(k=0;k<g.children[u].matches.length;k++)g.children[u+k].newMatches=p.newMatches}else for(k=0;k<g.children[u].matches.length;k++)g.children[u+k].newMatches=g.children[u+k].matches;a?d.contents[i]=j:d.contents.push(j)}else a||d.contents.push(j)}}};
b.generateMatchContext=function(a,b,c){var d=[],e=a*2+1,f;b.length<=e?(f=0,a=b.length-1):(f=c-a,f<0?(f=0,a=f+e-1):(a=c+a,a>b.length-1&&(a=b.length-1,f=a-e+1)));for(e=f;e<=a;e++)d.push({context:b[e],current:e===c});return d};b.splitFile=function(a){for(var b=0,c=0,d=0,e=0,f=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){f.push(a.substring(e));break}var i=1;b!==-1&&c!==-1?b+1===c?(i=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;f.push(a.substring(e,d-i));
e=d}return f};b.searchWithinFile=function(a,c,d,g,e,f){d=b.splitFile(d);if(e)c.contents=d;if(c){c.children=[];for(var i=g=0;i<d.length;i++){var j=d[i];if(j&&j.length>0){var k=f?j:j.toLowerCase();if(k=a.wildCard?b.searchOnelineRegEx(a,k):b.searchOnelineLiteral(a,k)){var s,p=i+1;if(e)for(var y=0;y<k.length;y++)s=y+1,s={parent:c,checked:c.checked,type:"detail",matches:k,lineNumber:p,matchNumber:s,name:j,location:c.location+"-"+p+"-"+s},c.children.push(s);else s={parent:c,context:b.generateMatchContext(2,
d,i),checked:c.checked,type:"detail",matches:k,lineNumber:p,name:j,location:c.location+"-"+p},c.children.push(s);g+=k.length}}}c.totalMatches=g}};b.replaceCheckedMatches=function(a,b,c,d,e){for(var f=0,i="",j=[],k=0;k<c.length;k++){f!==c[k].startIndex&&(i+=a.substring(f,c[k].startIndex));if(c[k].length)e=c[k].length;for(var f=!1,s=0;s<d.length;s++)if(d[s]===k){f=!0;break}f?(j.push({startIndex:i.length,length:b.length}),i+=b):(j.push({startIndex:i.length,length:e}),i+=a.substring(c[k].startIndex,c[k].startIndex+
e));f=c[k].startIndex+e}f<a.length&&(i+=a.substring(f));return{replacedStr:i,newMatches:j}};b.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};b.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};b._storeRecentSearch=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);c&&window.setTimeout(function(){c.dispatchEvent({type:"recentSearchesChanged"})}.bind(this),
20)})};b.addRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(g){var e,g=g.get("recentSearch");typeof g==="string"&&(g=JSON.parse(g));if(g){for(e in g)if(g[e].name===c)return;g.length>=20&&g.splice(19,g.length-20+1)}else g=[];g.splice(0,0,{name:c,regEx:d});b._storeRecentSearch(a,g)})};b.removeRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(g){var e,
g=g.get("recentSearch");typeof g==="string"&&(g=JSON.parse(g));if(g)for(e in g)if(g[e].name===c){g.splice(e,1);b._storeRecentSearch(a,g,d);break}})};b.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};b.getMixedSearches=function(a,c,d,g){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var e=a.get("recentSearch");typeof e===
"string"&&(e=JSON.parse(e));c&&(a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var c=b.parseQueryStr(a.query);e.some(function(a){return c.searchStrTitle===a.name})||e.push({name:c.searchStrTitle,label:a.name})}else e.push({name:null,label:a.name,value:a.query})}));e&&g&&g(e)})};b.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!=="undefined"?
a["links.newtab"]?!0:!1:!1)})};b.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return b});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(f,k,i,e,d,j){function c(b,a,c,d){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=d&&d.searchOnName;this._buildSkeletonOnly=d&&d.buildSkeletonOnly;this._fetchChildrenCallBack=d&&d.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:e.generateSearchHelper(c);this._location=d&&d.location;this._childrenLocation=d&&d.childrenLocation?d.childrenLocation:this._location;this._cancelled=!1;this.registry.getService("orion.page.message").setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}c.prototype.search=function(b){var a=this.registry.getService("orion.core.contentTypeRegistry");this._onSearchComplete=b;this._cancelled=!1;this._deferredArray=[];a.getContentTypes().then(function(a){this.contentTypesCache=
a;this._visitRecursively(this._childrenLocation).then(function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}})}.bind(this))}.bind(this))};c.prototype.searchName=function(b,a){if(b)this.searchHelper=e.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var c=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var d=0;d<this.fileSkeleton.length;d++){var g=
this.fileSkeleton[d].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,g,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,g,!0))if(c.push(this.fileSkeleton[d]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,docs:c}})}};c.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=
[];var d=this;b();c.getContentTypes().then(function(b){d.contentTypesCache=b;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};c.prototype._searchCompleted=function(){console.log("Search Completed.")};c.prototype._searchFiles=function(){var b=[];if(this.fileLocations.length>0)for(var a=0;a<this.fileLocations.length;a++)b.push(this._sniffSearch(this.fileLocations[a]));return j.all(b)};c.prototype._sort=function(b){b.sort(function(a,
b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};c.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===e.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};c.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var e=c.registry.getService("orion.page.progress");return(e?e.progress(c.fileClient.fetchChildren(b),
"Crawling search for children of "+b):c.fileClient.fetchChildren(b)).then(function(b){for(var e=0;e<b.length;e++)if(b[e].Directory!==void 0&&b[e].Directory===!1)if(c._searchOnName)a.push(c._buildSingleSkeleton(b[e]));else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[e]));else{if(!c._cancelled){var h=d.getFilenameContentType(b[e].Name,c.contentTypesCache);if(h&&(h["extends"]==="text/plain"||h.id==="text/plain")&&c._onFileType(h))h=c._sniffSearch(b[e]),a.push(h),c._deferredArray.push(h)}}else if(b[e].Location)if(c._cancelled)break;
else h=c._visitRecursively(b[e].ChildrenLocation),a.push(h),c._deferredArray.push(h);return j.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,b,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};c.prototype._reportSingleHit=function(b){b.LastModified=b.LocalTimeStamp;this.fileLocations.push(b);this._hitCounter++;this._sort(this.fileLocations);
this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};c.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(b){b.cancel()});this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}});console.log("Crawling search cancelled. Deferred array length : "+this._deferredArray.length);this.registry.getService("orion.page.message").setProgressResult({Message:f["Search cancelled by user"],
Severity:"Warning"})};c.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(b),this.registry.getService("orion.page.message").setProgressResult({Message:i.formatMessage(f["${0} files found out of ${1}"],this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(a.fileClient.read(b.Location),"Reading file "+b.Location).then(function(c){a._hitOnceWithinFile(c)&&
a._reportSingleHit(b);a.registry.getService("orion.page.message").setProgressResult({Message:i.formatMessage(f["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)},f.Cancel)},function(a){a&&a.message&&a.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+a.message)})};c.prototype._buildSingleSkeleton=function(b){this._totalCounter++;this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new j;b.resolve(this._totalCounter);
return b};c.prototype.constructor=c;return{SearchCrawler:c}});
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(f,k,i,e,d,j,c){function b(a){this._init(a)}b.prototype=new c.Dialog;b.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="'+e.toUrl("../../../images/progress_running.gif")+
'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';b.prototype._init=function(a){this.title=a.title||f["Find File Named"];this.modal=!0;this.messages=f;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new i.ContentTypeRegistry(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");
this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(f["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(f["Missing required argument: searchRenderer"]);this._initialize()};b.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",f.Search);this.$fileName.addEventListener("input",function(){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===d.KEY.ENTER){var c=d.$("a",b.$results);
c&&(d.stop(a),window.open(c.href),b.hide())}},!1);a.addEventListener("keydown",function(a){var c,e,f;if(a.keyCode===d.KEY.DOWN||a.keyCode===d.KEY.UP)c=d.$$array("a",b.$results),e=document.activeElement,f=c.indexOf(e),a.keyCode===d.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=b.$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")),d.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new k.SearchCrawler(b._searcher.registry,b._fileService,
"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(f["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),this.$fileNameMessage.appendChild(document.createTextNode(this._message)));if(this._initialText)this.$fileName.value=
this._initialText,this.doSearch()};b.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};b.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._searcher.createSearchParams(a,this._nameSearch,this._searchOnRoot),c=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));
this.currentSearch=c;var e=document.createElement("div");e.appendChild(document.createTextNode(this._nameSearch?f["Searching..."]:j.formatMessage(f["Searching for occurrences of"],a)));d.empty(this.$results);this.$results.appendChild(e);this._searcher.search(b,!1,function(){c===this.currentSearch&&c.apply(null,arguments)}.bind(this))}};b.prototype.decorateResult=function(a){for(var b=this,a=d.$$array("a",a),c=0;c<a.length;c++){var e=a[c];e.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&
!a.metaKey&&b.hide()},!1);e.addEventListener("keyup",function(a){a.keyCode===d.KEY.ENTER&&b.hide()},!1)}};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype._afterHiding=function(){this._onHide&&this._onHide()};b.prototype.constructor=b;return{OpenResourceDialog:b}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\t\t<nav id="primaryNav" class="bannerLeftArea" role="navigation">\n\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\t\t<div class="bannerRightArea">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;">\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">\n\t\t\t\t\t<span class="dropdownArrowEmpty"></span>\n\t\t\t\t</span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\n\t<div class="logoFooter commandSprite core-sprite-orion-logo"></div>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<ul>\n\t\t\t<\!-- <li><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a></li --\>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=4.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\n\t</div>\n</footer>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility: hidden;"></div>\n<div class="layoutRight commandList pageActions" id="settingsActions"></div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(f,k){function i(e,d,f){if(e=k.node(e))this._parent=e;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;e=document.createElement("div");e.classList.add("dropDownContainer");e.id=this.navDropDownId;e.style.display="none";this._parent.appendChild(e);this._dropdownMenu=e;if(d=k.node(d))this._triggerNode=
d;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(c){c.keyCode===k.KEY.ESCAPE&&this.clearPanel()}.bind(this))}f.mixin(i.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){this._dropdownMenu.style.display="";this._positionDropdown();
this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=k.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this));if(this.options.onShow)this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){if(this.isVisible()&&(this._dropdownMenu.style.display="none",this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},addContent:function(e){this._dropdownMenu.innerHTML=
e},getContentNode:function(){return this._dropdownMenu},updateContent:function(e,d){d()},_positionDropdown:function(){this._dropdownMenu.style.left="";var e=k.bounds(this._dropdownMenu),d=k.bounds(this._boundingNode(this._parent));if(e.left+e.width>d.left+d.width)this._dropdownMenu.style.right=0},_boundingNode:function(e){return e.style.right!==""||e.style.position==="absolute"||!e.parentNode||!e.parentNode.style?e:this._boundingNode(e.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)k.empty(this._parent),this._parent=this.select=null}});return i});
define("orion/widgets/input/GroupedContent",["i18n!orion/widgets/nls/messages","orion/objects","orion/webui/littlelib"],function(f,k){function i(){}k.mixin(i.prototype,{templateString:'<div style="float:left;"><section><span style="color:#333;padding:15px;">'+f["Main Pages"]+'</span><nav><ul id="navigationlinks"></ul></nav></section></div><div class="groupedContentDivider"></div><div style="float:left;"><section><span style="color:#333;padding:15px;">'+f["Related Links"]+'</span><nav><ul id="relatedLinks"></ul></nav></section></div>',
getContentPane:function(){return this.templateString}});return i});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file",
"Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",
'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.",
"Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file","Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository",
"Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.","Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.",
"Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Go Into":"Go Into","Move into the selected folder":"Move into the selected folder","Import local file...":"Import local file...","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection",
"Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}","Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location",
"Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system",
"Create new content":"Create new content","Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.",
"Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(f,k,i){function e(c,b,a){if(!c[b])throw b+f[" is not supported in this file system"];return c[b].apply(c,a)}function d(c,b,a,l){if(!c.readBlob)throw f["source file service does not support binary read"];if(!a.writeBlob)throw f["target file service does not support binary write"];if(b[b.length-1]!=="/")return e(c,"readBlob",[b]).then(function(b){return e(a,"writeBlob",[l,b])});var h=l.substring(0,
l.length-1),g=decodeURIComponent(h.substring(h.lastIndexOf("/")+1)),h=h.substring(0,h.lastIndexOf("/")+1);return e(a,"createFolder",[h,g]).then(function(){},function(){}).then(function(){return e(c,"fetchChildren",[b]).then(function(b){for(var e=[],g=0;g<b.length;++g){var h=b[g].Location,f=h;b[g].Directory&&(f=h.substring(0,h.length-1));f=decodeURIComponent(f.substring(f.lastIndexOf("/")+1));f=l+encodeURIComponent(f);b[g].Directory&&(f+="/");e[g]=d(c,h,a,f)}return k.all(e)})})}function j(c,b){function a(a){var b=
new k;b.reject(f["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),e=d;if(b)for(var e=[],g=0;g<d.length;++g)b(d[g])&&e.push(d[g]);for(var m=[],j=[],q=[],o=[],t={fetchChildren:function(){var a=new k;a.resolve(o);return a},createWorkspace:function(){var a=new k;a.reject(f["no file service"]);return a},loadWorkspaces:function(){var a=new k;a.reject(f["no file service"]);return a},loadWorkspace:function(){var a=new k;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:f["File Servers"],Location:"/",Children:o,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},d=0;d<e.length;++d)o[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[d].getProperty("top"),ChildrenLocation:e[d].getProperty("top"),Name:e[d].getProperty("Name")},g=e[d].getProperty("pattern")||".*",g[0]!=="^"&&(g="^"+g),m[d]=RegExp(g),j[d]=c.getService(e[d]),q[d]=e[d].getProperty("Name"),
e[d].getProperty("NameKey")&&e[d].getProperty("nls")&&i.getMessageBundle(e[d].getProperty("nls")).then(function(a,b){o[a].Name=b[e[a].getProperty("NameKey")];q[a]=b[e[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return j[0]?0:-1;for(var b=0;b<m.length;++b)if(m[b].test(a))return b;throw f["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?t:j[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?t.Name:q[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?t.Location:o[a].Location}}j.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return e(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return e(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return e(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return e(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,d){return e(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return e(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return e(this._getService(c),"createFile",arguments)},deleteFile:function(c){return e(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,b,a){var l=this._getService(c),h=this._getService(b);if(l===h)return e(l,"moveFile",arguments);var g=c[c.length-1]==="/",f=b;f[f.length-1]!=="/"&&(f+="/");if(a)f+=encodeURIComponent(a);else{var i=c;g&&(i=i.substring(0,i.length-1));f+=i.substring(i.lastIndexOf("/")+1)}g&&f[f.length-1]!=="/"&&(f+="/");return d(l,c,h,f).then(function(){return e(l,"deleteFile",[c])})},copyFile:function(c,b,a){var f=this._getService(c),h=this._getService(b);if(f===h)return e(f,"copyFile",arguments);
var g=c[c.length-1]==="/",m=b;m[m.length-1]!=="/"&&(m+="/");if(a)m+=encodeURIComponent(a);else{var i=c;g&&(i=i.substring(0,i.length-1));m+=i.substring(i.lastIndexOf("/")+1)}g&&m[m.length-1]!=="/"&&(m+="/");return d(f,c,h,m)},read:function(c,b){return e(this._getService(c),"read",arguments)},write:function(c,b,a){return e(this._getService(c),"write",arguments)},remoteImport:function(c,b){return e(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return e(this._getService(c),
"remoteExport",arguments)},search:function(c){return e(this._getService(c.resource),"search",arguments)}};j.prototype.constructor=j;return{FileClient:j}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html,orion/widgets/input/DropDownMenu,orion/widgets/input/GroupedContent,orion/util,orion/customGlobalCommands,orion/fileClient".split(","),function(f,
k,i,e,d,j,c,b,a,l,h,g,m,n,q,o,t,s,p,y,u,r,z,v,F,J,G,w,C,x,A,B){function D(a,b){if(a.getLabel)return a.getLabel();else{var c=new u;c.resolve(b.properties.name);return c}}function E(a){g.node("progressPane").setAttribute("aria-label",f["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function R(a,b){var c=a.getServiceReferences("orion.core.auth");V=[];for(var d=L.createMenuGenerator.apply(this,arguments),e=0;e<c.length;e++){var g=
c[e],h=a.getService(g);D(h,g).then(function(a){h.getKey().then(function(b){V.push(b);h.getUser().then(function(c){d.addUserItem(b,h,a,c)},function(c,e){d.addUserItem(b,h,a,e)});window.addEventListener("storage",function(){T[b]!==localStorage.getItem(b)&&(T[b]=localStorage.getItem(b),h.getUser().then(function(c){d.addUserItem(b,h,a,c)},function(){d.addUserItem(b,h,a)}))},!1)})})}}function P(a){return a}function I(a,c,d,e,g){function h(a){if(a)if(!a.visibleWhen||a.visibleWhen(c)){var b=new j.CommandInvocation(c,
c,null,a,e);return(new u).resolve([a,b])}else if(typeof g==="function")return m||(m=g()),u.when(m,function(b){if(b&&c===U&&(!a.visibleWhen||a.visibleWhen(b)))return b=new j.CommandInvocation(b,b,null,a,e),[a,b]});return(new u).resolve()}var f=arguments,l,m,i=a&&a.getServiceReferences("orion.page.link.related");i&&i.length!==0&&u.when(function(){if(l)return l;var b=a.getService("orion.core.contentTypeRegistry");b||(b=new o.ContentTypeRegistry(a),b=a.getService("orion.core.contentTypeRegistry"));return b.getContentTypes().then(function(a){return l=
a})}(),function(){if(L.beforeGenerateRelatedLinks.apply(this,f)){for(var c=[],g=0;g<i.length;g++){var m={},k,n=i[g].getPropertyKeys();for(k=0;k<n.length;k++)m[n[k]]=i[g].getProperty(n[k]);if(m.id&&(k=k=null,d.indexOf(m.id)<0))if((m.nls&&m.nameKey||m.name)&&m.uriTemplate)k=b._createCommandOptions(m,i[g],a,l,!0),c.push(k);else if(k=e.findCommand(m.id))c.push((new u).resolve(k));else{var o=a.getServiceReferences("orion.navigate.command");for(k=0;k<o.length;k++)if(o[k].getProperty("id")===m.id){for(var m=
{},n=o[k].getPropertyKeys(),q=0;q<n.length;q++)m[n[q]]=o[k].getProperty(n[q]);k=b._createCommandOptions(m,o[k],a,l,!0);c.push(k);break}}}u.all(c,P).then(function(a){a=a.map(function(a){return a instanceof j.Command?a:new j.Command(a)}).sort(function(a,b){return a.name.localeCompare(b.name)});return u.all(a.map(h),P).then(function(a){a.forEach(function(a){a&&L.addRelatedLinkCommand(a[0],a[1])});L.afterGenerateRelatedLinks.apply(this,f)})})}})}function N(a){var b=g.node("globalActions");b&&(a.destroy(b),
a.renderCommands(b.id,b,{},{},"tool"))}function H(a){var b=window.getComputedStyle(a,null);return b===null?a:b.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:H(a.parentNode)}function Q(a){var b={},c=null;typeof a==="string"&&(a=g.node(a));a||(a=g.node("pageActions"));for(var d=a;d&&d.classList;){if(d.classList.contains("toolComposite")){c=d;break}d=d.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(c&&(b.slideContainer=g.$(".slideParameters",c),
b.parameterArea=g.$(".parameters",c),b.dismissArea=g.$(".parametersDismiss",c),b.notifications=g.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=g.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=g.bounds(b.toolbarTarget),d=g.bounds(H(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-d.top,b.toolbar=c;return b}function M(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(c=g.bounds(a.notifications),b+=c.height);
a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=g.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);b?(a.toolbarTarget.style.top=a.toolbarTargetY+b+"px",a.toolbar.style.paddingBottom=b+"px"):a.toolbarTarget.style.top=a.toolbar.style.paddingBottom=""}}var d=function(a){var b=document.createElement("a");b.href=a;return b.href}(k.toUrl("auth/NotifyAuthentication.html")),T={},L={createMenuGenerator:A.createMenuGenerator||function(a,b){if(g.node("userMenu")){var c=g.node("userDropdown"),
d=new n.Dropdown({dropdown:c}),c=new r.UserMenu({dropdownNode:c,dropdown:d,serviceRegistry:a}),d=g.node("userTrigger");new q.Tooltip({node:d,text:f.Options,position:["below","left"]});var d=document.getElementById("userTrigger"),e=d.className;e+=" imageSprite core-sprite-silhouette";d.className=e;c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:A.beforeGenerateRelatedLinks||function(){var a=g.node("relatedLinks");g.empty(a);return!0},addRelatedLinkCommand:A.addRelatedLinkCommand||function(a,
b){var c=g.node("relatedLinks");j.createCommandMenuItem(c,a,b).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:A.afterGenerateRelatedLinks||function(){},afterSetPageTarget:A.afterSetPageTarget||function(){},generateNavigationMenu:A.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new q.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new w("primaryNav","centralNavigation"),b=new C;a.addContent(b.getContentPane())},afterGenerateBanner:A.afterGenerateBanner||
function(){}},V=[],U,S=[],K,O=null;return{generateBanner:function(b,d,h,l,n,o,q,t){function s(){this.create();this._filterString=""}function u(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=g.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new p.ThemePreferences(l,new y.ThemeData)).apply();var r=g.node(b);if(!r)throw f["could not find banner parent, id was "]+
b;var w=document.createRange();w.selectNode(r);w=w.createContextualFragment(F);g.processTextNodes(w,f);r.firstChild?r.insertBefore(w,r.firstChild):r.appendChild(w);r=g.node("home");r.href=k.toUrl("edit/edit.html");r.setAttribute("aria-label",f["Orion Home"]);g.node("progressPane").src=k.toUrl("images/none.png");if(r=g.node("pageToolbar"))r.classList.add("toolbarLayout"),r.innerHTML=G+i.slideoutHTMLFragment("mainToolbar");(r=g.node("closeNotifications"))&&r.setAttribute("aria-label",f["Close notification"]);
if(x.isFirefox<=17&&(r=g.node("staticBanner")))r.style.width="100%",r.style.MozBoxSizing="border-box";if(r=g.node("footer"))r.innerHTML=J,g.processTextNodes(r,f);h.setParameterCollector(new c.CommandParameterCollector(Q,M));document.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&(a=d.getService("orion.page.message"))&&a.setProgressMessage("")},!1);L.generateNavigationMenu.apply(this,arguments);var C=g.node("navigationlinks");C&&z.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){var b=
document.createElement("li");b.appendChild(a);C.appendChild(b)})});if(r=g.$(".split")){var w=g.$(".sidePanelLayout"),A=g.$(".mainPanelLayout");if(w&&A)O={side:w,main:A},O.splitter=new m.Splitter({node:r,sidePanel:w,mainPanel:A,toggle:!0,closeByDefault:t}),r=new j.Command({name:f["Toggle side panel"],tooltip:f["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){O.splitter.toggleSidePanel()}}),h.addCommand(r),h.registerCommandContribution("pageActions","orion.toggleSidePane",
1,null,!0,new e.KeyBinding("o",!0)),q&&O.splitter.addResizeListener(function(a){q&&a===A&&q.resize()})}var B=!1,D=function(a,b,c){if(!B){var b=b.getService("orion.page.progress"),d=new v.OpenResourceDialog({searcher:a,progress:b,searchRenderer:a.defaultRenderer,onHide:function(){B=!1;c&&c.focus()}});window.setTimeout(function(){B=!0;d.show()},0)}},r=new j.Command({name:f["Find File Named..."],tooltip:f["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){D(n,
d,q)}});h.addCommand(r);h.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new e.KeyBinding("f",!0,!0));r=new j.Command({name:f["Toggle banner and footer"],tooltip:f["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=g.node("banner"),b=g.node("footer"),c=g.$(".content-fixedHeight");a.style.visibility==="hidden"?(a.style.visibility="visible",b.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized")):(a.style.visibility=
"hidden",b.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"));q&&q.resize();return!0}});h.addCommand(r);h.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.KeyBinding("m",!0,!0));r=new j.Command({name:f["System Configuration Details"],tooltip:f["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return k.toUrl("help/about.html")}});h.addCommand(r);h.registerCommandContribution("globalActions","orion.configDetailsPage",
100,null,!0,new e.KeyBinding(112,!0,!0));r=new j.Command({name:f["Background Operations"],tooltip:f["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return k.toUrl("operations/list.html")}});h.addCommand(r);h.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new e.KeyBinding("o",!0,!0));s.prototype={create:function(){var a=this._keyAssistDiv=document.createElement("div");a.id="keyAssist";a.style.display="none";a.classList.add("keyAssistFloat");
a.setAttribute("role","menu");var b=this._keyAssistInput=document.createElement("input");b.classList.add("keyAssistInput");b.type="text";b.placeholder=f["Filter bindings"];a.appendChild(b);var c=this._keyAssistContents=document.createElement("div");c.classList.add("keyAssistContents");if(x.isIOS||x.isAndroid)c.style.overflowY="auto";a.appendChild(c);var d=this._keyAssistTable=document.createElement("table");d.tabIndex=0;d.classList.add("keyAssistList");c.appendChild(d);document.body.appendChild(a);
b.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("input",function(){this.filterChanged()}.bind(this));c.addEventListener(x.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&this.hide()}.bind(this));g.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){g.empty(this._keyAssistTable);
this._selectedIndex=-1;this._selectedRow=null;this._idCount=this._keyAssistContents.scrollTop=0;if(q&&q.getTextView&&q.getTextView()){var b=q.getTextView(),c=b.getActions(!0).filter(function(a){return(a=b.getActionDescription(a))&&a.name});c.sort(function(a,c){return b.getActionDescription(a).name.localeCompare(b.getActionDescription(c).name)});this.createHeader(f.Editor);for(var d=function(a){return function(){b.focus();return b.invokeAction(a)}},e={},l,m=0;m<c.length;m++)for(var i=c[m],j=b.getActionDescription(i),
k=b.getKeyBindings(i),n=0;n<k.length;n++){l=k[n];var o=a.getUserKeyString(l);l.scopeName?(e[l.scopeName]||(e[l.scopeName]=[]),e[l.scopeName].push({bindingString:o,name:j.name,execute:d(i)})):this.createItem(o,j.name,d(i))}for(var t in e)if(e[t].length){this.createHeader(t);for(c=0;c<e[t].length;c++)l=e[t][c],this.createItem(l.bindingString,l.name,l.execute)}}this.createHeader(f.Global);h.showKeyBindings(this)},createItem:function(a,b,c){if(this._filterString){var d=this._filterString.toLowerCase(),
e;d!==this._filterString?(d=this._filterString,e=function(a){return a}):e=function(a){return a.toLowerCase()};if(e(b).indexOf(d)===-1&&e(a).indexOf(d)===-1&&e(this._lastHeader).indexOf(d)===-1)return}var g=this._keyAssistTable.insertRow(-1);g.id="keyAssist-keyBinding-"+this._idCount++;g.setAttribute("role","menuitem");g._execute=c;g.classList.add("keyAssistItem");g.addEventListener("click",function(a){this._selectedRow=g;this.execute();a.preventDefault()}.bind(this));c=g.insertCell(-1);c.classList.add("keyAssistName");
c.appendChild(document.createTextNode(b));c=g.insertCell(-1);c.classList.add("keyAssistAccel");c.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var b=this._keyAssistTable.insertRow(-1);b.classList.add("keyAssistSection");var b=b.insertCell(-1),c=document.createElement("h2");c.appendChild(document.createTextNode(a));b.appendChild(c)},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,b=this._keyAssistDiv,a=b===a||(b.compareDocumentPosition(a)&16)!==0;b.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();
this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},select:function(a){var b=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(b.length===0)this._selectedIndex=-1;else{var c=this._selectedIndex;c+=a?1:-1;c%=b.length;c<0&&(c=b.length-1);if(this._selectedIndex!==-1)a=b[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=c;if(this._selectedIndex!==-1){this._selectedRow=a=b[this._selectedIndex];
a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();var b=a.getBoundingClientRect(),d=this._keyAssistContents,e=d.getBoundingClientRect();a.offsetTop<d.scrollTop?c===0?d.scrollTop=0:a.scrollIntoView(!0):b.bottom>e.bottom&&a.scrollIntoView(!1)}}},show:function(){if(!this.isVisible())this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*
0.75)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),this._keyAssistInput.select()},_keyDown:function(a){if(a.keyCode===40)this.select(!0);else if(a.keyCode===38)this.select(!1);else if(a.keyCode===13)this.execute();else return;a.preventDefault()},_scrollWheel:function(a){var b=0,b=x.isIE||x.isOpera?-a.wheelDelta:x.isFirefox?a.detail*40:-a.wheelDeltaY,c=this._keyAssistContents,d=c.scrollTop;c.scrollTop+=b;if(d!==c.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var I=new s,H=new j.Command({name:f["Show Keys"],tooltip:f["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){I.isVisible()?I.hide():I.show();return!0}});h.addCommand(H);h.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new e.KeyBinding(191,!1,!0));r=function(){q.getTextView().setKeyBinding(new e.KeyBinding(191,!1,!0,!x.isMac,x.isMac),H.id);q.getTextView().setAction(H.id,H.callback,H)};q&&q.getTextView&&
(q.getTextView()?r():q.addEventListener("TextViewInstalled",r));N(h);R(d,H.callback);E(d);window.addEventListener("hashchange",function(){h.processURL(window.location.href)},!1);window.setTimeout(function(){u(d)},0);L.afterGenerateBanner.apply(this,arguments)},getToolbarElements:Q,getMainSplitter:function(){return O},layoutToolbarElements:M,setPageTarget:function(a){var b,c,d=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&
!a.breadcrumbTarget&&(c=d?d+" ":"",c+=a.fileService.fileServiceName(a.target.Location),d=null),b=a.name||a.target.Name,U=a.target,I(e,a.target,S,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),b=a.name,I(e,{NoTarget:""},S,a.commandService,a.makeAlternate));(K=a.title)||(K=b?b+" - "+a.task:a.task);window.document.title=K;L.afterSetPageTarget.apply(this,arguments);if(b=g.node("location")){g.empty(b);var l=e&&new B.FileClient(e),e=a.breadcrumbTarget||a.target,l=l&&e&&e.Location?
l.fileServiceRootURL(e.Location):null;new h.BreadCrumbs({container:b,resource:e,rootSegmentName:d,workspaceRootSegmentName:c,workspaceRootURL:l,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(K)K.charAt(0)==="*"&&!a&&(K=K.substring(1)),a&&K.charAt(0)!=="*"&&(K="*"+K),window.document.title=K;var b=g.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){S=a},notifyAuthenticationSite:d}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(f){return{detectValidURL:function(k){for(var i=/\[([^\]]*)\]\(([^\)]+)\)/g,e=i.exec(k),d=[],j=0;e;){if(e.length===3&&e[2].length>0){var c=new URL(e[2]);c.protocol!==":"&&f.validateURLScheme(c.href)&&(e.index>j&&d.push({segmentStr:k.substring(j,e.index)}),d.push({segmentStr:e[1].length>0?e[1]:e[2],urlStr:e[2]}),j=e.index+e[0].length)}e=i.exec(k)}if(j===0)return null;j<k.length-1&&d.push({segmentStr:k.substring(j)});return d},processURLSegments:function(f,
i){i.forEach(function(e){if(e.urlStr){var d=document.createElement("a");d.href=e.urlStr;d.appendChild(document.createTextNode(e.segmentStr))}else d=document.createElement("span"),d.textContent=e.segmentStr;f.appendChild(d)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(f,k,i,e){function d(c,b,a,d,e){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=e;this.domId=a;this.progressDomId=d||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var j;d.prototype={_init:function(){var c=k.node("closeNotifications");if(c&&
!this._hookedClose){c.style.cursor="pointer";this._hookedClose=!0;var b=k.node(this.notificationContainerDomId);k.addAutoDismiss([b],function(){this._clickToDisMiss&&this.close()}.bind(this));c.addEventListener("click",function(){this.close()}.bind(this));b.addEventListener("click",function(a){a&&a.target&&a.target.nodeName.toLowerCase()==="a"&&(a=k.$$("a",b))&&a.length&&a.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);this.setProgressMessage("");var c=k.node("closeNotifications");
if(this._cancelMsg&&this._cancelFunc&&c)c.innerHTML="",c.classList.remove("cancelButton"),c.classList.add("dismissButton"),c.classList.add("core-sprite-close"),c.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=i.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(c,b,a){this._init();this.currentMessage=c;var d=k.node(this.domId);if(typeof a==="boolean"){var e=
d.getAttribute("aria-live");d.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){c===this.currentMessage&&(k.empty(d),d.appendChild(document.createTextNode(c)),window.setTimeout(function(){d.setAttribute("aria-live",e)},100))}.bind(this),100)}else k.empty(d),d.appendChild(document.createTextNode(c));typeof b==="number"&&window.setTimeout(function(){c===this.currentMessage&&(k.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),b)},setErrorMessage:function(c){this._clickToDisMiss=
!0;this.currentMessage=c;this._init();var b=c.responseText||c.message||c;if(typeof b==="string")try{b=JSON.parse(b)}catch(a){}var c=b.Message||b,d="red";if(b.Severity)switch(b.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}b=document.createElement("span");b.style.color=d;b.appendChild(document.createTextNode(c));c=k.node(this.domId);k.empty(c);c.appendChild(b)},setProgressMessage:function(c){this._clickToDisMiss=!1;this._init();this.currentMessage=
c;var b=document.createElement("span");b.classList.add("imageSprite");b.classList.add("progressIcon");b.classList.add("core-sprite-progress");var a=k.node(this.progressDomId);k.empty(a);a.appendChild(b);a.appendChild(document.createTextNode(c));b=k.node(this.notificationContainerDomId);b.classList.remove("notificationHide");if(c&&c.length>0)b.classList.add("progressNormal"),b.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();
else b.classList.remove("notificationShow"),b.classList.add("notificationHide")},setCancelFunction:function(c){this._cancelFunc=c},setProgressResult:function(c,b){this._clickToDisMiss=!1;this._cancelMsg=b;this.currentMessage=c;var a=c.responseText||c;if(typeof a==="string")try{a=JSON.parse(a)}catch(d){}this._init();var h=a.Message||a.toString(),g=f.UnknownError,m="core-sprite-information",i="progressNormal",j=document.createElement("span");j.classList.add("imageSprite");j.classList.add("progressIcon");
var o=[];if(a.Severity)switch(a.Severity){case "Warning":g=f.UnknownWarning;m="core-sprite-warning";i="progressWarning";o.push("progressInfo");o.push("progressError");o.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":m="core-sprite-error";i="progressError";o.push("progressWarning");o.push("progressInfo");o.push("progressNormal");this._clickToDisMiss=!0;break;default:i="progressNormal",o.push("progressWarning"),o.push("progressError"),o.push("progressNormal")}o.push("notificationHide");
j.classList.add(m);var t=k.node(this.progressDomId),m=k.node(this.notificationContainerDomId);k.empty(t);t.appendChild(j);h===Object.prototype.toString()&&(h=g);if(a.HTML)a=document.createElement("span"),a.innerHTML=h,t.appendChild(a);else{if(g=e.detectValidURL(h))h=document.createDocumentFragment(),e.processURLSegments(h,g),Array.prototype.forEach.call(k.$$("a",h),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&a.Severity!=="Error"&&!b)this._timer&&window.clearTimeout(this._timer),
this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3);h=document.createTextNode(h)}t.appendChild(h)}if(i&&this.progressDomId!==this.domId){m.classList.add(i);for(i=0;i<o.length;i++)m.classList.remove(o[i])}m.classList.add("notificationShow");if((o=k.node("closeNotifications"))&&this._cancelMsg)o.classList.add("cancelButton"),o.classList.remove("dismissButton"),o.classList.remove("core-sprite-close"),o.classList.remove("imageSprite"),o.innerHTML=this._cancelMsg},
showWhile:function(c,b){var a=this;if(b){a.setProgressMessage(b);var d=function(){b===a.currentMessage&&a.setProgressMessage("")};c.then(d,d)}return c},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,b){return new j(this,++this._lastProgressId,c,b)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var c="",b=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(b||(c+=", "),c+=this._progressMonitors[a].status,b=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},
_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};d.prototype.constructor=d;j=function(c,b,a,d){this.statusService=c;this.progressId=
b;if(a){this.deferred=a;this.begin(d);var e=this;a.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}};j.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};j.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};j.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};j.prototype.constructor=j;return{StatusReportingService:d,ProgressMonitor:j}});
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(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(f,k,i,e){function d(){}d.prototype={_initialize:function(d,c,b,a,l){this._tooltip=new e.Tooltip({node:d,hideDelay:l||0,afterShowing:this._afterShowingFunction(c).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";d=document.createRange();d.selectNode(this.$parent);d=d.createContextualFragment(this.TEMPLATE);
this.messages&&i.processTextNodes(d,f);this.$parent.appendChild(d);var h=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===i.KEY.ESCAPE&&h.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(d){return function(){d&&d.bind(this)();if(!this.customFocus){var c=
i.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};d.prototype.constructor=d;return{PopupDialog:d}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(f,k,i,e){var d={};(function(){var j=!1;d.updateNavTools=function(c,b,a,d,e,g){var m=i.node(d);if(m)b.destroy(m);else throw f["could not find toolbar "]+d;b.renderCommands(d,m,g,a,"button");if(e&&(d=i.node(e)))b.destroy(d),b.renderCommands(e,d,null,a,"button");j||(j=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",function(c){var d=i.node(e);
d&&(b.destroy(d),b.renderCommands(e,d,c.selections,a,"button"))}))};d.createOperationsCommands=function(c,b,a){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var h=new e.Command({name:f["Remove Completed"],tooltip:f["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},visibleWhen:function(){return!0}});c.addCommand(h);
h=new e.Command({name:f.Remove,tooltip:f["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){for(var c=Array.isArray(c.items)?c.items:[c.items],d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!d(a);for(var b in a)if(d(a[b]))return!1;return!0}});c.addCommand(h);
h=new e.Command({name:f.Cancel,tooltip:f["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=0;b<a.length;b++){var c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});c.addCommand(h)}})();
return d});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(f,k,i,e,d){function j(c){this._options=c}j.prototype=new e.PopupDialog;j.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>';j.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;d.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};j.prototype._bindToDom=function(){this.$allOperationsLink.href=k.toUrl("operations/list.html");this._setOperationsVisibility()};j.prototype.setOperations=function(c,b){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};j.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};if(c.DetailedMessage&&c.DetailedMessage!==a.Message)a.DetailedMessage=c.DetailedMessage;return a};j.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};j.prototype._renderOperationsTable=function(c,b,a){i.empty(c);for(var d=0;d<b.length;d++){var e=b[d],g=document.createElement("tr"),m=document.createElement("td");m.style.paddingLeft="5px";m.style.paddingRight="5px";m.textContent=e.Name;g.appendChild(m);var j=document.createElement("div");m.appendChild(j);m=document.createElement("span");m.style.paddingRight="5px";m.classList.add("imageSprite");switch(e.type){case "Warning":m.classList.add("core-sprite-warning");m.setAttribute("aria-label",
f["Operation resulted in a warning."]);break;case "error":m.classList.add("core-sprite-error");m.setAttribute("aria-label",f["Operation resulted in an error."]);break;case "loadstart":case "progress":m.classList.add("core-sprite-start");m.setAttribute("aria-label",f["Operation is running."]);break;case "abort":m.classList.add("core-sprite-stop");m.setAttribute("aria-label",f["Operation is canceled."]);break;case "load":case "loadend":m.classList.add("core-sprite-ok"),m.setAttribute("aria-label","Operation ok.")}j.appendChild(m);
m=document.createElement("span");m.classList.add("operationStatus");m.textContent=e.Name;j.appendChild(m);if(e.error){var k=e.error.Message||e.error;e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(k+=": "+e.error.DetailedMessage);m.textContent=k;m.classList.remove("operationStatus");m.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",j,{operation:e,deferred:a[d]},this,"tool");c.appendChild(g)}this._setOperationsVisibility()};j.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"};j.prototype.constructor=j;return{OperationsDialog:j}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(f,k,i,e,d){function j(b,a){if(!this._progressPane){this._progressPane=e.node(b);this._operationsDialog=new d.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===e.KEY.ENTER)&&c._operationsDialog.show()})}}function c(b,a,c,d){this._serviceRegistry=
b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}j.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var c=
{},d;for(d in b)b[d].progressMonitor||(c[d]=b[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=f.Operations,this._progressPane.alt=f.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in c){var m=c[d];if(m.type&&(m.type==="loadstart"||m.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=f["Operations running"];this._progressPane.alt=f["Operations running"];
this._progressPane.setAttribute("aria-valuetext",f["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=f["Some operations finished with warning"];this._progressPane.alt=f["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",f["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=f["Some operations finished with error"];this._progressPane.alt=
f["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",f["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=f.Operations,this._progressPane.alt=f.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};
j.prototype.constructon=j;c.prototype={init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new j(b,this._commandRegistry)},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b);f.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(f){if(d._operations[e]){var i=d._operations[e];if(a)i.Name=a;if(c)i.progressMonitor=c;d._lastOperation=i;i.type=f.canceled?"abort":"error";i.error=f;d.writeOperation.bind(d)(e,i,b);i.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[b].progressMonitor)&&
a.done(),delete this._operations[b],delete this._operationDeferrds[b]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(b){this._serviceRegistry.getService("orion.page.message").setProgressResult(b)},showWhile:function(b,a){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var c=this;b.then(function(){c._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c.setProgressResult.bind(c)(a);
return a});return this.progress(b,a)},writeOperation:function(b,a,c){this._operations[b]=a;this._operationDeferrds[b]=c;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(f,k){function i(c,b,a){return c[b].apply(c,a)}function e(c){this._location=c}function d(){var c=new k;c.reject(f["No Matching OperationService for location:"]+this._location);return c}function j(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var d=c.getService(b[a]);this._services[a]=d;d=b[a].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[a]=RegExp(d)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];this._operations.remove(a);return new e(a)}}e.prototype={getOperation:d,getOperations:d,removeCompletedOperations:d,removeOperation:d,cancelOperation:d};e.prototype.constructor=e;j.prototype={getOperations:function(){var c=
new k;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return i(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new k;c[a]=e.promise;i(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),h=0;h<e.length;h++){var f=e[h];d.test(f)&&c.indexOf(f)<0&&b.remove(f)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return k.all(c)},removeOperation:function(c){var b=this;return i(this._getService(c),"removeOperation",arguments).then(function(){b.getOperations.bind(b)().then(function(a){a.remove(c)})},function(a){return a},function(a){return a})}};j.prototype.constructor=j;return{OperationsClient:j}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All","Search ${0}":"Search ${0}",
"Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results",
"Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.","Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",Save:"Save","Type a name for the search":"Type a name for the search",
"Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search","Open in Search page for this directory":"Open in Search page for this directory","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term","${0} matches":"${0} matches","Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.",
"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>."});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(f,k){var i={root:k};Object.keys(f).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=f[e])});return i});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(f,k){function i(e){this._init(e)}i.prototype={_init:function(e){var d=e.parent,i=this,d=k.node(d);if(!d)throw f["no parent"];if(!e.model)throw f["no tree model"];if(!e.renderer)throw f["no renderer"];this._parent=d;this._treeModel=e.model;this._renderer=e.renderer;this._showRoot=e.showRoot===void 0?!1:e.showRoot;this._indent=e.indent===void 0?16:e.indent;this._onCollapse=e.onCollapse;this._labelColumnIndex=
e.labelColumnIndex===void 0?0:e.labelColumnIndex;this._id=e.id===void 0?"treetable":e.id;this._tableStyle=e.tableStyle;this._tableElement=e.tableElement||"table";this._tableBodyElement=e.tableBodyElement||"tbody";this._tableRowElement=e.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(c){i._showRoot?(c._depth=0,i._generate([c],0)):i._treeModel.getChildren(c,function(b){i.destroyed||i._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(e,d){k.empty(this._parent);
var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var c=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(c);c.id=this._id;this._tableStyle&&c.classList.add(this._tableStyle);this._renderer.initTable(c,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";e.length===
0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(e,d);c.appendChild(this._bodyElement);f.appendChild(c);this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(e,d,f){for(var c=0;c<e.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(e[c]);this._renderer.rowCallback&&this._renderer.rowCallback(b);b._depth=d;b._item=e[c];this._renderer.render(e[c],b);b.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*d+"px";f?(this._bodyElement.insertBefore(b,f.nextSibling),f&&(f=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(e,d,i){var c=this._treeModel.getId(e),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(d,0),this._rowsChanged();else{var a=k.node(c);a?(a._item=e,a&&(i||a._expanded)?(this._removeChildRows(c),this._renderer.updateExpandVisuals(a,
!0),d?(a._expanded=!0,this._generateChildren(d,a._depth+1,a),this._rowsChanged()):(b=this,d=this._treeModel.getChildren(a._item,function(c){if(!b.destroyed&&!a._expanded)a._expanded=!0,b._generateChildren(c,a._depth+1,a),b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(f["could not find table row "]+c)}},getItem:function(e){var d=k.node(e);return d&&d._item?d._item:e},toggle:function(e){var d=k.node(e);d&&(d._expanded?(this.collapse(e),this._renderer.updateExpandVisuals(d,
!1)):(this.expand(e),this._renderer.updateExpandVisuals(d,!0)))},isExpanded:function(e){e=typeof e==="string"?e:this._treeModel.getId(e);return(e=k.node(e))?e._expanded:!1},expand:function(e,d,f){var e=typeof e==="string"?e:this._treeModel.getId(e),c=k.node(e);if(c&&!c._expanded){var b=this;this._renderer.updateExpandVisuals(c,!0);this._treeModel.getChildren(c._item,function(a){if(!b.destroyed){if(!c._expanded)c._expanded=!0,b._generateChildren(a,c._depth+1,c),b._rowsChanged();d&&d.apply(b,f)}})}},
_removeChildRows:function(e){for(var d=e===this._id,f=!1,c=-1,b=[],a=k.$$array(".treeTableRow",this._parent),l=0;l<a.length;l++){var h=a[l];if(f)break;if(d)h._depth>c?b.push(h):f=!0;else if(h.id===e)d=!0,c=h._depth}for(e=0;e<b.length;e++)d=b[e],d.parentNode.removeChild(d)},collapse:function(e){var e=typeof e==="string"?e:this._treeModel.getId(e),d=k.node(e);if(d){if(!d._expanded)return;d._expanded=!1;this._renderer.updateExpandVisuals(d,!1);this._removeChildRows(e);this._rowsChanged()}this._onCollapse&&
this._onCollapse(d._item)}};i.prototype.constructor=i;return{TableTree:i}});
define("orion/treeModelIterator",[],function(){var f={};f.TreeModelIterator=function(){function f(i,e){this.firstLevelChildren=i;this.reset();this._init(e)}f.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 e=this._getChildren(f),e=e&&e.length>0;this.isExpanded&&e&&(e=this.isExpanded(f));return e},_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 e=this._diveIn(this._cursor);
if(!e){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var d=this;return this.forceExpandFunc(this._cursor,"first",function(e){e&&d.setCursor(e)})}(e=this._findSibling(this._cursor,!0))&&this.setCursor(e)}return e},_backward:function(f){if(!this._cursor)return null;var e=this._findSibling(this._cursor,!1);e&&e!==this._cursor.parent&&(e=this._drillToLast(e));if(f&&e&&this._expandable(e)&&this.forceExpandFunc&&e!==this._cursor.parent){var d=this;return this.forceExpandFunc(e,"last",function(e){e&&
d.setCursor(e)})}e&&this.setCursor(e);return e},_findSibling:function(f,e){for(var d=this.topLevel(f),j=this._getChildren(f.parent),j=d?this.firstLevelChildren:j,c=0;c<j.length;c++)if(j[c]===f)return c===0&&!e?d?null:f.parent:c===j.length-1&&e?d?null:this._findSibling(f.parent,e):e?j[c+1]:j[c-1];return null},_inParentChain:function(f,e){for(var d=f.parent;d;){if(d===e)return!0;d=d.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,e,d){this.setCursor(e);var j=[];for(j.push(e);;){if(this.iterate(f))j.push(this.cursor());else break;if(d===this.cursor())return j}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,e){var d=this.cursor(),
j=this._scan(!0,f,e);j||(j=this._scan(!1,f,e));this.setCursor(d);return j},iterate:function(f,e){return f?this._forward(e):this._backward(e)},iterateOnTop:function(f,e){var d=this._findSibling(this._getTopLevelParent(this.cursor()),f);d?this.setCursor(d):e&&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 f}();return f});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(f,k,i,e){var f={},d=navigator.userAgent.indexOf("iPad")!==-1,j=window.navigator.platform.indexOf("Mac")!==-1;f.ExplorerNavHandler=function(){function c(b,a,c){this.explorer=b;this.model=this.explorer.model;this._navDict=a;this._listeners=[];this._selections=[];this._currentColumn=0;b=this._getEventListeningDiv();b.tabIndex=0;b.classList.add("selectionModelContainer");
var d=this;this._modelIterator=new i.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:c.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return d.explorer.renderer.isExpandable(a)}:function(a){return d.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return d.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(c);(!c||c.setFocus!==!1)&&b.focus();c=function(a){if(e.isFormElement(a.target))return!0;if(d.explorer.preventDefaultFunc&&
d.explorer.preventDefaultFunc(a,d._modelIterator.cursor()))return!0;if(a.keyCode===k.KEY.DOWN)return d.onDownArrow(a);else if(a.keyCode===k.KEY.UP)return d.onUpArrow(a);else if(a.keyCode===k.KEY.RIGHT)return d.onRightArrow(a);else if(a.keyCode===k.KEY.LEFT)return d.onLeftArrow(a);else if(a.keyCode===k.KEY.SPACE)return d.onSpace(a);else if(a.keyCode===k.KEY.ENTER)return d.onEnter(a)};b.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(d.explorer.onFocus)d.explorer.onFocus(!1);
else d.toggleCursor(null,!1)};b.addEventListener("blur",c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(d.explorer.onFocus)d.explorer.onFocus(!0);else d.toggleCursor(null,!0)};b.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=b}c.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(b){this._linearGridMove=!1;if(b)this._selectionPolicy=b.selectionPolicy,this.gridClickSelectionPolicy=
b.gridClickSelectionPolicy||"none",this.preventDefaultFunc=b.preventDefaultFunc,this.postDefaultFunc=b.postDefaultFunc},_ctrlKeyOn:function(b){return j?b.metaKey:b.ctrlKey},removeListeners:function(){if(this._listeners)for(var b=0;b<this._listeners.length;b++)this._parentDiv.removeEventListener(this._listeners[b].type,this._listeners[b].listener,!1)},focus:function(){var b=this._getEventListeningDiv();b&&b.focus()},_getEventListeningDiv:function(b){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv===
"function"?this.explorer.keyEventListeningDiv(b):k.node(this.explorer._parentId)},isExpandable:function(b){return!b?!1:k.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)))?!0:!1},isExpanded:function(b){return!b?!1:this.explorer.myTree.isExpanded(this.model.getId(b))},refreshSelection:function(b){var a=this;this.explorer.selection&&this.explorer.selection.getSelections(function(c){a._clearSelection();for(var d=0;d<c.length;d++)a._selections.push(c[d]);a._selections.length>0?a.cursorOn(a._selections[0],
!0,!1,b):a.cursorOn();if(!(a._shiftSelectionAnchor&&a._inSelection(a._shiftSelectionAnchor)>=0))a._shiftSelectionAnchor=null})},refreshModel:function(b,a,c,d){this._currentColumn=0;this.topIterationNodes=[];this.model=a;this._navDict=b;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(c)this.topIterationNodes=c;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),!1),this._modelIterator.reset());
this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(b){for(var b=this.model.getId(b),a=0;a<this._selections.length;a++)if(b===this.model.getId(this._selections[a]))return a;return-1},_clearSelection:function(b){if(b)for(b=0;b<this._selections.length;b++)this._checkRow(this._selections[b],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(b){if(this._selectionPolicy!==
b)this._selectionPolicy=b,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(b,a,c){if(this._selectionPolicy==="cursorOnly")a&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0);else if(this._isRowSelectable(b)){!a||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b):(a=this._inSelection(b),a>=0?(this._checkRow(b,!0),this._selections.splice(a,1)):(this._checkRow(b,
!1),this._selections.push(b),this._lastSelection=b));if(c)this._shiftSelectionAnchor=this._lastSelection;this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(b,a){b||(b=this.currentModel());var c=this._getGridChildren(b);if(c&&c.length>1||a===0&&c){a!==0&&this.toggleCursor(b,!1);var d=this._currentColumn,e=!0;d+=a;d<0?(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!1)?b=this.currentModel():e=!1),
d=e?c.length-1:this._currentColumn):d>=c.length&&(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!0)?b=this.currentModel():e=!1),d=e?0:this._currentColumn);this._currentColumn=d;a!==0&&this.toggleCursor(b,!0);return!0}return!1},_getGridChildren:function(b){return this._navDict?this._navDict.getGridNavHolder(b):null},getCurrentGrid:function(b){b||(b=this.currentModel());return(b=this._getGridChildren(b))&&b.length>0?b[this._currentColumn]:null},getAriaContainerElement:function(b){for(var a=
this._parentDiv,c;b&&b!==a&&(c=b.getAttribute("role"))!=="grid"&&c!=="tree"&&c!=="treegrid";)b=b.parentNode;return b===a?null:b},toggleCursor:function(b,a){var c=this.getRowDiv(b),d=this.getCurrentGrid(b);d?(c&&(a?c.classList.add("treeIterationCursorRow"):c.classList.remove("treeIterationCursorRow")),d.domNode&&(c=this.getAriaContainerElement(d.domNode),a?(d.domNode.classList.add("treeIterationCursor"),c&&c.setAttribute("aria-activedescendant",d.domNode.id)):d.domNode.classList.remove("treeIterationCursor"))):
c&&(a?c.classList.add("treeIterationCursorRow_Dotted"):c.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(b,a,c,d){var e,f;if(b||a){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=b;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(e!==f||a)if(this.toggleCursor(e,!1),!a||f){this.moveColumn(null,0);this.toggleCursor(f,!0);if((b=this.getRowDiv())&&
!d){for(d=b.parentNode;d;){a=window.getComputedStyle(d,null);if(!a)break;a=a.getPropertyValue("overflow-y");if(a==="hidden"||a==="auto"||a==="scroll")break;d=d.parentNode}if(!d)d=document.body;a=!0;b.offsetTop<=d.scrollTop?(a=!1,c===void 0&&(c=!1)):b.offsetTop+b.offsetHeight>=d.scrollTop+d.clientHeight&&(a=!1,c===void 0&&(c=!0));a||b.scrollIntoView(!c)}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,f)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=
[],a=0;a<this._selections.length;a++)b.push(this.model.getId(this._selections[a]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;var b=this.model.getId(b),a=this._navDict.getValue(b);return a&&a.rowDomNode?a.rowDomNode:k.node(b)},iterate:function(b,a,c){this.topIterationNodes.length!==0&&this._modelIterator.iterate(b,a)&&(this.cursorOn(null,!1,b),c&&(b=this._inSelection(this._modelIterator.prevCursor()),a=this._inSelection(this._modelIterator.cursor()),b>=0&&
a>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)))},_checkRow:function(b,a){if(this.explorer.renderer._useCheckboxSelection){var c=this.getRowDiv(b);if(c){var d=k.node(this.explorer.renderer.getCheckBoxId(c.id)),e=a?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(c,d,e,!0)}}else this._select(b,a)},_select:function(b){b||(b=this._modelIterator.cursor());var a=this.getRowDiv(b);a&&(this._inSelection(b)<0?a.classList.add("checkedRow"):
a.classList.remove("checkedRow"))},_onModelGrid:function(b,a){var c=this._getGridChildren(b);if(c)for(var d=0;d<c.length;d++)if(a.target===c[d].domNode)return!0;return!1},onClick:function(b,a){var c=k.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));if(a.target!==c&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(b,a)))if(this.cursorOn(b,!0,!1,!0),d)this.setSelection(b,!0);else if(this._ctrlKeyOn(a))this.setSelection(b,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(c=
this._modelIterator.scan(this._shiftSelectionAnchor,b)){this._clearSelection(!0);for(var e=0;e<c.length;e++)this.setSelection(c[e],!0)}}else this.setSelection(b,!1,!0)},onCollapse:function(b){this._modelIterator.collapse(b)&&this.cursorOn()},onUpArrow:function(b){this.iterate(!1,!1,b.shiftKey);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),
!1,!0);b.preventDefault();return!1},_shouldMoveColumn:function(b){var a=this.currentModel(),c=this._getGridChildren(a);return c&&c.length>1?this.isExpandable(a)?this._ctrlKeyOn(b):!0:!1},onLeftArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,-1),b.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&this.isExpanded(a))return this.explorer.myTree.collapse(a),b.preventDefault(),!0;this._modelIterator.topLevel(a)?this.explorer.scopeUp&&
typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(a.parent),this.setSelection(a.parent,!1,!0))},onRightArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,1),b.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&!this.isExpanded(a))return this.explorer.myTree.expand(a),b.preventDefault(),!1},_isRowSelectable:function(b){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(b):!0},onSpace:function(b){this.setSelection(this.currentModel(),
!0,!0);b.preventDefault()},onEnter:function(b){var a=this.getCurrentGrid(this._modelIterator.cursor());if(a)if(a.widget)if(typeof a.onClick==="function")a.onClick();else typeof a.widget.focus==="function"&&a.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(b),!1,!1,!1,0,null);a.domNode.dispatchEvent(c)}else if(this.explorer.renderer.getRowActionElement&&(a=this._modelIterator.cursor()))if(a=this.explorer.renderer.getRowActionElement(this.model.getId(a)),
a.href)this._ctrlKeyOn(b)?window.open(a.href):window.location.href=a.href}};return c}();f.ExplorerNavDict=function(){function c(b){this._dict={};this._model=b}c.prototype={addRow:function(b,a){this._dict[this._model.getId(b)]={model:b,rowDomNode:a}},getValue:function(b){return this._dict[b]},getGridNavHolder:function(b,a){if(!b)return null;var c=this._model.getId(b);if(this._dict[c]){if(!this._dict[c].gridChildren&&a)this._dict[c].gridChildren=[];return this._dict[c].gridChildren}return null},initGridNavHolder:function(b){if(!b)return null;
b=this._model.getId(b);if(this._dict[b])this._dict[b].gridChildren=null}};return c}();return f});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands,orion/commandRegistry".split(","),function(f,k,i,e,d,j){var c={};c.Explorer=function(){function b(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;this.myTree=null}b.prototype={destroy:function(){this.model&&this.model.destroy();this.myTree&&this.myTree.destroy();this.destroyed=!0},changedItem:function(a,b){this.myTree&&
this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},makeNewItemPlaceHolder:function(a,b,c){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),c=document.createElement("span"),c.id=b+"placeHolderRow",a.appendChild(c),{tempNode:c,refNode:c};if(a){c=document.createElement("tr");c.id=b+"placeHolderRow";var d=document.createElement("td");d.id=b+"placeHolderCol";
c.appendChild(d);a.appendChild(c);c=i.node(b+"placeHolderRow");a=i.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=this.model.getId(a))return i.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&
this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===void 0||a===null))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,c){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",f=i.node(g);f&&i.empty(f);if(b)b.rootId=g;this.model=b;this._parentId=a;this._treeOptions=c;if(!c||c&&!c.noSelection)this.selectionPolicy=
c?c.selectionPolicy:"",this._navDict=new d.ExplorerNavDict(this.model);this.myTree=new e.TableTree({id:g,model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:c?!!c.showRoot:!1,indent:c?c.indent:void 0,onCollapse:c?c.onCollapse:void 0,navHandlerFactory:c?c.navHandlerFactory:void 0,tableElement:c?c.tableElement:void 0,tableBodyElement:c?c.tableBodyElement:void 0,tableRowElement:c?c.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy===
"cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:
null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){if(!this.getNavHandler())this._navHandler=a&&a.navHandlerFactory&&typeof a.navHandlerFactory.createNavHandler==="function"?a.navHandlerFactory.createNavHandler(this,this._navDict,a):new d.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),
b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return b}();c.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=new j.Command({tooltip:f["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()}}),e=new j.Command({tooltip:f["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()}});b.addCommand(d);b.addCommand(e)};c.ExplorerModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}b.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=
c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),b=this.idPrefix,c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return b}};return b}();c.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new c.ExplorerModel;
b.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();c.ExplorerRenderer=function(){function b(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite"}b.prototype={_init:function(a){if(a){this._useCheckboxSelection=
a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=a.actionScopeId;if(!this.commandService)this.commandService=a.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?
1:0},initTable:function(a,b){this.tableTree=b;i.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return f},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;if(this.getCheckedFunc)d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(b.checked=c)?b.classList.add("core-sprite-check_on"):b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d);this.explorer.getNavHandler()&&e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){var b=this.explorer.getNavDict(),c=this.explorer.getNavHandler();if(c&&b&&c.getSelectionPolicy()!=="cursorOnly"&&(a=window.sessionStorage[a+"selection"],typeof a==="string"&&(a=a.length>0?JSON.parse(a):null),a)){for(var d=[],c=0;c<
a.length;c++){var e=b.getValue(a[c]);if(e&&e.rowDomNode&&e.model&&(d.push(e.model),this._highlightSelection&&e.rowDomNode.classList.add("checkedRow"),e=i.node(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,e.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(d),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=
!1,c=window.sessionStorage[a+"expanded"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(i.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+
"__expand"},updateExpandVisuals:function(a,b){var c=i.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);
f.classList.add(d||"imageSprite");f.classList.add(c)}var i=this;e.onclick=function(){i.tableTree.toggle(a.id);if(i.tableTree.isExpanded(a.id))i._expanded.push(a.id);else for(var b in i._expanded)if(i._expanded[b]===a.id){i._expanded.splice(b,1);break}(b=i._getUIStatePreferencePath())&&window.sessionStorage&&i._storeExpansions(b)};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),
this.explorer.initNavHandler())},updateCommands:function(){if(this.commandService)for(var a=i.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=i.node(c.id+"actionswrapper");this.commandService.destroy(d);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,d,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();
c.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new c.ExplorerRenderer;b.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)e.innerHTML.length>0&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);d>0&&a.appendChild(b)};
b.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=this.explorer.getNavDict();if(c){c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),c===0?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle()):e.classList.add("navColumn"):
this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();c.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.prototype.getId=function(a){for(var a=this.getKey(a).replace(/[\\\/]/g,
""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return this.idPrefix+b};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return c});
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(f,k,i,e,d,j,c,b){function a(a,b,e,f,i,l,s,p,y){var b=j.clone(b),u;if(b.Directory)u=document.createElement("a"),u.className="navlinkonpage",u.href=!a?h:(new c(a+"#{,resource,params*}")).expand({resource:b.ChildrenLocation}),b.Name&&u.appendChild(document.createTextNode(b.Name));
else{i||(i=d.getOpenWithCommands(e));if(!l)for(a=0;a<i.length;a++)i[a].isEditor==="default"&&(l=i[a]);u=document.createElement("a");u.className="navlink targetSelector";s&&typeof s==="object"&&Object.keys(s).forEach(function(a){u[a]=s[a]});var r=null,z=null;if(r=y?y.holderDom:u)z=document.createElement("span"),z.className="core-sprite-file modelDecorationSprite",r.appendChild(z);b.Name&&u.appendChild(document.createTextNode(b.Name));var v=!1,F=b.Location;if(p&&typeof p==="object")b.params={},j.mixin(b.params,
p);for(a=0;a<i.length;a++)if(p=i[a],p.visibleWhen(b)){F=p.hrefCallback({items:b});v=!0;break}k.when(f.getFileContentType(b),function(a){var c;if(c=!v)if(c=l){a:{switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":c=!0;break a}c=!1}c=!c}c&&(F=l.hrefCallback({items:b}));if(r){c=r;var d=b.Location,e=z,g;switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":g=document.createElement("img");
g.src=d;g.classList.add("thumbnail");break;default:if(a&&a.image)g=document.createElement("img"),g.src=a.image,g.classList.add("thumbnail")}g&&c.replaceChild(g,e)}u.href=F})}return u}function l(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 h=new c("#{,resource,params*}");l.prototype=new i.SelectionRenderer;l.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};
l.prototype.tableCallback=function(a){a.setAttribute("aria-label",f.Navigator);a.setAttribute("role","presentation")};l.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};l.prototype.emptyCallback=function(a){var c=document.createElement("tr"),d=document.createElement("td");d.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=f.NoFile;var h=document.createElement("span");h.classList.add("core-sprite-addcontent");h.classList.add("icon-inline");
h.classList.add("imageSprite");b.processDOMNodes(e,[h]);d.appendChild(e);c.appendChild(d);a.appendChild(c)};l.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"}};l.prototype.setTarget=function(a){this.target=a};l.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};l.prototype.createFolderNode=
function(b){var c;this.showFolderLinks?(c=a(this.folderLink||"",b,this.commandService,this.contentTypeService),(b=this.getFolderImage(b))&&c.insertBefore(b,c.firstChild)):(c=document.createElement("span"),c.textContent=b.Name);return c};l.prototype.showFolderLinks=!0;l.prototype.getCellElement=function(b,c,f){switch(b){case 0:var b=document.createElement("td"),h=document.createElement("span");h.id=f.id+"MainCol";h.setAttribute("role","presentation");b.appendChild(h);b.setAttribute("role","presentation");
h.className="mainNavColumn";var i;if(c.Directory)this.getExpandImage(f,h),i=this.createFolderNode(c),h.appendChild(i),this.explorer._makeDropTarget(c,i),this.explorer._makeDropTarget(c,f);else{if(!this.openWithCommands){this.openWithCommands=d.getOpenWithCommands(this.commandService);for(i=0;i<this.openWithCommands.length;i++)if(this.openWithCommands[i].isEditor==="default")this.defaultEditor=this.openWithCommands[i]}i=a("",c,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,
{target:this.target});h.appendChild(i)}if(i)i.id=f.id+"NameLink",i.nodeType===1&&(e.addNavGrid(this.explorer.getNavDict(),c,i),i.setAttribute("role","link"),i.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,h,c,this.explorer,"tool",null,!0);return b;case 1:if(this.oneColumn)return null;f=document.createElement("td");if(c.LocalTimeStamp)f.textContent=(new Date(c.LocalTimeStamp)).toLocaleString();return f;case 2:if(this.oneColumn)return null;
f=document.createElement("td");if(!c.Directory&&typeof c.Length==="number")c=parseInt(c.Length,10)/1024,f.textContent=Math.ceil(c).toLocaleString()+" KB";f.style.textAlign="right";return f}};l.prototype.constructor=l;return{NavigatorRenderer:l,createLink:a}});
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(f,k,i,e,d,j,c,b,a){function l(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 l(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}l.prototype.makeRenderFunction=function(g,h,j,l,o){var t=this.serviceRegistry,s=this.commandRegistry;this.openWithCommands=this.openWithCommands||b.createOpenWithCommands(t,g,s);var p=this;return function(b,t,r,z){a.when(p.openWithCommands,function(a){if(r)i.empty(h),a=document.createElement("div"),a.appendChild(document.createTextNode(f["Search failed."])),h.appendChild(a),typeof l==="function"&&l(h);else{var p=
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 g=b[e];typeof g==="function"&&(b[e]=null,g())}else b[e]=function(){a(c,d)}}}(),J=!1;i.empty(h);if(b&&b.length>0){var G=document.createElement("table");G.setAttribute("role","presentation");for(var w=0;w<b.length;w++){var C=
b[w],x;if(!J&&(J=!0,j))x=G.insertRow(0).insertCell(0),x.textContent=j;x=G.insertRow(-1).insertCell(0);x.colspan=2;o&&o(x);var A={Name:C.name,Directory:C.directory,Location:C.path||C.location},B=null;if(typeof C.LineNumber==="number")B={},B.line=C.LineNumber;if(z&&z.keyword&&!z.nameSearch){var D=d.generateSearchHelper(z),B=B||{};B.find=D.inFileQuery.searchStr;B.regEx=D.inFileQuery.wildCard?!0:void 0}A=c.createLink(k.toUrl("edit/edit.html"),A,s,g,a,null,{"aria-describedby":(C.folderName?C.folderName:
C.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}},B);C.LineNumber&&A.appendChild(document.createTextNode(" (Line "+C.LineNumber+")"));x.appendChild(A);p(x,C)}h.appendChild(G);typeof l==="function"&&l(h)}!J&&t&&(a=e.formatMessage(f["No matches found for ${0}"],t),i.empty(h),h.appendChild(document.createTextNode(a)),typeof l==="function"&&l(h))}})}};h.prototype={search:function(a,b,c){var e=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var e=a.response.docs[c];b.push({name:e.Name,
path:e.Location,folderName:d.path2FolderName(e.Path?e.Path:e.Location,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return b};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){c(e(b),a.keyword,null,a)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var d=a.keyword,d=d.substring(d.indexOf("}")+1),d=d.substring(d.indexOf(":")+1);c(e(b),d,null,a)},function(a){c(null,null,a,null)})}catch(f){typeof f===
"string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(b){c(e(b),null,null,a)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new j.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(b){c(e(b),null,null,a)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(a,b){console.error(a);
i.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",d=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?d=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(d=a);if(d)this.setLocationbyURL(d.Location),c=d.Name,this._childrenLocation=d.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),c=this._fileService.fileServiceName(a.Location),
this._childrenLocation=a.ChildrenLocation;d=i.node("search");c||(c="");if(d&&d.placeholder){d.value="";var h=e.formatMessage(f["Search ${0}"],c);d.placeholder=h.length>30?h.substring(0,27)+"...":e.formatMessage(f["Search ${0}"],c)}if(d&&d.title)d.title=f["Type a keyword or wild card to search in "]+c},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation?
this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,
sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};h.prototype.constructor=h;return{Searcher:h}});define("orion/dialogs",[],function(){function f(f){this._serviceRegistry=f;this._serviceRegistration=f.registerService("orion.page.dialog",this)}f.prototype={confirm:function(f,i){i(window.confirm(f))},openFiles:function(){}};f.prototype.constructor=f;return{DialogService:f}});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(f,k,i,e){function d(a,b,c){var d=a[b],e=new i;if(typeof d!=="function")throw f["Service method missing: "]+b;d.apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function j(a,b){return new e.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function c(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
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 j(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function b(a,b){a[b]=function(){return d(this._getService(),b,Array.prototype.slice.call(arguments))}}
function a(a,b,d){for(var e=a.getServiceReferences("orion.site"),i=[],j=[],k=[],t=0;t<e.length;t++){var s=e[t].getProperty(b),s=s[0]!=="^"?"^"+s:s;i.push(e[t]);j.push(RegExp(s));k.push(a.getService(e[t]))}d=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var c=0;c<j.length;c++)if(j[c].test(a))return c;throw f["No Matching SiteService for "]+b+": "+a;}(d);return new c(a,k[d],i[d])}c.prototype={isFileMapped:function(a,b){if(!a){var c=new i;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,f){return e.isFileMapped(a,b).then(function(a){a||f.push({Source:c,Target:g,FriendlyPath:c});a=new i;a.resolve();return a})}var e=this,f="/"+b.Name,j;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";j=e.toInternalForm(b.Location).then(function(b){return d(f,b,a.Mappings).then(function(){return e.updateSiteConfiguration(a.Location,a).then(function(a){return e.updateSiteConfiguration(a.Location,
{HostingStatus:{Status:"started"}})})})})}else{var k=b.Name+" site";j=e.toInternalForm(b.Location).then(function(a){var b=[];return d(f,a,b).then(function(){return e.createSiteConfiguration(k,c,b,null,{Status:"started"}).then(function(a){return a})})})}return j.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){b(c.prototype,
a)});c.prototype.constructor=c;return{forLocation:function(b,c){return a(b,"pattern",c)},forFileLocation:function(b,c){return a(b,"filePattern",c)},getFileClient:j,SiteClient:c}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(f){return{makeRelative:function(f){if(!f)return f;var i=window.location.protocol+"//"+window.location.host;return f.indexOf(i)===0?f.substring(i.length):f},isAtRoot:function(k){if(!k)return!1;if(k==="/workspace")return!0;var i=new URL(f.toUrl("workspace"),window.location.href);return(new URL(k,window.location.href)).href.indexOf(i.href)===0}}});
define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(f,k,i){return{generateEditSiteHref:function(e){var d=f.toUrl("sites/site.html");return(new i(d+"#{,resource,params*}")).expand({resource:k.makeRelative(e.Location)})}}});
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(f,k,i,e,d,j,c,b){function a(a){return a instanceof Array?a:[a]}function l(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var h=e.Command,g=b.formatMessage;return{createSiteServiceCommands:function(a,b,c){var c=c||{},g=new e.Command({name:f.Create,tooltip:f["Create a new site configuration"],
id:"orion.site.create",parameters:new i.ParametersDescription([new i.CommandParameter("name","text",f.Name)]),visibleWhen:function(){return!0},callback:function(b){var e=b.items,g=a.getService(e),e=j.getFileClient(a,e.getProperty("filePattern")),f=b.parameters&&b.parameters.valueFor("name"),b=a.getService("orion.page.progress");(b?b.progress(e.loadWorkspaces(),"Loading workspaces"):e.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&f&&g.createSiteConfiguration(f,a).then(function(a){c.createCallback(d.generateEditSiteHref(a),
a)},c.errorCallback)})}});b.addCommand(g)},createSiteCommands:function(b,e){var i=b.getService("orion.page.dialog"),k=b.getService("orion.page.progress"),t=new h({name:f.Edit,tooltip:f["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(a){return d.generateEditSiteHref(a.items instanceof Array?a.items[0]:a.items)}});e.addCommand(t);t=new h({name:f.Start,tooltip:f["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(d){var e=a(d.items),g=d.userData;if(g.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var c=g.site||{};c.HostingStatus={Status:"started"};a=a.Location;return j.forLocation(b,a).updateSiteConfiguration(a,c)});k.showWhile(c.all(e)).then(l(d.items)).then(g.startCallback,
g.errorCallback)}});e.addCommand(t);t=new h({name:f.Stop,tooltip:f["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(d){var e=a(d.items),g=d.userData;if(g.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var c=g.site||{};c.HostingStatus={Status:"stopped"};a=a.Location;return j.forLocation(b,
a).updateSiteConfiguration(a,c)});k.showWhile(c.all(e)).then(l(d.items)).then(g.stopCallback,g.errorCallback)}});e.addCommand(t);t=new h({name:f.Delete,tooltip:f["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(b){b=a(b);return b.length>0?b.every(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"}):!1},callback:function(d){var e=a(d.items),h=d.userData,k=e.length===1?g(f.ConfirmDeleteSingle,e[0].Name):g(f.ConfirmDeleteMultiple,
e.length);i.confirm(k,function(a){a&&(a=e.map(function(a){a=a.Location;return j.forLocation(b,a).deleteSiteConfiguration(a)}),c.all(a).then(l(d.items)).then(h.deleteCallback,h.errorCallback))})}});e.addCommand(t)},createViewOnSiteCommands:function(a,b){var c=a.getService("orion.core.file");b.addCommand(new h({name:f["Add to site"],tooltip:f["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,g=a.getService("orion.page.progress");return(g?g.progress(c.loadWorkspaces(),"Loading workspaces"):c.loadWorkspaces()).then(function(b){return j.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new h({name:f.View,tooltip:f["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 j.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(f){function k(i,e){e||(e="orion.page.selection");this._serviceRegistry=i;f.attach(this);this._serviceRegistration=i.registerService(e,this);this._selections=null}k.prototype={getSelection:function(f){var e=this._getSingleSelection();typeof f==="function"&&f(e);return e},getSelections:function(f){var e=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(e);return e},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var e=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;e!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};k.prototype.constructor=k;return{Selection:k}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commandRegistry","orion/commonHTMLFragments"],function(f,k,i,e){function d(c,b){var a=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!b.id)throw Error("Missing required argument: id");this.id=b.id;if(!b.title)throw Error("Missing required argument: title");var d=b.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");c.appendChild(this.domNode);for(var h=0;h<d.length;h++)this.domNode.classList.add(d[h]);this.domNode.id=b.id;if(b.canHide)this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitle"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=0,this.domNode.addEventListener("click",
function(b){(b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(b){b.keyCode===f.KEY.ENTER&&(b.target===a.domNode||b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1);if(b.iconClass){var g=document.createElement("span");g.classList.add("sectionIcon");this.domNode.appendChild(g);(Array.isArray(b.iconClass)?b.iconClass:[b.iconClass]).forEach(function(a){g.classList.add(a)})}this.titleNode=document.createElement("div");
this.titleNode.id=b.id+"Title";this.titleNode.classList.add("sectionAnchor");this.titleNode.classList.add("sectionTitle");this.titleNode.classList.add("layoutLeft");this.domNode.appendChild(this.titleNode);this.titleNode.textContent=b.title;if(typeof b.getItemCount==="function")d=document.createElement("div"),d.classList.add("layoutLeft"),d.classList.add("sectionItemCount"),this.domNode.appendChild(d),d.textContent=b.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=
b.id+"Progress";this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);d=document.createElement("div");d.id=b.id+"FilterSearchBox";this.domNode.appendChild(d);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=b.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");
this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("div");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("sectionActions");this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("div");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);b.slideout&&(d=e.slideoutHTMLFragment(b.id),h=document.createRange(),h.selectNode(this.domNode),d=h.createContextualFragment(d),this.domNode.appendChild(d));this._contentParent=document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);c.appendChild(this._contentParent);b.content&&this.setContent(b.content);
this.hidden=b.hidden;if(typeof b.onExpandCollapse==="function")this._onExpandCollapse=b.onExpandCollapse;this._preferenceService=b.preferenceService;this._contentParent.style.display="none";if(this._preferenceService){var i=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(i.id);if(a!==void 0)i.hidden=!a;if(!i.hidden)i._contentParent.style.display="block";i._updateExpandedState(!i.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function j(c){this._section=c;this._id=++c._lastMonitor}d.prototype={setTitle:function(c){this.titleNode.textContent=c},setContent:function(c){typeof c==="string"?this._contentParent.innerHTML=c:(this._contentParent.innerHTML="",this._contentParent.appendChild(c))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new j(this)},_setMonitorMessage:function(c,b){this._progressNode.style.visibility=
"visible";this._loading[c]=b;var a="",d;for(d in this._loading)a!==""&&(a+="\n"),a+=this._loading[d];this._progressNode.title=a},_monitorDone:function(c){delete this._loading[c];var c="",b;for(b in this._loading)c!==""&&(c+="\n"),c+=this._loading[b];this._progressNode.title=c;if(c==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.hidden=!1):(this._contentParent.style.display="none",this.hidden=!0);this._updateExpandedState(!this.hidden,
!0)},_updateExpandedState:function(c,b){var a=this.twistie,d=this.id;a&&(a.classList.add(c?this._expandImageClass:this._collapseImageClass),a.classList.remove(c?this._collapseImageClass:this._expandImageClass));this._preferenceService&&b&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(d,c)});this._onExpandCollapse&&this._onExpandCollapse(c,this)}};d.prototype.constructor=d;j.prototype={begin:function(c){this.status=c;this._section._setMonitorMessage(this.id,c)},worked:function(c){this.status=
c;this._section._setMonitorMessage(this.id,c)},done:function(c){this.status=c;this._section._monitorDone(this.id)}};j.prototype.constructor=j;return{Section:d}});
define("orion/sites/siteMappingsTable","i18n!orion/sites/nls/messages,orion/commands,orion/explorers/explorer,orion/i18nUtil,orion/Deferred,orion/webui/littlelib,orion/EventTarget".split(","),function(f,k,i,e,d,j,c){function b(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function a(a){return a.replace(/[\r\n\t]/g,"")}var l={};l.Model=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.items=d}a.prototype=new i.ExplorerFlatModel;b(a.prototype,{getId:function(a){return a===this.root?
this.rootId:"mapping_"+this.items.indexOf(a)}});return a}();l.Renderer=function(){function a(b,c){this._init(b);this.options=b;this.explorer=c;this.commandService=b.commandService}a.prototype=new i.SelectionRenderer;b(a.prototype,{getCellHeaderElement:function(a){switch(a){case 0:return a=document.createElement("th"),a.textContent=" ",a.classList.add("isValidColumn"),a;case 1:return a=document.createElement("th"),a.textContent=f.Path,a;case 2:return a=document.createElement("th"),a.textContent=f["Mount at (server path)"],
a;case 3:return a=document.createElement("th"),a.textContent=f.Actions,a}},getCellElement:function(a,b,c){var d;switch(a){case 0:return this.getIsValidCell(a,b,c);case 1:return a=document.createElement("td"),c=document.createElement("input"),c.classList.add("pathInput"),c.value=typeof b.FriendlyPath!=="undefined"?b.FriendlyPath:b.Target,d=function(a){this.options.onchange(b,"FriendlyPath",a.target.value,a)}.bind(this),c.onchange=d,c.onkeyup=d,a.appendChild(c),a;case 2:return a=document.createElement("td"),
c=document.createElement("input"),c.classList.add("serverPathInput"),c.value=b.Source,d=function(a){this.options.onchange(b,"Source",a.target.value,a)}.bind(this),c.onchange=d,c.onkeyup=d,a.appendChild(c),a;case 3:return this.getActionsColumn(b,c)}},getIsValidCell:function(a,b){var c=b.Target,d=document.createElement("td"),h,i;if(/^\//.test(c)){var k=this;this.options.siteClient.toFileLocation(c).then(function(a){h=a;var b=document.createElement("span");b.classList.add("validating");j.empty(d);d.appendChild(b);
b.textContent="\u2026";b=k.options.fileClient._getService(a).read(a,!0);k.options.progress&&k.options.progress.progress(b,"Reading metadata of "+a);b.then(function(a){var b=a&&a.Directory,a=b?"core-sprite-folder":"core-sprite-file",b=b?f.WorkspaceFolder:f.WorkspaceFile;i=document.createElement("a");i.href=h;i.target="_new";var c=document.createElement("span");c.className+="imageSprite "+a;c.title=e.formatMessage(b,h);i.appendChild(c);j.empty(d);d.appendChild(i)},function(){i=document.createElement("a");
i.href=h;i.target="_new";var a=document.createElement("span");a.className+="imageSprite core-sprite-error";a.title=e.formatMessage(f.WorkspaceResourceNotFound,h);i.appendChild(a);j.empty(d);d.appendChild(i)})})}else h=c,i=document.createElement("a"),i.href=h,i.target="_new",j.empty(d),c=document.createElement("span"),c.className+="imageSprite core-sprite-link",c.title=e.formatMessage(f.ExternalLinkTo,h),i.appendChild(c),d.appendChild(i);d.classList.add("isValidCell");return d}});return a}();l.MappingsTable=
function(){function e(a){this.registry=a.serviceRegistry;this.commandService=a.commandRegistry;this.registerCommands();this.siteClient=a.siteClient;this.parentId=a.parentId;this.selection=a.selection;this.renderer=new l.Renderer({checkbox:!1,onchange:this.fieldChanged.bind(this),siteConfiguration:a.siteConfiguration,siteClient:a.siteClient,fileClient:a.fileClient,commandService:this.commandService,progress:a.serviceRegistry.getService("orion.page.progress"),actionScopeId:"siteMappingCommand"},this);
this.myTree=null;this._setSiteConfiguration(a.siteConfiguration);this.setDirty(!1)}e.prototype=Object.create(i.Explorer.prototype);c.attach(e.prototype);b(e.prototype,{_setSiteConfiguration:function(a){this.siteConfiguration=a;this.refresh()},refresh:function(){var a=function(){return(new d).resolve(this.siteConfiguration.Mappings)}.bind(this),b=this;this.siteClient.updateMappingsDisplayStrings(this.siteConfiguration).then(function(c){b.siteConfiguration.Mappings=c.Mappings;b.createTree(b.parentId,
new l.Model(null,a,b.siteConfiguration.Mappings))})},render:function(){this.changedItem(this.siteConfiguration.Mappings,this.siteConfiguration.Mappings)},renderItemRow:function(a,b){if(b==="FriendlyPath"){var c=document.getElementById(this.myTree._treeModel.getId(a)),d=j.$(".isValidCell",c),c=this.renderer.getIsValidCell(j.$$array("td",c).indexOf(d),a,c);d.parentNode.replaceChild(c,d)}},registerCommands:function(){this.commandService.addCommand(new k.Command({name:f.Delete,imageClass:"core-sprite-delete",
id:"orion.site.mappings.remove",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in a},callback:function(a){this.deleteMapping(a.items);this.render();this.setDirty(!0)}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.remove",0);this.commandService.addCommand(new k.Command({name:f["Move Up"],imageClass:"core-sprite-move-up",id:"orion.site.mappings.moveUp",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in
a}.bind(this),callback:function(a){var b=this.getItemIndex(a.items);if(b!==0){var c=this.siteConfiguration.Mappings[b-1];this.siteConfiguration.Mappings[b-1]=a.items;this.siteConfiguration.Mappings[b]=c;this.render();this.setDirty(!0)}}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.moveUp",1);this.commandService.addCommand(new k.Command({name:f["Move Down"],imageClass:"core-sprite-move-down",id:"orion.site.mappings.moveDown",visibleWhen:function(a){return"Source"in
a||"Target"in a||"FriendlyPath"in a}.bind(this),callback:function(a){var b=this.getItemIndex(a.items);if(b!==this.siteConfiguration.Mappings.length-1){var c=this.siteConfiguration.Mappings[b+1];this.siteConfiguration.Mappings[b+1]=a.items;this.siteConfiguration.Mappings[b]=c;this.render();this.setDirty(!0)}}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.moveDown",2)},getItemIndex:function(a){return this.siteConfiguration.Mappings.indexOf(a)},
_addMapping:function(b){var c=b.Source,d=b.Target,e=b.FriendlyPath;b.Source=a(typeof c==="string"?c:this.getNextMountPoint(e));b.Target=a(typeof d==="string"?d:"/");this.mappingExists(c,d)||this.siteConfiguration.Mappings.push(b)},addMapping:function(a){this._addMapping(a);this.render();this.setDirty(!0)},addMappings:function(a){for(var b=0;b<a.length;b++)this.addMapping(a[b]);this.render();this.setDirty(!0)},mappingExists:function(a,b){if(typeof a==="object"&&typeof b==="undefined")b=a.Target,a=
a.Source;for(var c=this.siteConfiguration.Mappings,d=0;d<c.length;d++)if(c[d].Source===a&&c[d].Target===b)return!0;return!1},getNextMountPoint:function(a){for(var b=this.siteConfiguration.Mappings,c=!1,d=0;d<b.length;d++)if(b[d].Source==="/"){c=!0;break}if(!c)return"/";if(!a)return"/web/somePath";a=a.split("/");for(d=a.length-1;d>=0;d--)if(!/\s+/.test(a[d]))return"/"+a[d];return"/web/somePath"},deleteMapping:function(a){a=this.siteConfiguration.Mappings.indexOf(a);a!==-1&&this.siteConfiguration.Mappings.splice(a,
1)},deleteAllMappings:function(){this.siteConfiguration.Mappings.splice(0,this.siteConfiguration.Mappings.length)},fieldChanged:function(b,c,d){d=a(d);if(b[c]!==d&&(b[c]=d,c==="FriendlyPath")){var e=d,f=this;this.siteClient.parseInternalForm(this.siteConfiguration,e).then(function(a){b.Target=a||e;f.renderItemRow(b,c);f.setDirty(!0)})}},setDirty:function(a){this._isDirty=a;this.dispatchEvent({type:"dirty",value:a})},isDirty:function(){return this._isDirty}});return e}();return l});
define("orion/explorers/explorer-table","i18n!orion/navigate/nls/messages,require,orion/Deferred,orion/webui/littlelib,orion/i18nUtil,orion/fileUtils,orion/explorers/explorer,orion/EventTarget,orion/util".split(","),function(f,k,i,e,d,j,c,b,a){function l(a,b,c,d,e,f){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!f}function h(a){b.attach(this);this.registry=a.serviceRegistry;this.treeRoot=a.treeRoot;this.selection=a.selection;this.fileClient=
a.fileClient;this.excludeFiles=a.excludeFiles;this.excludeFolders=a.excludeFolders;this.navHandlerFactory=a.navHandlerFactory;this.parentId=a.parentId;this.renderer=a.rendererFactory(this);this.dragAndDrop=a.dragAndDrop;this.setFocus=a.setFocus;this.myTree=this.model=null;this._hookedDrag=this.checkbox=!1;var c=a.modelEventDispatcher?a.modelEventDispatcher:new b;this.modelEventDispatcher=c;var d=this;this._modelListeners={};"copy,copyMultiple,create,delete,deleteMultiple,import,move,moveMultiple".split(",").forEach(function(a){c.addEventListener(a,
d._modelListeners[a]=d.modelHandler[a].bind(d))});var e=this.renderer;this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self";e.setTarget&&e.setTarget(a)}},{pid:"nav.config"})}l.prototype=new c.ExplorerModel;l.prototype.getRoot=function(a){a(this.root)};l.prototype.processParent=function(a,b){if(this.excludeFiles||this.excludeFolders){var c=[],d;for(d in b)if(!(b[d].Directory?this.excludeFolders:
this.excludeFiles))c.push(b[d]),b[d].parent=a;b=c}else for(c in b)b[c].parent=a;a.children=b;a.children.sort(function(a,b){var c=a.Directory;if(c!==b.Directory)return c?-1:1;var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0});return b};l.prototype.getChildren=function(a,b){var c=this;a.children?b(a.children):a.Directory!==void 0&&a.Directory===!1?b([]):a.Location?this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),
"Fetching children of "+a.Name).then(function(d){c.destroyed||b(c.processParent(a,d))}):b([])};l.prototype.hasChildren=function(){var a=!1;this.root.Children&&(a=this.root.Children.length>0);return a};l.prototype.constructor=l;h.prototype=Object.create(c.Explorer.prototype);h.prototype.destroy=function(){var a=this;Object.keys(this._modelListeners).forEach(function(b){a.modelEventDispatcher.removeEventListener(b,a._modelListeners[b])});c.Explorer.prototype.destroy.call(this)};h.prototype.modelHandler=
{copy:function(){},copyMultiple:function(a){var b=this,c={};a.items.forEach(function(a){a=a.newValue.Parents&&a.newValue.Parents[0]||b.treeRoot;c[a.Location]=a});Object.keys(c).forEach(function(a){b.changedItem(c[a],!0)})},create:function(a){this.changedItem(a.parent,!0,a.newValue)},"delete":function(){},deleteMultiple:function(a){var a=a.items,b=this,c;if(a.some(function(a){return a.oldValue.Location===b.treeRoot.Location?(c=a.parent,!0):!1}))this.loadResourceList(c);else{var d={};a.forEach(function(a){a=
a.parent;d[a.Location]=a});Object.keys(d).forEach(function(a){b.changedItem(d[a],!0)})}},"import":function(a){this.changedItem(a.target,!0)},move:function(a){var b=a.oldValue,c=a.newValue,a=a.parent,d=this,e=null;if(a.Projects)if(d.treeRoot.Location===b.Location){var f=d.treeRoot,b=c.ChildrenLocation?c:this.fileClient.read(c.ContentLocation,!0);i.when(b,function(a){d.dispatchEvent({type:"rootMoved",oldValue:f,newValue:a});d.loadResourceList(a)})}else e=d.isExpanded(b)&&b;else b.Directory&&(e=d.isExpanded(b)&&
c);d.changedItem(a,!0);e&&d.changedItem(e,!0)},moveMultiple:function(){this.changedItem(this.treeRoot,!0)}};var g;h.prototype._makeDropTarget=function(b,c,h){function i(a,b,c,e,g,h){b=b||"";if(a.isFile)j.isAtRoot(c.Location)?e.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:f["You cannot copy files directly into the workspace.  Create a folder first."]}):a.file(function(a){g(c,a,e,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(d.formatMessage(f["Unzip ${0}?"],
a.name)))});else if(a.isDirectory){var k=a.createReader(),l=function(c){k.readEntries(function(d){for(var f=0;f<d.length;f++)i(d[f],b+a.name+"/",c,e,g,h)})},m=e.registry.getService("orion.page.progress");j.isAtRoot(c.Location)?m.progress(h.createProject(c.ChildrenLocation,a.name),"Initializing project "+a.name).then(function(a){e.loadResourceList(e.treeRoot.Path,!0);m.progress(h.read(a.ContentLocation,!0),"Loading project info "+a.name).then(function(a){l(a)})}):m.progress(h.createFolder(c.Location,
a.name),"Creating folder "+a.name).then(function(a){e.changedItem(c,!0);l(a)})}}if(this.dragAndDrop){var k=this,l=this.dragAndDrop,p=function(a){g=a.target};if(h)this._oldDragStart&&c.removeEventListener("dragstart",this._oldDragStart,!1),this._oldDragStart=p;c.addEventListener("dragstart",p,!1);p=function(){g=null};if(h)this._oldDragEnd&&c.removeEventListener("dragend",this._oldDragEnd,!1),this._oldDragEnd=p;c.addEventListener("dragend",p,!1);p=function(a){c.classList.remove("dragOver");a.preventDefault();
a.stopPropagation()};if(h)this._oldDragLeave&&c.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=p;c.addEventListener("dragleave",p,!1);p=function(b){if(!a.isIE&&(b.dataTransfer.effectAllowed==="all"||b.dataTransfer.effectAllowed==="uninitialized"||b.dataTransfer.effectAllowed.indexOf("copy")>=0))b.dataTransfer.dropEffect="copy";c.classList.add("dragOver");e.stop(b)};if(h)this._oldDragEnter&&c.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=p;c.addEventListener("dragenter",
p,!1);p=function(b){if(!a.isIE&&(b.dataTransfer.effectAllowed==="all"||b.dataTransfer.effectAllowed==="uninitialized"||b.dataTransfer.effectAllowed.indexOf("copy")>=0))b.dataTransfer.dropEffect="copy";e.stop(b)};if(h&&!this._oldDragOver)c.addEventListener("dragover",p,!1),this._oldDragOver=p;p=function(a){c.classList.remove("dragOver");if(g){var h=k.fileClient,p=g.href,q=p.indexOf("#"),p=p.substring(q+1),v=k.registry.getService("orion.page.progress");v.showWhile(h.copyFile(p,b.Location),d.formatMessage(f["Copying ${0}"],
p)).then(function(){k.changedItem(b,!0)},function(a){v?v.setProgressResult(a):window.console.log(a)})}else if(a.dataTransfer.items&&a.dataTransfer.items.length>0)for(h=0;h<a.dataTransfer.items.length;h++)p=null,typeof a.dataTransfer.items[h].getAsEntry==="function"?p=a.dataTransfer.items[h].getAsEntry():typeof a.dataTransfer.items[h].webkitGetAsEntry==="function"&&(p=a.dataTransfer.items[h].webkitGetAsEntry()),p&&i(p,null,b,k,l,k.fileClient);else if(a.dataTransfer.files&&a.dataTransfer.files.length>
0)for(h=0;h<a.dataTransfer.files.length;h++)p=a.dataTransfer.files[h],!p.length&&(!p.type||p.type==="")?k.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:d.formatMessage(f["Did not drop ${0}.  Folder drop is not supported in this browser."],p.name)}):j.isAtRoot(b.Location)?k.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:f["You cannot copy files directly into the workspace.  Create a folder first."]}):l(b,p,k,p.name.indexOf(".zip")===
p.name.length-4&&window.confirm(d.formatMessage(f["Unzip ${0}?"],p.name)));e.stop(a)};if(h)this._oldDrop&&c.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=p;c.addEventListener("drop",p,!1)}};h.prototype.changedItem=function(a,b){if(this.treeRoot&&this.treeRoot.Location===a.Location)return this.loadResourceList(this.treeRoot,b);var c=this,d=new i;a.children=null;this.model.getChildren(a,function(e){c.getNavHandler();c.myTree.refresh.bind(c.myTree)(a,e,b);d.resolve(e)});return d};h.prototype.isExpanded=
function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))};h.prototype.getNameNode=function(a){if(a=this.model.getId(a))return e.node(a+"NameLink")};h.prototype.scopeUp=function(){};h.prototype.scopeDown=function(){};h.prototype.loadResourceList=function(a,b,c){a&&typeof a==="object"&&(a=a.ChildrenLocation||a.ContentLocation);a=j.makeRelative(a);if(!b&&a===this._lastPath)return(new i).resolve(this.treeRoot);this._lastPath=a;var d=this;return b||a!==this.treeRoot.Path?this.load(this.fileClient.loadWorkspace(a),
"Loading "+a).then(function(){d.treeRoot.Path=a;typeof c==="function"&&c();d.dispatchEvent({type:"rootChanged",root:d.treeRoot});return(new i).resolve(d.treeRoot)},function(a){d.treeRoot.Path=null;d.dispatchEvent({type:"rootChanged",root:d.treeRoot});return(new i).reject(a)}):(new i).resolve(d.treeRoot)};h.prototype.load=function(a,b,c){var d=e.node(this.parentId),f=e.node("progress");if(!f)f=document.createElement("div"),f.id="progress",e.empty(d),d.appendChild(f);e.empty(f);var g=setTimeout(function(){e.empty(f);
f.appendChild(document.createTextNode(b))},500),h=this;return i.when(a,function(a){clearTimeout(g);if(!h.destroyed){h.treeRoot={};for(var b in a)h.treeRoot[b]=a[b];h.model=new l(h.registry,h.treeRoot,h.fileClient,h.parentId,h.excludeFiles,h.excludeFolders);h.model.processParent(h.treeRoot,a.Children);if(h.dragAndDrop)h._hookedDrag?h._makeDropTarget(h.treeRoot,d,!0):(a=(a=d&&("draggable"in d||"ondragstart"in d&&"ondrop"in d))&&!(!window.File||!window.FileList||!window.FileReader),h._hookedDrag=!0,
a?h._makeDropTarget(h.treeRoot,d,!0):(h.dragAndDrop=null,window.console.log("Local file drag and drop is not supported in this browser.")));h.createTree(h.parentId,h.model,{navHandlerFactory:h.navHandlerFactory,setFocus:typeof h.setFocus==="undefined"?!0:h.setFocus,selectionPolicy:h.renderer.selectionPolicy,onCollapse:function(a){if(h.getNavHandler())h.getNavHandler().onCollapse(a)}});if(typeof c==="function")try{c()}catch(e){h.registry&&h.registry.getService("orion.page.message").setErrorMessage(e)}if(typeof h.onchange===
"function")h.onchange(h.treeRoot);return(new i).resolve(h.treeRoot)}},function(a){clearTimeout(g);h.registry.getService("orion.page.message").setProgressResult(a);return(new i).reject(a)})};h.prototype.onchange=function(){};h.prototype.constructor=h;return{FileExplorer:h,FileModel:l}});
define("orion/webui/dialogs/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,orion/webui/littlelib,orion/webui/dialog,orion/fileUtils,orion/selection,orion/explorers/navigationUtils,orion/explorers/explorer,orion/explorers/explorer-table".split(","),function(f,k,i,e,d,j,c,b){function a(a,b){this.explorer=b;this._init(a)}function l(a){this._init(a)}a.prototype=new c.SelectionRenderer;a.prototype.constructor=a;a.prototype.getLabelColumnIndex=function(){return 0};a.prototype.getCellElement=
function(a,b,c){a=document.createElement("td");c.appendChild(a);var d=document.createElement("span");d.id=c.id+"navSpan";a.appendChild(d);d.className="mainNavColumn singleNavColumn";this.getExpandImage(c,d);d.appendChild(document.createTextNode(b.Name))};l.prototype=new i.Dialog;l.prototype.TEMPLATE='<div id="message" style="width: 25em; padding-bottom: 5px;"></div><div id="directoryTree" class="explorerTreeClass" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>';
l.prototype._init=function(a){this.title=a.title||f["Choose a Folder"];this.modal=!0;this.buttons=[{text:f.OK,isDefault:!0,callback:this.done.bind(this)}];this.customFocus=!0;this._fileClient=a.fileClient;this._serviceRegistry=a.serviceRegistry;this._message=a.message||"";this._func=a.func;this._initialize()};l.prototype._bindToDom=function(){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
l.prototype.loadFolderList=function(c){c=e.makeRelative(c);this.selection=new d.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new b.FileExplorer({treeRoot:{children:[]},selection:this.selection,serviceRegistry:this._serviceRegistry,fileClient:this._fileClient,parentId:"directoryTree",excludeFiles:!0,rendererFactory:function(b){return new a({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"},b)}});this.explorer.loadResourceList(c,!0,null)};l.prototype.done=
function(){this.selection.getSelection(function(a){this.hide();this._func(a)}.bind(this))};l.prototype.constructor=l;return{DirectoryPrompterDialog:l}});define("text!orion/sites/templates/SiteEditor.html",[],function(){return'<div class="siteEditor">\n\t<div class="sectionTable" role="region">\n\t\t<form id="siteForm" class="siteForm sectionTableItem">\n\t\t\t<div class="siteEditorTable">\n\t\t\t\t<div>\n\t\t\t\t\t<div class="header">\n\t\t\t\t\t\t<label class="siteConfigNameLabel">${Name:}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="cell">\n\t\t\t\t\t\t<input class="siteConfigName" required="required" pattern="\\s*\\S+\\s*" value="">\n\t\t\t\t\t\t<div class="nameInvalid">${Not a valid name}</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div>\n\t\t\t\t\t<div class="header">\n\t\t\t\t\t\t<label class="hostHintLabel">${Hostname hint:}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="cell">\n\t\t\t\t\t\t<input class="hostHint" required="required" pattern="^(?:\\s*|[A-Za-z0-9-_]+)$" value="">\n\t\t\t\t\t\t<em>${Optional; used to determine the URL where a started site can be accessed.}</em>\n\t\t\t\t\t\t<div class="hostInvalid">${Not a valid hostname}</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div>\n\t\t\t\t\t<div class="header">\n\t\t\t\t\t\t<label class="hostingStatusLabel">${Status:}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="cell hostingStatusArea">\n\t\t\t\t\t\t<span class="hostingStatus"></span>\n\t\t\t\t\t\t<span class="siteStartedWarning">\n\t\t\t\t\t\t\t<em>${Changes you make here won\'t affect the running site.}</em>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</form>\n\t</div>\n\n\t<div class="siteEditorTable">\n\t\t<div class="mappingsGridTable"></div>\n\n\t\t<div class="convertToolbar"></div>\n\t</div>\n\n</div>'});
define("text!orion/sites/templates/ConvertToSelfHostingDialog.html",[],function(){return'<div>\n\t<style>\n\t.form {\n\t\twidth: auto;\n\t\tlist-style-type: none; \n\t\tpadding: 0; \n\t\tmargin: 0;\n\t\t-webkit-padding-start: 0;\n\t\t-webkit-margin-before: 0;\n\t}\n\t.form li {\n\t\tmargin: 0;\n\t}\n\t.msg {\n\t\tclear: both;\n\t\twidth: 25em;\n\t}\n\t.pad1 { padding: 8px 0 0 0; }\n\t.pad2 { padding: 20px 0 0 0; }\n\t.field {\n\t\tfloat: left;\n\t\twidth: 6em;\n\t}\n\t.col { float: left; }\n\t.okButton {\n\t\tfloat: right;\n\t\tclear: both;\n\t}\n\t</style>\n\t<div>\n\t\t<ul class="form">\n\t\t\t<li class="msg">\n\t\t\t\t<div>${SelectRepoSourceFolder}</div>\n\t\t\t</li>\n\t\t\t<li class="pad1">\n\t\t\t\t<div class="col">\n\t\t\t\t\t<button class="browseButton commandButton" id="browseButton">${Browse...}</button>\n\t\t\t\t\t<span class="folderText" id="folderText"></span>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t<li class="msg pad2">\n\t\t\t\t<div>${EnterPortNumber}</div>\n\t\t\t</li>\n\t\t\t<li class="pad1">\n\t\t\t\t<input class="field port" id="port" type="number" />\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</div>'});
define("orion/sites/SiteEditor","i18n!orion/sites/nls/messages,orion/commands,orion/Deferred,orion/section,orion/objects,orion/sites/siteMappingsTable,orion/i18nUtil,orion/webui/littlelib,orion/EventTarget,orion/webui/dialogs/DirectoryPrompterDialog,orion/webui/dialog,text!orion/sites/templates/SiteEditor.html,text!orion/sites/templates/ConvertToSelfHostingDialog.html".split(","),function(f,k,i,e,d,j,c,b,a,l,h,g,m){var n=function(a){this.options=a=a||{};d.mixin(this,a);this._init(a)};n.prototype=
new h.Dialog;d.mixin(n.prototype,{DEFAULT_PORT:8080,TEMPLATE:m,_init:function(a){this.title=a.title||f["Convert to Self-Hosting"];this.buttons=[{text:f.OK,callback:this.okButtonClicked.bind(this)}];this.modal=!0;this.messages={};d.mixin(this.messages,f);this.messages.SelectRepoSourceFolder=c.formatMessage(f.SelectRepoSourceFolder,["org.eclipse.orion.client"]);this.messages.EnterPortNumber=c.formatMessage(f.EnterPortNumber,this.DEFAULT_PORT);this._initialize()},_bindToDom:function(){var a=this;this.$okButton=
this.$buttonContainer.firstChild;this.$okButton.classList.add("disabled");this.$browseButton.addEventListener("click",function(){var b=new l.DirectoryPrompterDialog({title:f["Choose Orion Source Folder"],serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:this.onFolderChosen.bind(this)});a._addChildDialog(b);b.show()}.bind(this));this.$port.addEventListener("change",function(){this.portNumber=parseInt(this.$port.value,10);this.updateValidity()}.bind(this));this.portNumber=this.$port.value=
this.DEFAULT_PORT;this.updateValidity()},onFolderChosen:function(a){this.folder=a;this.$folderText.textContent=a?a.Name:"";this.updateValidity()},isValid:function(){return this.folder&&!isNaN(this.portNumber)&&this.portNumber>0},updateValidity:function(){this.isValid()?this.$okButton.classList.remove("disabled"):this.$okButton.classList.add("disabled")},okButtonClicked:function(){this.isValid()&&(this.hide(),typeof this.options.func==="function"&&this.options.func(this.folder,this.portNumber))}});
var q="/",h=function(a,b){a=a||{};d.mixin(this,a);this.options=a;this.checkOptions(this.options,"serviceRegistry,fileClient,siteClient,commandService,statusService,progressService".split(","));this._fileClient=this.options.fileClient;this._siteClient=this.options.siteClient;this._commandService=this.options.commandService;this._statusService=this.options.statusService;this._progressService=this.options.progressService;this._commandsContainer=this.options.commandsContainer;this.options.location&&this.load(this.options.location);
this.node=b||document.createElement("div")};a.attach(h.prototype);d.mixin(h.prototype,{_siteConfiguration:null,_modelListeners:null,mappings:null,_mappingProposals:null,_isSelfHostingSite:!1,_isDirty:!1,_autoSaveTimer:null,show:function(){this.createElements();this.postCreate()},createElements:function(){this.node.innerHTML=g;b.processTextNodes(this.node,f);this.siteForm=b.$(".siteForm",this.node);this.name=b.$(".siteConfigName",this.node);this.name.id=this.id+"_name";this.nameInvalid=b.$(".nameInvalid",
this.node);this.hostHint=b.$(".hostHint",this.node);this.hostHint.id=this.id+"_hostHint";this.hostInvalid=b.$(".hostInvalid",this.node);this.hostingStatus=b.$(".hostingStatus",this.node);this.siteStartedWarning=b.$(".siteStartedWarning",this.node);this.mappingsPlaceholder=b.$(".mappingsGridTable");this.mappingsPlaceholder.id=this.id+"_mappingsPlaceholder";this.convertToolbar=b.$(".convertToolbar");this.convertToolbar.id=this.id+"_convertToolbar";b.$(".siteConfigNameLabel",this.node).htmlFor=name.id;
b.$(".hostHintLabel",this.node).htmlFor=this.hostHint.id},postCreate:function(){var a=this;this.name.addEventListener("input",function(){a.name.checkValidity()?(a.name.classList.remove("invalid"),a.nameInvalid.classList.remove("visible")):(a.name.classList.add("invalid"),a.nameInvalid.classList.add("visible"))});this.hostHint.addEventListener("change",function(){a.hostHint.checkValidity()?(a.hostHint.classList.remove("invalid"),a.hostInvalid.classList.remove("visible")):(a.hostHint.classList.add("invalid"),
a.hostInvalid.classList.add("visible"))});var b=this;i.when(this.siteClient._canSelfHost(),function(a){var c=new k.Command({name:f["Convert to Self-Hosting"],tooltip:f["Enable the site configuration to launch an Orion server running your local client code"],imageClass:"core-sprite-add",id:"orion.site.convert",visibleWhen:function(c){return!!c.Location&&a&&!b._isSelfHostingSite},callback:b.convertToSelfHostedSite.bind(b)});b._commandService.addCommand(c)});this._autoSaveTimer=setTimeout(this.autoSave.bind(this),
8E3)},checkOptions:function(a,b){for(var c=0;c<b.length;c++)if(typeof a[b[c]]==="undefined")throw Error("options."+b[c]+" is required");},_makeAddMenuChoices:function(a,b){function c(a){if(!d.getSiteConfiguration().Mappings.some(function(a){return a.Source===q}))a.Source=q;d.mappings.addMapping(a)}var b=Array.isArray(b)?b[0]:b,a=a.sort(function(a,b){return a.FriendlyPath.toLowerCase().localeCompare(b.FriendlyPath.toLowerCase())}),d=this,e=function(){c(this.mapping)},g=a.map(function(a){return{name:a.FriendlyPath,
imageClass:"core-sprite-folder",mapping:a,callback:e}});a.length>0&&g.push({});g.push({name:f["Choose folder..."],imageClass:"core-sprite-folder",callback:function(){(new l.DirectoryPrompterDialog({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:function(a){a&&this._siteClient.getMappingObject(this.getSiteConfiguration(),a.Location,a.Name).then(function(a){e.call({mapping:a})})}.bind(this)})).show()}.bind(this)});g.push({name:f.URL,imageClass:"core-sprite-link",callback:function(){c({Source:"/web/somePath",
Target:"http://",FriendlyPath:"http://"})}});return g},convertToSelfHostedSite:function(){var a=this;(new n({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,siteClient:this._siteClient,func:function(b,c){a._siteClient.convertToSelfHosting(a.getSiteConfiguration(),b.Location,c).then(function(b){a.mappings.deleteAllMappings();a.mappings.addMappings(b.Mappings);a.save()})}})).show()},load:function(a){var b=new i;this._busyWhile(b,"Loading...");this._siteClient.loadSiteConfiguration(a).then(function(a){this._setSiteConfiguration(a);
this.setDirty(!1);b.resolve(a)}.bind(this),function(a){b.reject(a)});return b},_setSiteConfiguration:function(a){this._detachListeners();this._siteConfiguration=a;if(!this._mappingProposals){var b=this._commandService;this._mappingProposals=this._siteClient.getMappingProposals(a).then(function(a){a=new k.Command({name:f.Add,tooltip:f["Add a directory mapping to the site configuration"],id:"orion.site.mappings.add",visibleWhen:function(){return!0},choiceCallback:this._makeAddMenuChoices.bind(this,
a)});b.addCommand(a);a=this.titleWrapper.actionsNode;b.registerCommandContribution(a.id,"orion.site.mappings.add",1);b.renderCommands(a.id,a,this.mappings,this,"button")}.bind(this))}this._refreshCommands();this._refreshFields()},setDirty:function(a){this._isDirty=a;this.dispatchEvent({type:"dirty",value:a})},isDirty:function(){return this._isDirty},_refreshCommands:function(){function a(b){c._onError(b)}function b(a){c._setSiteConfiguration(a);c.setDirty(!1)}var c=this;this._siteClient.isSelfHostingSite(this.getSiteConfiguration()).then(function(d){c._isSelfHostingSite=
d;c._commandService.destroy(c._commandsContainer);c._commandService.renderCommands(c._commandsContainer.id,c._commandsContainer,c._siteConfiguration,{},"button",{site:c._siteConfiguration,startCallback:b,stopCallback:b,errorCallback:a})})},_refreshFields:function(){this.name.setAttribute("value",this._siteConfiguration.Name);this.hostHint.setAttribute("value",this._siteConfiguration.HostHint);this.mappings?this.mappings._setSiteConfiguration(this._siteConfiguration):(this.titleWrapper=new e.Section(document.getElementById(this.mappingsPlaceholder.id),
{id:"workingDirectorySection",title:f.Mappings,content:'<div id="mappingsNode"/>',canHide:!0}),this.mappings=new j.MappingsTable({serviceRegistry:this.serviceRegistry,siteClient:this._siteClient,fileClient:this._fileClient,commandRegistry:this._commandService,selection:null,parentId:"mappingsNode",siteConfiguration:this._siteConfiguration}));var a=this._siteConfiguration.HostingStatus;if(a&&a.Status==="started"){this.siteStartedWarning.style.display="block";this.hostingStatus.textContent=f["Started at "];
var b=document.createElement("a");b.href=a.URL;b.target="_new";this.hostingStatus.appendChild(b);b.textContent=a.URL}else if(a&&a.Status==="stopped")this.siteStartedWarning.style.display="none",this.hostingStatus.textContent=f.Stopped;setTimeout(function(){this._attachListeners(this._siteConfiguration)}.bind(this),0)},_attachListeners:function(a){function b(d,e){function f(){var b=d.value,g=a[e];a[e]=b;c.setDirty(g!==b||c.isDirty())}d.addEventListener("input",f);c._modelListeners.push({target:d,type:"input",
listener:f})}this._detachListeners();this._modelListeners=this._modelListeners||[];var c=this;b(this.name,f.Name);b(this.hostHint,f.HostHint);var d=function(a){c.setDirty(a.value)};this.mappings.addEventListener("dirty",d);this._modelListeners.push({target:this.mappings,type:"dirty",listener:d})},_detachListeners:function(){if(this._modelListeners){for(var a=0;a<this._modelListeners.length;a++){var b=this._modelListeners[a];b.target.removeEventListener(b.type,b.listener)}this._modelListeners.splice(0)}},
getSiteConfiguration:function(){return this._siteConfiguration},getResource:function(){return this._siteConfiguration&&this._siteConfiguration.Location},save:function(a){var a=typeof a==="undefined"?!0:a,b=this._siteConfiguration,c=b.HostingStatus;delete b.HostingStatus;var d=this;this._busyWhile(this._siteClient.updateSiteConfiguration(b.Location,b).then(function(e){d.setDirty(!1);return a?(d._setSiteConfiguration(e),e):(b.HostingStatus=c,d._refreshCommands(),b)}));return!0},autoSave:function(){this.isDirty()&&
this.save(!1);setTimeout(this.autoSave.bind(this),8E3)},_busyWhile:function(a,b){a.then(this._onSuccess.bind(this),this._onError.bind(this));this.progressService.showWhile(a,b)},_onSuccess:function(a){this.onSuccess(a)},_onError:function(a){this._statusService.setErrorMessage(a);this.onError(a)},onSuccess:function(a){this.dispatchEvent({type:"success",deferred:a})},onError:function(a){this.dispatchEvent({type:"error",deferred:a})}});return h});
define('built-site.js',"require,i18n!orion/sites/nls/messages,orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/fileClient,orion/operationsClient,orion/searchClient,orion/dialogs,orion/globalCommands,orion/sites/siteClient,orion/sites/siteCommands,orion/PageUtil,orion/sites/SiteEditor".split(","),function(f,k,i,e,d,j,c,b,a,l,h,g,m,n,q){i.startup().then(function(c){var i=c.serviceRegistry,s=c.preferences;new l.DialogService(i);var p=new b.OperationsClient(i),c=new e.StatusReportingService(i,
p,"statusPane","notifications","notificationArea"),y=new j.CommandRegistry({}),p=new d.ProgressService(i,p,y),u=n.matchResourceParameters().resource,u=g.forLocation(i,u),r=u._getFileClient(),z=new a.Searcher({serviceRegistry:i,commandService:y,fileService:r});h.generateBanner("orion-site",i,y,s,z);var v,F=function(){var a=v&&v.getSiteConfiguration();if(v&&a){var b={Parents:[]};b.Name=a.Name;b.Parents[0]={};b.Parents[0].Name=k.Sites;b.Parents[0].Location="";h.setPageTarget({task:"Edit Site",target:a,
breadcrumbTarget:b,makeBreadcrumbLink:function(a){a.href=f.toUrl("sites/sites.html")},serviceRegistry:i,searchService:z,fileService:r,commandService:y});h.setDirtyIndicator(v.isDirty())}},s=function(){var a=n.matchResourceParameters().resource;a&&a!==v.getResource()&&(!v.isDirty()||confirm(k["There are unsaved changes. Do you still want to navigate away?"]))&&v.load(a).then(function(){F()})};window.addEventListener("hashchange",s);v=new q({serviceRegistry:i,fileClient:r,siteClient:u,commandService:y,
statusService:c,progressService:p,commandsContainer:document.getElementById("pageActions"),id:"site-editor"});document.getElementById("site").appendChild(v.node);v.show();v.addEventListener("success",F);v.addEventListener("dirty",F);s();window.onbeforeunload=function(){if(v.isDirty())return k["There are unsaved changes."]};m.createSiteCommands(i,y);y.registerCommandContribution("pageActions","orion.site.start",1);y.registerCommandContribution("pageActions","orion.site.stop",2);y.registerCommandContribution("pageActions",
"orion.site.convert",3)})});