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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

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

 Contributors:  IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

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

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

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

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


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


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

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

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

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

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

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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

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

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

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

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

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors:  IBM Corporation - initial API and implementation

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

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

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

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation
*/
(function(){function h(c,f,b,e,a,j){f[c]&&(b.push(c),(f[c]===!0||f[c]===1)&&e.push(a+c+"/"+j))}function i(c,f,b,e,a){f=e+f+"/"+a;require._fileExists(c.toUrl(f+".js"))&&b.push(f)}function g(c,f,b){for(var e in f)f.hasOwnProperty(e)&&(!c.hasOwnProperty(e)||b)?c[e]=f[e]:typeof f[e]==="object"&&g(c[e],f[e],b)}var c=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(d){var f=d.config?d.config():{};return{version:"2.0.1+",load:function(b,e,a,j){j=j||{};if(j.locale)f.locale=j.locale;
var l=c.exec(b),d=l[1],m=l[4],n=l[5],r=m.split("-"),o=[],q={},p,u="";if(l[5])d=l[1],b=d+n;else{n=l[4];m=f.locale;if(!m)m=f.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();r=m.split("-")}if(j.isBuild){o.push(b);i(e,"root",o,d,n);for(p=0;p<r.length;p++)j=r[p],u+=(u?"-":"")+j,i(e,u,o,d,n);e(o,function(){a()})}else e([b],function(b){var j=[],c;h("root",b,j,o,d,n);for(p=0;p<r.length;p++)c=r[p],u+=(u?"-":"")+c,h(u,b,j,o,d,n);e(o,function(){var c,
l,f;for(c=j.length-1;c>-1&&j[c];c--){f=j[c];l=b[f];if(l===!0||l===1)l=e(d+f+"/"+n);g(q,l)}a(q)})})}}})})();
define("orion/i18n",[],function(){return{load:function(h,i,g,c){var c=c||{},d=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,f=d.exec(h);if(f)if(i.defined(h))g(i(h));else if(c.isBuild||c.isTest)g({});else{var b=f[1],e=f[3]?f[2]:"",a=f[3]||f[2];i(["orion/bootstrap"],function(j){j.startup().then(function(j){var k=j.serviceRegistry,j=k.getServiceReferences("orion.i18n.message");if(e)j.some(function(a){return h===a.getProperty("name")?(k.getService(a).getMessageBundle().then(function(a){g(a)},function(){g({})}),
!0):!1})||g({});else{var m={},n;j.forEach(function(j){var l=j.getProperty("name");if((f=d.exec(l))&&b===f[1]&&a===(f[3]||f[2]))if(e=f[3]?f[2]:""){if((j=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.toLowerCase().indexOf(e.toLowerCase())===0)m[e]=!0,i.specified(l)||define(l,["orion/i18n!"+l],function(a){return a})}else n=j});i.specified(h)?g(m):n?k.getService(n).getMessageBundle().then(function(a){Object.keys(m).forEach(function(b){typeof a[b]==="undefined"&&
(a[b]=m[b])});define(h,[],a);g(a)},function(){define(h,[],m);g(m)}):(define(h,[],m),g(m))}})})}else g(null)}}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile","Git Settings":"Git Settings",General:"General",Navigation:"Navigation","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Links:"Links",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",FileMgt:"File Management","Autosave Enabled":"Auto Save","Save interval":"Save interval (ms)","Autoload Enabled":"Auto Load",Restore:"Restore Defaults",Default:"Default",Scheme:"Scheme",Tabs:"Tabs",TabSize:"Tab Size",ExpandTab:"Insert spaces for tabs",ScrollAnimation:"Smooth scrolling",ScrollAnimationEnabled:"Scrolling Animation",ScrollAnimationTimeout:"Scrolling Duration (ms)",KeyBindings:"Key Bindings","Invalid save interval.":"Invalid save interval.",
"Invalid scrolling duration.":"Invalid scrolling duration.","Invalid tab size.":"Invalid tab size.","Editor preferences updated":"Editor preferences updated","Editor defaults restored":"Editor defaults restored"});define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/browserCompatibility",[],function(){function h(){for(var c=navigator.userAgent,f={browser:!1,version:!1},b=[{name:"Chrome/Chromium",regExp:/(?:chrome|crios|chromium)\/(\d+)/i,minVersion:24},{name:"Firefox",regExp:/firefox\/(\d+)/i,minVersion:17},{name:"MSIE",regExp:/msie\s(\d+)/i,minVersion:10},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:5}],e=0;e<b.length;e++){var a=b[e],j=c.match(a.regExp);if(j){f.browser=!0;f.version=j[1]>=a.minVersion;f.name=a.name;break}}return f}
function i(){try{return"localStorage"in window&&window.localStorage!==null}catch(c){return!1}}function g(c){alert(c);throw"unsupported browser";}var c=h();if(c.browser)c.version||g("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+c.name+".\n");else if(i()&&!localStorage.skipBrowserCheck)if(confirm("Sorry, your browser is not supported. The latest version of Chrome, Firefox or Safari web browser is recommended.\nContinue anyway?"))localStorage.skipBrowserCheck=
1;else throw"unsupported browser";else i()||g("Sorry, your browser is not supported.\n\nTo use Orion, the latest version of the Chrome, Firefox, or Safari web browser is recommended.\n");return{isSupportedBrowser:h,supportsLocalStorage:i,throwBrowserAlert:g}});
(function(h,i){typeof define==="function"&&define.amd?define("orion/Deferred",i):typeof exports==="object"?module.exports=i():(h.orion=h.orion||{},h.orion.Deferred=i())})(this,function(){function h(){for(var j;j=b.shift()||e.shift();)j();a=!1}function i(j,c){(c?e:b).push(j);a||(a=!0,c?setTimeout(h,0):h())}function g(a){return function(){a.apply(null,arguments)}}function c(){}function d(){var a=Error("Cancel");a.name="Cancel";return a}function f(){function a(){for(var j;j=m.shift();){var d=j.deferred,
f=e==="resolved"?"resolve":"reject";if(typeof j[f]==="function")try{var n=j[f](b);n&&typeof n.then==="function"?(d.cancel=n.cancel||c,n.then(g(d.resolve),g(d.reject),d.progress)):d.resolve(n)}catch(h){d.reject(h)}else d[f](b)}}var b,e,m=[],n=this;this.reject=function(c){e||(e="rejected",b=c,m.length&&i(a));return n.promise};this.resolve=function(c){e||(e="resolved",b=c,m.length&&i(a));return n.promise};this.progress=function(a){e||m.forEach(function(b){b.progress&&b.progress(a)});return n.promise};
this.cancel=function(){e||n.reject(d())};this.then=function(b,c,d){var b={resolve:b,reject:c,progress:d,deferred:new f},l=b.deferred,g=!1,h=function(){g||(g=!0,i(function(){var a=l.cancel===h?n.cancel:l.cancel;typeof a==="function"&&a()},!0))};l.cancel=h;m.push(b);e&&i(a,!0);return l.promise};this.promise=Object.create(Object.prototype,{then:{value:n.then},cancel:{get:function(){return n.cancel},set:function(a){n.cancel=a}}})}var b=[],e=[],a=!1;f.all=function(a,b){function e(a,b){o||(g[a]=b,--d===
0&&q.resolve(g))}function c(a,j){if(!o){if(b)try{e(a,b(j));return}catch(d){j=d}q.reject(j)}}var d=a.length,g=[],o=!1,q=new f;q.then(null,function(){o=!0;a.forEach(function(a){a.cancel&&a.cancel()})});d===0?q.resolve(g):a.forEach(function(a,b){a.then(e.bind(null,b),c.bind(null,b))});return q.promise};f.when=function(a,b,e,c){var d;if(!(a&&typeof a.then==="function"))d=new f,d.resolve(a),a=d.promise;return a.then(b,e,c)};return f});
define("orion/EventTarget",[],function(){function h(){this._namedListeners={}}h.prototype={dispatchEvent:function(h){if(!h.type)throw Error("unspecified type");var g=this._namedListeners[h.type];g&&g.forEach(function(c){try{typeof c==="function"?c(h):c.handleEvent(h)}catch(d){typeof console!=="undefined"&&console.log(d)}});return!h.defaultPrevented},addEventListener:function(h,g){if(typeof g==="function"||g.handleEvent)this._namedListeners[h]=this._namedListeners[h]||[],this._namedListeners[h].push(g)},
removeEventListener:function(h,g){var c=this._namedListeners[h];if(c)for(var d=0;d<c.length;d++)if(c[d]===g){c.length===1?delete this._namedListeners[h]:c.splice(d,1);break}}};h.prototype.constructor=h;h.attach=function(i){var g=new h;i.dispatchEvent=g.dispatchEvent.bind(g);i.addEventListener=g.addEventListener.bind(g);i.removeEventListener=g.removeEventListener.bind(g)};return h});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(h,i){function g(b,a,j){this._properties=j||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function c(b,a,j){this._serviceId=b;this._serviceReference=a;this._internalRegistry=j}function d(b,a){function j(j){return function(){var c;try{if(!a())throw Error("Service was unregistered");var d=b[j].apply(b,Array.prototype.slice.call(arguments));if(d&&typeof d.then==="function")return d;
else c=new h,c.resolve(d)}catch(l){c=new h,c.reject(l)}return c.promise}}for(var c in b)typeof b[c]==="function"&&(this[c]=j(c))}function f(b,a){this.type=b;this.serviceReference=a}function b(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var j=b._entries[a];if(!j)throw Error("already unregistered");var c=j.reference;b._serviceEventTarget.dispatchEvent(new f("unregistering",
c));b._entries[a]=null;c.getProperty("objectClass").forEach(function(a){for(var j=b._namedReferences[a],d=0;d<j.length;d++)if(j[d]===c){j.length===1?delete b._namedReferences[a]:j.splice(d,1);break}})},modifyService:function(a){a=b._entries[a];if(!a)throw Error("already unregistered");b._serviceEventTarget.dispatchEvent(new f("modified",a.reference))}}}g.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]}};
g.prototype.constructor=g;c.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("already unregistered");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)}};
c.prototype.constructor=c;b.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,j){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var l=this._entries.length,k=new g(l,b,j),m=this._namedReferences;b.forEach(function(a){m[a]=m[a]||[];m[a].push(k)});b=new d(a,this._internalRegistry.isRegistered.bind(null,l));this._entries.push({reference:k,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new f("registered",k));return new c(l,k,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,
a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};b.prototype.constructor=b;return{ServiceRegistry:b}});
define("orion/xhr",["orion/Deferred"],function(h){function i(g,c,d,f){var b=typeof d.response!=="undefined"?d.response:d.responseText,e;try{e=d.status}catch(a){e=0}g={args:c,response:b,responseText:typeof b==="string"?b:null,status:e,url:g,xhr:d};if(typeof f!=="undefined")g.error=f;return g}return function(g,c,d){var d=d||{},f=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,b=new h,e=d.headers||{},a=d.log||!1,j;typeof e["X-Requested-With"]==="undefined"&&(e["X-Requested-With"]="XMLHttpRequest");
if(typeof d.data!=="undefined"&&(g==="POST"||g==="PUT"))j=d.data;f.onprogress=function(a){a.xhr=f;b.progress(a)};f.onreadystatechange=function(){if(f.readyState===4){var e=i(c,d,f),j=f.status;200<=j&&j<400?b.resolve(e):(a&&typeof console!=="undefined"&&console.log(Error(f.statusText)),b.reject(e))}};try{f.open(g,c,!0);if(typeof d.responseType==="string")f.responseType=d.responseType;if(typeof d.timeout==="number")if(typeof f.timeout==="number")f.timeout=d.timeout,f.addEventListener("timeout",function(){b.reject(i(c,
d,f,"Timeout exceeded"))});else{var l=setTimeout(function(){b.reject(i(c,d,f,"Timeout exceeded"))},d.timeout);b.then(clearTimeout.bind(null,l),clearTimeout.bind(null,l))}Object.keys(e).forEach(function(a){f.setRequestHeader(a,e[a])});f.send(j)}catch(k){b.reject(i(c,d,f,k))}return b.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,i,g){function c(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function d(a,b){return{get:function(e,c){if(b===0)return null;var d=localStorage.getItem(a+e);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(e,c){if(b!==0){if(b!==-1)c._expires=(new Date).getTime()+1E3*b;
if(Object.keys(c).length===0)localStorage.removeItem(a+e);else{var d=JSON.stringify(c);localStorage.setItem(a+e,d);delete c._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function f(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 b(a){this._location=
a;this._currentPromise=null;this._cache=new d("/orion/preferences/default",3600)}function e(){this._cache=new d("/orion/preferences/local",-1)}function a(a,c){this._userProvider=new f(a);this._localProvider=new e;c=c||"defaults.pref";c.indexOf("://")===-1&&(c=h.toUrl(c));this._defaultsProvider=new b(c);this._serviceRegistration=a.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var e=this._stores[b];this._dirty.indexOf(e)!==-1&&
a.push(this._providers[b].put(this._name,e))}this._dirty=[];return i.all(a)},_scheduleFlush:function(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],e;for(e in b)b.hasOwnProperty(e)&&typeof this._cached[e]==="undefined"&&(this._cached[e]=
b[e])}}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 e=this._stores[0];if(e[a]!==b)e[a]=b,this._cached=null,this._scheduleFlush(e)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var e=this._stores[b];if(e.hasOwnProperty(a))return delete e[a],this._cached=null,this._scheduleFlush(e),!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,e=[],c=0;c<this._providers.length;++c)e.push(this._providers[c].get(this._name,a).then(function(a){return function(e){b._stores[a]=e}}(c)));return i.all(e).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};f.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var e=new i,c=null;
b?this._cache.remove(a):c=this._cache.get(a);if(c!==null)e.resolve(c);else{this._currentPromises[a]=e;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];e.resolve(b)},function(b){b.status===404?(b={},d._cache.set(a,b),delete d._currentPromises[a],e.resolve(b)):(delete d._currentPromises[a],e.resolve(d._cache.get(a,!0)||{}))})}return e},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};b.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var e=new i,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(c!==null)e.resolve(c);else{this._currentPromise=e;var d=this;g("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;e.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(d._cache.set(a,{}),d._currentPromise=null,e.resolve({})):(d._currentPromise=null,b=d._cache.get(a,!0),b!==null?e.resolve(b[a]||{}):e.resolve({}))})}return e},
put:function(){var a=new i;a.resolve();return a}};e.prototype={get:function(a){var b=new i,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var e=new i;this._cache.set(a,b);e.resolve();return e}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,e,c){if(!e||typeof e!=="number"||e>7||e<1)c=e,e=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",c,!1);if((a.USER_SCOPE&e)!==0)return"/orion/preferences/user"+
b;else if((a.LOCAL_SCOPE&e)!==0)return"/orion/preferences/local"+b;return"/orion/preferences/default"+b},getPreferences:function(b,e){if(!e||typeof e!=="number"||e>7||e<1)e=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var d=[];a.USER_SCOPE&e&&this._userProvider.available()&&d.push(this._userProvider);a.LOCAL_SCOPE&e&&d.push(this._localProvider);a.DEFAULT_SCOPE&e&&d.push(this._defaultsProvider);var f=new c(b,d);return f.sync().then(function(){return f})},getSetting:function(a,b,e){for(var c,d=0;d<a.length;d++)if(a[d].label===
b)for(var f=0;f<a[d].data.length;f++)if(a[d].data[f].label===e){c=a[d].data[f].value;break}return c}};return{PreferencesService:a}});
(function(){function h(a){if(typeof a!=="string")throw new TypeError;}function i(a){return a?a.split("&"):[]}function g(a){return a.length===0?"":a.join("&")}function c(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 f(a,b){var e="",d=[],j=0;return{next:function(){if(e!==a.query)e=a.query,d=i(e);if(j<d.length){var f=c(d[j++]);
switch(b){case "keys":return f[0];case "values":return f[1];case "keys+values":return[f[0],f[1]];default:throw new TypeError;}}throw x;}}}function b(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function e(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 j(b,c){if(typeof b!=="string")throw new TypeError;var b=a(b),d=m.exec(b);
if(!d)return null;var j={};j.scheme=d[1]||"";if(j.scheme&&!r.test(j.scheme))return null;var f=d[2];if(f&&(f=n.exec(f),j.userinfo=f[1],j.host=f[2],j.port=f[3],j.port&&!o.test(j.port)))return null;j.path=d[3];j.query=d[4];j.fragment=d[5];if(!j.scheme&&c&&(j.scheme=c.scheme,!j.host&&c.host))j.userinfo=c.userinfo,j.host=c.host,j.port=c.port,j.pathRelative=!0;if(j.pathRelative)if(j.path){if(j.path[0]!=="/")d=/^(.*\/)[^\/]*$/.exec(c.path)[1]||"/",j.path=d+j.path}else j.path=c.path;if(j.scheme)j.scheme=
j.scheme.toLowerCase();if(j.port)j.port=/[1-9]\d*$/.exec(j.port)[0];if(j.host&&j.path)j.path=e(j.path);return j}function l(a,e){var c;if(e){e=e.href||e;c=j(e);if(!c||!c.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:c})}c=j(a,c);if(!c)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:c,writable:!0});var d=new b(this);Object.defineProperty(this,"query",{get:function(){return this._url?d:null},enumerable:!0})}
try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(k){}var m=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,n=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,r=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,o=/^\d*$/,q=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,p=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,u=/^([^?#\s]*)$/,w=/^([^\s]*)$/,t=/^\S*$/,y=/([^:]*):?(.*)/,x=typeof StopIteration!=="undefined"?StopIteration:
Error("Stop Iteration"),v={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(b.prototype,{get:{value:function(a){h(a);var b;i(this._url.query).some(function(e){e=c(e);if(e[0]===a)return b=e[1],!0});return b},enumerable:!0},set:{value:function(a,b){h(a);h(b);var e=i(this._url.query);e.some(function(j,f){var l=c(j);if(l[0]===a)return l[1]=b,e[f]=d(l),!0})||e.push(d([a,b]));this._url.query=g(e)},enumerable:!0},has:{value:function(a){h(a);return i(this._url.query).some(function(b){if(c(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var b=i(this._url.query),e=b.filter(function(b){return c(b)[0]!==a});return e.length!==b.length?(this._url.query=g(e),!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 e=f(this._url,"keys+values");try{for(;;){var c=e.next();a.call(b,c[1],c[0],this)}}catch(j){if(j!==x)throw j;}},enumerable:!0},keys:{value:function(){return f(this._url,
"keys")},enumerable:!0},values:{value:function(){return f(this._url,"values")},enumerable:!0},items:{value:function(){return f(this._url,"keys+values")}},size:{get:function(){return i(this._url.query).length},enumerable:!0},getAll:{value:function(a){h(a);var b=[];i(this._url.query).forEach(function(e){e=c(e);e[0]===a&&b.push(e[1])});return b},enumerable:!0},append:{value:function(a,b){h(a);h(b);var e=i(this._url.query);e.push(d([a,b]));this._url.query=g(e)},enumerable:!0}});Object.defineProperties(l.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){h(a);this._input=a;this._url=j(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:""},enumerable:!0},protocol:{get:function(){return this._url?
this._url.scheme+":":":"},set:function(a){h(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,r.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){h(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=y.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);if(this._url){var b=y.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=y.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);if(this._url){var b=[y.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){h(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){h(a);if(this._url&&q.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===v[this.protocol]&&(a="");return a},set:function(a){h(a);if(this._url&&o.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){h(a);if(this._url&&u.exec(a))this._url.host&&
a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?e(a):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),w.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),t.exec(a)))this._url.fragment=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&
(Object.defineProperty(l,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(l,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=l})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(h,i){function g(a,b){var e=Object.keys(a),c=Object.keys(b);if(e.length!==c.length)return!1;e.sort();c.sort();for(var d=0,f=e.length;d<f;d++){var g=e[d];if(g!==c[d])return!1;var o=a[g],g=b[g];if(o!==g&&JSON.stringify(o)!==JSON.stringify(g))return!1}return!0}function c(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(b){}return a}function d(a){var b=null;return{key:function(e){return(b=
b||Object.keys(a))[e]},getItem:function(b){return a[b]},setItem:function(e,c){a[e]=c;b=null},removeItem:function(e){delete a[e];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function f(a,b){return{type:a,plugin:b}}function b(a,b,e){function c(a,b,d){if(!D)return(new h).reject(Error("plugin not connected"));var j=z++,f=new h;f.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&e.postMessage({id:j,cancel:a.message||"Cancel"},
D)});A[String(j)]=f;e.postMessage({id:j,serviceId:a,method:b,params:d},D);return f.promise}function d(a){var b={};if(a.methods&&(a.methods.forEach(function(e){b[e]=function(){var b=Array.prototype.slice.call(arguments);return v==="active"?c(a.serviceId,e,b):p.start({"transient":!0}).then(function(){return c(a.serviceId,e,b)})}}),b.addEventListener&&b.removeEventListener)){var e=new i;b.dispatchEvent=e.dispatchEvent.bind(e);var j=b.addEventListener;b.addEventListener=function(a,b){e._namedListeners[a]||
j(a);e.addEventListener(a,b)};var f=b.removeEventListener;b.removeEventListener=function(a,b){e.removeEventListener(a,b);e._namedListeners[a]&&f(a)}}return b}function n(b){var e=JSON.parse(JSON.stringify(b.properties));e.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);e.objectClass=b;return e}function r(a){var b=d(a),c=n(a),c=e.registerService(a.names||a.type,b,c);s[a.serviceId]={registration:c,proxy:b}}function o(){e.persist(a,{created:u,headers:w,services:t,autostart:y,lastModified:x})}
function q(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var c=a.params[0];B({headers:c.headers,services:c.services}).then(function(){C.resolve(p)})}else if("dispatchEvent"===a.method){var d=s[a.serviceId].proxy;d.dispatchEvent.apply(d,a.params)}else if("progress"===a.method)b=A[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)C&&C.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=A[String(a.id)],delete A[String(a.id)],
a.error){var j=e.handleServiceError(p,a.error);b.reject(j)}else b.resolve(a.result)}catch(f){console.log("Plugin._responseHandler "+f)}}var p=this,b=b||{},u=b.created||(new Date).getTime(),w=b.headers||{},t=b.services||[],y=b.autostart,x=b.lastModified||0,v="installed",E,C,D,s={},z=0,A={},B;this._persist=o;this._resolve=function(){v="resolved";e.dispatchEvent(new f("resolved",p))};this._getAutostart=function(){return y};this._getCreated=function(){return u};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(w))};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 x};this.getServiceReferences=function(){var a=[];Object.keys(s).forEach(function(b){a.push(s[b].registration.getReference())});return a};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));
if(E)return E.promise.then(this.start.bind(this,b));if(v==="active")return(new h).resolve();if(!b||!b["transient"]){var c=b&&b.lazy?"lazy":"started";c!==y&&(y=c,o())}c=e.getState();if(c!=="starting"&&c!=="active")return b["transient"]?(new h).reject(Error("start transient error")):(new h).resolve();if(v==="installed")try{this._resolve()}catch(d){return(new h).reject(d)}v==="resolved"&&t.forEach(function(a){r(a)});if(b&&b.lazy)return v!=="starting"&&(v="starting",e.dispatchEvent(new f("lazy activation",
p))),(new h).resolve();var j=new h;E=j;v="starting";e.dispatchEvent(new f("starting",p));C=new h;D=e.connect(a,q);C.then(function(){C=null;v="active";e.dispatchEvent(new f("started",p));E=null;j.resolve()},function(){C=null;v="stopping";e.dispatchEvent(new f("stopping",p));Object.keys(s).forEach(function(a){s[a].registration.unregister();delete s[a]});e.disconnect(D);D=null;v="resolved";E=null;e.dispatchEvent(new f("stopped",p));j.reject(Error("plugin activation error"))});return j.promise};this.stop=
function(a){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(E)return E.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==y)y="stopped",o();if(v!=="active"&&v!=="starting")return(new h).resolve();E=a=new h;v="stopping";e.dispatchEvent(new f("stopping",p));Object.keys(s).forEach(function(a){s[a].registration.unregister();delete s[a]});D&&(e.disconnect(D),D=null);v="resolved";E=null;e.dispatchEvent(new f("stopped",p));a.resolve();return a.promise};
B=function(b){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!b)return x===0&&(x=(new Date).getTime(),o()),e.loadManifest(a).then(B);var c=w,d=t,j=y;w=b.headers||{};t=b.services||{};y=b.autostart||y;b.lastModified?x=b.lastModified:(x=(new Date).getTime(),o());if(g(w,c)&&g(t,d)&&y===j)return(new h).resolve();if(v==="active"||v==="starting"){var k=[];Object.keys(t).forEach(function(a){var b=t[a];k.push(a);var e=s[a];if(e){if(g(b.methods,Object.keys(e.proxy))){var a=n(b),
c=e.registration.getReference(),d={};c.getPropertyKeys().forEach(function(a){d[a]=c.getProperty(a)});g(a,d)||e.registration.setProperties(a);return}e.registration.unregister();delete s[a]}r(b)});Object.keys(s).forEach(function(a){k.indexOf(a)===-1&&(s[a].registration.unregister(),delete s[a])})}v==="active"&&(e.disconnect(D),C=new h,D=e.connect(a,q),C.then(function(){C=null},function(){C=null;v="stopping";e.dispatchEvent(new f("stopping"),p);Object.keys(s).forEach(function(a){s[a].registration.unregister();
delete s[a]});e.disconnect(D);D=null;v="resolved";e.dispatchEvent(new f("stopped",p))}));return(new h).resolve()};this.update=function(a){return B(a).then(function(){e.dispatchEvent(new f("updated",p))})};this.uninstall=function(){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));e.removePlugin(this);v="uninstalled";e.dispatchEvent(new f("uninstalled",
p));return(new h).resolve()}}var e=/^http[s]?/i;return{Plugin:b,PluginRegistry:function(a,j){function l(a){var b=a.source;r.some(function(e){if(b===e.target){if(typeof e.useStructuredClone==="undefined")e.useStructuredClone=typeof a.data!=="string";e.handler(e.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var j=j||{},k=j.storage||localStorage;k.getItem||(k=d(k));var g="installed",n=[],r=[],o=new i,q={},p={registerService:a.registerService.bind(a),connect:function(a,b,e){function c(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var d={handler:b,url:a},f=setTimeout(c.bind(null,"Load timeout for: "+a),e||15E3),l=document.createElement("iframe");l.name=a+"_"+(new Date).getTime();if(!j.visible)l.style.display="none",l.style.visibility="hidden";l.src=a;l.onload=function(){clearTimeout(f);setTimeout(c.bind(null,"Plugin handshake timeout for: "+a),5E3)};l.sandbox="allow-scripts allow-same-origin";document.body.appendChild(l);d.target=l.contentWindow;d.close=function(){l&&
(document.body.removeChild(l),l=null)};r.push(d);return d},disconnect:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.splice(b,1);try{a.close()}catch(e){}break}},removePlugin:function(a){for(var b=0;b<n.length;b++)if(a===n[b]){n.splice(b,1);break}k.removeItem("plugin."+a.getLocation())},persist:function(a,b){k.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{o.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new h,e=p.connect(a,function(a){e&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],p.disconnect(e),e=null,b.resolve(a)):"timeout"===a.method&&(p.disconnect(e),e=null,b.reject(a.error)))});return b.promise},getState:function(){return g},handleServiceError:function(a,b){if(b&&b.status===401){var c=a.getHeaders(),d=a.getName()||a.getLocation(),j=document.createElement("span");j.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(c.login)j.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=c.login,e.test(d.href)?(j.appendChild(d),j.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+c.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(j)}}if(b.__isError){var f=b,b=Error(f.message);Object.keys(f).forEach(function(a){b[a]=f[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=p.getState;this.init=function(){if(!(g==="starting"||g==="active"||g==="stopping")){addEventListener("message",l,!1);for(var a=[],e=0,d=k.length;e<d;e++)a.push(k.key(e));a.forEach(function(a){if(a.indexOf("plugin.")===0){var e=a.substring(7),a=JSON.parse(k.getItem(a));a.created&&n.push(new b(e,a,p))}});
n.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=c(a);if(!this.getPlugin(a)){var e=j.plugins[a],e=typeof e==="object"||{};e.autostart=e.autostart||j.defaultAutostart||"lazy";n.push(new b(a,e,p))}}.bind(this));g="starting"}};this.start=function(){g!=="starting"&&this.init();if(g!=="starting")return(new h).reject("Cannot start framework. Framework is already "+g+".");var a=[],b=(new Date).getTime();n.forEach(function(e){var c=
e._getAutostart();e.getLastModified()===0?a.push(e.update().then(function(){if("started"===c)return e.start({"transient":!0});if("lazy"===c)return e.start({lazy:!0,"transient":!0});e._resolve()})):"started"===c?a.push(e.start({"transient":!0})):"lazy"===c?(a.push(e.start({lazy:!0,"transient":!0})),b>e.getLastModified()+864E5&&e.update()):e._resolve()});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){g="active"})};this.stop=function(){if(g!=="starting"&&g!=="active")return(new h).reject("Cannot stop registry. Registry is already "+
g+".");g="stopping";var a=[];n.forEach(function(b){a.push(b.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",l);g="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new h).reject("Cannot uninstall registry")};this.installPlugin=function(a,e){var a=c(a),d=this.getPlugin(a);if(d)return(new h).resolve(d);if(q[a])return q[a];if(e)return d=new b(a,e,p),n.push(d),
d._persist(),p.dispatchEvent(new f("installed",d)),(new h).resolve(d);var j=p.loadManifest(a).then(function(e){d=new b(a,e,p);n.push(d);d._persist();delete q[a];p.dispatchEvent(new f("installed",d));return d},function(b){delete q[a];throw b;});return q[a]=j};this.getPlugins=function(){return n.slice()};this.getPlugin=function(a){var b=null,a=c(a);n.some(function(e){if(a===e.getLocation())return b=e,!0});return b};this.addEventListener=o.addEventListener.bind(o);this.removeEventListener=o.removeEventListener.bind(o);
this.resolvePlugins=function(){var a=!0;n.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(c,d){function f(b){var c=b.getProperty("service.id"),d=this.addingService(b);d&&(e[c]=b,a[c]=d)}function b(b){var c=b.getProperty("service.id"),d=a[c];delete e[c];delete a[c];this.removedService(b,d)}this.serviceRegistry=c;var e={},a={},j=i,l,k;this.close=function(){if(j!==g)throw"Already closed";j=i;c.removeEventListener("registered",l);c.removeEventListener("unregistering",k);k=l=null;var a=this;this.getServiceReferences().forEach(function(e){b.call(a,
e)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return e.length?Object.keys(e).map(function(a){return e[a]}):null};this.open=function(){if(j!==i)throw"Already open";j=g;var a=this;l=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(d)!==-1&&(f.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};k=function(e){e.serviceReference.getProperty("objectClass").indexOf(d)!==
-1&&b.call(a,e.serviceReference)};c.addEventListener("registered",l);c.addEventListener("unregistering",k);c.getServiceReferences(d).forEach(function(b){f.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,g=1;h.prototype={addingService:function(c){return this.serviceRegistry.getService(c)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return h});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(h,i){var g,c,d,f,b,e="pid";g=function(a,b,c){function d(a,e,c){e.forEach(function(d,j){try{var f=a[j].getProperty("__plugin__"),k=f&&b.getPlugin(f);(!f||k&&k.getState()==="active")&&e[j].updated(c)}catch(g){typeof console!=="undefined"&&console.log(g)}})}i.call(this,a,"orion.cm.managedservice");var f={},g={},o=function(b){var d=[];b.plugin.getServiceReferences().forEach(function(b){if(b.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var f=b.getProperty(e),b=a.getService(b);f&&b&&(f=(f=c._find(f))&&f.getProperties(),d.push(b.updated(f)))}});return h.all(d)};this.addingService=function(b){var c=b.getProperty(e),d=a.getService(b);if(!c||!d)return null;f[c]||(f[c]=[]);g[c]||(g[c]=[]);f[c].push(b);g[c].push(d);return d};this.onServiceAdded=function(a,b){var j=a.getProperty(e),j=c._find(j);d([a],[b],j&&j.getProperties())};this.onOpen=function(){b.addEventListener("started",o)};this.onClose=function(){b.removeEventListener("started",
o)};this.notifyUpdated=function(a){var b=a.getPid();d(f[b]||[],g[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(f[a]||[],g[a]||[],null)};this.removedService=function(a,b){var c=a.getProperty(e),d=f[c],j=g[c];d.length>1?d.splice(d.indexOf(a),1):delete f[c];j.length>1?j.splice(j.indexOf(b),1):delete g[c]}};c=function(){function a(b,e,c){this.store=new d(this,c);this.configAdmin=new f(this,this.store);this.tracker=new g(b,e,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}();f=function(){function a(b,e){this.factory=b;this.store=e}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 a="/cm/configurations";
d=function(){function c(d,j){this.factory=d;this.prefsService=j;this.configs=Object.create(null);this.pref=null;var f=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){f.pref=a;a.keys().forEach(function(c){if(!f.configs[c]){var d=a.get(c);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[e]=c,f.configs[c]=new b(f.factory,f,d))}})})}c.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var e=this._find(a);
e||(e=new b(this.factory,this,a),this.configs[a]=e);return e},list:function(){var a=this,b=[];this.pref.keys().forEach(function(e){(e=a._find(e))&&e.getProperties()!==null&&b.push(e)});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 a(b){for(var e={},c=Object.keys(b),d=0;d<c.length;d++){var j=c[d],f=b[j];e[j]=f instanceof Array?f.slice():f}return e}function b(c,d,f){this.factory=
c;this.store=d;if(f!==null&&typeof f==="object")this.pid=f[e],c=a(f),delete c[e],this.properties=c;else if(typeof f==="string")this.pid=f,this.properties=null;else throw Error("Invalid pid/properties "+f);}b.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=a(this.properties),!b))c[e]=this.pid;return c},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(b){this._checkRemoved();b=a(b);delete b[e];this.properties=b;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return b}();return{ConfigurationAdminFactory:c}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(h,i,g,c,d,f){var b;return{startup:function(){if(b)return b;b=new i;var e=new g.ServiceRegistry,a=new c.PreferencesService(e);return a.getPreferences("/plugins").then(function(c){var l={plugins:{}};c.keys().forEach(function(a){var b=h.toUrl(a);l.plugins[b]=c[a]});var g=new d.PluginRegistry(e,l);return g.start().then(function(){if(e.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=h.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 i.all(b,function(a){console.log(a)})})}).then(function(){return(new f.ConfigurationAdminFactory(e,g,a)).getConfigurationAdmin().then(e.registerService.bind(e,"orion.cm.configadmin"))}).then(function(){var a=e.getService("orion.core.auth");
if(a){var b=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)})}),c=localStorage.getItem("lastLogin");if(!c||c<(new Date).getTime()-9E5)return b}}).then(function(){var c={serviceRegistry:e,preferences:a,pluginRegistry:g};b.resolve(c);return c})})}}});
define("orion/webui/littlelib",[],function(){function h(b,a){a||(a=document);return a.querySelectorAll(b)}function i(b,a){var c=b.compareDocumentPosition(a);return b===a||Boolean(c&16)}function g(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=g(b.childNodes[a]);if(c)return c}return null}function c(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var d=c(b.childNodes[a]);if(d)return d}return null}function d(b,
a){if(b.nodeType===3){var c=f.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 f=/\$\{([^\}]+)\}/,b=[];return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:h,$$array:function(b,a){return Array.prototype.slice.call(h(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));return a},contains:i,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:g,lastTabbable:c,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:function(b,a){d(b,function(b,e){b.parentNode.replaceChild(document.createTextNode(a[e[1]]||e[1]),b)})},processDOMNodes:function(b,a){d(b,function(b,e){var c=a[e[1]];if(c){var d=document.createRange(),f=e.index;d.setStart(b,f);d.setEnd(b,
f+e[0].length);d.deleteContents();d.insertNode(c)}})},addAutoDismiss:function(e,a){b.length===0&&document.addEventListener("click",function(a){for(var e=[],c=0;c<b.length;c++){var d=b[c].dismiss,f=!1,g;if(b[c].excludeNodes.every(function(b){return b&&(f=document.compareDocumentPosition(document,b)!==1)&&i(b,a.target)?(g=b,!1):!0})){try{d()}catch(o){typeof console!=="undefined"&&console&&console.error(o&&o.message)}f=document.compareDocumentPosition(document,g)!==1}f&&e.push(b[c])}b=e},!0);b.push({excludeNodes:e,
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("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",
" is already a favorite.":" is already a favorite.","Add to the favorites list":"Add to the favorites list","Make Favorite":"Make Favorite","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 "," has been added to the favorites list.":" has been added to the favorites list.",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy",
"Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"I20130625-1555","Add this page to the favorites list":"Add this page to the favorites list","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?","Orion Home":"Orion Home","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",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","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?","You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.",
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","Open in new tab":"Open in new tab","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."});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("text",["module"],function(h){var i,g,c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,f=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,b=typeof location!=="undefined"&&location.href,e=b&&location.protocol&&location.protocol.replace(/\:/,""),a=b&&location.hostname,j=b&&(location.port||void 0),l=[],k=h.config&&h.config()||{};i={version:"2.0.5",strip:function(a){if(a){var a=a.replace(d,""),b=a.match(f);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:k.createXhr||function(){var a,b,e;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(b=0;b<3;b+=1){e=c[b];try{a=new ActiveXObject(e)}catch(d){}if(a){c=[e];break}}return a},parseName:function(a){var b,
e,c=!1,d=a.indexOf(".");b=a.indexOf("./")===0||a.indexOf("../")===0;d!==-1&&(!b||d>1)?(b=a.substring(0,d),e=a.substring(d+1,a.length)):b=a;a=e||b;d=a.indexOf("!");d!==-1&&(c=a.substring(d+1)==="strip",a=a.substring(0,d),e?e=a:b=a);return{moduleName:b,ext:e,strip:c}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,e,c){var d,f;d=i.xdRegExp.exec(a);if(!d)return!0;a=d[2];d=d[3];d=d.split(":");f=d[1];d=d[0];return(!a||a===b)&&(!d||d.toLowerCase()===e.toLowerCase())&&(!f&&!d||f===c)},finishLoad:function(a,
b,e,c){e=b?i.strip(e):e;k.isBuild&&(l[a]=e);c(e)},load:function(c,d,f,l){if(l.isBuild&&!l.inlineText)f();else{k.isBuild=l.isBuild;var g=i.parseName(c),l=g.moduleName+(g.ext?"."+g.ext:""),h=d.toUrl(l),u=k.useXhr||i.useXhr;!b||u(h,e,a,j)?i.get(h,function(a){i.finishLoad(c,g.strip,a,f)},function(a){f.error&&f.error(a)}):d([l],function(a){i.finishLoad(g.moduleName+"."+g.ext,g.strip,a,f)})}},write:function(a,b,e){if(l.hasOwnProperty(b)){var c=i.jsEscape(l[b]);e.asModule(a+"!"+b,"define(function () { return '"+
c+"';});\n")}},writeFile:function(a,b,e,c,d){var b=i.parseName(b),f=b.ext?"."+b.ext:"",j=b.moduleName+f,l=e.toUrl(b.moduleName+f)+".js";i.load(j,e,function(){var b=function(a){return c(l,a)};b.asModule=function(a,b){return c.asModule(a,l,b)};i.write(a,j,b,d)},d)}};if(k.env==="node"||!k.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)g=require.nodeRequire("fs"),i.get=function(a,b){var e=g.readFileSync(a,"utf8");e.indexOf("\ufeff")===0&&(e=e.substring(1));b(e)};else if(k.env===
"xhr"||!k.env&&i.createXhr())i.get=function(a,b,e,c){var d=i.createXhr(),f;d.open("GET",a,!0);if(c)for(f in c)c.hasOwnProperty(f)&&d.setRequestHeader(f.toLowerCase(),c[f]);if(k.onXhr)k.onXhr(d,a);d.onreadystatechange=function(){var c;if(d.readyState===4)c=d.status,c>399&&c<600?(c=Error(a+" HTTP status: "+c),c.xhr=d,e(c)):b(d.responseText)};d.send(null)};else if(k.env==="rhino"||!k.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")i.get=function(a,b){var e,c,d=new java.io.File(a),f=java.lang.System.getProperty("line.separator"),
d=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(d),"utf-8")),j="";try{e=new java.lang.StringBuffer;(c=d.readLine())&&c.length()&&c.charAt(0)===65279&&(c=c.substring(1));for(e.append(c);(c=d.readLine())!==null;)e.append(f),e.append(c);j=String(e.toString())}finally{d.close()}b(j)};return i});define("text!orion/banner/slideout.html",[],function(){return'<div id="slideContainer" class="slideParameters slideContainer">\n\t<span id="pageCommandParameters" class="layoutLeft parameters"></span>\n\t<span id="pageCommandDismiss" class="layoutRight parametersDismiss"></span>\n</div>'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(h,i,g){return{slideoutHTMLFragment:function(c){var d=document.createElement("div");d.innerHTML=g;var f=i.$("#slideContainer",d);f.id=c+f.id;f=i.$("#pageCommandParameters",d);f.id=c+f.id;f=i.$("#pageCommandDismiss",d);f.id=c+f.id;return d.innerHTML}}});
define("orion/util",[],function(){var h=navigator.userAgent,i=parseFloat(h.split("MSIE")[1])||void 0,g=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,c=h.indexOf("Opera")!==-1,d=parseFloat(h.split("Chrome/")[1])||void 0,f=h.indexOf("Safari")!==-1&&!d,b=parseFloat(h.split("WebKit/")[1])||void 0,e=h.indexOf("Android")!==-1,a=h.indexOf("iPad")!==-1,h=h.indexOf("iPhone")!==-1,j=a||h,l=navigator.platform.indexOf("Mac")!==-1,k=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,e){return b[(e<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:g,isOpera:c,isChrome:d,isSafari:f,isWebkit:b,isAndroid:e,isIPad:a,isIPhone:h,isIOS:j,isMac:l,isWindows:k,isLinux:m,platformDelimiter:k?"\r\n":"\n"}});
define("orion/keyBinding",["orion/util"],function(h){function i(c,d,f,b,e,a){this.type=a||"keydown";this.keyCode=typeof c==="string"&&this.type==="keydown"?c.toUpperCase().charCodeAt(0):c;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=f!==void 0&&f!==null?f:!1;this.mod3=b!==void 0&&b!==null?b:!1;this.mod4=e!==void 0&&e!==null?e:!1}function g(c){this.keys=c}i.prototype={getKeys:function(){return[this]},match:function(c,d){if(d!==void 0){if(d!==0)return!1}else if(c instanceof Array){if(c.length>1)return!1;
c=c[0]}return c.type!==this.type?!1:this.keyCode===c.keyCode||this.keyCode===String.fromCharCode(h.isOpera?c.which:c.charCode!==void 0?c.charCode:c.keyCode)?this.mod1!==(h.isMac?c.metaKey:c.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==c.shiftKey?!1:this.mod3!==c.altKey?!1:h.isMac&&this.mod4!==c.ctrlKey?!1:!0:!1},equals:function(c){return!c?!1:this.keyCode!==c.keyCode?!1:this.mod1!==c.mod1?!1:this.mod2!==c.mod2?!1:this.mod3!==c.mod3?!1:this.mod4!==c.mod4?!1:this.type!==c.type?!1:!0}};g.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(c,d){var f=this.keys;if(d!==void 0)return d>f.length?!1:f[d].match(c)?d===f.length-1?!0:d+1:!1;else{c instanceof Array||(c=[c]);if(c.length>f.length)return!1;var b;for(b=0;b<c.length;b++)if(!f[b].match(c[b]))return!1;return b===f.length?!0:b}},equals:function(c){if(!c.keys)return!1;if(c.keys.length!==this.keys.length)return!1;for(var d=0;d<c.keys.length;d++)if(!c.keys[d].equals(this.keys[d]))return!1;return!0}};return{KeyBinding:i,KeyStroke:i,
KeySequence:g}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(h,i){function g(c){this._init(c)}g.prototype={_init:function(c){this._dropdownNode=i.node(c.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=i.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=c.populate;var d=this;this._triggerNode.addEventListener("click",function(c){d.toggle()&&i.stop(c)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)d.toggle(),i.stop(c)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")?this.close():this.open()},open:function(){this._populate&&(this.empty(),this._populate(this._dropdownNode));var c=this.getItems();if(c.length>0){if(!this._hookedAutoDismiss){var d=i.$$(".dropdownSubMenu",
this._dropdownNode);i.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(d)),this.close.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();c[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var c=i.bounds(this._dropdownNode),d=i.bounds(this._boundingNode(this._triggerNode));if(c.left+c.width>d.left+d.width)this._dropdownNode.style.right=
0},_boundingNode:function(c){return c.style.right!==""||c.style.position==="absolute"||!c.parentNode||!c.parentNode.style?c:this._boundingNode(c.parentNode)},close:function(c){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");c&&this._triggerNode.focus();return!0},getItems:function(){var c=[],d=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(f){f.parentNode.parentNode===d._dropdownNode&&
c.push(f)});return c},empty:function(){var c=this;i.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===c._dropdownNode&&d.parentNode.removeChild(d)})},_dropdownKeyDown:function(c){if(c.keyCode===i.KEY.UP||c.keyCode===i.KEY.DOWN||c.keyCode===i.KEY.RIGHT||c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.LEFT){var d=this.getItems(),f=document.activeElement;if(d.length&&d.length>0&&f){var b=d.indexOf(f);b<0&&(b=d.indexOf(f.parentNode));b>=0&&(c.keyCode===i.KEY.UP&&b>0?(b--,d[b].focus()):c.keyCode===
i.KEY.DOWN&&b<d.length-1?(b++,d[b].focus()):c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.RIGHT?f.classList.contains("dropdownTrigger")&&f.dropdown&&f.dropdown.open():c.keyCode===i.KEY.LEFT&&f.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(c))}}else c.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(c))}};g.prototype.constructor=g;return{Dropdown:g}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<span class="dropdownArrowDown"></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"></span></span><ul class="dropdownMenu"></ul></li>'});define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(h,i){function g(c){this._init(c)}g.prototype={_init:function(c){this._node=i.node(c.node);if(!this._node)throw"no dom node for tooltip found";this._position=c.position||["right","above","below","left"];this._text=c.text;this._hideDelay=c.hideDelay===void 0?200:c.hideDelay;this._tailSize=c.tailSize||10;this._trigger=c.trigger||"mouseover";this._afterShowing=c.afterShowing;this._afterHiding=c.afterHiding;var d=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(b){b.target===d._node&&(d.show(),i.stop(b))},!1);else if(this._trigger==="mouseover"){this._showDelay=c.showDelay===void 0?500:c.showDelay;c=["mouseout","click"];this._node.addEventListener("mouseover",function(b){i.contains(d._node,b.target)&&(d.show(),i.stop(b))},!1);for(var f=0;f<c.length;f++)this._node.addEventListener(c[f],function(b){i.contains(d._node,b.target)&&d.hide()},!1)}},_makeTipNode:function(){if(!this._tip){this._tip=
document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("span");this._tipInner.classList.add("tooltip");this._text&&this._tipInner.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);document.body.appendChild(this._tip);var c=this;i.addAutoDismiss([this._tip,this._node],function(){c.hide()});if(this._trigger==="mouseover")this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),
this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(){if(c._timeout)window.clearTimeout(c._timeout),c._timeout=null;c._tip.addEventListener("mouseout",function(d){i.contains(c._tip,d.target)&&(c.hide(),i.stop(d))},!1)},!1)}return this._tip},_positionTip:function(c,d){this._makeTipNode();c==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,b;for(b=i.bounds(f);f&&!b.width&&!b.height;f=f.parentNode)b=
i.bounds(f);var f=i.bounds(this._tipInner),e;switch(c){case "above":e=b.top-f.height-this._tailSize-1;b=b.left-this._tailSize;break;case "below":e=b.top+b.height+this._tailSize+1;b=b.left-this._tailSize;break;case "left":e=b.top-this._tailSize/2;b=b.left-f.width-this._tailSize-1;break;default:e=b.top-this._tailSize/2,b=b.left+b.width+this._tailSize+1}var a=i.bounds(document.documentElement);if(e+f.height>a.height)if(d)e=a.height-f.height-1;else return!1;if(b+f.width>a.width)if(d)b=a.width-f.width-
1;else return!1;if(b<0)if(d)b=4;else return!1;if(e<0)if(d)e=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+c),c==="above"||c==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),c==="left"))this._tail.style.left=f.width+"px";this._tip.style.top=e+"px";this._tip.style.left=b+"px";this._tip.style.width=f.width+"px";this._tip.style.height=f.height+"px";return!0},contentContainer:function(){this._makeTipNode();
return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var c=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var d=!1,f=0;!d&&f<c._position.length;)d=c._positionTip(c._position[f]),f++;d||c._positionTip(c._position[0],!0);c._tip.classList.add("tooltipShowing");c._afterShowing&&c._afterShowing()},this._showDelay)}},hide:function(c){if(this._timeout)window.clearTimeout(this._timeout),
this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(c===void 0)c=this._hideDelay;var d=this;this._timeout=window.setTimeout(function(){d._tip.classList.remove("tooltipShowing");d._tip.removeAttribute("style");d._afterHiding&&d._afterHiding()},c)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tail=this._tipInner=this._tip=null}};g.prototype.constructor=g;return{Tooltip:g}});
define("orion/commands","require,orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(h,i,g,c,d,f,b,e){function a(a,b){for(var e in b)if(b[e]&&b[e].keyBinding&&b[e].command&&b[e].keyBinding.match(a)){var c=b[e],d=c.keyBinding;if(!d.domScope||g.contains(g.node(d.domScope),a.target)){var f=c.invocation;if(f){var j=c.command;if(j.hrefCallback){g.stop(a);
e=j.hrefCallback.call(f.handler||window,f);e.then?e.then(function(a){window.open(a)}):window.open(e);break}else if(j.onClick||j.callback){g.stop(a);window.setTimeout(function(){(j.onClick||j.callback).call(f.handler||window,f)},0);break}}}}}function j(a,b,e){b.classList.add("commandImage");var c;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(c=document.createElement("span"),b.appendChild(c),c.classList.add(a.spriteClass),c.classList.add(a.imageClass)):(c=new Image,c.alt=a.name,
c.name=e,c.id=e,c.src=a.image,b.appendChild(c));return c}function l(a,b,e,c,d){this.commandRegistry=d;this.handler=a;this.items=b;this.userData=e;this.command=c;if(c.parameters)this.parameters=c.parameters.makeCopy();this.id=c.id}function k(a){this._init(a)}var m=null,n={};window.document.addEventListener("keydown",function(b){b=b||window.event;if(function(a){if(i.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}(b)){if(b.target.contentEditable==="true")return;var e=b.target.nodeName.toLowerCase();if(e==="input")switch(b.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(e===
"textarea")return}e={};if(m){var c,d,f;d=Object.keys(n);for(c=0;c<d.length;c++)f=d[c],e[f]=n[f];var j=m();d=Object.keys(j);for(c=0;c<d.length;c++)f=d[c],e[f]=j[f]}else e=n;a(b,e)},!1);l.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new l(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}};l.prototype.constructor=l;k.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||h.toUrl("images/none.png");this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},populateChoicesMenu:function(a,
b,e,c,d){this.getChoices(b,e,c).forEach(function(e){if(e.name){var c=document.createElement("li");a.appendChild(c);var f=document.createElement("span");f.tabIndex=0;f.role="menuitem";f.classList.add("dropdownMenuItem");var j=document.createTextNode(e.name);f.appendChild(j);c.appendChild(f);f.choice=e;f.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);f.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&
a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else d._generateMenuSeparator(a)})},getChoices:function(a,b,e){return this.choiceCallback?this.choiceCallback.call(b,a,e):null},makeChoiceCallback:function(a,b){return function(e){a.callback&&a.callback.call(a,b,e)}},hasImage:function(){return this.imageClass||this.image!==h.toUrl("images/none.png")}};k.prototype.constructor=k;return{Command:k,CommandInvocation:l,createDropdownMenu:function(a,b,e,f,l,k){a=g.node(a);if(!a)throw"no parent node was specified";
var h=document.createRange();h.selectNode(a);h=h.createContextualFragment(d);g.processTextNodes(h,{ButtonText:b});a.appendChild(h);a=a.lastChild;h=a.previousSibling;f?h.classList.add(f):(h.classList.add("orionButton"),h.classList.add("commandButton"));if(l){if(!k)h.textContent="",h.setAttribute("aria-label",b);j({spriteClass:"commandSprite",imageClass:l},h,b);h.classList.add("orionButton")}h.dropdown=new c.Dropdown({dropdown:a,populate:e});a.dropdown=h.dropdown;return{menuButton:h,menu:a,dropdown:h.dropdown}},
createCheckedMenuItem:function(a,e,c,d){a=g.node(a);if(!a)throw"no parent node was specified";var f=document.createRange();f.selectNode(a);f=f.createContextualFragment(b);g.processTextNodes(f,{ItemText:e});a.appendChild(f);a=g.$(".checkedMenuItem",a.lastChild);a.checked=c;a.addEventListener("change",d,!1)},createCommandItem:function(a,b,c,d,f,l,g){var k,l=l||!b.name&&b.hasImage();if(b.hrefCallback)k=document.createElement("a"),k.id=d,l&&b.hasImage()?j(b,k,d):(k.className="commandLink",k.appendChild(document.createTextNode(b.name))),
g=b.hrefCallback.call(c.handler,c),g.then?g.then(function(a){k.href=a}):k.href=g?g:"#";else{k=document.createElement("button");k.className="orionButton";l?b.hasImage()?(j(b,k,d),b.name&&k.setAttribute("aria-label",b.name)):(k.classList.add("commandButton"),k.classList.add("commandMissingImageButton"),k.appendChild(document.createTextNode(b.name))):(k.classList.add("commandButton"),d=document.createTextNode(b.name),k.appendChild(d));var h=g||b.callback;if(h)b.onClick=h,k.addEventListener("click",function(){h.call(c.handler,
c)},!1)}a.nodeName.toLowerCase()==="ul"?(g=document.createElement("li"),a.appendChild(g),a=g):k.classList.add("commandMargins");a.appendChild(k);if(b.tooltip)k.commandTooltip=new e.Tooltip({node:k,text:b.tooltip,position:["above","below","right","left"]});f&&(n[b.id]={keyBinding:f,command:b,invocation:c});return k},createCommandMenuItem:function(a,b,c,d,f){var j,l=a.dropdown;if(b.hrefCallback)j=document.createElement("a"),j.appendChild(document.createTextNode(b.name)),f=b.hrefCallback.call(c.handler,
c),f.then?f.then(function(a){j.href=a}):j.href=f?f:"#";else{j=document.createElement("span");j.tabIndex=0;j.appendChild(document.createTextNode(b.name));var g=f||b.callback;if(g)b.onClick=g,j.addEventListener("click",function(){l.close(!0);g.call(c.handler,c)},!1)}if(b.tooltip)j.commandTooltip=new e.Tooltip({node:j,text:b.tooltip,position:["right","left","above","below"]});j.className="dropdownMenuItem";j.role="menuitem";f=document.createElement("li");a.appendChild(f);f.appendChild(j);d&&(n[b.id]=
{keyBinding:d,command:b,invocation:c});return j},setKeyBindingProvider:function(a){m=a},localKeyBindings:n,_testMethodProcessKey:a}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function g(c){var f="",b=navigator.platform.indexOf("Mac")!==-1;c.mod1&&(f+=b?"Cmd+":"Ctrl+");c.mod2&&(f+="Shift+");c.mod3&&(f+="Alt+");c.mod4&&b&&(f+="Ctrl+");if(c.alphaKey)return f+c.alphaKey;if(c.type==="keypress")return f+c.keyCode;for(var e in i.KEY)if(typeof(i.KEY[e]==="number")&&i.KEY[e]===c.keyCode)return f+e;var a;switch(c.keyCode){case 59:a=c.mod2?":":";";break;case 61:a=c.mod2?"+":"=";break;case 188:a=
c.mod2?"<":",";break;case 190:a=c.mod2?">":".";break;case 191:a=c.mod2?"?":"/";break;case 192:a=c.mod2?"~":"`";break;case 219:a=c.mod2?"{":"[";break;case 220:a=c.mod2?"|":"\\";break;case 221:a=c.mod2?"}":"]";break;case 222:a=c.mod2?'"':"'"}return a?f+a:c.keyCode>=112&&c.keyCode<=123?f+"F"+(c.keyCode-111):f+String.fromCharCode(c.keyCode)}function c(c){var f=window.navigator.platform.indexOf("Mac")!==-1;return f&&c.metaKey||!f&&c.ctrlKey}return{getUserKeyString:function(c){for(var f="",c=c.getKeys(),
b=0;b<c.length;b++)b!==0&&(f+=" "),f+=g(c[b]);return f},getUserText:function(c,f,b,e,a,j,l,g,h){var n=!1,l=function(l){return function(g){if(!n){var k=i.node(c),r=k.value;if(k)if(l&&g.keyCode===i.KEY.ESCAPE){if(b)f.style.display="inline";n=!0;k.parentNode.removeChild(k);j&&j()}else if(!(l&&g.keyCode!==i.KEY.ENTER)){if(r.length===0||!h&&r===e){if(b)f.style.display="inline"}else a(r);n=!0;k.parentNode&&k.parentNode.removeChild(k);j&&j()}}}},r=document.createElement("input");r.id=c;r.value=e||"";f.parentNode.insertBefore(r,
f.nextSibling);r.classList.add("userEditBoxPrompt");if(b)f.style.display="none";r.addEventListener("keydown",l(!0),!1);r.addEventListener("blur",l(!1),!1);window.setTimeout(function(){r.focus();if(e){var a=i.node(c),b=g?e.indexOf(g):-1;if(b>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",b),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,b);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=b}else a.select()}},
0)},openInNewWindow:c,followLink:function(d,f){f&&c(f)?window.open(d):window.location=d},createButton:function(c,f){var b=document.createElement("button");b.className="orionButton commandButton commandMargins";b.addEventListener("click",function(b){f();i.stop(b)},!1);c&&b.appendChild(document.createTextNode(c));return b},createDropdownButton:function(){}}});
define("orion/PageUtil",[],function(){var h=/^(?:[a-zA-Z0-9-_.!~*'()#;,\/?:@&=+$\[\]]|%[0-9A-F][0-9A-F])*$/,i=/^http[s]?/i;return{matchResourceParameters:function(g){var g=g||window.location.toString(),c={resource:""},d=g.indexOf("#");if(d!==-1&&(g=g.substring(d+1),g.length!==0)){g=g.split(",");Object.defineProperty(c,"resourceRaw",{value:g[0]});c.resource=decodeURIComponent(g[0]);if(!c.resource.match(h))c.resource=encodeURI(c.resource).replace(/%5B/g,"[").replace(/%5D/g,"]");for(d=1;d<g.length;d++){var f=
/([^=]*)(=?)(.*)/.exec(g[d]),b=decodeURIComponent(f[1]||""),f=decodeURIComponent(f[3]||"");b!==""&&b!=="resource"&&(c[b]=f)}}return c},validateURLScheme:function(g,c){var d=g;if(g.indexOf("://")===-1){var f=document.createElement("a");f.href=g;d=f.href}f=!1;return(f=c?c.some(function(b){return RegExp("^"+b+":","i").test(d)}):i.test(d))?g:(console.log("Illegal URL Scheme: '"+g+"'"),"")}}});
define("orion/explorers/navigationUtils",[],function(){function h(g,c){if(!i&&g)g.push({domNode:c}),c.tabIndex=-1,c.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(g,c,d){g&&(g=g.getGridNavHolder(c,!0))&&h(g,d)},generateNavGrid:h,removeNavGrid:function(g,c){if(g)for(var d=0;d<g.length;d++)if(g[d].domNode===c){g.splice(d,1);break}}}});
define("orion/commandRegistry","require,orion/commands,orion/uiUtils,orion/PageUtil,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip,orion/explorers/navigationUtils".split(","),function(h,i,g,c,d,f,b,e,a,j,l){function k(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,e,c,d){this.name=a;this.type=b;this.label=e;this.value=c;this.lines=d||1}function r(a,b,e){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=e;this.clientCollect=b&&b.clientCollect}k.prototype={_init:function(a){this._selectionService=a.selection;var b=this;i.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 e=this._urlBindings[b].urlBinding.match(a);if(e){var c=this._urlBindings[b],d=c.command,f=c.invocation;if(f&&f.parameters&&d.callback){f.parameters.setValue(e.parameterName,e.parameterValue);var j=this;window.setTimeout(function(){j._invoke(f)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,e,c){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new i.CommandInvocation(e,
b,null,a,this),c):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,c)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,e){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,e))},confirm:function(a,b,e,c,d,f){var j=!1;if(this._parameterCollector&&!d){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,d){var f=document.createElement("span");f.classList.add("parameterPrompt");f.textContent=b;a.appendChild(f);f=document.createElement("button");f.addEventListener("click",function(){j=!0;l._parameterCollector.close()},!1);d.appendChild(f);f.appendChild(document.createTextNode(e));f.className="dismissButton";var g=document.createElement("button");g.addEventListener("click",function(){j=!1;l._parameterCollector.close()},!1);d.appendChild(g);g.appendChild(document.createTextNode(c));g.className=
"dismissButton";return f},function(){f(j)}))return}j=window.confirm(b);f(j)},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,b){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){var e=!1;a.parameters.updateParameters(a);
if(a.parameters.shouldCollectParameters()&&(e=this._parameterCollector.collectParameters(a),!e)){var c=new j.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),e=c.contentContainer();e.classList.add("parameterPopup");var d=window.document.activeElement,f=this._parameterCollector.getFillFunction(a,function(){d&&d.focus();c.destroy()})(e);c.show();window.setTimeout(function(){f.focus();f.select()},0);e=!0}e||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){var e=a.invocation;if(e)if(a=a.command,a.hrefCallback)e=a.hrefCallback.call(e.handler||window,e),e.then?e.then(function(a){window.open(a)}):window.open(e);else if(a.onClick||a.callback)(a.onClick||a.callback).call(e.handler||window,e)}function e(a){return function(){b(a)}}var c=
{},d,f,j=[],l;for(l in this._activeBindings)(f=this._activeBindings[l])&&f.keyBinding&&f.command&&j.push(f);j.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});for(l=0;l<j.length;l++)f=j[l],f.keyBinding.scopeName?(c[f.keyBinding.scopeName]||(c[f.keyBinding.scopeName]=[]),c[f.keyBinding.scopeName].push(f)):(d=g.getUserKeyString(f.keyBinding),a.createItem(d,f.command.name,e(f)));for(var k in c)c[k].length&&c[k].length>0&&(a.createHeader(k),c[k].forEach(function(b){d=g.getUserKeyString(b.keyBinding);
a.createItem(d,b.command.name,e(b))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var e=this;b.forEach(function(b){e._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,e,c,d,f,j,l){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));if(a[b]){if(c)a[b].title=c;if(e)a[b].position=e;if(j)a[b].imageClass=
j;if(l)a[b].tooltip=l;a[b].emptyGroupMessage=f}else a[b]={title:c,position:e,emptyGroupMessage:f,imageClass:j,tooltip:l,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,e,c,d,f,j){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];c&&(a=this._createEntryForPath(a,c));a[b]={position:e};f&&((e=this._commandList[b])?this._addBinding(e,"key",f,d):this._addPendingBinding(b,"key",f,d));j&&((e=this._commandList[b])?this._addBinding(e,"url",j,d):this._addPendingBinding(b,"url",j,d));a.sortedContributions=null},_addBinding:function(a,b,e,c){if(!a.id)throw Error("No command id: "+a);b==="key"?this._activeBindings[a.id]=
{command:a,keyBinding:e,bindingOnly:c}:b==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:e,bindingOnly:c})},_addPendingBinding:function(a,b,e,c){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:e,bindingOnly:c})},_checkForTrailingSeparator:function(a,b,e){var c;if(b==="tool"||b==="button")if((c=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&c.classList.contains("commandSeparator"))return e?(a.removeChild(c),!1):!0;if(b===
"menu"&&(a=d.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(c=a[a.length-1],e)c.parentNode.parentNode.removeChild(c.parentNode);else return!0;return!1},renderCommands:function(a,b,e,c,f,j,l){if(typeof a!=="string")throw"a scope id for rendering must be specified";b=d.node(b);if(!b)throw"no parent";var g=this._contributionsByScopeId[a];if(!e&&g){var e=g.localSelectionService||this._selectionService,k=this;e&&e.getSelections(function(e){k.renderCommands(a,
b,e,c,f,j)})}else g&&(this._render(this._contributionsByScopeId[a],b,e,c,f||"button",j,l),this._checkForTrailingSeparator(b,f,!0))},destroy:function(a){a=d.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,b,e,c,d,f,g){var k=a.sortedContributions;if(!k){var k=[],h=!1,m;for(m in a)if(!a.hasOwnProperty||a.hasOwnProperty(m)){var n=
a[m];if(n&&typeof n.position==="number")n.id=m,k.push(n),h=!0}if(h)k.sort(function(a,b){return a.position-b.position}),a.sortedContributions=k}var r=0,s=this;k.forEach(function(a){var k,h;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){k=a.children;var m;if(d==="tool"||d==="button")if(a.title)m=s._createDropdownMenu(b,a.title,null,null,a.imageClass,a.tooltip),g&&l.generateNavGrid(g,m.menuButton),window.setTimeout(function(){s._render(a.children,m.menu,
e,c,"menu",f,g);s._checkForTrailingSeparator(m.menu,"menu",!0);if(m.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!m.menuButton.emptyGroupTooltip)m.menuButton.emptyGroupTooltip=new j.Tooltip({node:m.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else g&&l.removeNavGrid(g,m.menuButton),m.menu.parentNode&&m.menu.parentNode.removeChild(m.menu),m.destroyButton&&m.destroyButton.parentNode&&m.destroyButton.parentNode.removeChild(m.destroyButton);
else m.menuButton.style.visibility="visible"},0);else{var n;b.childNodes.length>0&&!s._checkForTrailingSeparator(b,d)&&(n=s.generateSeparatorImage(b));s._render(k,b,e,c,d,f,g);b.childNodes.length>0&&b.childNodes[b.childNodes.length-1]!==n&&(n=s.generateSeparatorImage(b))}else if(a.title){if(n=s._createDropdownMenu(b,a.title,!0,null,null,a.imageClass))s._render(k,n.menu,e,c,"menu",f,g),n.menu.childNodes.length===0&&n.destroyButton&&b.removeChild(n.destroyButton)}else b.childNodes.length>0&&s._generateMenuSeparator(b),
s._render(k,b,e,c,d,f,g),s._generateMenuSeparator(b)}else{var o=s._commandList[a.id];k=o?!0:!1;var x=null,x=null;if(o){h=new i.CommandInvocation(c,e,f,o,s);h.domParent=b;n=k&&(o.visibleWhen?o.visibleWhen(e):!0);if(s._activeBindings[o.id]&&s._activeBindings[o.id].keyBinding)x=s._activeBindings[o.id],x.invocation=n?h:null,x.bindingOnly&&(k=!1);if(s._urlBindings[o.id]&&s._urlBindings[o.id].urlBinding)x=s._urlBindings[o.id],x.invocation=n?h:null,x.bindingOnly&&(k=!1);k=k&&n}if(k)o.choiceCallback?(d===
"tool"||d==="button"?(k=b,n=!1,b.nodeName.toLowerCase()==="ul"&&(k=document.createElement("li"),b.appendChild(k))):(k=b,n=!0),s._createDropdownMenu(k,o.name,n,function(a){o.populateChoicesMenu(a,e,c,f,s)}.bind(o),o.imageClass,o.tooltip||o.title)):(h.handler=h.handler||this,h.domParent=b,n=function(){s._invoke(h)},d==="menu"?k=i.createCommandMenuItem(b,o,h,null,n):(k=d+o.id+r,k=i.createCommandItem(b,o,h,k,null,d==="tool",n)),l.generateNavGrid(g,k),h.domNode=k,r++)}})},_createDropdownMenu:function(a,
b,c,l,g,k){a=d.node(a);if(!a||!d.contains(document.body,a))return null;var h,m=a;if(c)k=document.createRange(),k.selectNode(a),k=k.createContextualFragment(e),d.processTextNodes(k,{ButtonText:b}),a.appendChild(k),h=a.lastChild,a=h.lastChild,b=a.previousSibling,b.dropdown=new f.Dropdown({dropdown:a,populate:l}),a.dropdown=b.dropdown;else if(a.nodeName.toLowerCase()==="ul"&&(m=document.createElement("li"),a.appendChild(m),h=m),a=null,g&&(a="dropdownButtonWithIcon",k=k||b),k=g?k||b:k,l=i.createDropdownMenu(m,
b,l,a,g),b=l.menuButton,a=l.menu,k)b.commandTooltip=new j.Tooltip({node:b,text:k,position:["above","below","right","left"]});return{menuButton:b,menu:a,dropdown:b.dropdown,destroyButton:h}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");b.appendChild(e);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}};k.prototype.constructor=k;m.prototype={match:function(a){a=c.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;n.prototype={optionsRequested:function(){return this.optionsRequested}};n.prototype.constructor=n;r.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 e=this.parameterTable[a];if(e)e.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 r(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};r.prototype.constructor=
r;return{CommandRegistry:k,URLBinding:m,ParametersDescription:r,CommandParameter:n}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,i,g){function c(c,f){this._activeContainer=null;this._getElementsFunction=c;this._toolbarLayoutFunction=f}c.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&g.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&g.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(c,f,b){typeof c==="string"&&(c=g.node(c));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===c)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(c))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=b;var e=f(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!e)return!1;this._activeElements.focusNode=e;c=g.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(c.length===0){f=this._activeElements.dismissArea||
this._activeElements.parameterArea;c=document.createElement("button");c.id="closebox";c.className="imageSprite core-sprite-close dismissButton";c.title=h.Close;f.appendChild(c);var a=this;c.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(e)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){e.focus();e.select&&e.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(c,f){g.$$array("input",f).forEach(function(b){b.type==="checkbox"?c.parameters.setValue(b.parameterName,b.checked):b.type!=="button"&&c.parameters.setValue(b.parameterName,b.value.trim())});g.$$array("textArea",f).forEach(function(b){c.parameters.setValue(b.parameterName,b.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?
(c.domNode&&c.domNode.classList.add("commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(c,f){var b=this;return function(e,a){var j=null,l=function(){f&&f();b.close()},k=function(a){a.keyCode===g.KEY.ENTER&&b._collectAndCall(c,e);if(a.keyCode===g.KEY.ESCAPE||a.keyCode===g.KEY.ENTER)l(),g.stop(a)};c.parameters.forEach(function(a){var b=null;if(a.label)b=document.createElement("label"),b.classList.add("parameterInput"),b.setAttribute("for",a.name+
"parameterCollector"),b.textContent=a.label,e.appendChild(b);var c=a.name+"parameterCollector",d=b||e;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)b=document.createElement("textarea"),b.rows=a.lines,b.type="textarea",b.id=c,d.appendChild(b),k=function(a){a.keyCode===g.KEY.ESCAPE&&(l(),g.stop(a))};else if(a.type==="boolean"){if(b=document.createElement("input"),b.type="checkbox",b.id=c,d.appendChild(b),a.value)b.checked=!0}else if(b=document.createElement("input"),b.type=a.type,b.id=c,
d.appendChild(b),a.value)b.value=a.value;b.classList.add("parameterInput");b.setAttribute("speech","speech");b.setAttribute("x-webkit-speech","x-webkit-speech");b.parameterName=a.name;j||(j=b);b.addEventListener("keydown",k,!1)});var m=a;if(!m)m=document.createElement("span"),m.className="layoutRight parametersDismiss",e.appendChild(m);var i=function(a,b){var e=document.createElement("button");b.appendChild(e);a&&e.appendChild(document.createTextNode(a));e.classList.add("dismissButton");return e};
if(c.parameters.hasOptionalParameters())c.parameters.optionsRequested=!1,i(h.More,m).addEventListener("click",function(){c.parameters.optionsRequested=!0;b._collectAndCall(c,e);l()},!1);i(h.Submit,m).addEventListener("click",function(){b._collectAndCall(c,e);l()},!1);m=i(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=h.Close;m.addEventListener("click",function(){l()},!1);return j}}};c.prototype.constructor=c;return{CommandParameterCollector:c}});
define("orion/editor/regex",[],function(){return{escape:function(h){return h.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(h){return(h=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(h))?{pattern:h[1],flags:h[2]}:null}}});
define("orion/contentTypes",[],function(){function h(c,b){function e(a,b,e,c){var e=b.filename.indexOf(e)>=0,d=b.extension.indexOf(c)>=0;if(e||d)if(!a||e&&a.extension.indexOf(c)>=0)return b;return a}for(var a=c&&c.split(".").pop(),d=null,l=0;l<b.length;l++){var g=b[l];e(d,g,c,a)===g&&(d=g)}return d}function i(f){this.serviceRegistry=f;this.map=function(b){function e(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var b=b.getServiceReferences(c).concat(b.getServiceReferences(d)),
a={},f=0;f<b.length;f++)for(var l=e(b[f].getProperty("contentTypes")),g=0;g<l.length;g++){var h=l[g];a[h.id]||(a[h.id]={id:h.id,name:h.name,image:h.image,"extends":h["extends"],extension:e(h.extension),filename:e(h.filename)})}return a}(f);f.registerService(g,this)}var g="orion.core.contenttypes",c="orion.core.contenttype",d="orion.file.contenttype";i.prototype={getContentTypes:function(){var c=this.getContentTypesMap(),b=[],e;for(e in c)c.hasOwnProperty(e)&&b.push(c[e]);return b},getContentTypesMap:function(){return this.map},
getFileContentType:function(c){return h(c.Name,this.getContentTypes())},getFilenameContentType:function(c){return h(c,this.getContentTypes())},getContentType:function(c){return this.map[c]||null},isExtensionOf:function(c,b){c=typeof c==="string"?this.getContentType(c):c;b=typeof b==="string"?this.getContentType(b):b;if(!c||!b)return!1;if(c.id===b.id)return!0;else for(var e=c,a={};e&&(e=this.getContentType(e["extends"]));){if(e.id===b.id)return!0;if(a[e.id])throw Error("Cycle: "+e.id);a[e.id]=!0}return!1},
isSomeExtensionOf:function(c,b){for(var e=0;e<b.length;e++)if(this.isExtensionOf(c,b[e]))return!0;return!1}};return{ContentTypeService:i,getFilenameContentType:h}});
define("orion/URITemplate",[],function(){function h(a){this._text=a}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,"]");if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function g(a,b,e){for(var c=[],d=0;d<a.length;d++)typeof a[d]!=="undefined"&&
c.push(i(a[d],b));return c.join(e)}function c(a,b,e,c){for(var d=Object.keys(a),f=[],g=0;g<d.length;g++)typeof a[d[g]]!=="undefined"&&f.push(i(d[g],b)+e+i(a[d[g]],b));return f.join(c)}function d(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=b[a[0]])?a=a.substring(1):this._operator=b.NUL;for(var c=[],d=a.split(","),f=0;f<d.length;f++){var g=d[f].match(e);if(g===null)throw Error("Bad VarSpec: "+a);c.push({name:g[1],explode:!!g[2],prefix:g[3]?parseInt(g[3],
10):-1})}this._varSpecList=c}function f(a){for(var b=[],e=0,c=a.indexOf("{",e);c!==-1;){b.push(new h(a.substring(e,c)));e=a.indexOf("}",c+1);if(e===-1)throw Error("Invalid template: "+a);b.push(new d(a.substring(c+1,e)));e+=1;c=a.indexOf("{",e)}b.push(new h(a.substring(e)));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-,"}},e=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;h.prototype={expand:function(){return encodeURI(this._text)}};d.prototype={expand:function(a){for(var b=[],e=
0;e<this._varSpecList.length;e++){var d=this._varSpecList[e],f=d.name,h=a[f],r=typeof h;if(r!=="undefined"&&h!==null){var o=b.length===0?this._operator.first:this._operator.sep;if(r==="string")this._operator.named&&(o+=i(f,"U+R"),o+=h.length===0?this._operator.ifemp:"="),d.prefix!==-1&&d.prefix<h.length&&(h=h.substring(0,d.prefix)),o+=i(h,this._operator.allow);else if(Array.isArray(h))d.explode?o+=g(h,this._operator.allow,this._operator.sep):(this._operator.named&&(o+=i(f,"U+R"),o+=h.length===0?this._operator.ifemp:
"="),o+=g(h,this._operator.allow,","));else if(r==="object")d.explode?o+=c(h,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(o+=i(f,"U+R"),o+=Object.keys(h).length===0?this._operator.ifemp:"="),o+=c(h,this._operator.allow,",",","));else throw Error("bad param type: "+f+" : "+r);b.push(o)}}return b.join("")}};f.prototype={expand:function(a){for(var b=[],e=0;e<this._templateComponents.length;e++)b.push(this._templateComponents[e].expand(a));return b.join("")}};return f});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,i){function g(c){if(c=localStorage.getItem("orion/messageBundle/"+c))if(c=JSON.parse(c),c._expires&&c._expires>(new Date).getTime())return delete c._expires,c;return null}var c={};return{getMessageBundle:function(d){function f(){h(["i18n!"+d],function(a){if(a){var e=d;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(a));delete a._expires}b.resolve(a)})}if(c[d])return c[d];var b=new i;c[d]=
b;var e=g(d);if(e)return b.resolve(e),b;try{h([d],f)}catch(a){h(["orion/i18n!"+d],f)}return b},formatMessage:function(c){var f=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(b,e){return f[(e<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(h,i,g,c,d){function f(){return(new URL(h.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function b(b,a){var j=b.getServiceReferences(a||"orion.page.link"),l=g.matchResourceParameters(window.location.href),k={OrionHome:f(),Location:l.resource},h=[];j.forEach(function(a){var b={};a.getPropertyKeys().forEach(function(e){b[e]=a.getProperty(e)});if(b.uriTemplate&&
b.nls&&(b.name||b.nameKey)){var e=new i;d.getMessageBundle(b.nls).then(function(a){var d=new c(b.uriTemplate),d=window.decodeURIComponent(d.expand(k)),d=g.validateURLScheme(d);b.href=d;b.textContent=b.nameKey?a[b.nameKey]:b.name;e.resolve(b)});h.push(e)}else if(b.uriTemplate&&b.name){var f=new c(b.uriTemplate),f=window.decodeURIComponent(f.expand(k)),f=g.validateURLScheme(f);b.href=f;b.textContent=b.name;h.push((new i).resolve(b))}});return i.all(h)}return{createPageLinks:function(e,a){return b(e,
a).then(function(a){a.sort(function(a,b){var e=a.textContent&&a.textContent.toLowerCase(),c=b.textContent&&b.textContent.toLowerCase();return e<c?-1:e>c?1:0});return a.map(function(a){var b=a.href,a=a.textContent,e=document.createElement("a");e.href=b;e.target="_self";e.classList.add("targetSelector");e.textContent=a;return e})})},getPageLinksInfo:b,getOrionHome:f}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks".split(","),function(h,i,g,c,d,f,b,e,a){var j={},l=a.getOrionHome();j._cloneItemWithoutChildren=function n(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),e;for(e in a)e!=="children"&&e!=="Children"&&(b[e]=n(a[e]));return b};j._getOpenWithNavCommandExtensions=function(a){function b(a,e){for(var c=a.getServiceReferences("orion.navigate.openWith"),
d=[],f=0;f<c.length;f++){var j=c[f];j.getProperty("editor")===e.id&&(j=j.getProperty("contentType"),j instanceof Array?d=d.concat(j):j!==null&&typeof j!=="undefined"&&d.push(j))}return d}for(var e=function(){for(var b=a.getServiceReferences("orion.edit.editor"),e=[],c=0;c<b.length;c++){var d=b[c],f=d.getProperty("id");e.push({id:f,name:d.getProperty("name"),nameKey:d.getProperty("nameKey"),nls:d.getProperty("nls"),uriTemplate:d.getProperty("orionTemplate")||d.getProperty("uriTemplate")})}return e}(),
c=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),d=[],f=0;f<e.length;f++){var j=e[f],g=c&&c.editor===j.id,l=b(a,j);l.length&&d.push({properties:{name:j.name||j.id,nameKey:j.nameKey,id:"eclipse.openWithCommand."+j.id,tooltip:j.name,tooltipKey:j.nameKey,contentType:l,uriTemplate:j.uriTemplate,nls:j.nls,forceSingleItem:!0,isEditor:g?"default":"editor"},service:{}})}return d};j._makeValidator=function(a,
b,e,c){function j(a,b,e,c){var d=e.match,f;if(b.indexOf("|")>=0)return f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),j(a,f,e,c)?!0:j(a,b,e,c);else if(b.indexOf(":")>=0)return f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?j(a[f],b,e,c):!1;else{a:{f=!1;var g;if(typeof a[b]!=="undefined"){if(typeof d==="undefined")g=a[b],f=!0;else if(typeof d==="string"){if(!typeof(a[b]==="string")){e=!1;break a}if(e.variableName){if(d=RegExp(d).exec(a[b]))f=d[0],g=e.variableMatchPosition===
"before"?a[b].substring(0,d.index):e.variableMatchPosition==="after"?a[b].substring(d.index+f.length):e.variableMatchPosition==="only"?f:a[b],f=!0}else{e=RegExp(d).test(a[b]);break a}}else a[b]===d&&(g=a[b],f=!0);if(f&&e.variableName&&(c[e.variableName]=g,c.itemCached=a,e.replacements))for(a=0;a<e.replacements.length;a++)b=!1,e.replacements[a].pattern?c[e.variableName]=c[e.variableName].replace(RegExp(e.replacements[a].pattern),e.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
e.replacements[a]);e=f}else e=!1}return e}}return{info:a,validationFunction:function(b){typeof c==="function"&&(b=c.call(this,b));if(b){if(Array.isArray(b)){if((this.info.forceSingleItem||this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var f=0;f<b.length;f++){var g;a:{var l=b[f],k=e;if(this.info.validationProperties)for(g=0;g<this.info.validationProperties.length;g++){var h=this.info.validationProperties[g];if(typeof h.source!=="undefined"){if(!j(l,h.source,h,this)){g=
!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");g=!1;break a}}if(this.info.contentType&&k){h=!1;if(l=d.getFilenameContentType(l.Name,k))for(g=0;g<this.info.contentType.length;g++)if(l.id===this.info.contentType[g]){h=!0;break}g=h}else g=!0}if(!g)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},e;for(e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);if(this.info.validationProperties)for(e=
0;e<this.info.validationProperties.length;e++){var c=this.info.validationProperties[e];c.source&&c.variableName&&(this.itemCached===a&&this[c.variableName]||j(a,c.source,c,this),a[c.variableName]?window.console.log("Variable name "+c.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[c.variableName]=this[c.variableName])}b.OrionHome=l;a=new f(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null}}};j._createCommandOptions=
function(a,e,c,d,f,g){function l(b,k){var h=j._makeValidator(a,c,d,g);b.visibleWhen=h.validationFunction.bind(h);if(f)if(h.generatesURI.bind(h)())b.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var i=a;b.callback=function(a){var d;if(i.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,d=j._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){d=[];for(var f=0;f<a.items.length;f++)d.push(j._cloneItemWithoutChildren(a.items[f]))}else d=
j._cloneItemWithoutChildren(a.items);if(c)var g=c.getService("orion.page.progress");e.run?g?g.progress(e.run(d),"Running command: "+b.name):e.run(d):c&&(g?g.progress(c.getService(e).run(d),"Running command: "+b.name):c.getService(e).run(d))}}k.resolve(b)}var k=new i;a.nls?b.getMessageBundle(a.nls).then(function(b){l({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},k)}):l({name:a.name,image:a.image,
id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},k);return k};j.getOpenWithCommands=function(a){var b=[],e;for(e in a._commandList){var c=a._commandList[e];c.isEditor&&b.push(c)}return b};var k;j.createAndPlaceFileCommandsExtension=function(a,b,e,c,d,f){var g=!!f;return j.createFileCommands(a,null,f?"all":void 0,g).then(function(a){b._addedOpenWithCommands=g;var f=!1,j=!1;a.forEach(function(a){b.addCommand(a);d&&!f&&(f=!0,b.addCommandGroup(e,"eclipse.fileCommandExtensions",
1E3,null,d));d&&!j&&(j=!0,b.addCommandGroup(e,"eclipse.openWith",1E3,"Open With",d+"/eclipse.fileCommandExtensions"));this.isEditor?b.registerCommandContribution(e,a.id,c+this.index,d?d+"/eclipse.fileCommandExtensions/eclipse.openWith":null):b.registerCommandContribution(e,a.id,c+this.index,d?d+"/eclipse.fileCommandExtensions":null)});return{}})};j.createFileCommands=function(a,b,e,c){var e=e===void 0?"global":e,c=c===void 0?!0:c,d=a.getServiceReferences("orion.navigate.command"),f=[];if(e==="all"||
e==="global")for(var l=0;l<d.length;l++)if(d[l].getProperty("id")!=="orion.navigateFromMetadata"){for(var h=a.getService(d[l]),y={},x=d[l].getPropertyKeys(),v=0;v<x.length;v++)y[x[v]]=d[l].getProperty(x[v]);(e==="all"||y.forceSingleItem&&y.showGlobally)&&f.push({properties:y,service:h})}return i.when(function(){var e=a.getService("orion.core.contenttypes")||b;return k||i.when(e.getContentTypes(),function(a){return k=a})}(),function(){f=c?f.concat(j._getOpenWithNavCommandExtensions(a,k)):f;var b=f.map(function(b){var e=
b.properties;return j._createCommandOptions(e,b.service,a,k,!0).then(function(a){a=new g.Command(a);if(e.isEditor)a.isEditor=e.isEditor;return a})});return i.all(b,function(a){return{_error:a}}).then(function(a){return a})})};j.createOpenWithCommands=function(a,b,e){return e&&e._addedOpenWithCommands?(new i).resolve(j.getOpenWithCommands(e)):j.createFileCommands(a,b,"none",!0)};return j});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,i){function g(c){this._init(c)}g.prototype={_init:function(c){var d=i.node(c.container);if(!d)throw"no parent container";this._container=d;d.classList.remove("currentLocation");this._id=c.id||"eclipse.breadcrumbs";this._resource=c.resource||null;this._rootSegmentName=c.rootSegmentName;this._workspaceRootSegmentName=c.workspaceRootSegmentName;this._workspaceRootURL=c.workspaceRootURL;this._makeHref=c.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var c;if(this._resource&&this._resource.Parents){c=document.createElement("a");var d=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(c,d):c.href=h.toUrl("navigate/table.html")+"#"+d}else c=document.createElement("span");i.empty(c);c.appendChild(document.createTextNode(this._workspaceRootSegmentName));return c}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],
buildSegment:function(c){var d=document.createElement("a");d.classList.add("breadcrumb");d.appendChild(document.createTextNode(c));return d},addSegmentHref:function(c,d){this._makeHref?this._makeHref(c,d.Location,d):c.href=h.toUrl("navigate/table.html")+"#"+d.ChildrenLocation},buildSegments:function(c,d){if(this._resource.Parents){var f=this._resource.Parents.slice(0),b,e;f&&(f=f.slice(0),d==="reverse"&&(f=f.reverse().slice(0)),f.forEach(function(a){c?(e=c,c=null):e=a.Name;b=this.buildSegment(e);
this.path+=a.Name;this.addSegmentHref(b,a);b.include=!1;this.segments.push(b)}.bind(this)))}},addDivider:function(){var c=document.createElement("span");c.appendChild(document.createTextNode(" / "));this.path+="/";c.classList.add("breadcrumbSeparator");this.append(c)},refresh:function(){(this.crumbs=i.node(this._id))?i.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),this.dirty=document.createElement("span"),this.dirty.id=
"dirty",this.dirty.className="modifiedFileMarker",this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(c){this.crumbs.appendChild(c)},addTitle:function(c,d){var f=d||document.title;this.crumbs.childNodes.length===0&&(c=document.createElement("span"),c.appendChild(document.createTextNode(f)),c.classList.add("breadcrumb"),c.classList.add("currentLocation"),
this.append(c))},finalSegment:function(c,d){c=document.createElement("span");d?c.appendChild(document.createTextNode(d)):c.appendChild(document.createTextNode(this._resource.Name));c.classList.add("currentLocation");this.path+=this._resource.Name;this.append(c)},firstSegment:function(c){if(c)this.append(c),this._resource&&this._resource.Parents?(c.classList.add("breadcrumb"),this.addDivider()):(c.href="",c.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(c){c.include===
!0&&(this.append(c),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var c=this.segments.slice(0).reverse();c.forEach(function(c){this.append(c);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?c.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=c.reverse()}},measure:function(){this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var c=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;
if(d)this.addTitle(c,d);else if(this.finalSegment(c,d),this._resource&&this._resource.Parents&&(this.buildSegments(d,"reverse"),this.measureSegments(),this.firstSegment(c)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var c=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;d?this.addTitle(c,d):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(c),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(c,
d)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};g.prototype.constructor=g;return{BreadCrumbs:g}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(h,i){function g(c){this._init(c)}g.prototype={_init:function(c){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(c.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(c.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(c.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=c.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(c.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add("splitThumbLayout");this._closeByDefault=c.closeByDefault;this._initializeFromStoredSettings();this._closed?(this._closed=!1,this._thumbDown()):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)},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(c){this._resizeListeners.push(c)},_initializeFromStoredSettings:function(){var c=localStorage.getItem(this._prefix+"/toggleState");this._closed=c?c==="closed":this._closeByDefault?
!0:!1;if(this._vertical)if(c=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(c,10);else{if(this._closeByDefault)this._splitTop=150}else if(c=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(c,10);else if(this._closeByDefault)this._splitLeft=150},_adjustToSplitPosition:function(c){var d=i.bounds(this.$node),f=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=d.height;if(c||!this._splitTop)this._splitTop=d.top,localStorage.setItem(this._prefix+
"/yPosition",this._splitTop);c=this._splitTop;this.$node.parentNode.style.position==="relative"&&(c=this._splitTop-f.top);this.$sideNode.style.height=c+"px";this.$sideNode.style.bottom=c-1+"px";this.$sideNode.style.display="block";this.$node.style.top=c+"px"}else{this._splitWidth=d.width;if(c||!this._splitLeft)this._splitLeft=d.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);c=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(c=this._splitLeft-f.left);this.$sideNode.style.width=
c+"px";this.$sideNode.style.right=c-1+"px";this.$sideNode.style.display="block";this.$node.style.left=c+"px"}this._resize()},_resize:function(c){var c=c||0,d=i.bounds(this.$node.parentNode),f=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=d.height-(f.top-d.top+f.height)+"px":this.$mainNode.style.width=d.width-(f.left-d.left+f.width)+"px";var b=this;window.setTimeout(function(){b._notifyResizeListeners(b.$mainNode)},c);window.setTimeout(function(){b._notifyResizeListeners(b.$sideNode)},
c)},_notifyResizeListeners:function(c){for(var d=0;d<this._resizeListeners.length;d++)this._resizeListeners[d](c)},_thumbDown:function(){this._closed?(this._closed=!1,this._addAnimation(),this._vertical?(this.$sideNode.style.height=this._splitTop+"px",this.$node.style.top=this._splitTop+"px"):(this.$sideNode.style.width=this._splitLeft+"px",this.$node.style.left=this._splitLeft+"px")):(this._closed=!0,this._addAnimation(),this._vertical?(this.$sideNode.style.top=0,this.$node.style.top="1px"):(this.$sideNode.style.width=
0,this.$node.style.left="1px"));this._resize(this._animationDelay);this._removeAnimation();localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null)},_removeAnimation:function(){var c=this;window.setTimeout(function(){c.$sideNode.classList.remove("sidePanelLayoutAnimation");c.$mainNode.classList.remove("mainPanelLayoutAnimation");c.$node.classList.remove("splitLayoutAnimation");c._thumb.classList.remove("splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add("sidePanelLayoutAnimation");
this.$mainNode.classList.add("mainPanelLayoutAnimation");this.$node.classList.add("splitLayoutAnimation");this._thumb&&this._thumb.classList.add("splitLayoutAnimation")},_mouseDown:function(c){if(c.target===this._thumb)return i.stop(c),this._thumbDown(c);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(c)},_mouseMove:function(c){if(this._tracking){var d=i.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=c.clientY;if(this._splitTop<d.top+5)this._splitTop=d.top+5;else if(this._splitTop>d.top+d.height-5)this._splitTop=d.top+d.height-5;var f=this._splitTop;this.$node.parentNode.style.position==="relative"&&(f=this._splitTop-d.top);this.$node.style.top=f+"px"}else{this._splitLeft=c.clientX;if(this._splitLeft<d.left+5)this._splitLeft=d.left+5;else if(this._splitLeft>d.left+d.width-
5)this._splitLeft=d.left+d.width-5;f=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(f=this._splitLeft-d.left);this.$node.style.left=f+"px"}this._adjustToSplitPosition(!0);i.stop(c)}},_mouseUp:function(c){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),i.stop(c)}};g.prototype.constructor=g;return{Splitter:g}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(h){return{makeRelative:function(h){if(!h)return h;var g=window.location.protocol+"//"+window.location.host;return h.indexOf(g)===0?h.substring(g.length):h},isAtRoot:function(i){if(!i)return!1;if(i==="/workspace")return!0;var g=new URL(h.toUrl("workspace"),window.location.href);return(new URL(i,window.location.href)).href.indexOf(g.href)===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(h,i,g){function c(c){this._favorites=[];g.attach(this);this._init(c);this._initializeFavorites()}c.prototype={_init:function(c){this._registry=c.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(c){for(var c=Array.isArray(c)?
c:[c],f=0;f<c.length;f++){var b=c[f],e=b.ChildrenLocation?b.ChildrenLocation:b.Location,e=i.makeRelative(e);this.addFavorite(b.Name,e,b.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(c){this.addFavorite(c,c,!1,!0)},addFavorite:function(c,f,b){this._favorites.push({name:c,path:f,directory:b,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(c){for(var f in this._favorites)if(this._favorites[f].path===
c){this._favorites.splice(f,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(c,f){var b=!1,e;for(e in this._favorites)if(this._favorites[e].path===c){var a=this._favorites[e];if(a.name!==f)a.name=f,b=!0}b&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(c){for(var f in this._favorites)if(this._favorites[f].path===c)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(c){var f;
if(!c)return this._favorites;var b="";for(f=0;f<c.length;f++){var e=c.charAt(f);b+=e==="*"?".*":e==="?"?".?":this._SPECIAL_CHARS.indexOf(e)>=0?"\\"+e:e}b+=".*";c=RegExp(b);b=[];for(f in this._favorites)this._favorites[f].name.search(c)===0&&b.push(this._favorites[f]);return b},_initializeFavorites:function(){var c=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var b,f=f.get("navigate");typeof f==="string"&&(f=JSON.parse(f));if(f)for(b in f)f[b].isFavorite=
!0,c._favorites.push(f[b]);c._favorites.sort(c._sorter);c._notifyListeners()})},_storeFavorites:function(){var c=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){f.put("navigate",c)})},_sorter:function(c,f){var b=c.name.toLowerCase(),e=f.name.toLowerCase();return b>e?1:b<e?-1:0},getFavorites:function(){return{navigator:this._favorites}}};c.prototype.constructor=c;return{FavoritesService:c}});
define("orion/widgets/themes/ThemePreferences",[],function(){function h(h,g){this._preferences=h;this._themeData=g;var c=g.getThemeStorageInfo(),d=h.listenForChangedSettings(c.storage,2,function(c){c.key===d&&this.apply()}.bind(this))}h.prototype={_initialize:function(h,g,c){var d=c.get(h.styleset);d||(d=g.getStyles(),c.put(h.styleset,JSON.stringify(d)));(g=c.get("selected"))&&(g=JSON.parse(g));if(!g||g[h.selectedKey]===void 0)g=g||{},g[h.selectedKey]=h.defaultTheme,c.put("selected",JSON.stringify(g))},
apply:function(){this.setTheme()},getTheme:function(h){var g=this._themeData,c=g.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(d){this._initialize(c,g,d);var f=JSON.parse(d.get("selected")),d=JSON.parse(d.get(c.styleset)),b;if(d)for(var e=0;e<d.length;e++)if(d[e].name===f[c.selectedKey]){b=d[e];break}h({style:b,styles:d})}.bind(this))},setTheme:function(h,g){var c=this._themeData,d=c.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(f){this._initialize(d,
c,f);var b=JSON.parse(f.get("selected"));h||(h=b[d.selectedKey]);b[d.selectedKey]=h;f.put("selected",JSON.stringify(b));g?f.put(d.styleset,JSON.stringify(g)):g=JSON.parse(f.get(d.styleset));for(f=0;f<g.length;f++)if(g[f].name===b[d.selectedKey]){c.processSettings(g[f]);break}}.bind(this))},setFontSize:function(h){var g=this._themeData,c=g.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(d){this._initialize(c,g,d);var f=JSON.parse(d.get("selected")),b=JSON.parse(d.get(c.styleset)),
e;if(b)for(var a=0;a<b.length;a++)b[a].fontSize=h,b[a].name===f[c.selectedKey]&&(e=b[a]);d.put(c.styleset,JSON.stringify(b));g.processSettings(e)}.bind(this))}};return{ThemePreferences:h}});
define("orion/editor/eventTarget",[],function(){function h(){}h.addMixin=function(i){var g=h.prototype,c;for(c in g)g.hasOwnProperty(c)&&(i[c]=g[c])};h.prototype={addEventListener:function(h,g,c){if(!this._eventTypes)this._eventTypes={};var d=this._eventTypes[h];d||(d=this._eventTypes[h]={level:0,listeners:[]});d.listeners.push({listener:g,useCapture:c})},dispatchEvent:function(h){var g=h.type;this._dispatchEvent("pre"+g,h);this._dispatchEvent(g,h);this._dispatchEvent("post"+g,h)},_dispatchEvent:function(h,
g){var c=this._eventTypes?this._eventTypes[h]:null;if(c){var d=c.listeners;try{if(c.level++,d)for(var f=0,b=d.length;f<b;f++)if(d[f]){var e=d[f].listener;typeof e==="function"?e.call(this,g):e.handleEvent&&typeof e.handleEvent==="function"&&e.handleEvent(g)}}finally{if(c.level--,c.compact&&c.level===0){for(f=d.length-1;f>=0;f--)d[f]||d.splice(f,1);d.length===0&&delete this._eventTypes[h];c.compact=!1}}}},isListening:function(h){return!this._eventTypes?!1:this._eventTypes[h]!==void 0},removeEventListener:function(h,
g,c){if(this._eventTypes){var d=this._eventTypes[h];if(d){for(var f=d.listeners,b=0,e=f.length;b<e;b++){var a=f[b];if(a&&a.listener===g&&a.useCapture===c){d.level!==0?(f[b]=null,d.compact=!0):f.splice(b,1);break}}f.length===0&&delete this._eventTypes[h]}}}};return{EventTarget:h}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(h,i,g){function c(c){c=c||{};this._document=c.document||document}var d={};c.getTheme=function(f){var f=f||"default",b=d[f];b||(b=d[f]=new c);return b};c.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(c,b){var e=this,a=e._themeClass;e._themeClass=c;this._load(c,b,function(){e.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:e.getThemeClass()})})},onThemeChanged:function(c){return this.dispatchEvent(c)},
buildStyleSheet:function(c,b){function e(b,e,d){e&&(a.push("."+c+" ."+b+" {"),a.push("\t"+(d?"background-color":"color")+": "+e+";"),a.push("}"))}var a=[];a.push("");a.push("."+c+" {");b.fontFamily&&a.push("\tfont-family: "+b.fontFamily+";");b.fontSize&&a.push("\tfont-size: "+b.fontSize+";");b.fontSize&&a.push("\tcolor: "+b.text+";");a.push("}");a.push("."+c+".textview {");b.background&&a.push("\tbackground-color: "+b.background+";");a.push("}");e("ruler.annotations",b.annotationRuler,!0);e("ruler.lines",
b.annotationRuler,!0);e("ruler.folding",b.annotationRuler,!0);e("ruler.overview",b.overviewRuler,!0);e("rulerLines",b.lineNumber,!1);e("rulerLines.even",b.lineNumberEven,!1);e("rulerLines.odd",b.lineNumberOdd,!1);e("annotationLine.currentLine",b.currentLine,!0);e("entity-name-tag",b.keyword,!1);e("entity-other-attribute-name",b.attribute,!1);e("string-quoted",b.string,!1);e("line_caret",b.currentLine,!0);e("token_keyword",b.keyword,!1);e("token_string",b.string,!1);e("token_singleline_comment",b.comment,
!1);e("token_multiline_comment",b.comment,!1);e("token_doc_comment",b.comment,!1);e("token_doc_html_markup",b.comment,!1);return a.join("\n")},_createStyle:function(c,b,e,a){var d=this._document,c="orion-theme-"+c,l=d.getElementById(c);if(l){if(a||l.firstChild.data===b)return;l.removeChild(l.firstChild);l.appendChild(d.createTextNode(b))}else a?(l=g.createElement(d,"link"),l.rel="stylesheet",l.type="text/css",l.href=b,l.addEventListener("load",function(){e()})):(l=g.createElement(d,"style"),l.appendChild(d.createTextNode(b))),
l.id=c,(d.getElementsByTagName("head")[0]||d.documentElement).appendChild(l);a||e()},_load:function(c,b,e){if(c)if(typeof b==="string")this._createStyle(c,b,e);else if(b=b.href,b.substring(b.length-4)!==".css"&&(b+=".css"),/^\//.test(b)||/[a-zA-Z0-9]+:\/\//i.test(b)||!h.toUrl)this._createStyle(c,b,e,!0);else{var a=this;h(["text!"+b],function(b){a._createStyle(c,b,e,!1)})}else e()}};i.EventTarget.addMixin(c.prototype);return{TextTheme:c}});
define("orion/widgets/themes/ThemeClass",[],function(){function h(h){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=h;this.classString="."+h+"{ "}h.prototype.className=null;h.prototype.classString=void 0;h.prototype.style=void 0;h.prototype.closeString=" }\n";h.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:h}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(h){function i(){}i.prototype.navbar="#333";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="FEC";i.prototype.sidepanel="#FBFBFB";i.prototype.mainpanel="white";i.prototype.navtext="#bfbfbf";i.prototype.content="#3087B3";i.prototype.search="#444";i.prototype.toolpanel="white";i.prototype.writeNavigationStyle=function(){var g="",c=[],d=new h.ThemeClass("orionPage");
d.style.backgroundColor="#fdfdfd";d.style.width="100%";d.style.height="100%";c.push(d);d=new h.ThemeClass("topRowBanner");d.style.margin="0";d.style.border="0";d.style.backgroundColor=this.navbar;d.style.height="15px";d.style.padding="10px";d.style.paddingRight="3px";c.push(d);d=new h.ThemeClass("a");d.style.textDecoration="none";d.style.color=this.content;c.push(d);d=new h.ThemeClass("navlink");d.style.display="inline-block";d.style.padding="2px";d.style.color=this.content;c.push(d);d=new h.ThemeClass("primaryNav");
d.style.color=this.navtext;d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.paddingTop="0";d.style.verticalAlign="baseline";c.push(d);d=new h.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";c.push(d);d=new h.ThemeClass("primaryNav a:hover");d.style.color="#bfbfbf";d.style.cursor="hand";d.style.color="white";d.style.fontWeight="normal";c.push(d);for(var f in c)g+=
c[f].toString();return g};i.prototype.writeLocationStyle=function(){var g="",c=[],d=new h.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";c.push(d);d=new h.ThemeClass("breadcrumb");d.style.fontSize="8pt";d.style.textDecoration=
"none";d.style.color="#f1f1f2;";d.style.paddingTop="2px";c.push(d);d=new h.ThemeClass("a.breadcrumb:hover");d.style.textDecoration="none";d.style.borderBottom="1px dotted";d.style.color="#F58B0F";d.style.cursor="pointer";c.push(d);d=new h.ThemeClass("breadcrumbSeparator");d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color="#f1f1f2";d.style.fontWeight="bold";c.push(d);d=new h.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";c.push(d);d=new h.ThemeClass("a.currentLocation:hover");d.style.fontWeight="bold";d.style.fontSize="10pt";d.style.color="#666666";d.style.textDecoration="none";d.style.borderBottom="0";c.push(d);d=new h.ThemeClass("navlinkonpage");d.style.color=this.content;c.push(d);d=new h.ThemeClass("progressPane_running");d.style.background="url(../images/progress_running_dark.gif) no-repeat center";d.style.width="16px";d.style.height="16px";c.push(d);
for(var f in c)g+=c[f].toString();return g};i.prototype.writeButtonStyle=function(){var g="",c=[],d=new h.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="5px 6px";d.style.borderRadius="3px";d.style.lineHeight="12px";d.style.fontSize="8pt";d.style.userSelect="none";c.push(d);d=new h.ThemeClass("commandButton:over");
d.style.backgroundColor="#e6e6e6";d.style.border="1px solid #808080";c.push(d);d=new h.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";c.push(d);d=new h.ThemeClass("commandMenuItem");d.style.border="0";d.style.padding="0";d.style.margin="0";c.push(d);
for(var f in c)g+=c[f].toString();return g};i.prototype.writeMainStyle=function(){var g="",c=[],d=new h.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";c.push(d);d=new h.ThemeClass("searchbox:focus");d.style.color="white";d.style.outline="none";c.push(d);d=new h.ThemeClass("checkedRow");d.style.cssText="background-color:"+this.selection+" !important;";c.push(d);d=new h.ThemeClass("navbar-item-selected");d.style.background=this.selection;d.style.color=
this.content;c.push(d);d=new h.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%)";c.push(d);d=new h.ThemeClass("mainpane");d.style.background=this.mainpanel;d.style.border=0;c.push(d);d=new h.ThemeClass("mainToolbar");d.style.background=this.toolpanel;
d.style.height="34px";d.style.borderBottom="1px solid #ebebeb";d.style.paddingTop="2px";c.push(d);for(var f in c)g+=c[f].toString();return g};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(g){g.navbar.value?(this.navbar=g.navbar.value,this.button=g.button.value,this.location=g.location.value,this.selection=g.selection.value,this.sidepanel=
g.sidepanel.value,this.mainpanel=g.mainpanel.value,this.navtext=g.navtext.value,this.search=g.search.value,this.content=g.content.value,this.toolpanel=g.toolpanel.value):(this.navbar=g.navbar,this.button=g.button,this.location=g.location,this.selection=g.selection,this.sidepanel=g.sidepanel,this.mainpanel=g.mainpanel,this.navtext=g.navtext,this.search=g.search,this.content=g.content,this.toolpanel=g.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:i}});
define("orion/widgets/themes/container/ThemeData",["orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(h,i){function g(){}function c(){this.styles=[];var c=new g;c.name="Orion";c.navbar="#333";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 g;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 g;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 g;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 g;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 g;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 g;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 d(){return this.styles}g.prototype.name="Orion";g.prototype.navbar="#333";g.prototype.button="#EFEFEF";g.prototype.location="#333";g.prototype.breadcrumb="#3087B3";g.prototype.separator="#333";g.prototype.selection=
"FEC";g.prototype.sidepanel="#FBFBFB";g.prototype.mainpanel="white";g.prototype.toolpanel="white";g.prototype.navtext="#bfbfbf";g.prototype.content="#3087B3";g.prototype.search="#444";c.prototype.styles=[];c.prototype.getStyles=d;c.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};c.prototype.getViewData=function(){for(var c={top:10,left:10,width:350,height:350,shapes:[{type:"RECTANGLE",name:"Navigation Bar",x:10,y:10,
width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:"Navigation Text",label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:"Search Box",x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:"Tool Panel",x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:"Selection Bar",x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},
{type:"RECTANGLE",name:"Location",x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:"Navigation Text",label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:"Content",label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:"Content",label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:"Content",label:"Location",
x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:"Main Panel",x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:"Button",x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:"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:"Section Text",label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:"Line Color",x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:"Line Color",x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:"Line Color",x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:"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:"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"}]},b=0;b<3;b++)c.shapes.push({type:"TEXT",name:"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:"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};c.prototype.processSettings=function(c){var b=new i.ThemeSheetWriter;(new h.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",b.getSheet(c))};return{ThemeData:c,getStyles:d}});
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","Populating favorites...":"Populating favorites...",Favorite:"Favorite","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}'."});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(h,i,g,c){function d(c){this._displaySignOut=!0;this._init(c)}d.prototype={_init:function(c){this._dropdownNode=g.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,e;for(e in c)c.hasOwnProperty(e)&&b++;return b},_makeMenuItem:function(c,b){var e=document.createElement("span");e.role="menuitem";
e.tabIndex=0;var a=document.createTextNode(c);e.appendChild(a);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&e.classList.add(this._dropDownItemClass):e.classList.add("dropdownMenuItem");e.addEventListener("click",b,!1);e.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&b()},!1);return e},_renderAuthenticatedService:function(c){var b=this,e=this.authenticatedServices[c].authService;if(e&&e.logout&&this._displaySignOut){var a=document.createElement("li"),
d=this._makeMenuItem(h["Sign Out"],function(){e.logout().then(function(){b.addUserItem(c,e,b.authenticatedServices[c].label);localStorage.removeItem(c);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var d=localStorage.key(a);d&&d.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(d)}e.getAuthForm(window.location.href).then(function(a){window.location=a})})});a.appendChild(d);this._dropdownNode.appendChild(a)}},renderServices:function(){function d(a){e[a]||
(e[a]=b.createDocumentFragment());return e[a]}var b=document,e=[];c.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(a){this._dropdown?this._dropdown.empty():this._dropdownNode&&g.empty(this._dropdownNode);a.forEach(function(a){var c=d(typeof a.category==="number"?a.category:1),e=b.createElement("li"),j=b.createElement("a");j.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&j.classList.add(this._dropDownItemClass):j.classList.add("dropdownMenuItem");
j.href=a.href;j.textContent=a.textContent;e.appendChild(j);c.appendChild(e)}.bind(this));if(this.keyAssistFunction){var a=document.createElement("li"),c=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&c.classList.add(this._keyAssistClass):c.classList.add("key-assist-menuitem");a.appendChild(c);d(0).appendChild(a)}var l=this;e.sort(function(a,b){return a-b}).forEach(function(a,b){if(b<e.length-1&&!this._noSeparator){var c=
document.createElement("li");c.classList.add("dropdownSeparator");var d=document.createElement("span");d.classList.add("dropdownSeparator");c.appendChild(d);a.appendChild(c)}l._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var k in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(k)&&this._renderAuthenticatedService(k,0)}.bind(this))},setKeyAssist:function(c){this.keyAssistFunction=c;this.renderServices()},addUserItem:function(c,b,e,a){a?(this.unauthenticatedServices[c]&&
delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:b,label:e,data:a}):(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?{authService:b,label:e,pending:this.unauthenticatedServices[c].pending}:{authService:b,label:e});this.renderServices()}};d.prototype.constructor=d;return{UserMenu:d}});
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?"});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(h,i,g,c,d,f){function b(a,b,c){var e="";c&&(e="^");if(e=g.parse("/"+e+a.searchStr+"/"))c=e.pattern,e=e.flags,e.indexOf("i")===-1&&!b.caseSensitive&&(e+="i"),a.regExp={pattern:c,flags:e},a.wildCard=!0}var e={ALL_FILE_TYPE:"*.*"};e.doSearch=function(a,b,c,d){if(a){var f=!0;c==="*"&&(c="");c===""&&(f=d&&d.type!==e.ALL_FILE_TYPE);if(f){c!==""&&e.addRecentSearch(b,
c,d?d.regEx:!1);var a=a.createSearchParams(c,!1,!1,d),g=e.generateSearchHref(a);e.getOpenSearchPref(b,function(a){a?window.open(g):window.location=g})}}else window.alert(h["Can't search: no search service is available"])};e.generateSearchHelper=function(a,c){var d=a.keyword,f=d,g={};a.fileType&&a.fileType!==e.ALL_FILE_TYPE&&d===""&&(f="*."+a.fileType);if(a.regEx)g.searchStr=d,b(g,a,c);else{var h=d.indexOf("*")>-1,i=d.indexOf("?")>-1;h&&(d=d.split("*").join(".*"));i&&(d=d.split("?").join("."));!h&&
!i&&!a.nameSearch?(g.searchStr=a.caseSensitive?d.split("\\").join(""):d.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?d:d.toLowerCase(),b(g,a,c),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:a,inFileQuery:g,displayedSearchTerm:f}};e.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"};e.copySearchParams=function(a,b){var c={},e;for(e in a)if(a[e]!==void 0&&a[e]!==null&&(b||e!=="replace"))c[e]=a[e];return c};e.generateSearchHref=function(a){var b=i.toUrl("search/search.html"),a=e.copySearchParams(a,!0),c=a.resource;a.resource=void 0;return(new f(b+"#{,resource,params*}")).expand({resource:c,params:a})};e.generateFindURLBinding=function(a,
b,c,e){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof e==="string"?e:void 0,atLine:typeof c==="number"?c:void 0};return","+(new f("{,params*}")).expand({params:a})};e.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)};e.replaceRegEx=function(a,
b,c){return a.replace(RegExp(b.pattern,b.flags),c)};e.replaceStringLiteral=function(a,b,c){b=g.parse("/"+b+"/gim");return e.replaceRegEx(a,b,c)};e.searchOnelineLiteral=function(a,b,c){var e;e=0;for(var d=!1,f=[];;)if(e=b.indexOf(a.searchStr,e),e<0)break;else{f.push({startIndex:e,length:a.searchStrLength});d=!0;if(c)break;e+=a.searchStrLength}return d?f:null};e.findRegExp=function(a,b,c,e){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var d=null;return(d=RegExp(b,
c).exec(a.substring(e)))&&{startIndex:d.index+e,length:d[0].length}};e.searchOnelineRegEx=function(a,b,c){for(var d=0,f=!1,g=[];;)if(d=e.findRegExp(b,a.regExp.pattern,a.regExp.flags,d)){g.push(d);f=!0;if(c)break;d=d.startIndex+d.length}else break;return f?g:null};e.generateNewContents=function(a,b,c,d,f,g){if(d&&b){if(!a)c.contents=[];for(var h=0;h<b.length;h++){for(var i=b[h],q=!1,p=!1,u=[],w,t=0,y=0;y<d.children.length;y++)if(d.children[y].lineNumber-1===h){t=y;for(q=0;q<d.children[y].matches.length;q++)d.children[y+
q].checked!==!1&&u.push(q);p=u.length>0;w=d.children[y].matches;q=!0;break}if(q){if(p){u=e.replaceCheckedMatches(i,f,w,u,g);i=u.replacedStr;for(q=0;q<d.children[t].matches.length;q++)d.children[t+q].newMatches=u.newMatches}else for(q=0;q<d.children[t].matches.length;q++)d.children[t+q].newMatches=d.children[t+q].matches;a?c.contents[h]=i:c.contents.push(i)}else a||c.contents.push(i)}}};e.generateMatchContext=function(a,b,c){var e=[],d=a*2+1,f;b.length<=d?(f=0,a=b.length-1):(f=c-a,f<0?(f=0,a=f+d-1):
(a=c+a,a>b.length-1&&(a=b.length-1,f=a-d+1)));for(d=f;d<=a;d++)e.push({context:b[d],current:d===c});return e};e.splitFile=function(a){for(var b=0,c=0,e=0,d=0,f=[];;){b!==-1&&b<=e&&(b=a.indexOf("\r",e));c!==-1&&c<=e&&(c=a.indexOf("\n",e));if(c===-1&&b===-1){f.push(a.substring(d));break}var g=1;b!==-1&&c!==-1?b+1===c?(g=2,e=c+1):e=(b<c?b:c)+1:e=b!==-1?b+1:c+1;f.push(a.substring(d,e-g));d=e}return f};e.searchWithinFile=function(a,b,c,d,f,g){c=e.splitFile(c);if(f)b.contents=c;if(b){b.children=[];for(var h=
d=0;h<c.length;h++){var i=c[h];if(i&&i.length>0){var q=g?i:i.toLowerCase();if(q=a.wildCard?e.searchOnelineRegEx(a,q):e.searchOnelineLiteral(a,q)){var p,u=h+1;if(f)for(var w=0;w<q.length;w++)p=w+1,p={parent:b,checked:b.checked,type:"detail",matches:q,lineNumber:u,matchNumber:p,name:i,location:b.location+"-"+u+"-"+p},b.children.push(p);else p={parent:b,context:e.generateMatchContext(2,c,h),checked:b.checked,type:"detail",matches:q,lineNumber:u,name:i,location:b.location+"-"+u},b.children.push(p);d+=
q.length}}}b.totalMatches=d}};e.replaceCheckedMatches=function(a,b,c,e,d){for(var f=0,g="",h=[],i=0;i<c.length;i++){f!==c[i].startIndex&&(g+=a.substring(f,c[i].startIndex));if(c[i].length)d=c[i].length;for(var f=!1,p=0;p<e.length;p++)if(e[p]===i){f=!0;break}f?(h.push({startIndex:g.length,length:b.length}),g+=b):(h.push({startIndex:g.length,length:d}),g+=a.substring(c[i].startIndex,c[i].startIndex+d));f=c[i].startIndex+d}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:h}};e.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};e.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};e._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)})};e.addRecentSearch=function(a,b,c){typeof b==="string"&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f,
d=d.get("recentSearch");typeof d==="string"&&(d=JSON.parse(d));if(d){for(f in d)if(d[f].name===b)return;d.length>=20&&d.splice(19,d.length-20+1)}else d=[];d.splice(0,0,{name:b,regEx:c});e._storeRecentSearch(a,d)})};e.removeRecentSearch=function(a,b,c){typeof b==="string"&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f,d=d.get("recentSearch");typeof d==="string"&&(d=JSON.parse(d));if(d)for(f in d)if(d[f].name===b){d.splice(f,1);e._storeRecentSearch(a,
d,c);break}})};e.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)})};e.getMixedSearches=function(a,b,c,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));b&&(a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(c){var b=e.parseQueryStr(a.query);
f.some(function(a){return b.searchStrTitle===a.name})||f.push({name:b.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&d&&d(f)})};e.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)})};e.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",
{openInNewTab:b})})};return e});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,i,g,c,d,f){function b(b,a,d,f){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=f&&f.searchOnName;this._buildSkeletonOnly=f&&f.buildSkeletonOnly;this._fetchChildrenCallBack=f&&f.fetchChildrenCallBack;this._searchParams=d;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:c.generateSearchHelper(d);this._location=f&&f.location;this._childrenLocation=f&&f.childrenLocation?f.childrenLocation:this._location}b.prototype.search=function(b){var a=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=b;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))};b.prototype.searchName=function(b,a){if(b)this.searchHelper=c.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var d=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var f=0;f<this.fileSkeleton.length;f++){var g=this.fileSkeleton[f].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,g,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,g,!0))if(d.push(this.fileSkeleton[f]),
d.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:d.length,docs:d}})}};b.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),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()})})};b.prototype._searchCompleted=function(){console.log("Search Completed.")};
b.prototype._searchFiles=function(){var b=[],a;if(this.fileLocations.length>0){a=this;for(var c=0;c<a.fileLocations.length;c++)b.push(a._sniffSearch(a.fileLocations[c]))}return f.all(b)};b.prototype._sort=function(b){b.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),e=b.Name&&b.Name.toLowerCase();return c<e?-1:c>e?1:0})};b.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===c.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=
0:!0};b.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var g=c.registry.getService("orion.page.progress");return(g?g.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{var g=d.getFilenameContentType(b[e].Name,c.contentTypesCache);g&&(g["extends"]==="text/plain"||g.id==="text/plain")&&c._onFileType(g)&&a.push(c._sniffSearch(b[e]))}else b[e].Location&&a.push(c._visitRecursively(b[e].ChildrenLocation));return f.all(a)})};b.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,b,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,
b,!0)};b.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)};b.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(b),this.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(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:g.formatMessage(h["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};b.prototype._buildSingleSkeleton=function(b){this._totalCounter++;
this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new f;b.resolve(this._totalCounter);return b};b.prototype.constructor=b;return{SearchCrawler:b}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,i,g,c){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 c=
document.body;this.$frameParent=c;this.$$modalExclusions=this.$$modalExclusions||[];var b=document.createRange();b.selectNode(c);b=b.createContextualFragment(this.CONTAINERTEMPLATE);c.appendChild(b);this.$frame=c.lastChild;this.title&&g.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=g.$("#closeDialog",this.$frame);var e=this;this.$close.addEventListener("click",function(){e.hide()},!1);this.$parent=g.$(".dialogContent",this.$frame);b=document.createRange();b.selectNode(this.$parent);
c=b.createContextualFragment(this.TEMPLATE);this.messages&&g.processTextNodes(c,this.messages);this.$parent.appendChild(c);this.$buttonContainer=g.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE?e.hide():a.keyCode===g.KEY.ENTER&&typeof e._defaultCallback==="function"&&e._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(b){var e=c.createButton(b.text,b.callback);if(b.id)e.id=b.id,d["$"+e.id]=e;if(b.isDefault)d._defaultCallback=b.callback,d._defaultButton=e;d.$buttonContainer.appendChild(e)})}},_makeModal:function(){var c=this;this.$frame.addEventListener("blur",function(a){c.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var b=!g.contains(c.$frame,a.target);if(b)for(var e=0;e<
c.$$modalExclusions.length;e++)if(g.contains(c.$$modalExclusions[e],a.target)){b=!1;break}b&&(window.setTimeout(function(){(c.$lastFocusedElement||c.$parent).focus()},0),g.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var b=this.$frameParent.childNodes,e=!1;this._addedBackdrop=[];for(var a=0;a<b.length;a++){for(var d=0;d<this.$$modalExclusions.length;d++)if(g.contains(this.$$modalExclusions[d],b[a])){e=
!0;break}!e&&b[a]!==c.$frame&&b[a].classList&&!b[a].classList.contains("tooltipContainer")&&(d=b[a],d.classList.contains("modalBackdrop")||(d.classList.add("modalBackdrop"),this._addedBackdrop.push(d)))}(b=g.lastTabbable(this.$buttonContainer)||g.lastTabbable(this.$parent))&&b.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.TAB){var b=c._getFirstFocusField();b&&b!==a.target&&b.focus();g.stop(a)}},!1)},_addChildDialog:function(c){this.$$modalExclusions.push(c.$frame||c.$parent)},_bindElements:function(c){for(var b=
0;b<c.childNodes.length;b++){var e=c.childNodes[b];e.id&&(this["$"+e.id]=e);this._bindElements(e)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding==="function"&&this._afterHiding();var c=this;this.keepAlive||window.setTimeout(function(){c.destroy()},
0)},show:function(c){typeof this._beforeShowing==="function"&&this._beforeShowing();var b=g.bounds(this.$frame),e=g.bounds(document.documentElement),a;c?(a=g.bounds(c),c=a.top+a.height+4,a=a.left+4,c+b.height>e.height&&(c=Math.max(0,e.height-b.height-4)),a+b.width>e.width&&(a=Math.max(0,e.width-b.width-4))):(a=Math.max(0,(e.width-b.width)/2),c=Math.max(0,(e.height-b.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=c+"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 g.firstTabbable(this.$parent)||this._defaultButton||g.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(c){c.classList.remove("modalBackdrop")});this.$frameParent.removeEventListener("focus",this._modalListener,!0);this.$frameParent.removeEventListener("click",
this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};d.prototype.constructor=d;return{Dialog:d}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/util,orion/webui/dialog".split(","),function(h,i,g,c,d,f,b){function e(a){this._init(a)}e.prototype=new b.Dialog;e.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+c.toUrl("../../../images/progress_running.gif")+
'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';e.prototype._init=function(a){this.title=a.title||h["Find File Named"];this.modal=!0;this.messages=h;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new g.ContentTypeService(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(h["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(h["Missing required argument: searchRenderer"]);this._favService=a.favoriteService;if(!this._favService)throw Error(h["Missing required argument: favService"]);this._initialize()};e.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);
b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===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,g,h;if(a.keyCode===d.KEY.DOWN||a.keyCode===d.KEY.UP)e=d.$$array("a",b.$results),c=d.$$array("a",b.$favresults),f=document.activeElement,h=e.indexOf(f),g=c.indexOf(f),a.keyCode===d.KEY.DOWN?g>=0?(g<c.length-1?c[g+1]:e.length>0?e[0]:c[0]).focus():
h>=0?(h<e.length-1?e[h+1]:c.length>0?c[0]:e[0]).focus():(e.length>0||c.length>0)&&(-1<c.length-1?c[0]:e[0]).focus():g>=0?(f=b.$fileName,(g>0?c[g-1]:f).focus()):h>=0?(f=b.$fileName,(h>0?e[h-1]:c.length>0?c[c.length-1]:f).focus()):e.length>0?e[e.length-1].focus():c.length>0&&c[c.length-1].focus(),d.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=
b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new i.SearchCrawler(b._searcher.registry,b._fileService,"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),
this.$fileNameMessage.appendChild(document.createTextNode(this._message)));if(this._initialText)this.$fileName.value=this._initialText,this.doSearch()};e.prototype.populateFavorites=function(){var a=document.createElement("div");a.appendChild(document.createTextNode(h["Populating favorites&#x2026;"]));d.empty(this.$favresults);this.$favresults.appendChild(a);this._progress?this._progress.progress(this._favService.getFavorites(),"Getting favorites").then(this.showFavorites()):this._favService.getFavorites().then(this.showFavorites());
this._favService.addEventListener("favoritesChanged",this.showFavorites())};e.prototype.showFavorites=function(){var a=this;return function(b){if(b.navigator)b=b.navigator;a._searchRenderer.makeRenderFunction(a._contentTypeService,a.$favresults,!1,a.decorateResult.bind(a),a.showFavoritesImage)(b);if(b&&b.length>0)b=document.createElement("div"),b.style.borderBottom="1px dashed #BBBBBB",b.style.padding="5px",a.$favresults.appendChild(b)}};e.prototype.showFavoritesImage=function(a){var b=new Image;
b.classList.add("modelDecorationSprite");b.classList.add("core-sprite-favorite");b.src=c.toUrl("images/none.png");b.title=h.Favorite;a.appendChild(b);b.style.verticalAlign="middle"};e.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)};e.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?h["Searching..."]:f.formatMessage(h["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))}};e.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)}};e.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};e.prototype._afterHiding=function(){this._onHide&&this._onHide()};e.prototype.constructor=e;return{OpenResourceDialog:e}});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<div class="centralNavigation" id="centralNavigation" tabindex="0" role="button" style="margin-top:0;"></div>\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=3.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;">\n</div>\n<div class="layoutRight" style="padding-left:7px;margin-left:4px;margin-top:6px;" id="settingsTab" style="visibility:hidden;">\n\t<button class="layoutRight core-sprite-wrench imageSprite" id="settingsAction" aria-live="off" style="visibility:hidden;"></button>\n</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/objects",[],function(){return{mixin:function(h){Array.prototype.slice.call(arguments,1).forEach(function(i){for(var g=Object.keys(i),c=0;c<g.length;c++){var d=g[c];h[d]=i[d]}})}}});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(h,i){function g(c,d,f){this.CLEAR_PANEL=f!==null?f:!0;this.OPEN="false";f="";c.nodeType?this.node=c:(f=c+"_",c=document.getElementById(c),this.node=c.nodeType?c:document.createElement("span"));this.node.innerHTML=this.templateString;this.navLabelId=f+"navigationlabel";document.getElementById("navigationlabel").id=this.navLabelId;this.arrowId=f+"dropDownArrow";document.getElementById("dropDownArrow").id=this.arrowId;
this.navDropDownId=f+"navdropdown";document.getElementById("navdropdown").id=this.navDropDownId;if(d.icon)this.node.className=this.node.className+" "+d.icon,this.node.onclick=this.click.bind(this);else{if(d.label)c=document.getElementById(this.navLabelId),c.textContent=d.label,c.onclick=this.click.bind(this);if(d.caret)document.getElementById(this.arrowId).className=d.caret}this._dropdownNode=i.node(this.navDropDownId);this._triggerNode=i.node(this.navLabelId)}h.mixin(g.prototype,{templateString:'<div id="navigationlabel" class="navigationLabel dropdownTrigger" ></div><span id="dropDownArrow" class="dropDownArrow"></span><div class="dropDownContainer" id="navdropdown" style="display:none;"></div>',
click:function(){var c=document.getElementById(this.navDropDownId);c.style.display==="none"?this.updateContent(this.getContentNode(),function(){c.style.display="";this._positionDropdown();this.handle=i.addAutoDismiss([this.node,c],this.clearPanel.bind(this))}.bind(this)):this.CLEAR_PANEL&&this.clearPanel()},clearPanel:function(){document.getElementById(this.navDropDownId).style.display="none"},addContent:function(c){document.getElementById(this.navDropDownId).innerHTML=c},getContentNode:function(){return document.getElementById(this.navDropDownId)},
updateContent:function(c,d){d()},toggleLabel:function(c){document.getElementById(this.navLabelId).style.display=c?"":"none";document.getElementById(this.arrowId).style.display=c?"":"none"},_positionDropdown:function(){this._dropdownNode.style.left="";var c=i.bounds(this._dropdownNode),d=i.bounds(this._boundingNode(this._triggerNode));if(c.left+c.width>d.left+d.width)this._dropdownNode.style.right=0},_boundingNode:function(c){return c.style.right!==""||c.style.position==="absolute"||!c.parentNode||
!c.parentNode.style?c:this._boundingNode(c.parentNode)},destroy:function(){if(this.node)i.empty(this.node),this.node=this.select=null}});return g});
define("orion/widgets/input/GroupedContent",["orion/objects","orion/webui/littlelib"],function(h){function i(){}h.mixin(i.prototype,{templateString:'<div style="float:left;"><section><span style="color:#333;padding:15px;">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;">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","Make Favorite":"Make Favorite","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}'?","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?",
"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.","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","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",Favorites:"Favorites","Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:",
"Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.","Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding."});
define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,i,g){function c(b,c,a){if(!b[c])throw c+h[" is not supported in this file system"];return b[c].apply(b,a)}function d(b,e,a,f){if(!b.readBlob)throw h["source file service does not support binary read"];if(!a.writeBlob)throw h["target file service does not support binary write"];if(e[e.length-1]!=="/")return c(b,"readBlob",[e]).then(function(b){return c(a,"writeBlob",[f,b])});var g=f.substring(0,
f.length-1),k=decodeURIComponent(g.substring(g.lastIndexOf("/")+1)),g=g.substring(0,g.lastIndexOf("/")+1);return c(a,"createFolder",[g,k]).then(function(){},function(){}).then(function(){return c(b,"fetchChildren",[e]).then(function(c){for(var e=[],g=0;g<c.length;++g){var h=c[g].Location,l=h;c[g].Directory&&(l=h.substring(0,h.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+1));l=f+encodeURIComponent(l);c[g].Directory&&(l+="/");e[g]=d(b,h,a,l)}return i.all(e)})})}function f(b,c){function a(a){var b=
new i;b.reject(h["No Matching FileService for location:"]+a);return b}var d=b.getServiceReferences("orion.core.file"),f=d;if(c)for(var f=[],k=0;k<d.length;++k)c(d[k])&&f.push(d[k]);for(var m=[],n=[],r=[],o=[],q={fetchChildren:function(){var a=new i;a.resolve(o);return a},createWorkspace:function(){var a=new i;a.reject(h["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(h["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:h["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<f.length;++d)o[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:f[d].getProperty("top"),ChildrenLocation:f[d].getProperty("top"),Name:f[d].getProperty("Name")},k=f[d].getProperty("pattern")||".*",k[0]!=="^"&&(k="^"+k),m[d]=RegExp(k),n[d]=b.getService(f[d]),r[d]=f[d].getProperty("Name"),
f[d].getProperty("NameKey")&&f[d].getProperty("nls")&&g.getMessageBundle(f[d].getProperty("nls")).then(function(a,b){o[a].Name=b[f[a].getProperty("NameKey")];r[a]=b[f[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return n[0]?0:-1;for(var b=0;b<m.length;++b)if(m[b].test(a))return b;throw h["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?q:n[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?q.Name:r[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?q.Location:o[a].Location}}f.prototype={getService:function(b){return this._getService(b)},fileServiceName:function(b){return this._getServiceName(b)},fileServiceRootURL:function(b){return this._getServiceRootURL(b)},fetchChildren:function(b){return c(this._getService(b),"fetchChildren",arguments)},createWorkspace:function(b){return c(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return c(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return c(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,e,a,d){return c(this._getService(b),"createProject",arguments)},createFolder:function(b,e){return c(this._getService(b),"createFolder",arguments)},createFile:function(b,e){return c(this._getService(b),"createFile",arguments)},deleteFile:function(b){return c(this._getService(b),"deleteFile",arguments)},
moveFile:function(b,e,a){var f=this._getService(b),g=this._getService(e);if(f===g)return c(f,"moveFile",arguments);var h=b[b.length-1]==="/",i=e;i[i.length-1]!=="/"&&(i+="/");if(a)i+=encodeURIComponent(a);else{var n=b;h&&(n=n.substring(0,n.length-1));i+=n.substring(n.lastIndexOf("/")+1)}h&&i[i.length-1]!=="/"&&(i+="/");return d(f,b,g,i).then(function(){return c(f,"deleteFile",[b])})},copyFile:function(b,e,a){var f=this._getService(b),g=this._getService(e);if(f===g)return c(f,"copyFile",arguments);
var h=b[b.length-1]==="/",i=e;i[i.length-1]!=="/"&&(i+="/");if(a)i+=encodeURIComponent(a);else{var n=b;h&&(n=n.substring(0,n.length-1));i+=n.substring(n.lastIndexOf("/")+1)}h&&i[i.length-1]!=="/"&&(i+="/");return d(f,b,g,i)},read:function(b,e){return c(this._getService(b),"read",arguments)},write:function(b,e,a){return c(this._getService(b),"write",arguments)},remoteImport:function(b,e){return c(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,e){return c(this._getService(b),
"remoteExport",arguments)},search:function(b){return c(this._getService(b.resource),"search",arguments)}};f.prototype.constructor=f;return{FileClient:f}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html,orion/widgets/input/DropDownMenu,orion/widgets/input/GroupedContent,orion/util,orion/customGlobalCommands,orion/fileClient".split(","),function(h,
i,g,c,d,f,b,e,a,j,l,k,m,n,r,o,q,p,u,w,t,y,x,v,E,C,D,s,z,A,B,F,G){function L(a,b){if(a.getLabel)return a.getLabel();else{var c=new y;c.resolve(b.properties.name);return c}}function S(a){k.node("progressPane").setAttribute("aria-label",h["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function T(a,b){var c=a.getServiceReferences("orion.core.auth");Q=[];for(var e=I.createMenuGenerator.apply(this,arguments),d=0;d<c.length;d++){var f=
c[d],g=a.getService(f);L(g,f).then(function(a){g.getKey().then(function(b){Q.push(b);g.getUser().then(function(c){e.addUserItem(b,g,a,c)},function(c,d){e.addUserItem(b,g,a,d)});window.addEventListener("storage",function(){P[b]!==localStorage.getItem(b)&&(P[b]=localStorage.getItem(b),g.getUser().then(function(c){e.addUserItem(b,g,a,c)},function(){e.addUserItem(b,g,a)}))},!1)})})}}function J(a,b,c,d,g){var j=arguments,h,l=a&&a.getServiceReferences("orion.page.link.related");l&&l.length!==0&&y.when(function(){if(h)return h;
var b=a.getService("orion.core.contenttypes");b||(b=new q.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return h=a})}(),function(){var k;if(I.beforeGenerateRelatedLinks.apply(this,j)){for(var i=[],m=0;m<l.length;m++){var n={},t,G=l[m].getPropertyKeys();for(t=0;t<G.length;t++)n[G[t]]=l[m].getProperty(G[t]);if(n.id){var q=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var c=new f.CommandInvocation(b,b,null,a,d);I.addRelatedLinkCommand(a,
c)}else typeof g==="function"&&(k||(k=g()),y.when(k,function(c){c&&b===R&&(!a.visibleWhen||a.visibleWhen(c))&&I.addRelatedLinkCommand(a,new f.CommandInvocation(c,c,null,a,d))}))},r=null;t=null;if(c.indexOf(n.id)<0)if((n.nls&&n.nameKey||n.name)&&n.uriTemplate)t=e._createCommandOptions(n,l[m],a,h,!0),i.push(t),t.then(function(a){a=new f.Command(a);q(a)});else{if(!r&&(r=d.findCommand(n.id))){q(r);continue}if(!r){var o=a.getServiceReferences("orion.navigate.command");for(t=0;t<o.length;t++)if(o[t].getProperty("id")===
n.id){for(var n={},G=o[t].getPropertyKeys(),w=0;w<G.length;w++)n[G[w]]=o[t].getProperty(G[w]);t=e._createCommandOptions(n,o[t],a,h,!0);i.push(t);t.then(function(a){r=new f.Command(a);q(r)});break}}}}}y.all(i,function(a){return a}).then(function(){I.afterGenerateRelatedLinks.apply(this,j)})}})}function U(a){var b=k.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function N(a){var b={},c=null;typeof a==="string"&&(a=k.node(a));a||(a=k.node("pageActions"));for(var e=a;e&&
e.classList;){if(e.classList.contains("toolComposite")){c=e;break}e=e.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(c&&(b.slideContainer=k.$(".slideParameters",c),b.parameterArea=k.$(".parameters",c),b.dismissArea=k.$(".parametersDismiss",c),b.notifications=k.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=k.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=k.bounds(c),b.toolbarTargetY=a.height+1;return b}function O(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=
0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(c=k.bounds(a.notifications),b+=c.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=k.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var d=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),P={},I={createMenuGenerator:F.createMenuGenerator||
function(a,b){if(k.node("userMenu")){var c=k.node("userDropdown"),e=new n.Dropdown({dropdown:c}),c=new x.UserMenu({dropdownNode:c,dropdown:e,serviceRegistry:a}),e=k.node("userTrigger");new r.Tooltip({node:e,text:h.Options,position:["below","left"]});var e=document.getElementById("userTrigger"),d=e.className;d+=" imageSprite core-sprite-silhouette";e.className=d;c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:F.beforeGenerateRelatedLinks||function(){var a=k.node("relatedLinks");k.empty(a);
return!0},addRelatedLinkCommand:F.addRelatedLinkCommand||function(a,b){var c=k.node("relatedLinks");f.createCommandMenuItem(c,a,b).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:F.afterGenerateRelatedLinks||function(){},afterSetPageTarget:F.afterSetPageTarget||function(){},generateNavigationMenu:F.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new r.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new z("centralNavigation",{label:"Develop",
icon:"commandSprite core-sprite-hamburger"}),b=new A;a.addContent(b.getContentPane())},afterGenerateBanner:F.afterGenerateBanner||function(){}},Q=[],R,M=[],H,K=null;return{addSettings:function(a){(new z("settingsTab",{label:"Develop",icon:"imageSprite core-sprite-wrench"},!1)).updateContent=a.updateContent.bind(a)},generateBanner:function(e,d,j,l,n,G,q){function r(){this.create();this._filterString=""}function y(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=k.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new w.ThemePreferences(l,new t.ThemeData)).apply();var p=k.node(e);if(!p)throw h["could not find banner parent, id was "]+e;var x=document.createRange();x.selectNode(p);x=x.createContextualFragment(C);k.processTextNodes(x,h);p.firstChild?p.insertBefore(x,p.firstChild):p.appendChild(x);p=k.node("home");p.href=i.toUrl("navigate/table.html");p.setAttribute("aria-label",
h["Orion Home"]);k.node("progressPane").src=i.toUrl("images/none.png");if(p=k.node("pageToolbar"))p.classList.add("toolbarLayout"),p.innerHTML=s+g.slideoutHTMLFragment("mainToolbar");(p=k.node("closeNotifications"))&&p.setAttribute("aria-label",h["Close notification"]);if(p=k.node("footer"))p.innerHTML=D,k.processTextNodes(p,h);j.setParameterCollector(new b.CommandParameterCollector(N,O));document.addEventListener("keydown",function(a){a.keyCode===k.KEY.ESCAPE&&(a=d.getService("orion.page.message"))&&
a.setProgressMessage("")},!1);I.generateNavigationMenu.apply(this,arguments);var L=k.node("navigationlinks");L&&v.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){var b=document.createElement("li");b.appendChild(a);L.appendChild(b)})});if(p=k.$(".split")){var x=k.$(".sidePanelLayout"),u=k.$(".mainPanelLayout");if(x&&u)K={side:x,main:u},K.splitter=new m.Splitter({node:p,sidePanel:x,mainPanel:u,toggle:!0,closeByDefault:p.style&&p.style.left==="0%"}),p=new f.Command({name:h["Toggle side panel"],
tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),j.addCommand(p),j.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new c.KeyBinding("o",!0)),q&&K.splitter.addResizeListener(function(a){q&&a===u&&(a=q.getTextView())&&a.resize()})}p=new f.Command({name:h["Make Favorite"],tooltip:h["Add to the favorites list"],imageClass:"core-sprite-favorite",id:"orion.makeFavorite",visibleWhen:function(a){a=Array.isArray(a)?
a:[a];if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!a[b].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=d.getService("orion.core.favorite"),c=d.getService("orion.page.progress"),e=function(a){return function(e){e?d.getService("orion.page.message").setMessage(a.Name+h[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},f=0;f<a.length;f++){var g=a[f];c.progress(b.hasFavorite(g.ChildrenLocation||g.Location),
"Checking favorite "+g.Name).then(e(g))}}});j.addCommand(p);var J=!1,z=function(a,b,c){if(!J){var e=b.getService("orion.core.favorite"),d=b.getService("orion.page.progress");e||(e=new o.FavoritesService({serviceRegistry:b}),e=b.getService("orion.core.favorite"));var f=new E.OpenResourceDialog({searcher:a,progress:d,searchRenderer:a.defaultRenderer,favoriteService:e,onHide:function(){J=!1;c&&c.getTextView()&&c.getTextView().focus()}});window.setTimeout(function(){J=!0;f.show()},0)}},p=new f.Command({name:h["Find File Named..."],
tooltip:h["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){z(n,d,q)}});j.addCommand(p);j.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new c.KeyBinding("f",!0,!0));p=new f.Command({name:h["Toggle banner and footer"],tooltip:h["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=k.node("banner"),b=k.node("footer"),c=k.$(".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.getTextView()&&q.getTextView().resize();return!0}});j.addCommand(p);j.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new c.KeyBinding("m",!0,!0));p=new f.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});
j.addCommand(p);j.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new c.KeyBinding(112,!0,!0));p=new f.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});j.addCommand(p);j.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new c.KeyBinding("o",!0,!0));r.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=h["Filter bindings"];a.appendChild(b);var c=this._keyAssistContents=document.createElement("div");c.classList.add("keyAssistContents");if(B.isIOS||B.isAndroid)c.style.overflowY="auto";a.appendChild(c);var e=this._keyAssistTable=document.createElement("table");
e.tabIndex=0;e.classList.add("keyAssistList");c.appendChild(e);document.body.appendChild(a);b.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));e.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("input",function(){this.filterChanged()}.bind(this));c.addEventListener(B.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===k.KEY.ESCAPE&&this.hide()}.bind(this));
k.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){k.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;this._idCount=this._keyAssistContents.scrollTop=0;if(q&&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(h.Editor);for(var e=function(a){return function(){b.focus();
return b.invokeAction(a)}},d={},f,g=0;g<c.length;g++)for(var l=c[g],i=b.getActionDescription(l),m=b.getKeyBindings(l),n=0;n<m.length;n++){f=m[n];var t=a.getUserKeyString(f);f.scopeName?(d[f.scopeName]||(d[f.scopeName]=[]),d[f.scopeName].push({bindingString:t,name:i.name,execute:e(l)})):this.createItem(t,i.name,e(l))}for(var G in d)if(d[G].length){this.createHeader(G);for(c=0;c<d[G].length;c++)f=d[G][c],this.createItem(f.bindingString,f.name,f.execute)}}this.createHeader(h.Global);j.showKeyBindings(this)},
createItem:function(a,b,c){if(this._filterString){var e=this._filterString.toLowerCase(),d;e!==this._filterString?(e=this._filterString,d=function(a){return a}):d=function(a){return a.toLowerCase()};if(d(b).indexOf(e)===-1&&d(a).indexOf(e)===-1&&d(this._lastHeader).indexOf(e)===-1)return}var f=this._keyAssistTable.insertRow(-1);f.id="keyAssist-keyBinding-"+this._idCount++;f.setAttribute("role","menuitem");f._execute=c;f.classList.add("keyAssistItem");f.addEventListener("click",function(a){this._selectedRow=
f;this.execute();a.preventDefault()}.bind(this));c=f.insertCell(-1);c.classList.add("keyAssistName");c.appendChild(document.createTextNode(b));c=f.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(){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(),e=this._keyAssistContents,d=e.getBoundingClientRect();a.offsetTop<e.scrollTop?c===0?e.scrollTop=0:a.scrollIntoView(!0):b.bottom>d.bottom&&a.scrollIntoView(!1)}}},show:function(){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=B.isIE||B.isOpera?-a.wheelDelta:B.isFirefox?a.detail*40:-a.wheelDeltaY,c=this._keyAssistContents,e=c.scrollTop;c.scrollTop+=b;if(e!==c.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var A=new r,F=new f.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){A.isVisible()?A.hide():A.show();return!0}});j.addCommand(F);j.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new c.KeyBinding(191,!1,!0));p=function(){q.getTextView().setKeyBinding(new c.KeyBinding(191,!1,!0,!B.isMac,B.isMac),F.id);q.getTextView().setAction(F.id,F.callback,F)};q&&(q.getTextView()?
p():q.addEventListener("TextViewInstalled",p));U(j);T(d,F.callback);S(d);window.addEventListener("hashchange",function(){j.processURL(window.location.href)},!1);window.setTimeout(function(){y(d)},0);I.afterGenerateBanner.apply(this,arguments)},getToolbarElements:N,getMainSplitter:function(){return K},layoutToolbarElements:O,setPageTarget:function(a){var b,c,e=a.breadcrumbRootName,d=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&
(c=e?e+" ":"",c+=a.fileService.fileServiceName(a.target.Location),e=null),b=a.name||a.target.Name,R=a.target,J(d,a.target,M,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(e=e||a.task||a.name),b=a.name,J(d,{NoTarget:""},M,a.commandService,a.makeAlternate));(H=a.title)||(H=b?b+" - "+a.task:a.task);window.document.title=H;I.afterSetPageTarget.apply(this,arguments);if(b=k.node("location")){k.empty(b);var f=d&&new G.FileClient(d),d=a.breadcrumbTarget||a.target,f=f&&d&&d.Location?f.fileServiceRootURL(d.Location):
null;new l.BreadCrumbs({container:b,resource:d,rootSegmentName:e,workspaceRootSegmentName:c,workspaceRootURL:f,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(H)H.charAt(0)==="*"&&!a&&(H=H.substring(1)),a&&H.charAt(0)!=="*"&&(H="*"+H),window.document.title=H;var b=k.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){M=a},notifyAuthenticationSite:d}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(h){return{detectValidURL:function(i){for(var g=/\[([^\]]*)\]\(([^\)]+)\)/g,c=g.exec(i),d=[],f=0;c;){if(c.length===3&&c[2].length>0){var b=new URL(c[2]);b.protocol!==":"&&h.validateURLScheme(b.href)&&(c.index>f&&d.push({segmentStr:i.substring(f,c.index)}),d.push({segmentStr:c[1].length>0?c[1]:c[2],urlStr:c[2]}),f=c.index+c[0].length)}c=g.exec(i)}if(f===0)return null;f<i.length-1&&d.push({segmentStr:i.substring(f)});return d},processURLSegments:function(h,
g){g.forEach(function(c){if(c.urlStr){var d=document.createElement("a");d.href=c.urlStr;d.appendChild(document.createTextNode(c.segmentStr))}else d=document.createElement("span"),d.textContent=c.segmentStr;h.appendChild(d)})}}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands","orion/PageUtil","orion/urlUtils"],function(h,i,g,c,d){function f(b,a,c,d,f){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=a;this.notificationContainerDomId=f;this.domId=c;this.progressDomId=d||c;this._hookedClose=!1;this._timer=null}var b;f.prototype={_init:function(){var b=i.node("closeNotifications");if(b&&!this._hookedClose)this._hookedClose=!0,
b.addEventListener("click",function(){window.clearTimeout(this._timer);this.setProgressMessage("")}.bind(this))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=g.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,a,c){this._init();this.currentMessage=b;var d=i.node(this.domId);if(typeof c==="boolean"){var f=d.getAttribute("aria-live");d.setAttribute("aria-live",c?"polite":"off");window.setTimeout(function(){b===
this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode(b)),window.setTimeout(function(){d.setAttribute("aria-live",f)},100))}.bind(this),100)}else i.empty(d),d.appendChild(document.createTextNode(b));typeof a==="number"&&window.setTimeout(function(){b===this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),a)},setErrorMessage:function(b){this.currentMessage=b;this._init();var a=b.responseText||b.message||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(c){}var b=
a.Message||a,d="red";if(a.Severity)switch(a.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}a=document.createElement("span");a.style.color=d;a.appendChild(document.createTextNode(b));b=i.node(this.domId);i.empty(b);b.appendChild(a)},setProgressMessage:function(b){this._init();this.currentMessage=b;var a=document.createElement("span");a.classList.add("imageSprite");a.classList.add("progressIcon");a.classList.add("core-sprite-progress");var c=i.node(this.progressDomId);
i.empty(c);c.appendChild(a);c.appendChild(document.createTextNode(b));a=i.node(this.notificationContainerDomId);a.classList.remove("notificationHide");if(b&&b.length>0)a.classList.add("progressNormal"),a.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else a.classList.remove("notificationShow"),a.classList.add("notificationHide")},setProgressResult:function(b){this.currentMessage=b;var a=b.responseText||b;if(typeof a===
"string")try{a=JSON.parse(a)}catch(c){}this._init();var f=a.Message||a,g="core-sprite-information",h="progressInfo",n=document.createElement("span");n.classList.add("imageSprite");n.classList.add("progressIcon");b=[];if(a.Severity)switch(a.Severity){case "Warning":g="core-sprite-warning";h="progressWarning";b.push("progressInfo");b.push("progressError");b.push("progressNormal");break;case "Error":g="core-sprite-error";h="progressError";b.push("progressWarning");b.push("progressInfo");b.push("progressNormal");
break;default:b.push("progressWarning"),b.push("progressError"),b.push("progressNormal")}b.push("notificationHide");n.classList.add(g);var r=i.node(this.progressDomId),g=i.node(this.notificationContainerDomId);i.empty(r);r.appendChild(n);if(a.HTML)a=document.createElement("span"),a.innerHTML=f,r.appendChild(a);else{if(n=d.detectValidURL(f))f=document.createDocumentFragment(),d.processURLSegments(f,n),Array.prototype.forEach.call(i.$$("a",f),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&
a.Severity!=="Error")this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3);f=document.createTextNode(f)}r.appendChild(f)}if(h&&this.progressDomId!==this.domId){g.classList.add(h);for(h=0;h<b.length;h++)g.classList.remove(b[h])}g.classList.add("notificationShow")},showWhile:function(b,a){var c=this;if(a){c.setProgressMessage(a);var d=function(){a===c.currentMessage&&c.setProgressMessage("")};b.then(d,d)}return b},
_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,a){return new b(this,++this._lastProgressId,c,a)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",a=!0,c;for(c in this._progressMonitors)this._progressMonitors[c].status&&(a||(b+=", "),b+=this._progressMonitors[c].status,a=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;
this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};f.prototype.constructor=f;b=function(b,a,c,d){this.statusService=b;this.progressId=a;if(c){this.deferred=c;this.begin(d);var f=this;c.then(function(){f.done.bind(f)()},function(){f.done.bind(f)()})}};
b.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};b.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};b.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};b.prototype.constructor=b;return{StatusReportingService:f,ProgressMonitor:b}});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,i,g,c){function d(){}d.prototype={_initialize:function(d,b,e,a,j){this._tooltip=new c.Tooltip({node:d,hideDelay:j||0,afterShowing:this._afterShowingFunction(b).bind(this),afterHiding:e,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&&g.processTextNodes(d,h);this.$parent.appendChild(d);var l=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&l.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var e=c.childNodes[b];e.id&&(this["$"+e.id]=e);this._bindElements(e)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var b=
g.firstTabbable(this.$parent);b&&b.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};d.prototype.constructor=d;return{PopupDialog:d}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,i,g,c){var d={};(function(){var f=!1;d.updateNavTools=function(b,c,a,d,l,k){var i=g.node(d);if(i)c.destroy(i);else throw h["could not find toolbar "]+d;c.renderCommands(d,i,k,a,"button");if(l&&(d=g.node(l)))c.destroy(d),c.renderCommands(l,d,null,a,"button");f||(f=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",function(b){var d=g.node(l);
d&&(c.destroy(d),c.renderCommands(l,d,b.selections,a,"button"))}))};d.createOperationsCommands=function(b,e,a){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new c.Command({name:h["Remove Completed"],tooltip:h["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){e.loadOperations.bind(e)()})},visibleWhen:function(){return!0}});b.addCommand(f);
f=new c.Command({name:h.Remove,tooltip:h["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],c=0;c<b.length;c++){var d=b[c];a.removeOperation.bind(a)(d.Location).then(function(){e.loadOperations.bind(e)()},function(){e.loadOperations.bind(e)()})}},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}});b.addCommand(f);
f=new c.Command({name:h.Cancel,tooltip:h["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],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}});b.addCommand(f)}})();
return d});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,i,g,c,d){function f(b){this._options=b}f.prototype=new c.PopupDialog;f.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink" class="navlinkonpage">All Operations</a></td></tr></table><div id="operationsExist"><div style="padding-left: 7px" id="myOperationsListEmpty">No operations running on this page.</div><table id="myOperationsList" style="display: none;"></table></div><div style="padding-left: 7px" id="operationsDontExist">No operations running.</div>';f.prototype._init=
function(b){this._myOperations=[];this._operationsDeferreds=[];this._commandService=b.commandRegistry;d.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(b.triggerNode)};f.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};f.prototype.setOperations=function(b,c){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(b)for(var a in b)this._myOperations.push(b[a]),this._operationsDeferreds.push(c[a]);this._renderOperations()};f.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}var a={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==a.Message)a.DetailedMessage=b.DetailedMessage;return a};f.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};f.prototype._renderOperationsTable=function(b,c,a){g.empty(b);for(var d=0;d<c.length;d++){var f=c[d],i=document.createElement("tr"),m=document.createElement("td");m.style.paddingLeft="5px";m.style.paddingRight="5px";m.textContent=f.Name;i.appendChild(m);var n=document.createElement("div");m.appendChild(n);m=document.createElement("span");m.style.paddingRight="5px";m.classList.add("imageSprite");switch(f.type){case "Warning":m.classList.add("core-sprite-warning");m.setAttribute("aria-label",
h["Operation resulted in a warning."]);break;case "error":m.classList.add("core-sprite-error");m.setAttribute("aria-label",h["Operation resulted in an error."]);break;case "loadstart":case "progress":m.classList.add("core-sprite-start");m.setAttribute("aria-label",h["Operation is running."]);break;case "abort":m.classList.add("core-sprite-stop");m.setAttribute("aria-label",h["Operation is canceled."]);break;case "load":case "loadend":m.classList.add("core-sprite-ok"),m.setAttribute("aria-label","Operation ok.")}n.appendChild(m);
m=document.createElement("span");m.classList.add("operationStatus");m.textContent=f.Name;n.appendChild(m);if(f.error){var r=f.error.Message||f.error;f.error.DetailedMessage&&f.error.DetailedMessage!==""&&(r+=": "+f.error.DetailedMessage);m.textContent=r;m.classList.remove("operationStatus");m.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",n,{operation:f,deferred:a[d]},this,"tool");b.appendChild(i)}this._setOperationsVisibility()};f.prototype._setOperationsVisibility=
function(){this.$myOperationsList.style.display=this._myOperations.length>0?"":"none";this.$myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.$operationsDontExist.style.display=this._myOperations.length>0?"none":"";this.$operationsExist.style.display=this._myOperations.length>0?"":"none"};f.prototype.constructor=f;return{OperationsDialog:f}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(h,i,g,c,d){function f(b,a){if(!this._progressPane){this._progressPane=c.node(b);this._operationsDialog=new d.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var f=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===c.KEY.ENTER)&&f._operationsDialog.show()})}}function b(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}f.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=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var f="";for(d in c){var g=c[d];if(g.type&&(g.type==="loadstart"||g.type==="progress")){f="running";break}}switch(f){case "running":this._progressPane.title=h["Operations running"];this._progressPane.alt=h["Operations running"];
this._progressPane.setAttribute("aria-valuetext",h["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=h["Some operations finished with warning"];this._progressPane.alt=h["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=h["Some operations finished with error"];this._progressPane.alt=
h["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};
f.prototype.constructon=f;b.prototype={init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new f(b,this._commandRegistry)},progress:function(b,a,c){var d=this,f=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(){if(d._operations[f]){var g=d._operations[f];if(a)g.Name=a;d._lastOperation=g;g.type="loadend";if(c)g.progressMonitor=c;d.writeOperation.bind(d)(f,g,b);g.Location||d._removeOperationFromTheList.bind(d)(f)}},
function(g){if(d._operations[f]){var h=d._operations[f];if(a)h.Name=a;if(c)h.progressMonitor=c;d._lastOperation=h;h.type=g.canceled?"abort":"error";h.error=g;d.writeOperation.bind(d)(f,h,b);h.Location||d._removeOperationFromTheList.bind(d)(f)}},function(g){if(a)g.Name=a;if(c)g.progressMonitor=c;d.writeOperation.bind(d)(f,g,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)}};b.prototype.constructor=b;return{ProgressService:b}});
define("orion/profile/usersClient",[],function(){function h(h){this.serviceRegistry=h}h.prototype={getUserInfo:function(h,g){return this._doServiceCall("getUserInfo",arguments)},getUsersListSubset:function(h,g,c){return this._doServiceCall("getUsersListSubset",arguments)},getUsersList:function(h){return this._doServiceCall("getUsersList",arguments)},deleteUser:function(h,g){return this._doServiceCall("deleteUser",arguments)},createUser:function(h,g,c){return this._doServiceCall("createUser",arguments)},
updateUserInfo:function(h,g,c){return this._doServiceCall("updateUserInfo",arguments)},resetUserPassword:function(h,g,c){return this._doServiceCall("resetUserPassword",arguments)},initProfile:function(h,g,c){return this._doServiceCall("initProfile",arguments)},fire:function(h,g,c){return this._doServiceCall("fire",arguments)},getDivContent:function(){return this._doServiceCall("getDivContent",arguments)},_doServiceCall:function(h,g){var c=this.serviceRegistry.getService("orion.core.user");return c[h].apply(c,
g)}};h.prototype.constructor=h;return{UsersClient:h}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,i){function g(b,c,a){return b[c].apply(b,a)}function c(b){this._location=b}function d(){var b=new i;b.reject(h["No Matching OperationService for location:"]+this._location);return b}function f(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var e=b.getServiceReferences("orion.core.operation"),
a=0;a<e.length;a++){var d=b.getService(e[a]);this._services[a]=d;d=e[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];return new c(a)}}c.prototype={getOperation:d,getOperations:d,removeCompletedOperations:d,removeOperation:d,cancelOperation:d};c.prototype.constructor=c;f.prototype={getOperations:function(){var b=
new i;if(this._operations)return b.resolve(this._operations),b;var c=this;this._preferenceService.getPreferences("/operations").then(function(a){c._operations=a;b.resolve(c._operations)});return b},getOperation:function(b){return g(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],c=this,a=0;a<this._services.length;a++){var d=this._patterns[a],f=new i;b[a]=f.promise;g(this._services[a],"removeCompletedOperations").then(function(a){return function(b){Array.isArray(b)&&
c.getOperations.bind(c)().then(function(c){for(var e=c.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&b.indexOf(g)<0&&c.remove(g)}a.resolve()})}}(f),function(a){return function(b){a.reject(b)}}(f))}return i.all(b)},removeOperation:function(b){var c=this;return g(this._getService(b),"removeOperation",arguments).then(function(){c.getOperations.bind(c)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};f.prototype.constructor=f;return{OperationsClient:f}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All","Search ${0}":"Search ${0}",
"Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results",
"Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"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"});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(c){typeof g[c]==="undefined"&&(g[c]=h[c])});return g});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function g(c){this._init(c)}g.prototype={_init:function(c){var d=c.parent,f=this,d=i.node(d);if(!d)throw h["no parent"];if(!c.model)throw h["no tree model"];if(!c.renderer)throw h["no renderer"];this._parent=d;this._treeModel=c.model;this._renderer=c.renderer;this._showRoot=c.showRoot===void 0?!1:c.showRoot;this._indent=c.indent===void 0?16:c.indent;this._onCollapse=c.onCollapse;this._labelColumnIndex=
c.labelColumnIndex===void 0?0:c.labelColumnIndex;this._id=c.id===void 0?"treetable":c.id;this._tableStyle=c.tableStyle;this._tableElement=c.tableElement||"table";this._tableBodyElement=c.tableBodyElement||"tbody";this._tableRowElement=c.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){f._showRoot?(b._depth=0,f._generate([b],0)):f._treeModel.getChildren(b,function(b){f._generate(b,0)})})},_generate:function(c,d){i.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&
this._renderer.wrapperCallback(f);var b=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(b);b.id=this._id;this._tableStyle&&b.classList.add(this._tableStyle);this._renderer.initTable(b,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(c,d);b.appendChild(this._bodyElement);f.appendChild(b);
this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(c,d,f){for(var b=0;b<c.length;b++){var e=document.createElement(this._tableRowElement);e.id=this._treeModel.getId(c[b]);this._renderer.rowCallback&&this._renderer.rowCallback(e);e._depth=d;e._item=c[b];this._renderer.render(c[b],e);e.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*d+"px";f?(this._bodyElement.insertBefore(e,f.nextSibling),f&&(f=e)):this._bodyElement.appendChild(e)}},_rowsChanged:function(){this._renderer.rowsChanged&&
this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(c,d,f){var b=this._treeModel.getId(c),e;if(b===this._id)this._removeChildRows(b),this._generateChildren(d,0),this._rowsChanged();else{var a=i.node(b);a?(a._item=c,a&&(f||a._expanded)?(a._expanded=!0,this._removeChildRows(b),this._renderer.updateExpandVisuals(a,!0),d?(this._generateChildren(d,a._depth+1,a),this._rowsChanged()):(e=this,d=this._treeModel.getChildren(a._item,function(b){e._generateChildren(b,
a._depth+1,a);e._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(h["could not find table row "]+b)}},getItem:function(c){var d=i.node(c);return d&&d._item?d._item:c},toggle:function(c){var d=i.node(c);d&&(d._expanded?(this.collapse(c),this._renderer.updateExpandVisuals(d,!1)):(this.expand(c),this._renderer.updateExpandVisuals(d,!0)))},isExpanded:function(c){return(c=i.node(c))?c._expanded:!1},expand:function(c,d,f){var c=typeof c==="string"?c:this._treeModel.getId(c),b=i.node(c);
if(b&&!b._expanded){b._expanded=!0;var e=this;this._renderer.updateExpandVisuals(b,!0);this._treeModel.getChildren(b._item,function(a){e._generateChildren(a,b._depth+1,b);e._rowsChanged();d&&d.apply(e,f)})}},_removeChildRows:function(c){for(var d=c===this._id,f=!1,b=-1,e=[],a=i.$$array(".treeTableRow",this._parent),g=0;g<a.length;g++){var h=a[g];if(f)break;if(d)h._depth>b?e.push(h):f=!0;else if(h.id===c)d=!0,b=h._depth}for(c=0;c<e.length;c++)d=e[c],d.parentNode.removeChild(d)},collapse:function(c){var c=
typeof c==="string"?c:this._treeModel.getId(c),d=i.node(c);if(d){if(!d._expanded)return;d._expanded=!1;this._renderer.updateExpandVisuals(d,!1);this._removeChildRows(c);this._rowsChanged()}this._onCollapse&&this._onCollapse(d._item)}};g.prototype.constructor=g;return{TableTree:g}});
define("orion/treeModelIterator",[],function(){var h={};h.TreeModelIterator=function(){function h(g,c){this.firstLevelChildren=g;this.reset();this._init(c)}h.prototype={_init:function(g){if(g)this.isExpanded=g.isExpanded,this.isExpandable=g.isExpandable,this.forceExpandFunc=g.forceExpandFunc,this.getChildrenFunc=g.getChildrenFunc},topLevel:function(g){return g.parent?g.parent===this.root:!0},_getChildren:function(g){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(g):g?g.children:
null},_expanded:function(g){if(!g)return!0;var c=this._getChildren(g),c=c&&c.length>0;this.isExpanded&&c&&(c=this.isExpanded(g));return c},_expandable:function(g){return!g?!0:this.isExpandable?this.isExpandable(g):!1},_diveIn:function(g){return this._expanded(g)?(this.setCursor(this._getChildren(g)[0]),this.cursor()):null},_drillToLast:function(g){return this._expanded(g)?(g=this._getChildren(g),this._drillToLast(g[g.length-1])):g},_forward:function(g){if(!this._cursor)return null;var c=this._diveIn(this._cursor);
if(!c){if(g&&this._expandable(this._cursor)&&this.forceExpandFunc){var d=this;return this.forceExpandFunc(this._cursor,"first",function(c){c&&d.setCursor(c)})}(c=this._findSibling(this._cursor,!0))&&this.setCursor(c)}return c},_backward:function(g){if(!this._cursor)return null;var c=this._findSibling(this._cursor,!1);c&&c!==this._cursor.parent&&(c=this._drillToLast(c));if(g&&c&&this._expandable(c)&&this.forceExpandFunc&&c!==this._cursor.parent){var d=this;return this.forceExpandFunc(c,"last",function(c){c&&
d.setCursor(c)})}c&&this.setCursor(c);return c},_findSibling:function(g,c){for(var d=this.topLevel(g),f=this._getChildren(g.parent),f=d?this.firstLevelChildren:f,b=0;b<f.length;b++)if(f[b]===g)return b===0&&!c?d?null:g.parent:b===f.length-1&&c?d?null:this._findSibling(g.parent,c):c?f[b+1]:f[b-1];return null},_inParentChain:function(g,c){for(var d=g.parent;d;){if(d===c)return!0;d=d.parent}return!1},_getTopLevelParent:function(g){if(this.topLevel(g))return g;for(g=g.parent;g;){if(this.topLevel(g))return g;
g=g.parent}return null},_onCollapse:function(g){return this._expanded(g.parent)?g:this._onCollapse(g.parent)},_scan:function(g,c,d){this.setCursor(c);var f=[];for(f.push(c);;){if(this.iterate(g))f.push(this.cursor());else break;if(d===this.cursor())return f}return null},setCursor:function(g){this._prevCursor=this._cursor;this._cursor=g},setTree:function(g){this.firstLevelChildren=g;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(g,c){var d=this.cursor(),
f=this._scan(!0,g,c);f||(f=this._scan(!1,g,c));this.setCursor(d);return f},iterate:function(g,c){return g?this._forward(c):this._backward(c)},iterateOnTop:function(g,c){var d=this._findSibling(this._getTopLevelParent(this.cursor()),g);d?this.setCursor(d):c&&this.firstLevelChildren.length>0&&this.setCursor(g?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(g){if(!this._cursor)return null;return this._inParentChain(this._cursor,g)?(this.setCursor(g),
this._cursor):null},reset:function(){this.root=this._prevCursor=this._cursor=null;if(this.firstLevelChildren.length>0)this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent},cursorMoved:function(){return this._cursor!==this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return h}();return h});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(h,i,g){var h={},c=navigator.userAgent.indexOf("iPad")!==-1,d=window.navigator.platform.indexOf("Mac")!==-1;h.ExplorerNavHandler=function(){function f(b,c,a){this.explorer=b;this.model=this.explorer.model;this._navDict=c;this._listeners=[];this._selections=[];this._currentColumn=0;var d=this._getEventListeningDiv();d.tabIndex=0;d.classList.add("selectionModelContainer");
var f=this;this._modelIterator=new g.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:a.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return f.explorer.renderer.isExpandable(a)}:function(a){return f.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return f.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&d.focus();b=function(a){if(a.target===d){if(f.explorer.preventDefaultFunc&&f.explorer.preventDefaultFunc(a,
f._modelIterator.cursor()))return!0;if(a.keyCode===i.KEY.DOWN)return f.onDownArrow(a);else if(a.keyCode===i.KEY.UP)return f.onUpArrow(a);else if(a.keyCode===i.KEY.RIGHT)return f.onRightArrow(a);else if(a.keyCode===i.KEY.LEFT)return f.onLeftArrow(a);else if(a.keyCode===i.KEY.SPACE)return f.onSpace(a);else if(a.keyCode===i.KEY.ENTER)return f.onEnter(a)}};d.addEventListener("keydown",b,!1);this._listeners.push({type:"keydown",listener:b});b=function(){if(f.explorer.onFocus)f.explorer.onFocus(!1);else f.toggleCursor(null,
!1)};d.addEventListener("blur",b,!1);this._listeners.push({type:"blur",listener:b});b=function(){if(f.explorer.onFocus)f.explorer.onFocus(!0);else f.toggleCursor(null,!0)};d.addEventListener("focus",b,!1);this._listeners.push({type:"focus",listener:b});this._parentDiv=d}f.prototype={_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 d?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):i.node(this.explorer._parentId)},
isExpandable:function(b){return!b?!1:i.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 c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){c._clearSelection();for(var d=0;d<a.length;d++)c._selections.push(a[d]);c._selections.length>0&&c.cursorOn(c._selections[0],!0,!1,b)})},refreshModel:function(b,c,a,d){this._currentColumn=
0;this.topIterationNodes=[];this.model=c;this._navDict=b;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(b){for(var b=this.model.getId(b),c=0;c<this._selections.length;c++)if(b===this.model.getId(this._selections[c]))return c;
return-1},_clearSelection:function(b){if(b)for(b=0;b<this._selections.length;b++)this._checkRow(this._selections[b],!0);this._selections=[]},setSelection:function(b,c){if(this._selectionPolicy==="cursorOnly")c&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0);else if(this._isRowSelectable(b)){if(!c||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b;else{var 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)}this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(b,c){b||(b=this.currentModel());var a=this._getGridChildren(b);if(a&&a.length>1||c===0&&a){c!==0&&this.toggleCursor(b,!1);var d=this._currentColumn,f=!0;d+=c;d<0?(this._linearGridMove&&c!==0&&(this._modelIterator.iterate(!1)?b=this.currentModel():f=!1),
d=f?a.length-1:this._currentColumn):d>=a.length&&(this._linearGridMove&&c!==0&&(this._modelIterator.iterate(!0)?b=this.currentModel():f=!1),d=f?0:this._currentColumn);this._currentColumn=d;c!==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 c=
this._parentDiv,a;b&&b!==c&&(a=b.getAttribute("role"))!=="grid"&&a!=="tree"&&a!=="treegrid";)b=b.parentNode;return b===c?null:b},toggleCursor:function(b,c){var a=this.getRowDiv(b),d=this.getCurrentGrid(b);d?(a&&(c?a.classList.add("treeIterationCursorRow"):a.classList.remove("treeIterationCursorRow")),d.domNode&&(a=this.getAriaContainerElement(d.domNode),c?(d.domNode.classList.add("treeIterationCursor"),a&&a.setAttribute("aria-activedescendant",d.domNode.id)):d.domNode.classList.remove("treeIterationCursor"))):
a&&(c?a.classList.add("treeIterationCursorRow_Dotted"):a.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(b,c,a,d){var a=a===void 0?!1:a,f,g;if(b||c){if(g===this._modelIterator.cursor())return;f=this._modelIterator.cursor();g=b;this._modelIterator.setCursor(g)}else f=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();if(f!==g||c)if(this.toggleCursor(f,!1),!c||g)if(this.moveColumn(null,0),this.toggleCursor(g,
!0),(b=this.getRowDiv())&&!d&&!this._visible(b)&&b.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(f,g)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=[],c=0;c<this._selections.length;c++)b.push(this.model.getId(this._selections[c]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;var b=this.model.getId(b),c=this._navDict.getValue(b);return c&&c.rowDomNode?c.rowDomNode:i.node(b)},iterate:function(b,
c,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(b,c)&&(this.cursorOn(null,!1,b),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(b,c){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(b);if(a){var d=i.node(this.explorer.renderer.getCheckBoxId(a.id)),f=c?!d.checked:!0;if(f!==d.checked)this.explorer.renderer.onCheck(a,d,f,!0)}}else this._select(b,c)},_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(b){return(b=i.node(b))?i.bounds(b).height:0},_visible:function(b){if(b.offsetWidth===0||b.offsetHeight===0)return!1;var c=0;c+=this._getToolBarHeight("staticBanner");c+=this._getToolBarHeight("titleArea");c+=this._getToolBarHeight("pageToolbar");var a=this._getEventListeningDiv(!0).getClientRects()[0],d=this._vpHeight();this._vpWidth();for(var c=a.top>c?a.top:
c,a=a.bottom<d?a.bottom:d,b=b.getClientRects(),d=0,f=b.length;d<f;d++){var g=b[d];if(g.top>=c&&g.top<=a&&g.bottom>=c&&g.bottom<=a)return!0}return!1},_select:function(b){b||(b=this._modelIterator.cursor());var c=this.getRowDiv(b);c&&(this._inSelection(b)<0?c.classList.add("checkedRow"):c.classList.remove("checkedRow"))},_onModelGrid:function(b,c){var a=this._getGridChildren(b);if(a)for(var d=0;d<a.length;d++)if(c.target===a[d].domNode)return!0;return!1},onClick:function(b,d){var a=i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));
if(d.target!==a&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(b,d)))if(this.cursorOn(b,!0,!1,!0),c)this.setSelection(b,!0);else if(this._ctrlKeyOn(d))this.setSelection(b,!0);else if(d.shiftKey&&this._lastSelection){if(a=this._modelIterator.scan(this._lastSelection,b)){this._clearSelection(!0);for(var f=0;f<a.length;f++)this.setSelection(a[f],!0)}}else this.setSelection(b,!1)},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);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1);b.preventDefault();return!1},_shouldMoveColumn:function(b){var c=this.currentModel(),a=this._getGridChildren(c);return a&&a.length>1?this.isExpandable(c)?this._ctrlKeyOn(b):!0:!1},onLeftArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,
-1),b.preventDefault(),!0;var c=this._modelIterator.cursor();if(!c)return!1;if(this.isExpandable(c)&&this.isExpanded(c))return this.explorer.myTree.collapse(c),b.preventDefault(),!0;this._modelIterator.topLevel(c)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(c.parent),this.setSelection(c.parent,!1))},onRightArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,1),b.preventDefault(),!0;var c=this._modelIterator.cursor();
if(!c)return!1;if(this.isExpandable(c)&&!this.isExpanded(c))return this.explorer.myTree.expand(c),b.preventDefault(),!1},_isRowSelectable:function(b){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(b):!0},onSpace:function(b){this.setSelection(this.currentModel(),!0);b.preventDefault()},onEnter:function(b){var c=this.getCurrentGrid(this._modelIterator.cursor());if(c)if(c.widget)if(typeof c.onClick==="function")c.onClick();else typeof c.widget.focus==="function"&&c.widget.focus();
else{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(b),!1,!1,!1,0,null);c.domNode.dispatchEvent(a)}else if(this.explorer.renderer.getRowActionElement&&(c=this._modelIterator.cursor()))if(c=this.explorer.renderer.getRowActionElement(this.model.getId(c)),c.href)this._ctrlKeyOn(b)?window.open(c.href):window.location.href=c.href}};return f}();h.ExplorerNavDict=function(){function c(b){this._dict={};this._model=b}c.prototype={addRow:function(b,
c){this._dict[this._model.getId(b)]={model:b,rowDomNode:c}},getValue:function(b){return this._dict[b]},getGridNavHolder:function(b,c){if(!b)return null;var a=this._model.getId(b);if(this._dict[a]){if(!this._dict[a].gridChildren&&c)this._dict[a].gridChildren=[];return this._dict[a].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 h});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands,orion/commandRegistry".split(","),function(h,i,g,c,d,f){var b={};b.Explorer=function(){function b(a,c,d,e){this.registry=a;this.renderer=d;this.selection=c;this.commandService=e;this.myTree=null}b.prototype={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=g.node(b+"placeHolderRow");a=g.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return g.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===
void 0||a===null))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,e){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var f=a+"innerTree",h=g.node(f);h&&g.empty(h);if(b)b.rootId=f;this.model=b;this._parentId=a;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new d.ExplorerNavDict(this.model);this.myTree=new c.TableTree({id:f,
model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:e?!!e.showRoot:!1,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,navHandlerFactory:e?e.navHandlerFactory:void 0,tableElement:e?e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},
refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){if(!this.getNavHandler())this._navHandler=
a&&a.navHandlerFactory&&typeof a.navHandlerFactory.createNavHandler==="function"?a.navHandlerFactory.createNavHandler(this,this._navDict,a):new 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}();b.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=new f.Command({tooltip:h["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),g=new f.Command({tooltip:h["Collapse all"],
imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(d);b.addCommand(g)};b.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}b.prototype={destroy:function(){},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}();b.ExplorerFlatModel=function(){function c(a,b,d){this.rootPath=a;this.fetchItems=b;this.root=d}c.prototype=new b.ExplorerModel;c.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)})}};c.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return c}();b.ExplorerRenderer=function(){function b(a,c){this.explorer=c;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;g.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){a=window.sessionStorage[a+"selection"];typeof a==="string"&&(a=a.length>0?JSON.parse(a):null);var b;if(a&&this.explorer.getNavDict()){var c=[];for(b=0;b<a.length;b++){var d=this.explorer.getNavDict().getValue(a[b]);if(d&&d.rowDomNode&&
d.model&&(c.push(d.model),this._highlightSelection&&d.rowDomNode.classList.add("checkedRow"),d=g.node(this.getCheckBoxId(d.rowDomNode.id))))d.checked=!0,d.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(c),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(g.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=g.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=
this;e.onclick=function(){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id);else for(var b in g._expanded)if(g._expanded[b]===a.id){g._expanded.splice(b,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&g._storeExpansions(b)};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){if(this.commandService)for(var a=
g.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=g.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}();b.SelectionRenderer=function(){function c(a,b){this._init(a);this.explorer=b}c.prototype=new b.ExplorerRenderer;
c.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)};c.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)};c.prototype.getCellHeaderElement=function(){};c.prototype.getCellElement=function(){};return c}();b.SimpleFlatModel=function(){function c(a,b,d){this.items=a;this.getKey=d;this.idPrefix=b;this.root={children:a}}c.prototype=new b.ExplorerModel;c.prototype.getRoot=function(a){a(this.root)};c.prototype.destroy=function(){};c.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};c.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return c}();return b});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages,orion/Deferred,orion/webui/littlelib,orion/explorers/explorer,orion/explorers/navigationUtils,orion/extensionCommands,orion/contentTypes".split(","),function(h,i,g,c,d,f){function b(a,b,c,d,e,g,h){var o;if(b.Directory)o=document.createElement("a"),o.className="navlinkonpage",o.href=a+"#"+b.ChildrenLocation,o.appendChild(document.createTextNode(b.Name));else{e||(e=f.getOpenWithCommands(c));if(!g)for(a=0;a<e.length;a++)e[a].isEditor===
"default"&&(g=e[a]);o=document.createElement("a");o.className="navlink targetSelector";h&&typeof h==="object"&&Object.keys(h).forEach(function(a){o[a]=h[a]});o.appendChild(document.createTextNode(b.Name));for(var q=b.Location,p=!1,a=0;a<e.length;a++)if(c=e[a],c.visibleWhen(b)){q=c.hrefCallback({items:b});p=!0;break}i.when(d.getFileContentType(b),function(a){var c;if(c=!p)if(c=g){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&&(q=g.hrefCallback({items:b}));c=o;var d=b.Location,e;switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":e=document.createElement("img");e.src=d;e.classList.add("thumbnail");break;default:a&&a.image?(e=document.createElement("img"),e.src=a.image,e.classList.add("thumbnail")):(e=document.createElement("span"),e.className="core-sprite-file_model modelDecorationSprite")}c.firstChild?c.insertBefore(e,c.firstChild):
c.appendChild(e);o.href=q})}return o}function e(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"}e.prototype=new c.SelectionRenderer;e.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};e.prototype.tableCallback=function(a){a.setAttribute("aria-label",h.Navigator);a.setAttribute("role","presentation")};e.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};
e.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"}};e.prototype.setTarget=function(a){this.target=a};e.prototype.createFolderNode=function(a){var c;this.showFolderLinks?c=b(this.folderLink||"",a,this.commandService,this.contentTypeService):(c=document.createElement("span"),c.textContent=a.Name);return c};e.prototype.showFolderLinks=!0;e.prototype.getCellElement=function(a,c,e){switch(a){case 0:var a=
document.createElement("td"),g=document.createElement("span");g.id=e.id+"MainCol";g.setAttribute("role","presentation");a.appendChild(g);a.setAttribute("role","presentation");g.className="mainNavColumn";var h;if(c.Directory)this.getExpandImage(e,g),h=this.createFolderNode(c),g.appendChild(h),this.explorer._makeDropTarget(c,h),this.explorer._makeDropTarget(c,e);else{if(!this.openWithCommands){this.openWithCommands=f.getOpenWithCommands(this.commandService);for(h=0;h<this.openWithCommands.length;h++)if(this.openWithCommands[h].isEditor===
"default")this.defaultEditor=this.openWithCommands[h]}h=b("",c,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,{target:this.target});g.appendChild(h)}if(h)h.id=e.id+"NameLink",h.nodeType===1&&(d.addNavGrid(this.explorer.getNavDict(),c,h),h.setAttribute("role","link"),h.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,g,c,this.explorer,"tool",null,!0);return a;case 1:if(this.oneColumn)return null;e=document.createElement("td");
if(c.LocalTimeStamp)e.textContent=(new Date(c.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!c.Directory&&typeof c.Length==="number")c=parseInt(c.Length,10)/1024,e.textContent=Math.ceil(c).toLocaleString()+" KB";e.style.textAlign="right";return e}};e.prototype.constructor=e;return{NavigatorRenderer:e,createLink:b}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler,orion/explorers/navigatorRenderer,orion/extensionCommands,orion/Deferred".split(","),function(h,i,g,c,d,f,b,e,a){function j(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function l(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new j(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}j.prototype.makeRenderFunction=function(d,f,j,l,o){var q=this.serviceRegistry,p=this.commandRegistry;this.openWithCommands=this.openWithCommands||e.createOpenWithCommands(q,d,p);var u=this;return function(e,t,q){a.when(u.openWithCommands,function(a){if(q)g.empty(f),a=document.createElement("div"),a.appendChild(document.createTextNode(h["Search failed."])),f.appendChild(a),typeof l==="function"&&l(f);else{var v=
function(){function a(b,c){var d=c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];typeof f==="function"&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),u=!1;g.empty(f);if(e&&e.length>0){var C=document.createElement("table");C.setAttribute("role","presentation");for(var D=0;D<e.length;D++){var s=
e[D],z;if(!u&&(u=!0,j))z=C.insertRow(0).insertCell(0),z.textContent=j;z=C.insertRow(-1).insertCell(0);z.colspan=2;o&&o(z);var A={Name:s.name,Directory:s.directory,Location:s.path||s.location},A=b.createLink(i.toUrl("navigate/table.html"),A,p,d,a,null,{"aria-describedby":(s.folderName?s.folderName:s.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}});s.LineNumber&&A.appendChild(document.createTextNode(" (Line "+s.LineNumber+")"));z.appendChild(A);v(z,s)}f.appendChild(C);typeof l===
"function"&&l(f)}!u&&t&&(a=c.formatMessage(h["No matches found for ${0}"],t),g.empty(f),f.appendChild(document.createTextNode(a)),typeof l==="function"&&l(f))}})}};l.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(a){c(e(a),null)});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)},function(a){c(null,null,a)})}catch(g){typeof g==="string"&&g.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(a){c(e(a),null)}):typeof g==="string"&&g.indexOf("search")>-1&&!a.nameSearch?(new f.SearchCrawler(this.registry,this._fileService,
a,{childrenLocation:this.getChildrenLocation()})).search(function(a){c(e(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(g)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(a,b){console.error(a);g.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var d="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>
0?e=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(e=a);if(e)this.setLocationbyURL(e.Location),d=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),d=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;e=g.node("search");d||(d="");if(e&&e.placeholder){e.value="";var f=c.formatMessage(h["Search ${0}"],d);e.placeholder=f.length>30?f.substring(0,27)+"...":c.formatMessage(h["Search ${0}"],
d)}if(e&&e.title)e.title=h["Type a keyword or wild card to search in "]+d},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation?this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?
this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};l.prototype.constructor=l;return{Searcher:l}});
define("orion/dialogs",[],function(){function h(h){this._serviceRegistry=h;this._serviceRegistration=h.registerService("orion.page.dialog",this)}h.prototype={confirm:function(h,g){g(window.confirm(h))},openFiles:function(){}};h.prototype.constructor=h;return{DialogService:h}});
define("orion/metatype",["orion/serviceTracker"],function(h){function i(e){function a(a,b,c){a=a.getProperty(b);a instanceof Array&&a.forEach(c)}var f=new h(e,d),i=this.ocdsMap={},k=this.pidsMap={};f.addingService=function(d){a(d,g,function(a){a=new b(a);i[a.getId()]=a});a(d,c,function(a){var b=a.pid,a=a.classId;b&&a&&(k[b]=i[a])});return e.getService(d)};f.removedService=function(b){a(b,g,function(a){delete i[a.id]});a(b,c,function(a){delete k[a.pid]})};f.open()}var g="classes",c="designates",d=
"orion.cm.metatype",f,b;i.prototype={getObjectClassDefinitionForPid:function(b){return this.pidsMap[b]||null},getObjectClassDefinition:function(b){return this.ocdsMap[b]||null}};b=function(b){this.id=b.id;this.name=b.name||null;var a=b.properties;if(!this.id)throw'Missing "id" property: '+JSON.stringify(b);if(!(a instanceof Array)||!a.length)throw'"properties" property is missing or empty: '+JSON.stringify(b);this.props=[];for(b=0;b<a.length;b++)this.props.push(new f(a[b]))};b.prototype={getAttributeDefinitions:function(){return this.props},
getId:function(){return this.id},getName:function(){return this.name}};f=function(b){this.id=b.id;this.name=b.name||null;this.options=b.options||null;this.type=b.type||"string";this.defaultValue=typeof b.defaultValue!=="undefined"?b.defaultValue:null;if(!this.id)throw'Missing "id" property: '+JSON.stringify(b);var a;switch(this.type){case "boolean":case "number":case "string":a=!0}if(!a)throw'Invalid "type": '+this.type;this.options&&this.options.forEach(function(a){if(typeof a.value==="undefined")throw"Missing option value: "+
JSON.stringify(a);})};f.prototype={getId:function(){return this.id},getName:function(){return this.name},getOptionLabels:function(){return this.options&&this.options.map(function(b){return b.label})},getOptionValues:function(){return this.options&&this.options.map(function(b){return b.value})},getType:function(){return this.type},getDefaultValue:function(){return this.defaultValue}};return{MetaTypeRegistry:i}});
define("orion/settings/settingsRegistry",["orion/serviceTracker"],function(h){function i(a){this.pid=a.pid;this.classId=(this.isRef=typeof a.classId==="string")?a.classId:this.pid+".type";this.name=typeof a.name==="string"?a.name:null;this.properties=null;this.category=a.category;this.tags=a.tags;if(!this.pid)throw Error('Missing "pid" property');}function g(a,c,g,k){var m={};h.call(this,a,f);this.addingService=function(f){var r=f.getProperty(b);if(!r||!r.length)return null;for(var o=0;o<r.length;o++){var q=
r[o],p=new i(q),u=p.getObjectClassDefinitionId(),w={designates:[{pid:p.getPid(),classId:u}]};if(!p.isRef&&!c.getObjectClassDefinition(u))w.classes=[{id:u,properties:q.properties}];m[p.getPid()]=a.registerService(d,{},w);q=c.getObjectClassDefinition(u);p.properties=q.getAttributeDefinitions();g[p.getPid()]=p;q=p.getCategory()||e;k[q]||(k[q]=[]);k[q].push(p.getPid())}return h.prototype.addingService.call(this,f)};this.removedService=function(a){for(var a=a.getProperty(b),c=0;c<a.length;c++){var d=a[c].pid,
f=a[c].category;m[d].unregister();delete m[d];delete g[d];var h=k[f||e];h.splice(h.indexOf(d),1);h.length||delete k[f]}}}function c(a,b){this.settingsMap=Object.create(null);this.categories=Object.create(null);(new g(a,b,this.settingsMap,this.categories)).open()}var d="orion.cm.metatype",f="orion.core.setting",b="settings",e="unsorted";i.prototype={getName:function(){return this.name},getPid:function(){return this.pid},getObjectClassDefinitionId:function(){return this.classId},getAttributeDefinitions:function(){return this.properties},
getCategory:function(){return this.category||null},getTags:function(){return this.tags||[]},isDefaults:function(a){return this.getAttributeDefinitions().every(function(b){var c=a[b.getId()],d=b.getDefaultValue(),e=c===d;b.getType()==="string"&&(e=e||c===""&&d===null);return e})}};c.prototype={getSettings:function(a){var b=this.settingsMap,a=typeof a==="string"?this.categories[a]:Object.keys(b);return!a?[]:a.map(function(a){return b[a]})},getCategories:function(){return Object.keys(this.categories)}};
return c});
define("orion/widgets/themes/ThemeComponent",[],function(){function h(){}function i(g,c,d,f,b,e,a,i,l){var k=new h;k.type="ELLIPSE";k.fill=l;k.width=i;k.x=c;k.y=d;k.radius=f;k.startangle=b;k.endangle=e;k.direction=a;k.render(g);return k}h.prototype.type=null;h.prototype.fill=null;h.prototype.stroke=null;h.prototype.width=0;h.prototype.height=0;h.prototype.font=null;h.prototype.text=null;h.prototype.radius=null;h.prototype.x=0;h.prototype.y=0;h.prototype.x2=0;h.prototype.y2=0;h.prototype.x3=0;h.prototype.y3=
0;h.prototype.context=null;h.prototype.description=null;h.prototype.over=!1;h.prototype.family=null;h.prototype.render=function(g){if(g)this.context=g;switch(this.type){case "TEXT":this.context.beginPath();this.context.font=this.font;this.context.fillStyle=this.fill;this.context.fillText(this.text,this.x,this.y);this.context.closePath();break;case "LINE":this.context.beginPath();this.context.strokeStyle=this.stroke;this.context.moveTo(this.x,this.y);this.context.lineTo(this.x2,this.y2);this.context.lineWidth=
this.width;this.context.stroke();this.context.closePath();break;case "RECTANGLE":this.context.beginPath();this.context.strokeStyle=this.stroke;if(this.fill)this.context.fillStyle=this.fill;this.context.rect(this.x,this.y,this.width,this.height);this.fill&&this.context.fill();this.stroke&&this.context.stroke();this.context.closePath();break;case "ROUNDRECTANGLE":this.context.beginPath();this.context.fillStyle=this.fill;this.context.strokeStyle=this.stroke;this.context.moveTo(this.x+this.radius,this.y);
this.context.lineTo(this.x+this.width-this.radius,this.y);this.context.quadraticCurveTo(this.x+this.width,this.y,this.x+this.width,this.y+this.radius);this.context.lineTo(this.x+this.width,this.y+this.height-this.radius);this.context.quadraticCurveTo(this.x+this.width,this.y+this.height,this.x+this.width-this.radius,this.y+this.height);this.context.lineTo(this.x+this.radius,this.y+this.height);this.context.quadraticCurveTo(this.x,this.y+this.height,this.x,this.y+this.height-this.radius);this.context.lineTo(this.x,
this.y+this.radius);this.context.quadraticCurveTo(this.x,this.y,this.x+this.radius,this.y);this.context.closePath();this.stroke&&this.context.stroke();this.fill&&this.context.fill();break;case "TRIANGLE":this.context.beginPath();this.context.moveTo(this.x,this.y);this.context.lineTo(this.x2,this.y2);this.context.lineTo(this.x3,this.y3);this.context.lineTo(this.x,this.y);this.context.fillStyle=this.fill;this.context.fill();this.context.closePath();break;case "ELLIPSE":this.context.beginPath(),this.context.arc(this.x,
this.y,this.radius,this.startangle,this.endangle,this.direction),this.context.fillStyle=this.fill,this.context.fill(),this.context.closePath()}};h.prototype.mouseOver=function(g,c){this.over=!1;switch(this.type){case "RECTANGLE":case "ROUNDRECTANGLE":if(g>this.x&&g<this.x+this.width&&c>this.y&&c<this.y+this.height)this.over=!0;break;case "TEXT":if(g>this.x&&g<this.x+this.width&&c>this.y-16&&c<this.y-16+this.height)this.over=!0;break;case "ELLIPSE":if(g>this.x-5-this.radius&&g<this.x-5+this.radius&&
c>this.y-5-this.radius&&c<this.y-5+this.radius)this.over=!0}return this.over};h.prototype.glow=function(g,c){var d=this.y-6+(this.height+12)/2;switch(this.type){case "TEXT":d-=8}var f=this.x-6+(this.width+12)*0.5;this.context.beginPath();this.context.moveTo(f,d);this.context.lineTo(g+30,d);this.context.lineTo(g+30,c+7);this.context.lineTo(g+45,c+7);this.context.strokeStyle="#cc0000";this.context.lineWidth=1;this.context.stroke();i(this.context,f,d,3,0,2*Math.PI,!1,null,"#cc0000");this.context.closePath()};
return{Component:h,drawArc:i,drawLine:function(g,c,d,f,b,e,a){var i=new h;i.type="LINE";i.stroke=a;i.width=e;i.x=c;i.y=d;i.x2=f;i.y2=b;i.render(g);return i},drawText:function(g,c,d,f,b,e){var a=new h;a.type="TEXT";a.font=b;a.fill=e;a.text=c;a.x=d;a.y=f;a.render(g);a.width=g.measureText(c).width;a.height=15;return a},drawRectangle:function(g,c,d,f,b,e,a){var i=new h;i.type="RECTANGLE";i.fill=e;i.stroke=a;i.x=c;i.y=d;i.width=f;i.height=b;i.render(g);return i},drawTriangle:function(g,c,d,f,b,e,a,i,l){var k=
new h;k.type="TRIANGLE";k.fill=i;k.stroke=l;k.x=c;k.y=d;k.x2=f;k.y2=b;k.x3=e;k.y3=a;k.render(g);return k},roundRect:function(g,c,d,f,b,e,a,i){var l=new h;l.type="ROUNDRECTANGLE";l.fill=a;l.stroke=i;l.x=c;l.y=d;l.width=f;l.height=b;l.radius=e;l.render(g);return l}}});
define("orion/widgets/themes/editor/ThemeData",["orion/editor/textTheme"],function(h){function i(){}function g(){this.styles=[];var b=new i;b.name="Eclipse";b.annotationRuler="white";b.background="white";b.comment="green";b.keyword="#7f0055";b.text="darkSlateGray";b.string="blue";b.overviewRuler="white";b.lineNumberOdd="#444";b.lineNumberEven="#444";b.lineNumber="#444";b.currentLine="#EAF2FE";b.tag="darkorange";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);b=new i;b.name=
"Prospecto";b.annotationRuler="white";b.background="white";b.comment="#3C802C";b.keyword="#CC4C07";b.text="#333";b.string="#446FBD";b.overviewRuler="white";b.lineNumberOdd="silver";b.lineNumberEven="silver";b.lineNumber="silver";b.currentLine="#EAF2FE";b.tag="#CC4C07";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);b=new i;b.name="Blue";b.annotationRuler="lavender";b.background="aliceBlue";b.comment="indigo";b.keyword="cornFlowerBlue";b.text="navy";b.string="cornFlowerBlue";
b.overviewRuler="lavender";b.lineNumberOdd="darkSlateGray";b.lineNumberEven="darkSlateGray";b.lineNumber="darkSlateGray";b.currentLine="white";b.tag="cornFlowerBlue";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);b=new i;b.name="Ambience";b.annotationRuler="#3D3D3D";b.background="#202020";b.comment="mediumslateblue";b.keyword="cornFlowerBlue";b.text="darkseagreen";b.string="lightcoral";b.overviewRuler="white";b.lineNumberOdd="black";b.lineNumberEven="black";b.lineNumber="black";
b.currentLine="lightcyan";b.tag="cornFlowerBlue";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);b=new i;b.name="Tierra";b.annotationRuler="moccasin";b.background="lemonchiffon";b.comment="darkseagreen";b.keyword="darkred";b.text="#555555";b.string="orangered";b.overviewRuler="moccasin";b.lineNumberOdd="chocolate";b.lineNumberEven="chocolate";b.lineNumber="chocolate";b.currentLine="#baa289";b.tag="darkred";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);
b=new i;b.name="Nimbus";b.annotationRuler="#444";b.background="dimgray";b.comment="darkseagreen";b.keyword="darkorange";b.text="white";b.string="cornflowerblue";b.overviewRuler="#444";b.lineNumberOdd="#aaa";b.lineNumberEven="#aaa";b.lineNumber="#aaa";b.currentLine="#aabfbb";b.tag="darkorange";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);b=new i;b.name="Adelante";b.annotationRuler="#E2D2B2";b.background="#F1E7C8";b.comment="#5D774E";b.keyword="#AF473B";b.text="dimgray";b.string=
"#DE5D3B";b.overviewRuler="#E2D2B2";b.lineNumberOdd="#AF473B";b.lineNumberEven="#AF473B";b.lineNumber="#AF473B";b.currentLine="#9e937b";b.tag="#AF473B";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b);b=new i;b.name="Raspberry Pi";b.annotationRuler="seashell";b.background="seashell";b.comment="#66B32F";b.keyword="#E73E36";b.text="dimgray";b.string="darkorange";b.overviewRuler="seashell";b.lineNumberOdd="#E73E36";b.lineNumberEven="#E73E36";b.lineNumber="#E73E36";b.currentLine=
"#F5B1AE";b.tag="#E73E36";b.attribute="cadetBlue";b.fontFamily=d;b.fontSize=f;this.styles.push(b)}function c(){return this.styles}var d='"Consolas", "Monaco", "Vera Mono", "monospace"',f="10pt";g.prototype.styles=[];g.prototype.getStyles=c;g.prototype.fontSettable=!0;g.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"editorstyles",defaultTheme:"Prospecto",selectedKey:"editorSelected"}};g.prototype.parseToXML=function(b){try{var c=null;if(window.DOMParser){var c=(new DOMParser).parseFromString(b,
"text/xml"),a=c.getElementsByTagName("parsererror");return!a||!a.length||!a[0].childNodes.length?c:null}else return c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(b),c}catch(d){}};g.prototype.selectFontSize=function(b){console.log("fontsize: "+b)};g.prototype.importTheme=function(b){console.log("import theme");console.log(b);var c=this.parseToXML(b.parameters.valueFor("name")),a=new i;a.name=c.getElementsByTagName("colorTheme")[0].attributes[1].value;a.annotationRuler=c.getElementsByTagName("background")[0].attributes[0].value;
a.background=c.getElementsByTagName("background")[0].attributes[0].value;a.comment=c.getElementsByTagName("singleLineComment")[0].attributes[0].value;a.keyword=c.getElementsByTagName("keyword")[0].attributes[0].value;a.text=c.getElementsByTagName("foreground")[0].attributes[0].value;a.string=c.getElementsByTagName("string")[0].attributes[0].value;a.overviewRuler=c.getElementsByTagName("background")[0].attributes[0].value;a.lineNumberOdd=c.getElementsByTagName("lineNumber")[0].attributes[0].value;
a.lineNumberEven=c.getElementsByTagName("lineNumber")[0].attributes[0].value;a.lineNumber=c.getElementsByTagName("lineNumber")[0].attributes[0].value;a.currentLine=c.getElementsByTagName("selectionBackground")[0].attributes[0].value;b.items.addTheme(a)};g.prototype.processSettings=function(b){var c=h.TextTheme.getTheme();c.setThemeClass("editorTheme",c.buildStyleSheet("editorTheme",b))};g.prototype.getViewData=function(){var b={top:10,left:10,width:400,height:350},c=b.left,a=b.top;b.shapes=[{type:"TEXT",
name:"Line Numbers",label:"1",x:c+20,y:a+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"},{type:"RECTANGLE",name:"Background",x:c+46,y:a,width:290,height:b.height,family:"background",fill:"white"},{type:"TEXT",name:"Strings",label:"'text/javascript'",x:c+134,y:a+20,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"=",x:c+124,y:a+20,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"RECTANGLE",name:"Current Line",x:c+46,y:a+
87,width:290,height:18,family:"currentLine",fill:"#eaf2fd"},{type:"TEXT",name:"HTML Attribute",label:"type",x:c+98,y:a+20,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"RECTANGLE",name:"Overview Ruler",x:c+336,y:a,width:14,height:b.height,family:"overviewRuler",fill:"white"},{type:"TEXT",name:"Comments",label:"/* comment */",x:c+75,y:a+40,fill:"darkSeaGreen",family:"comment",font:"9pt sans-serif"},{type:"TEXT",name:"HTML Tag",label:"<script",x:c+55,y:a+20,fill:"darkorange",family:"keyword",
font:"9pt sans-serif"},{type:"TEXT",name:"HTML Tag",label:">",x:c+213,y:a+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"RECTANGLE",name:"Current Line",x:c+46,y:a+87,width:290,height:18,family:"currentLine",fill:"#eaf2fd"},{type:"TEXT",name:"Strings",label:"'Result'",x:c+164,y:a+80,fill:"cornflowerBlue",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"multiply(a,b){",x:c+120,y:a+60,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",
name:"keywords",label:"function",x:c+75,y:a+60,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"Keywords",label:"var",x:c+95,y:a+80,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"output = ",x:c+115,y:a+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:";",x:c+205,y:a+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"keywords",label:"var",x:c+95,
y:a+100,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"result = a*b;",x:c+115,y:a+100,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"keywords",label:"return",x:c+95,y:a+120,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"output + result;",x:c+135,y:a+120,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"}",x:c+75,y:a+140,fill:"darkSlateGray",
family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"HTML Tag",label:"<\/script>",x:c+55,y:a+160,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"HTML Tag",label:"<style",x:c+55,y:a+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"HTML Attribute",label:"type",x:c+95,y:a+200,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"TEXT",name:"Foreground",label:"=",x:c+121,y:a+200,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},
{type:"TEXT",name:"Strings",label:"'text/css'",x:c+131,y:a+200,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:"HTML Tag",label:">",x:c+180,y:a+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"CSS Class Name",label:".some-class",x:c+75,y:a+220,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:"CSS Class Name",label:"{",x:c+145,y:a+220,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"CSS Attribute",
label:"color:",x:c+95,y:a+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"CSS Value",label:"#123456",x:c+130,y:a+240,fill:"darkSlateGray",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:"CSS Text",label:";",x:c+180,y:a+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"CSS Class Name",label:"}",x:c+75,y:a+260,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:"HTML Tag",label:"</style>",x:c+55,y:a+280,
fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"RECTANGLE",name:"Annotation Ruler",x:c,y:a,width:46,height:b.height,family:"annotationRuler",fill:"white"}];for(var d=0;d<16;d++)b.shapes.push({type:"TEXT",name:"Line Numbers",label:d+1,x:c+20,y:a+20*d+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"});return b};return{ThemeData:g,getStyles:c}});
define("orion/widgets/input/Select",["orion/objects","orion/webui/littlelib"],function(h,i){function g(c,d){h.mixin(this,c);this.node=d||document.createElement("div");this.node.innerHTML=this.templateString;this.select=i.$(".setting-control",this.node)}h.mixin(g.prototype,{templateString:'<select class="setting-control" id="selection"></select>',addOptions:function(c){var d=document.createElement("option");d.value=c.value;d.appendChild(document.createTextNode(typeof c.label==="string"?c.label:c.value));
if(c.selected)d.selected="selected";this.select.appendChild(d)},show:function(){this.postCreate()},postCreate:function(){this.options.forEach(this.addOptions.bind(this));this.select.addEventListener("change",this.change.bind(this))},destroy:function(){if(this.node)i.empty(this.node),this.node=this.select=null},setStorageItem:function(){},getSelected:function(){return this.select.value},getSelectedIndex:function(){return this.select.selectedIndex},setSelectedIndex:function(c){this.select.selectedIndex=
c},change:function(){var c=this.select.value;this.category?this.setStorageItem(this.category,this.item,this.element,c,this.ui):this.setStorageItem(c)}});return g});
define("orion/widgets/input/TextField",["orion/objects","orion/webui/littlelib"],function(h,i){function g(c,d){h.mixin(this,c);this.node=d||document.createElement("div")}h.mixin(g.prototype,{templateString:'<input type="text" class="setting-control" name="myname"/>',category:null,item:null,element:null,ui:null,show:function(){this.node.innerHTML=this.templateString;this.textfield=i.$(".setting-control",this.node);this.textfield.addEventListener("change",this.change.bind(this))},destroy:function(){if(this.node)i.empty(this.node),
this.textfield=this.node=null},setStorageItem:function(){},width:function(c){this.textfield.style.width=c},setValue:function(c){this.textfield.value=c},change:function(){if(this.selection&&this.selection.value)var c=this.selection.value;this.setStorageItem(this.category,this.item,this.element,c,this.ui)}});return g});
define("orion/widgets/themes/ThemeBuilder","i18n!orion/settings/nls/messages,orion/commands,orion/commandRegistry,orion/globalCommands,orion/PageUtil,orion/webui/littlelib,orion/widgets/themes/ThemeComponent,orion/widgets/themes/editor/ThemeData,orion/widgets/input/Select,orion/widgets/input/TextField".split(","),function(h,i,g,c,d,f,b,e,a,j){function l(){x=null;D=E=!0;s=[];B=A=z=null}function k(a,b){this.name=a;this.value=b}function m(a){this.settings=[];this.themeData=a.themeData;this.toolbarId=
a.toolbarId;l();document.getElementById("pageActions").innerHTML='<div id="commandButtons"><div id="revertCommands" class="layoutRight sectionActions"></div><div id="userCommands" class="layoutRight sectionActions"></div></div>';this.commandService=a.commandService;this.preferences=a.preferences;var a=new i.Command({name:"Cancel",tooltip:"Revert Theme",id:"orion.reverttheme",callback:function(a){this.revert(a.items)}.bind(this)}),b=new i.Command({name:"Apply",tooltip:"Apply Theme",id:"orion.applytheme",
callback:function(a){this.apply(a.items)}.bind(this)});this.commandService.addCommand(new i.Command({name:"Show Guide",tooltip:"Check Guide",id:"orion.checkGuide",callback:function(a){this.guide(a.items)}.bind(this)}));this.commandService.registerCommandContribution("themeCommands","orion.checkGuide",1);this.commandService.addCommand(a);this.commandService.registerCommandContribution("themeCommands","orion.reverttheme",2);this.commandService.addCommand(b);this.commandService.registerCommandContribution("themeCommands",
"orion.applytheme",3)}function n(){if(A){A.clearRect(0,0,z.width,z.height);var a=z.height;z.width=z.width;z.height=a}}function r(a){var b=z.getBoundingClientRect();return{x:a.clientX-b.left,y:a.clientY-b.top}}function o(a){var b=r(a),a=b.x,b=b.y;B=[];for(var c=0;c<s.length;c++)if(s[c].mouseOver(a,b)){z.style.cursor="crosshair";s[c].id=c;B.push(s[c]);break}else z.style.cursor=""}function q(){z.style.cursor=""}function p(a,b){var c=!1;if(b)for(var d in a)if(a[d]===b){c=!0;break}return c}function u(a,
c){for(var d=y+40,e=[],f=0,g=0,h=0;h<c.length;h++){var i=c[h];if(p(e,i.family)===!1&&i.description){var f=w+10+g*28,j=i.x-6+(i.width+12)*0.5,k=i.y-6+(i.height+12)/2;a.beginPath();switch(i.family){case "background":a.beginPath();a.moveTo(j+70,f-4);a.lineTo(y+50,f-4);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=0.5;a.stroke();b.drawArc(a,j+70,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;case "Side":a.beginPath();a.moveTo(j+30,f-4);a.lineTo(y+50,f-4);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=
0.5;a.stroke();b.drawArc(a,j+30,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;default:a.moveTo(j,k),a.lineTo(j,f-4),a.lineTo(y+50,f-4),a.strokeStyle="rgba(187,0,0,0.7)",a.lineWidth=0.5,a.stroke(),b.drawArc(a,j,k,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)")}a.closePath();a.globalAlpha=1;b.drawText(a,i.description.toUpperCase(),t+5+d,f,"bold 8pt sans-serif","#333");i.family&&e.push(i.family);g++}}b.drawText(a,"CLICK DIAGRAM TO STYLE",t+5+d,f+50,"bold 8pt sans-serif","#cc0000");b.drawText(a,"PRESS APPLY BUTTON TO",
t+5+d,f+65,"bold 8pt sans-serif","#cc0000");b.drawText(a,"APPLY PREVIEW",t+5+d,f+80,"bold 8pt sans-serif","#cc0000");document.getElementById("stringcontainer").style.display="none"}var w=10,t=10,y=350,x=null,v=!0,E=!0,C=!1,D=!0,s=[],z=null,A=null,B=null;k.prototype.name=void 0;k.prototype.value=void 0;m.prototype.applyColor=function(){var a=document.getElementById(this.themebuilder.colorFieldId).firstChild.value;if(this.themebuilder.validateHex(a))s[x.id].fill=a,this.themebuilder.updateFamily(s[x.id].family,
a),v=!1,this.themebuilder.refresh(),s[x.id].glow(y,w),this.themebuilder.drawPicker(A,s[x.id]),f.node("pickercontainer").style.display="none",f.node("savecontainer").style.display="",f.node("stringcontainer").style.display=""};m.prototype.colorFieldId=void 0;m.prototype.settings=[];m.prototype.AUTONAME=!1;m.prototype.template='<div id="themeContainer"><canvas id="orionui" width="800" height="380""></canvas><div id="sizecontainer" style="display:none;"><span class="settingsLabel">Font Size:</span><div id="fontsizepicker" class="fontsizepicker"></div></div><div id="pickercontainer" style="display:block;"><span class="settingsLabel">Theme:</span><div id="themepicker" class="themepicker"></div></div><br><div id="savecontainer" style="display:none;"><span class="settingsLabel">New theme name:</span><div id="themesaver" class="themesaver"></div></div><div id="stringcontainer" style="position:relative;left:400px;top:-140px;display:none;"><span>OR HEX: </span><div id="colorstring" class="colorfield"></div><button class = "commandButton" style="padding:5px;font-size:9pt;"type="button" id="colorButton"}">ok</button></div></div>';
var F=["white,seashell,cornsilk,lemonchiffon,lightyellow,palegreen,paleturquoise,aliceblue,lavender,plum".split(","),"lightgray,pink,bisque,moccasin,khaki,lightgreen,lightseagreen,lightcyan,cornflowerblue,violet".split(","),"silver,lightcoral,sandybrown,orange,palegoldenrod,chartreuse,mediumturquoise,skyblue,mediumslateblue,orchid".split(","),"gray,red,orangered,darkorange,yellow,limegreen,darkseagreen,royalblue,slateblue,mediumorchid".split(","),"dimgray,crimson,chocolate,coral,gold,forestgreen,seagreen,blue,blueviolet,darkorchid".split(","),
"darkslategray,firebrick,saddlebrown,sienna,olive,green,darkcyan,mediumblue,darkslateblue,darkmagenta".split(","),"black,darkred,maroon,brown,darkolivegreen,darkgreen,midnightblue,navy,indigo,purple".split(",")];m.prototype.colornames=F;m.prototype.addAdditionalCommand=function(a){var b=new g.ParametersDescription([new g.CommandParameter("name","text",h["Commit message:"],"",4)],{hasOptionalParameters:!1});this.commandService.addCommand(new i.Command({name:a.name,tooltip:a.tip,parameters:b,id:a.id,
callback:function(b){a.callback(b)}.bind(this)}));this.commandService.registerCommandContribution("themeCommands",a.id,4)};m.prototype.validateHex=function(a){var b=!0;/^(#)?([0-9a-fA-F]{3})([0-9a-fA-F]{3})?$/.test(a)===!1&&(b=!1);return b};m.prototype.clear=n;m.prototype.refresh=function(){this.clear();C===!0&&this.drawOutlineData()};m.prototype.updateFamily=function(a,b){for(var c=0;c<s.length;c++)if(s[c].family){if(s[c].family===a)s[c].fill=b;for(var d in this.settings)if(this.settings[d].name===
a){this.settings[d].value=b;break}}};m.prototype.drawPicker=function(a,c){var d=y+40;b.drawText(a,c.description.toUpperCase(),t+d,w+10,"bold 9pt sans-serif","#555");b.drawText(a,"COLOR:",t+d,w+50,"8pt sans-serif","#555");b.drawRectangle(a,t+d+100,w+40,50,10,c.fill,null);b.drawText(a,"COLOR STRING:",t+d,w+70,"8pt sans-serif","#555");b.drawText(a,c.fill,t+d+100,w+70,"8pt sans-serif","#555");b.drawLine(a,t+d,w+25,t+d+190,w+25,10,"#555");b.drawLine(a,t+d,w+85,t+d+190,w+85,5,"#555");b.drawText(a,"NEW COLOR:",
t+d,w+115,"bold 8pt sans-serif","#555");if(D===!0){for(d=0;d<7;d++)for(var e=1;e<11;e++){var f=b.drawArc(a,t+y+e*20+25,w+90+d*20+50,7,0,2*Math.PI,!1,null,F[d][e-1]);f.paintchip=!0;s.push(f)}D=!1}else for(d=0;d<s.length;d++)s[d].paintchip&&s[d].render();d=document.getElementById("stringcontainer");d.style.display="";d.zIndex=1;d=document.getElementById(this.colorFieldId);if(!this.colfld)this.colfld=new j({},d),this.colfld.show(),this.colfld.width("100px");d=document.getElementById("colorButton");d.themebuilder=
this;d.onclick=this.applyColor};m.prototype.colfld=void 0;m.prototype.mouseDown=function(a){v=!1;for(var b=r(a),a=b.x,b=b.y,c=0;c<s.length;c++)if(s[c].mouseOver(a,b))s[c].id=c,B=[],this.refresh(),B.push(s[c]);if(B.length>0){for(b=a=0;b<B.length;b++)B[b].width<B[a].width&&(a=b);v=B.length>0?!0:!1;switch(B[a].type){case "ELLIPSE":s[x.id].fill=B[a].fill;this.updateFamily(s[x.id].family,B[a].fill);v=!1;this.refresh();s[x.id].glow(y,w);this.drawPicker(A,s[x.id]);f.node("pickercontainer").style.display=
"none";f.node("savecontainer").style.display="";if(this.AUTONAME===!1)this.themeSaver.setValue(this.themeSelect.getSelected()),this.AUTONAME=!0;break;case "RECTANGLE":case "ROUNDRECTANGLE":case "TEXT":B[a].glow(y,w),this.drawPicker(A,B[a]),x=B[a]}}};m.prototype.familyShown=p;m.prototype.overview=u;m.prototype.getCurrentSettings=function(){return this.settings};m.prototype.addData=function(a){this.settings=[];var b;C=!0;if(a){this.dataset=a;for(var c=0;c<a.shapes.length;c++)b=a.shapes[c].fill?a.shapes[c].fill:
a.shapes[c].line,this.settings[a.shapes[c].family]=new k(a.shapes[c].family,b)}};m.prototype.drawShape=function(a,c){var d;switch(a.type){case "RECTANGLE":d=b.drawRectangle(A,a.x,a.y,a.width,a.height,c,"#CCC");break;case "TEXT":d=b.drawText(A,a.label,a.x,a.y,a.font,c);break;case "ROUNDRECTANGLE":d=b.roundRect(A,a.x,a.y,a.width,a.height,5,c,"#CCC");break;case "LINE":b.drawLine(A,a.x1,a.y1,a.x2,a.y2,a.linewidth,c);break;case "TRIANGLE":b.drawTriangle(A,a.x1,a.y1,a.x2,a.y2,a.x3,a.y3,c);break;case "IMAGE":var e=
new Image;e.onload=function(){A.drawImage(e,a.x,a.y)};e.src=a.source}if(d)d.description=a.name,d.family=a.family,d.paintchip=!1,s.push(d)};m.prototype.drawOutlineData=function(a){a&&this.addData(a);z||(z=document.getElementById("orionui"),A=z.getContext("2d"),z.addEventListener("mousedown",this.mouseDown.bind(this),!1),z.addEventListener("mousemove",o,!1),z.addEventListener("mouseup",q,!1));if(E===!0){for(var b in this.dataset.shapes){if(this.settings&&this.settings[this.dataset.shapes[b].family])a=
this.settings[this.dataset.shapes[b].family].value,this.dataset.shapes[b].fill?this.dataset.shapes[b].fill=a:this.dataset.shapes[b].line=a;this.drawShape(this.dataset.shapes[b],this.dataset.shapes[b].fill,this.dataset.shapes[b].line,this.dataset.shapes[b].font)}E=!1}else for(var c in s)s[c].paintchip||s[c].render();v&&u(A,s)};m.prototype.apply=function(){this.preferences.getTheme(function(a){var b=this.settings.name,a=a.styles,c=f.node("themesaver"),d=c.firstChild.value;if(d.length>0){b=!1;if(a)for(var e=
0;e<a.length;e++)if(a[e].name===d){b=!0;break}if(!b){b={};b.name=d;for(var g in this.settings)if(e=this.settings[g].name,e!=="name")b[e]=this.settings[g].value;a.push(b)}b=d;c.firstChild.value=""}this.preferences.setTheme(b,a);f.node("savecontainer").style.display="none";f.node("pickercontainer").style.display="";this.updateThemePicker(b,a);this.AUTONAME=!1}.bind(this))};m.prototype.revert=function(){this.guide();f.node("pickercontainer").style.display="";f.node("savecontainer").style.display="none";
this.AUTONAME=!1};m.prototype.guide=function(a){this.refresh();v=!0;a=this.themeData.getViewData();this.drawOutlineData(a);f.node("stringcontainer").style.display="none"};m.prototype.select=function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(d.name===a){this.settings.name=a;for(var e in this.settings)if(e!=="name")this.settings[e].value=d[this.settings[e].name];break}}n();l();this.refresh()};m.prototype.selectFontSize=function(a){this.settings.fontSize={value:a};this.preferences.setFontSize(a)};
m.prototype.updateFontSizePicker=function(b){for(var c=[],d=8;d<19;d++){var e={value:d+"pt",label:d+"pt"};if(d===b)e.selected="true";c.push(e)}this.sizeSelect.destroy();b=document.createElement("div");b.id="fontsizepicker";document.getElementById("sizecontainer").appendChild(b);this.sizeSelect=new a({options:c},b);this.sizeSelect.setStorageItem=this.selectFontSize.bind(this);this.sizeSelect.show()};m.prototype.addFontSizePicker=function(b){for(var b=b.style.fontSize,c=document.getElementById("fontsizepicker"),
d=[],e=8;e<19;e++){var f={value:e+"pt",label:e+"pt"};if(f.value===b)f.selected="true";d.push(f)}if(!this.sizeSelect)this.sizeSelect=new a({options:d},c),this.sizeSelect.setStorageItem=this.selectFontSize.bind(this),this.sizeSelect.show()};m.prototype.addThemePicker=function(b){for(var c=[],d=b.style.name,b=b.styles,e=0;e<b.length;e++){var f={value:b[e].name,label:b[e].name};if(b[e].name===d)f.selected=!0;c.push(f)}this.select(d,b);d=document.getElementById("themepicker");if(!this.themeSelect)this.themeSelect=
new a({options:c},d),this.themeSelect.setStorageItem=this.selectTheme.bind(this),this.themeSelect.show(),c=document.getElementById("themesaver"),this.themeSaver=new j({},c),this.themeSaver.show()};m.prototype.updateThemePicker=function(b,c){var d=[],e;for(e in c){var f={value:c[e].name,label:c[e].name};if(b&&c[e].name===b)f.selected=!0;d.push(f);this.themeSelect.destroy();f=document.createElement("div");f.id="themepicker";for(var g=document.getElementById("themepicker"),h=g.firstChild;h;)g.removeChild(h),
h=g.firstChild;g.appendChild(f);this.themeSelect=new a({options:d},f);this.themeSelect.setStorageItem=this.selectTheme.bind(this);this.themeSelect.show()}};m.prototype.renderData=function(a,b){var c=this.themeData.getViewData();b&&b==="INITIALIZE"&&(E=!0);a.innerHTML=this.template;var d=this.themeData.getThemeStorageInfo(),e=document.getElementById("colorstring");this.colorFieldId=d.styleset+"colorField";e.id=this.colorFieldId;this.drawOutlineData(c);this.preferences.getTheme(function(a){this.addFontSizePicker(a);
this.addThemePicker(a)}.bind(this));this.commandService.renderCommands("themeCommands",document.getElementById(this.toolbarId||"revertCommands"),this,this,"button")};m.prototype.selectTheme=function(a){this.preferences.getTheme(function(b){this.select(a,b.styles)}.bind(this))};m.prototype.addTheme=function(a){this.preferences.getTheme(function(b){var c=a.name;b.styles.push(a);this.preferences.setTheme(c,b.styles);this.select(c,b.styles);this.updateThemePicker(c,b.styles)}.bind(this))};m.prototype.destroy=
function(){var a=this.themeSelect;a&&a.destroy();(a=this.themeSaver)&&a.destroy();(a=this.colfld)&&a.destroy();(a=this.fontsizepicker)&&a.destroy()};return m});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(h){function i(g,c){c||(c="orion.page.selection");this._serviceRegistry=g;h.attach(this);this._serviceRegistration=g.registerService(c,this);this._selections=null}i.prototype={getSelection:function(g){var c=this._getSingleSelection();typeof g==="function"&&g(c);return c},getSelections:function(g){var c=Array.isArray(this._selections)?this._selections.slice():[];typeof g==="function"&&g(c);return c},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(g){var c=this._selections;this._selections=Array.isArray(g)?g.length>0?g.slice():null:g?[g]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};i.prototype.constructor=i;return{Selection:i}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commandRegistry","orion/commonHTMLFragments"],function(h,i,g,c){function d(b,d){var a=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!d.id)throw Error("Missing required argument: id");this.id=d.id;if(!d.title)throw Error("Missing required argument: title");var f=d.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");b.appendChild(this.domNode);for(var g=0;g<f.length;g++)this.domNode.classList.add(f[g]);this.domNode.id=d.id;if(d.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===h.KEY.ENTER&&(b.target===a.domNode||b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1);if(d.iconClass){var i=document.createElement("span");i.classList.add("sectionIcon");this.domNode.appendChild(i);(Array.isArray(d.iconClass)?d.iconClass:[d.iconClass]).forEach(function(a){i.classList.add(a)})}this.titleNode=document.createElement("div");
this.titleNode.id=d.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=d.title;if(typeof d.getItemCount==="function")f=document.createElement("div"),f.classList.add("layoutLeft"),f.classList.add("sectionItemCount"),this.domNode.appendChild(f),f.textContent=d.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=
d.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);f=document.createElement("div");f.id=d.id+"FilterSearchBox";this.domNode.appendChild(f);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=d.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=d.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=d.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);d.slideout&&(f=c.slideoutHTMLFragment(d.id),g=document.createRange(),g.selectNode(this.domNode),f=g.createContextualFragment(f),this.domNode.appendChild(f));this._contentParent=document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);b.appendChild(this._contentParent);d.content&&this.setContent(d.content);
this.hidden=d.hidden;if(typeof d.onExpandCollapse==="function")this._onExpandCollapse=d.onExpandCollapse;this._preferenceService=d.preferenceService;this._contentParent.style.display="none";if(this._preferenceService){var m=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(m.id);if(a!==void 0)m.hidden=!a;if(!m.hidden)m._contentParent.style.display="block";m._updateExpandedState(!m.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=d.commandService;this._lastMonitor=0;this._loading={}}function f(b){this._section=b;this._id=++b._lastMonitor}d.prototype={setTitle:function(b){this.titleNode.textContent=b},setContent:function(b){typeof b==="string"?this._contentParent.innerHTML=b:(this._contentParent.innerHTML="",this._contentParent.appendChild(b))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new f(this)},_setMonitorMessage:function(b,c){this._progressNode.style.visibility=
"visible";this._loading[b]=c;var a="",d;for(d in this._loading)a!==""&&(a+="\n"),a+=this._loading[d];this._progressNode.title=a},_monitorDone:function(b){delete this._loading[b];var b="",c;for(c in this._loading)b!==""&&(b+="\n"),b+=this._loading[c];this._progressNode.title=b;if(b==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.hidden=!1):(this._contentParent.style.display="none",this.hidden=!0);this._updateExpandedState(!this.hidden,
!0)},_updateExpandedState:function(b,c){var a=this.twistie,d=this.id;a&&(a.classList.add(b?this._expandImageClass:this._collapseImageClass),a.classList.remove(b?this._collapseImageClass:this._expandImageClass));this._preferenceService&&c&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(d,b)});this._onExpandCollapse&&this._onExpandCollapse(b,this)}};d.prototype.constructor=d;f.prototype={begin:function(b){this.status=b;this._section._setMonitorMessage(this.id,b)},worked:function(b){this.status=
b;this._section._setMonitorMessage(this.id,b)},done:function(b){this.status=b;this._section._monitorDone(this.id)}};f.prototype.constructor=f;return{Section:d}});
define("orion/widgets/input/Checkbox",["orion/objects","orion/webui/littlelib"],function(h,i){function g(c,d){h.mixin(this,c);this.node=d||document.createElement("div");this.node.innerHTML=this.templateString;this.myfield=i.$(".setting-control",this.node)}h.mixin(g.prototype,{templateString:'<label><input class="setting-control settingsCheckbox" type="checkbox"/></label>',show:function(){this.myfield.addEventListener("change",this.change.bind(this));this.postCreate()},destroy:function(){if(this.node)i.empty(this.node),
this.myfield=this.node=null},setStorageItem:function(){},isChecked:function(){return this.myfield.checked},setChecked:function(c){this.myfield.checked=c},change:function(){},postCreate:function(){this.myfield.style.width="20px";this.editmode&&this.editmode==="readonly"&&this.myfield.setAttribute("disabled","disabled")}});return g});
define("orion/widgets/input/LabeledCheckbox",["orion/objects","orion/webui/littlelib","orion/widgets/input/Checkbox"],function(h,i,g){function c(c,f){g.apply(this,arguments);this.mylabel=i.$(".setting-label",this.node)}h.mixin(c.prototype,g.prototype,{templateString:'<label><span class="setting-label"></span><input class="setting-control settingsCheckbox" type="checkbox"/></label>',postCreate:function(){g.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){g.prototype.destroy.call(this);
if(this.mylabel)this.mylabel=null}});return c});
define("orion/widgets/input/LabeledTextfield",["orion/objects","orion/webui/littlelib"],function(h,i){function g(c,d){h.mixin(this,c);this.node=d||document.createElement("div")}h.mixin(g.prototype,{templateString:'<div class="setting-property"><label><span class="setting-label"></span><input class="setting-control" type="text" /></label></div>',show:function(){this.node.innerHTML=this.templateString;this.mylabel=i.$(".setting-label",this.node);this.myfield=i.$(".setting-control",this.node);this.myfield.addEventListener("change",
this.change.bind(this));this.postCreate()},destroy:function(){if(this.node)i.empty(this.node),this.node=this.mylabel=this.myfield=null},setStorageItem:function(){},change:function(){this.setStorageItem(this.category,this.item,this.element,this.myfield.value,this.ui)},setValue:function(c){this.myfield.value=c},getValue:function(){return this.myfield.value},postCreate:function(){this.mylabel.textContent=this.fieldlabel+":";if(this.inputType&&this.inputType==="password")this.myfield.type="password";
this.editmode&&this.editmode==="readonly"&&this.myfield.setAttribute("readonly","true")}});return g});
define("orion/widgets/input/LabeledSelect",["orion/objects","orion/webui/littlelib","orion/widgets/input/Select"],function(h,i,g){function c(c,f){g.apply(this,arguments);this.mylabel=i.$(".setting-label",this.node)}h.mixin(c.prototype,g.prototype,{templateString:'<div class="setting-property"><label><span class="setting-label"></span><select class="setting-control"></select></label></div>',postCreate:function(){g.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){g.prototype.destroy.call(this);
if(this.mylabel)this.mylabel=null}});return c});
define("orion/settings/ui/PluginSettings","i18n!orion/settings/nls/messages,orion/explorers/explorer,orion/section,orion/i18nUtil,orion/Deferred,orion/objects,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledSelect".split(","),function(h,i,g,c,d,f,b,e,a){function j(a,b){this.serviceRegistry=b;this.childWidgets=[];n.call(this,{cachePrefix:"pluginSettings"},a)}function l(a,b){m.call(this,a,b,new j(this,a))}function k(a){var b=a.parent,c=a.serviceRegistry,
d=a.settings;if(!a.parent||!a.serviceRegistry||!a.settings||!a.title)throw"Missing required option";this.parent=typeof b==="string"?document.getElementById("parent"):b;this.render(b,c,d,a.title)}var m=i.Explorer,n=i.SelectionRenderer,r=g.Section,o=function(a){f.mixin(this,a);this.fieldlabel=this.property.getName()};f.mixin(o.prototype,{postCreate:function(){var a=this.property,b=this.configuration.getProperties(),a=b&&typeof b[a.getId()]!=="undefined"?b[a.getId()]:a.getDefaultValue();typeof this.updateField===
"function"&&this.updateField(a)},changeProperty:null,updateField:null});var q=function(a){o.apply(this,arguments);e.apply(this,arguments)};f.mixin(q.prototype,e.prototype,o.prototype,{postCreate:function(){e.prototype.postCreate.apply(this,arguments);o.prototype.postCreate.apply(this,arguments);this.myfield.type=this.property.getType()==="number"?"number":"text"},change:function(){this.changeProperty(this.myfield.value)},updateField:function(a){this.myfield.value=a}});var p=function(a){o.apply(this,
arguments);b.apply(this,arguments)};f.mixin(p.prototype,b.prototype,o.prototype,{change:function(a){this.changeProperty(a.target.checked)},postCreate:function(){o.prototype.postCreate.call(this);b.prototype.postCreate.call(this)},updateField:function(a){this.myfield.checked=a}});var u=function(b){o.apply(this,arguments);a.apply(this,arguments)};f.mixin(u.prototype,a.prototype,o.prototype,{postCreate:function(){var b=this.property.getOptionValues(),c=this.property.getOptionLabels();this.options=b.map(function(a,
b){var d=typeof c[b]==="string"?c[b]:a;return{value:d,label:d}});a.prototype.postCreate.apply(this,arguments);o.prototype.postCreate.apply(this,arguments)},change:function(b){a.prototype.change.apply(this,arguments);var c=this.property.getOptionValues()[this.getSelectedIndex()];typeof c!=="undefined"&&this.changeProperty(c)},updateField:function(a){a=this.property.getOptionValues().indexOf(a);a!==-1&&this.setSelectedIndex(a)}});var w=function(a,b){f.mixin(this,a);if(!b)throw"parentNode is required";
this.node=b};f.mixin(w.prototype,{createElements:function(){var a=this.serviceRegistry,b=this;this.children=[];this.configAdmin=a.getService("orion.cm.configadmin");this.initConfiguration().then(function(a){b.createChildren(a)})},startup:function(){this.createElements()},destroy:function(){this.children&&this.children.forEach(function(a){a.destroy()})},addChild:function(a){this.children.push(a);this.node.appendChild(a.node);a.show()},initConfiguration:function(){var a=this.configuration;if(a)return(new d).resolve(a);
else{var b=this;return this.configPromise=this.configPromise||this.configAdmin.getConfiguration(this.setting.getPid()).then(function(a){return b.configuration=a})}},createChildren:function(a){var b=this;this.setting.getAttributeDefinitions().forEach(function(c){var d={property:c,configuration:a,serviceRegistry:b.serviceRegistry,changeProperty:b.changeProperty.bind(b,c)},e;if(c.getOptionValues())e=new u(d);else switch(c.getType()){case "boolean":e=new p(d);break;case "number":case "string":e=new q(d)}b.addChild(e)})},
changeProperty:function(a,b){this.initConfiguration().then(function(c){var d=this.setting,e=c.getProperties()||{};e[a.getId()]=b;d.isDefaults(e)?(c.remove(),this.configPromise=this.configuration=null):c.update(e)}.bind(this))}});j.prototype=new n;j.prototype.getCellElement=function(a,b,c){var d=b.getPid(),e=d+"header",a=document.createElement("section");a.id=d;a.className="setting-row";a.setAttribute("role","region");a.setAttribute("aria-labelledby",e);d=document.createElement("h3");d.id=e;d.className=
"setting-header";d.textContent=b.getName();e=document.createElement("div");e.className="setting-content";b=this.createPropertiesWidget(e,b);this.childWidgets.push(b);b.startup();a.appendChild(d);a.appendChild(e);c.appendChild(a)};j.prototype.createPropertiesWidget=function(a,b){return new w({serviceRegistry:this.serviceRegistry,setting:b},a)};j.prototype.renderTableHeader=function(){return document.createElement("div")};j.prototype.destroy=function(){this.childWidgets&&this.childWidgets.forEach(function(a){a.destroy()});
this.childWidgets=null};l.prototype=new m;l.prototype.destroy=function(){this.renderer&&this.renderer.destroy()};k.prototype={_makeSection:function(a,b,c,d){return new r(a,{id:b,title:d,useAuxStyle:!0,getItemCount:function(){return c.length}})},destroy:function(){this.explorer.destroy()},render:function(a,b,c,d){a=this._makeSection(a,"pluginsettings-section",c,d);this.explorer=new l(b);this.explorer.createTree(a.getContentElement().id,new i.SimpleFlatModel(c,"setting-",function(a){return a.getPid()}),
{tableElement:"div",tableBodyElement:"div",tableRowElement:"div"})}};return k});
define("orion/widgets/settings/SplitSelectionLayout",["i18n!orion/settings/nls/messages","require","orion/webui/littlelib","orion/objects"],function(h,i,g,c){function d(d,b,e){c.mixin(this,d);this.selectionNode=b;this.contentNode=e;this.itemToIndexMap=null;this.toolbar=g.node(this.pageActions);this.selectionNode.innerHTML=this.categoriesTemplateString;this.contentNode.innerHTML=this.contentTemplateString;this.navbar=g.$(".navbar",this.selectionNode);this.table=g.$(".split-selection-table",this.contentNode)}
c.mixin(d.prototype,{categoriesTemplateString:'<div id="categories" class="categories"><div id="categoryNode" class="sidePanelMargins"><ul class="navbar" role="tablist" aria-labelledby="content-title"></ul></div></div>',contentTemplateString:'<div class="settings" role="tabpanel">\t<div class="split-selection-table"></div></div>',show:function(){this.itemToIndexMap={};this.drawUserInterface()},updateToolbar:function(){this.toolbar&&g.empty(this.toolbar)},addCategory:function(c,b){var b=typeof b===
"undefined"?0:b,d=document.createElement("li");d.classList.add("navbar-item");d.setAttribute("role","tab");d.setAttribute("aria-selected","false");d.tabIndex=-1;d.textContent=c.textContent;Object.keys(c).forEach(function(a){a==="show"||a==="onclick"?d.addEventListener("click",c[a]):d.setAttribute(a,c[a])});this.navbar.appendChild(d);this.itemToIndexMap[c.id]=b},selectCategory:function(c){if(this.selectedCategory)this.selectedCategory.classList.remove("navbar-item-selected"),this.selectedCategory.setAttribute("aria-selected",
"false"),this.selectedCategory.tabIndex=-1;if(c)this.selectedCategory=g.node(c);this.selectedCategory.classList.add("navbar-item-selected");this.selectedCategory.setAttribute("aria-selected","true");this.contentNode.setAttribute("aria-labelledby",c);this.selectedCategory.tabIndex=0;this.selectedCategory.focus()},showSettings:function(c){this.selectCategory(c);this.updateToolbar(c)},drawUserInterface:function(){g.empty(this.navbar);var c=this,b;this.navbar.addEventListener("keypress",function(d){if(d.keyCode===
g.keys.LEFT||d.keyCode===g.KEY.UP)c.selectedCategory.previousSibling&&(b=document.createEvent("MouseEvents"),b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c.selectedCategory.previousSibling.dispatchEvent(b));else if((d.keyCode===g.KEY.RIGHT||d.keyCode===g.KEY.DOWN)&&c.selectedCategory.nextSibling)b=document.createEvent("MouseEvents"),b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c.selectedCategory.nextSibling.dispatchEvent(b)})}});return d});
define("orion/widgets/plugin/ServiceCarousel",["i18n!orion/settings/nls/messages","orion/objects","orion/webui/littlelib"],function(h,i,g){function c(c,b){var d=c.style;d.left=b.left+"px";d.top=b.top+"px";d.width=b.width+"px";d.height=b.height+"px"}function d(c,b){i.mixin(this,c);this.node=document.createElement("div");if(!this.node)throw Error("parentNode is required");b.appendChild(this.node)}i.mixin(d.prototype,{serviceState:!1,pointer:0,box:null,closedIcon:"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46FewKfYYAAAF4SURBVCjPbZEvyFNhGMV/590ciANhjNs2nC66osHiJ8b9cdVgN4uKyWbRaDGZBIvwYRB2723WBUEEy5igYeZxYQzd7t2x7IUFn/bAOec55zxK05TxeEyWZZds3wEeAXeBP8An4I3tr5PJZJemKQLIsiyxfQ6c8f95V1XVw+l0utdsNrsInEsaA5akE6Btx/3Vfr9/HiTdOIIBKMsS29gGOCU/bTQanWD7QVQry1Lz+ZzFYsFutyOEgCQkGbhg+1Zd0vRIkG2KomC5XLJarej3+3S7XUII8dJZHehIihaQxHq9ZrvdUhQFzWaTdrvNEXO1DvwCrkSjh8OBJEnodrv0ej1arVZMD/CjLumj7SexoSRJGAwGdDodarVaBFqSbH9WlmU3gS9RHSCEgG1iw8fW/gLXAvDd9gfbhBAIIThmOf4hZnux2Wx+CyDP88tVVb2XdC9mOVUHXo9Go8eSCFmWMRwOC+A+cBt4C/y0/c32S+C6pGeSyPOcfyAyt4A7QPcNAAAAAElFTkSuQmCC",
openIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46NddkXU4AAAFuSURBVCjPXZG/q9NwFMU/5yYQOhVKoF1SDK9OOjl1URxcQl+G5/LgLeJf4K7wRjdBxMXRxcFR6TfZ3e3iUGe3DKXYQSEk10GjwbPdy+X8uEdVVVEUBVVVJcBt4MrdHwI3gG/u/lHSO3f/vNlsfoQQEEBd19O+799IunR3JAHg7gxw92Bmj4uiaLTdbifAe0nnkvDfl+IfxvMnSUUs6Q5wLom+7+m6TmMFSYrjeFjcdfd7MfBozLjb7WiaBjPD3ZlOp6zXa8VxPNh9YsCDgdTMmM/nHI9H9vs9TdOQpilRFI3cct+A7+PgWZaxXC5JkoQsy8jznP/w04Aw2JNEFEXkec5isWC1WjGZTIZvDrk+KIRwC/jyJzQAfd9zOByYzWZ/s42wNklfgZejXtzMSNMUMxsrALx1952G46qqnrr7tZklQ8EjhRZ40XXddVmWrdV1jSROp9Nz4MzdL4BX7h6A18ClpJtt2z4ry7INIfAL982ks01Z8EgAAAAASUVORK5CYII=",
templateString:'<div class="plugin-service-carousel" ><div class="serviceContainer"><div class="serviceContainerClosed" tabindex="0" role="button" aria-pressed="false">${Services}</div><div class="serviceCount">0</div></div><div class="serviceRails serviceRailsHidden" tabindex="0" role="group"><div class="leftButton leftButtonArea" role="presentation"><span class="leftCarousel carouselControl">&lt;</span></div><div class="listContainer" role="presentation"><ul class="serviceList"></ul></div><div class="rightButton rightButtonArea" role="presentation"><span class="rightCarousel carouselControl">&gt;</span></div></div></div>',
createElements:function(){this.node.innerHTML=this.templateString;g.processTextNodes(this.node,h);var c=this.serviceLabel=g.$(".serviceContainerClosed",this.node);this.serviceCount=g.$(".serviceCount",this.node);var b=this.rails=g.$(".serviceRails",this.node);this.leftbutton=g.$(".leftButton",this.node);this.listContainer=g.$(".listContainer",this.node);this.testlist=g.$(".serviceList",this.node);this.rightbutton=g.$(".rightButton",this.node);g.$(".leftCarousel",this.node).addEventListener("click",
this.slideLeft.bind(this));g.$(".rightCarousel",this.node).addEventListener("click",this.slideRight.bind(this));c.addEventListener("click",this.showServices.bind(this));c.addEventListener("keypress",this.onServiceClick.bind(this));b.addEventListener("mouseenter",this.showButtons.bind(this));b.addEventListener("mouseleave",this.hideButtons.bind(this));b.addEventListener("focus",this.showButtons.bind(this));b.addEventListener("blur",this.hideButtons.bind(this));b.addEventListener("keypress",this.handleKeypress.bind(this));
this.postCreate()},destroy:function(){if(this.node)this.node=this.serviceLabel=this.serviceCount=this.rails=this.leftbutton=this.listContainer=this.testlist=this.rightbutton=null},postCreate:function(){var c=g.bounds(this.node.parentNode);this.addData(this.serviceData);this.serviceLabel.textContent=h.Services;this.serviceCount.textContent=this.serviceData.length;this.node.style.width=c.width-63+"px"},show:function(){this.createElements()},expand:function(){this.rails.classList.remove("serviceRailsHidden");
this.rails.classList.add("serviceRailsVisible");this.serviceLabel.classList.remove("serviceContainerClosed");this.serviceLabel.classList.add("serviceContainerOpen");this.serviceState=!0},collapse:function(){this.serviceLabel.classList.remove("serviceContainerOpen");this.serviceLabel.classList.add("serviceContainerClosed");this.rails.classList.remove("serviceRailsVisible");this.rails.classList.add("serviceRailsHidden");this.serviceState=!1},showServices:function(){this.serviceState===!1?(this.expand(),
this.box?g.bounds(this.rails,this.box):this.box=g.bounds(this.rails)):(g.bounds(this.rails,{height:0}),this.collapse())},onServiceClick:function(c){if(c.keyCode===g.KEY.ENTER||c.charCode===g.KEY.SPACE)this.showServices(),this.serviceState===!1?c.target.setAttribute("aria-pressed","true"):c.target.setAttribute("aria-pressed","false"),c.preventDefault()},showButtons:function(){this.leftbutton.style.visibility=this.serviceData.length>1&&this.pointer>0?"visible":"hidden";this.rightbutton.style.visibility=
this.serviceData.length>1&&this.pointer<this.serviceData.length-1?"visible":"hidden";var c=g.bounds(this.rails),b=g.bounds(this.leftbutton.firstChild),c=Math.round(c.height/2)-Math.round(b.height)+"px";this.leftbutton.firstChild.style.top=c;this.rightbutton.firstChild.style.top=c},hideButtons:function(){this.leftbutton.style.visibility="hidden";this.rightbutton.style.visibility="hidden"},slideRight:function(){this.box=g.bounds(this.rails);if(this.pointer<this.serviceData.length-1){this.pointer+=1;
for(var d=0;d<this.pointer;d++)this.listContainer.childNodes[0].childNodes[d].style.display="none";c(this.rails,this.box)}this.showButtons()},slideLeft:function(){this.box=g.bounds(this.rails);if(this.pointer>0)this.pointer-=1,this.listContainer.childNodes[0].childNodes[this.pointer].style.display="";this.showButtons();c(this.rails,this.box)},consoleOutput:function(c){console.log("Service: "+c.title+" Element: "+c.item+":");console.dir(c.value)},createServiceTable:function(c,b){var d=document.createElement("li");
d.classList.add("serviceData");b.appendChild(d);var a=document.createElement("div");a.classList.add("listEntry");d.appendChild(a);d=document.createElement("div");d.classList.add("tablecontainer");a.appendChild(d);var i=document.createElement("table");d.classList.add("serviceTable");d.appendChild(i);i.innerHTML='<thead><tr><th scope="col">${Item}</th><th scope="col">${Value}</th></tr></thead>';g.processTextNodes(i,h);d=document.createElement("tbody");i.appendChild(d);for(i=0;i<c.items.length;i++){var l=
document.createElement("tr"),k=document.createElement("td");k.textContent=c.items[i].item;l.appendChild(k);d.appendChild(l);var m=c.items[i].value,k=document.createElement("td");l.appendChild(k);typeof m==="object"?(l={title:c.service,item:c.items[i].item,value:m},m=document.createElement("span"),m.classList.add("objectLink"),m.title=h["click here, then check javascript console to drill down"],m.addEventListener("click",this.consoleOutput.bind(this,l)),m.textContent=h["JavaScript Object"],k.appendChild(m)):
k.textContent=m}d=document.createElement("div");d.classList.add("listTitle");d.textContent=c.service;a.appendChild(d)},addData:function(c){var b;for(b=0;b<c.length;b++)this.createServiceTable(c[b],this.testlist)},handleKeypress:function(c){c.keyCode===g.KEY.LEFT&&this.leftbutton.style.visibility!=="hidden"?this.slideLeft():c.keyCode===g.KEY.RIGHT&&this.rightbutton.style.visibility!=="hidden"&&this.slideRight()}});return d});
define("orion/widgets/plugin/PluginEntry",["i18n!orion/settings/nls/messages","orion/PageUtil","orion/objects","orion/webui/littlelib","orion/widgets/plugin/ServiceCarousel"],function(h,i,g,c,d){function f(a){var b=a.split("/"),b=b[b.length-1],b=b.split(".html")[0],b=b.replace(/([a-z])([A-Z])/,"$1 $2"),b=function(a){return a.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})}(b),b=b.replace("plugin",""),b=b.replace("Plugin","");b===""&&(b=a);return b}function b(a){var b=[];a.getServiceReferences().forEach(function(a){var c=
{service:a.getProperty("objectClass").join(" "),items:[]};a.getPropertyKeys().forEach(function(b){b={item:b,value:a.getProperty(b)};c.items.push(b)});b.push(c)});return b}function e(a,b){g.mixin(this,a);this.node=b||document.createElement("div")}g.mixin(e.prototype,{iconSource:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBFxMFB6T1TK0AAAfOSURBVGjevZpLbFzlGYaf9x87DnZCyLUhCSSOY9PgmdwQdxrRVqhR1aYgpVXUTbvohgqRtrQCsWjFolSqBIUKCXXRsmkFCygiUpu2QgkFWkoIGOKZQIRj5yYSUifNhdiO7TlvF/+Mb4zt8bGTszmamXP+//2+7/2u/4gZulxgAYmWWl4kWG6zVGI+5gLQjziOOeYQzmgwOar19AMkpyEsTL+v0ryUAKEMfD8PWNqBvExWLVADyAI8YgcDOEEaxB5A2if5Z2rlHQDnQdnLLIALoFZwO3cgHsTahsiAsbGkqtazbYGMQHwi/AeLp0Irp/0BaP0MCpDsBhozhMYiyX41EPxXoc3YIM0I+2yXVtLDlp8OWS5Va5GqESR5PS57B1J93HFm0I8SBAtzWLBdOd5O8hCy07VAnvkyO4G7jCwx08DHmgMhkB9SlieT9kDIJVMXwAUArnWiDqBeGuWSl1MASyX/MDtDzt8q+16lK4y7UMJyzH7J9eDxwSeG2ZtKj0z/itSUsS15a5Jnl1ohOabJBUjypXuBBZKO2CwEUZHvdoyNjbugaR/U3zVjQpTkENEKW5zXK+E6k+yfRAD1LI73hD1AZlI/nX0TzNkSgTe+Bg1fHi2EDUVPVzAbtrqdHWFdzBcVBUjeA9/8X5zX7yzW4Uk4L0HPu3BseylLBWjcDXNLAtlQ1wI3fAj1t6UWQpIUHeMpt3PL2NA6CmDyAdeR4ahQ9Q5rQ8NmaPwnQ7mh83YYPAktXaVnivBxC/R3psodZcfGdGLWOtBfDq+jKZTRv+QpZmgJPnsdujZHS9iw+i1oenfYEspAc0dqSwz5A6wm6IGRuWEIqNv5PuK5qZQEn7fE3dC4hwmzdEcW+grpLAGWLcRcxGdqhZB8VPpRejA1+PLV1wZJX0kvrhC1gKb3oSFlxLJLq+on5bwgAB+giSIdFbVS3mgiuWyoXQ5rCpCZR1V10uGvwWf/SGMJ2xwJOTe6UPIBF3nW44GvawHVTLxkzSJoOVod+LJCVv0drro5jSUkWOUC69QKwQXmSnxJY21uw7xt0HwQVvwpZlxXoEVmITS1g0J1mi//bkPTXpi1JkVsNSR6LEahJFxvq6Zi5Fn0SLzP+w6sfHkY5Eja3PAp1C6dnGZjBZegdy8MHEqTHWz5nuRDFKzki+Caiprquh362uPnq++FVa+P0PyCyPmRQk0F/IW/QOcdaROcQDUUw/UBs35czXkQDq2D3rb4ueFOWLkTZq2Elo7qHXasYi7sgiPfiM1pyqAnuwYnC4NQ9nMhb0zwpWPTsCXmfBOaOyEzn1RdmQfhxP3TL7tRRmJJQCybCD8SBEHnLdESItKGlC2lamDVaxPqrFpD2iwOmPpJCwcbMtdAXfP0Bhplvl98FWYtn1aVWirWFoeqNg1XQdN7EOak37RMt/M749bXfA9UO20hAvjSpNqc1QyZJelpUwZ/7nk4/xIMnopRbPU76SkUlzwbkLon1IIEffuh8zZwMqLG8dTA9xWg5y2Ytz3ScdFD0F+Yli8YzgXsfFXZs3cfdN0J7p+wRa4I/uIb0P04zM7F+L/gfujZC2efTz8mkBPM8WCRr0oLEvS8DUe+Du4bw8QxTpr0Db8zcBy6fw2LH4Oef8OyZ6IlMvNh8aPTiUODks4ErAJQrL552R1r+qS3RCmN1nbPW/BxI5x7EYoX4fh3YfHP4cQDsPy5SKVZzTGi9f4nFYVsGzxAxp/IeRYBx0B1U2ojr9oEq/ZAZm4ppgkuvgmH744tpIHMbFjxPJx7Aa57AQaOQjIAdY3DzeCnj8KpX8X3VX1QsPR+yHpjUJZuW8ewp9ZG9rVB560RrASXDsLhrw6XB0GRakfvg+L/4vOHNkCxGw7Mg+KFuNYXHodlvy31QK56fyX+5VA2Stq1RfKuKXuUDXVro1OefAg8wLhNkUc0agJqV0DzRxAa4jNnnoXjP4SMqok+F0LWV8cR0H4ozVu6QQtSpdhUNZEh1MfJRc2S+N3pp+HEjyYpzQ3m98rxA4AQ1g2t9xtwytJQ6d5JeuDjtcNRa+EOWPHHcR3bjicLFk+4fURBk+wGFtGAdF5yuAIz3NGWqFkaxzC1y+J33U/AyZ+Ooxy/qCzfrliROc8WrF3mssz/Jy/ybjgeu7zBM3Dw2pg0SzAcqXMWa7mCezR2sJXkgd66vxn2quJc5DJeZV0d2hCTZcfaUeDL+CV+EdYNg69YEydt1KmGs0AdV9IKI8f1GhZqaKyIXlLW28ae2oymUDsoB0leNwH7xJU51JhsCAQ6ReJV6lvSq1tPVXlCk+c+W3/mSvvD2HwLh12kNaynp+oTGneBsrwsfK8keeg044ppPWYW6zyBDaqpDH5cAdQI3gPK8YrNTZhL2IrrXn61A8J+04mX6UbOjXc+VnVjm7RRR61ex9wSj990WbQe5+gewHpSOT9SzXuT9sRuh7CRS+qvvVXB98gaiCfzM2eNEtmFnWeAJcr5EXdlYoKdrgDKlTap60etvGp7geFhxCe2cUphht6xQbxha2vIkdNGzia7QY1FwleqGtFNQ3MFbXbCM8hrhGYBmRKBS8lVpflNjO1RyQbUjzwIvESGH4e1nE6dA1ODPwC6cSiLzwetxG4BsqCsxBzwEuCSrTOCbnAbIm+HLik5omzpLzedEFanw/F/byy0oCz4lroAAAAASUVORK5CYII=",
templateString:'<div class="plugin-entry" style="overflow:hidden;"><div class="plugin-list-item"><div><div class="plugin-icon"></div><span class="plugin-commands"></span><div class="stretch"><span class="plugin-title"></span><div></div><span class="plugin-description"></span><div class="plugin-links" style="font-size:11px"></div></div></div></div><div class="plugin-service-item" ></div></div>',serviceDescriptions:null,createElements:function(){this.node.innerHTML=this.templateString;this.pluginTitle=
c.$(".plugin-title",this.node);this.pluginDescription=c.$(".plugin-description",this.node);this.pluginLinks=c.$(".plugin-links",this.node);this.commandSpan=c.$(".plugin-commands",this.node);this.serviceContainer=c.$(".plugin-service-item",this.node);this.postCreate()},destroy:function(){if(this.node)this.node=this.pluginTitle=this.pluginDescription=this.pluginLinks=this.commandSpan=this.serviceContainer=null},show:function(){this.createElements()},addPluginLink:function(a,b){if(i.validateURLScheme(b)){var c=
document.createElement("a");c.classList.add("plugin-link");c.href=b;c.title=a;c.textContent=a;this.pluginLinks.appendChild(c)}else console.log("Illegal "+a+" URL: "+b)},postCreate:function(){var a=this.plugin.getHeaders(),c=this.plugin.getLocation();this.pluginTitle.textContent=a.name||f(c);this.pluginDescription.textContent=a.description||h["A plugin for Eclipse Orion"];this.addPluginLink("Plugin",c);a.website&&this.addPluginLink("Website",a.website);a.license&&this.addPluginLink("License",a.license);
a.login&&this.addPluginLink("Login",a.login);this.commandSpan.id=c;this.commandService.renderCommands("pluginCommand",this.commandSpan,c,this,"tool");this.serviceDescriptions=b(this.plugin);this.carousel=new d({serviceData:this.serviceDescriptions},this.serviceContainer);this.carousel.show()}});return e});
define("orion/widgets/plugin/PluginList","i18n!orion/settings/nls/messages,require,orion/Deferred,orion/commands,orion/commandRegistry,orion/commonHTMLFragments,orion/objects,orion/webui/littlelib,orion/widgets/plugin/PluginEntry,orion/explorers/explorer,orion/URITemplate,orion/PageLinks".split(","),function(h,i,g,c,d,f,b,e,a,j,l,k){function m(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function n(a,b){p.call(this,{},b);this.commandService=a}function r(a){this.renderer=
new n(a,this)}function o(a,c){b.mixin(this,a);this.node=c||document.createElement("div")}var q=j.Explorer,p=j.SelectionRenderer,u={},w=localStorage.getItem("/orion/preferences/default/plugins");w&&(w=JSON.parse(w),Object.keys(w).forEach(function(a){u[m(i.toUrl(a))]=!0}));n.prototype=Object.create(p.prototype);n.prototype.getCellElement=function(b,c){if(b===0){var d=new a({plugin:c,commandService:this.commandService});d.show();return d.node}};r.prototype=Object.create(q.prototype);b.mixin(o.prototype,
{templateString:'<div id="pluginSectionHeader" class="pluginSectionHeader sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft"></div><div class="sectionItemCount layoutLeft">0</div><div id="pluginCommands" class="pluginCommands layoutRight sectionActions"></div></div><div class="displaytable layoutBlock"><div class="plugin-list-container"><div class="plugin-list" id="plugin-list" style="overflow:hidden;"></div></div></div>',pluginDialogState:!1,includeMaker:!1,target:"_self",
createElements:function(){this.node.innerHTML=this.templateString;this.pluginSectionHeader=e.$(".pluginSectionHeader",this.node);this.pluginTitle=e.$(".sectionAnchor",this.node);this.pluginCount=e.$(".sectionItemCount",this.node);this.pluginCommands=e.$(".pluginCommands",this.node);this.pluginList=e.$(".plugin-list",this.node);this.postCreate()},destroy:function(){if(this.node)e.empty(this.node),this.node=this.pluginSectionHeader=this.pluginTitle=this.pluginCount=this.pluginCommands=this.pluginList=
null},postCreate:function(){var a=this;if(this.pluginSectionHeader){var b=f.slideoutHTMLFragment("pluginSlideout"),c=document.createRange();c.selectNode(this.pluginSectionHeader);b=c.createContextualFragment(b);this.pluginSectionHeader.appendChild(b)}this.render();this.registry.registerService("orion.cm.managedservice",{updated:function(b){a.setTarget(b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?"_blank":"_self":"_self")}.bind(this)},{pid:"nav.config"})},updateToolbar:function(){this.pluginCommands&&
this.commandService.destroy(this.pluginCommands)},show:function(){this.createElements();this.updateToolbar();this.pluginsUri&&(this.commandService.addCommand(new c.Command({name:h["Get Plugins"],tooltip:h["Find More Orion Plugins"],id:"orion.findMorePluginsCommand",hrefCallback:function(a){return this.getPluginsLink(a.items)}.bind(this)})),this.commandService.registerCommandContribution("pluginCommands","orion.findMorePluginsCommand",1));this.commandService.addCommand(new c.Command({name:h.Install,
tooltip:h["Install a plugin by specifying its URL"],id:"orion.installPlugin",parameters:new d.ParametersDescription([new d.CommandParameter("url","url",h["Plugin URL:"],"")]),callback:function(a){a.parameters&&(a=a.parameters.valueFor("url"))&&this.installHandler(a)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommands","orion.installPlugin",2,null,!1,null,new d.URLBinding("installPlugin","url"));this.commandService.addCommand(new c.Command({name:h["Reload all"],tooltip:h["Reload all installed plugins"],
id:"orion.reloadAllPlugins",callback:this.reloadPlugins.bind(this)}));this.commandService.registerCommandContribution("pluginCommands","orion.reloadAllPlugins",3);this.commandService.addCommand(new c.Command({name:h.Create,tooltip:h["Create a new Orion Plugin"],id:"orion.createPlugin",callback:function(a){this.createPlugin(a.items)}.bind(this)}));this.includeMaker===!0&&this.commandService.registerCommandContribution("pluginCommands","orion.createPlugin",2);this.commandService.renderCommands("pluginCommands",
"pluginCommands",this,this,"button")},render:function(){this.commandService.addCommand(new c.Command({name:h.Reload,tooltip:h["Reload the plugin"],id:"orion.reloadPlugin",imageClass:"core-sprite-refresh",visibleWhen:function(a){return typeof a==="string"},callback:function(a){this.reloadPlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand","orion.reloadPlugin",1);this.commandService.addCommand(new c.Command({name:h.Delete,tooltip:h["Delete this plugin from the configuration"],
imageClass:"core-sprite-delete",id:"orion.uninstallPlugin",visibleWhen:function(a){return!u[a]},callback:function(a){this.removePlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand","orion.uninstallPlugin",2);var a=this.settings.pluginRegistry;this.commandService.addCommand(new c.Command({name:h.Disable,tooltip:h.DisableTooltip,id:"orion.disablePlugin",imageClass:"core-sprite-stop",visibleWhen:function(b){return u[b]?!1:a.getPlugin(b)._getAutostart()!=="stopped"},
callback:function(a){this.disablePlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand","orion.disablePlugin",3);this.commandService.addCommand(new c.Command({name:h.Enable,tooltip:h.EnableTooltip,id:"orion.enablePlugin",imageClass:"core-sprite-start",visibleWhen:function(b){return u[b]?!1:a.getPlugin(b)._getAutostart()==="stopped"},callback:function(a){this.enablePlugin(a.items)}.bind(this)}));this.commandService.registerCommandContribution("pluginCommand",
"orion.enablePlugin",4);var b=this.settings.pluginRegistry.getPlugins();this.pluginTitle.textContent=h.Plugins;this.pluginCount.textContent=b.length;this.explorer=new r(this.commandService);this.pluginListTree=this.explorer.createTree(this.pluginList.id,new j.SimpleFlatModel(b,"plugin",function(a){return a.getLocation()}),{setFocus:!1})},pluginURLFocus:function(){this.pluginUrlEntry.value="";this.pluginUrlEntry.style.color=""},pluginURLBlur:function(){if(this.pluginUrlEntry.value==="")this.pluginUrlEntry.value=
h["Type a plugin url here ..."],this.pluginUrlEntry.style.color="#AAA"},createPlugin:function(){var a=i.toUrl("settings/maker.html");window.open(a,this.target)},addPlugin:function(a){this.statusService.setMessage(h["Installed "]+a,5E3,!0);this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!0)});this.render()},getPluginsLink:function(){var a=new l(this.pluginsUri);return decodeURIComponent(a.expand({OrionHome:k.getOrionHome()}))},pluginError:function(a){this.statusService.setErrorMessage(a)},
installHandler:function(a){/^\S+$/.test(a.trim())&&(this.statusService.setMessage(h["Installing "]+a+"...",null,!0),this.settings.pluginRegistry.getPlugin(a)?this.statusService.setErrorMessage(h["Already installed"]):this.settings.pluginRegistry.installPlugin(a).then(function(a){a.start({lazy:!0}).then(this.addPlugin.bind(this,a.getLocation()),this.pluginError.bind(this))}.bind(this),this.pluginError.bind(this)))},reloaded:function(){var a=this.settings.pluginRegistry.getPlugins();this.statusService.setMessage(h["Reloaded "]+
a.length+h[" plugin"]+(a.length===1?"":"s")+".",5E3,!0);this.render()},reloadPlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.update().then(this.render.bind(this)),this.statusService.setMessage(h["Reloaded "]+a,5E3,!0))},disablePlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.stop(),this.statusService.setMessage("Disabled "+a,5E3,!0),this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!1);this.render(this)}.bind(this)),this.render())},
enablePlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.start({lazy:!0}),this.statusService.setMessage("Enabled "+a,5E3,!0),this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!1);this.render(this)}.bind(this)),this.render())},setTarget:function(a){this.target=a},reloadPlugins:function(){var a=[];this.settings.pluginRegistry.getPlugins().forEach(function(b){a.push(b.update())});g.all(a,function(){}).then(this.reloaded.bind(this))},forceRemove:function(a){var b=
this.settings.pluginRegistry.getPlugin(a);b&&b.uninstall().then(function(){this.statusService.setMessage(h["Uninstalled "]+a,5E3,!0);this.settings.preferences.getPreferences("/plugins").then(function(b){b.keys().some(function(c){if(m(i.toUrl(c))===m(a))return b.remove(c),!0})}.bind(this));this.render()}.bind(this))},removePlugin:function(a){window.confirm(h["Are you sure you want to uninstall '"]+a+"'?")&&this.forceRemove(a)}});return o});
define("orion/widgets/settings/Subsection",[],function(){function h(h){var g=h.sectionName;this.parentNode=h.parentNode;this.children=h.children;h=document.createElement("section");h.classList.add("setting-row");h.setAttribute("role","region");h.setAttribute("aria-labelledby","Navigation-header");var c=document.createElement("h3");c.classList.add("setting-header");c.textContent=g;g=document.createElement("div");g.classList.add("setting-content");h.appendChild(c);h.appendChild(g);this.node=h;this.subsectionContent=
g}h.prototype.show=function(){this.parentNode&&this.parentNode.appendChild(this.node);if(this.children){var h=this;this.children.forEach(function(g){h.subsectionContent.appendChild(g.node);g.show()})}};return h});define("orion/form",[],function(){function h(h){return encodeURIComponent(h).replace(/[!'()*]/g,escape).replace("%20","+")}return{encodeFormData:function(i){for(var i=i||{},g=Object.keys(i),c=[],d=0;d<g.length;d++){var f=g[d],b=i[f];c.push(h(f)+"="+h(b))}return c.join("&")}}});
define("profile/UsersService",["orion/Deferred","orion/xhr","orion/EventTarget","orion/form"],function(h,i,g,c){function d(b){return b===""?null:JSON.parse(b)}function f(b){g.attach(this);if(b)this._serviceRegistry=b,this._serviceRegistration=b.registerService("orion.core.user",this)}f.prototype={getUsersListSubset:function(b,c,a){var f=new h,g=this;i("GET","../users?start="+b+"&rows="+c,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=d(b.response);a&&(typeof a==="function"?a(b):
g.dispatchEvent({type:a,data:b}));f.resolve(b)},function(a){f.reject(a.response||a)});return f},getUsersList:function(b){var c=new h,a=this;i("GET","../users",{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(f){f=d(f.response);b&&(typeof b==="function"?b(f):a.dispatchEvent({type:b,data:f}));c.resolve(f.users)},function(a){c.reject(a.response||a)});return c},deleteUser:function(b,c){var a=new h,f=this;i("DELETE",b,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=d(b.response);
c&&(typeof c==="function"?c(b):f.dispatchEvent({type:c,data:b}));a.resolve(b)},function(b){a.reject(b.response||b)});return a},createUser:function(b){var b=b||{},e={login:b.login,password:b.password,email:b.email};if(b.guest)e.guest="",typeof e.login!=="string"&&delete e.login,typeof e.password!=="string"&&delete e.password,typeof e.email!=="string"&&delete e.email;return i("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:c.encodeFormData(e)}).then(function(a){return(new h).resolve(d(a.response))},
function(a){var b=a;try{b=d(a.response||a.error)}catch(c){}return(new h).reject(b)})},getUserInfo:function(b,c){var a=new h,f=this;i("GET",b,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=d(b.response);c&&(typeof c==="function"?c(b):f.dispatchEvent({type:c,data:b}));a.resolve(b)},function(b){a.reject(b.response||b)});return a},updateUserInfo:function(b,c,a){var f=new h,g=this;if(c.password!==c.passwordRetype)return f.reject({message:"Passwords do not match!"}),f;i("PUT",b,{headers:{"Content-Type":"application/json; charset=UTF-8",
"Orion-Version":"1"},timeout:15E3,data:JSON.stringify(c)}).then(function(b){b=d(b.response);a&&(typeof a==="function"?a(b):g.dispatchEvent({type:a,data:b}));f.resolve(b)},function(a){f.reject(a.response||a)});return f},resetUserPassword:function(b,e,a){var f=new h,g=this;i("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:c.encodeFormData({reset:!0,login:b,password:e})}).then(function(b){b=d(b.response);a&&(typeof a==="function"?
a(b):g.dispatchEvent({type:a,data:b}));f.resolve(b)},function(a){f.reject(a.response||a)});return f}};return f});
define("orion/widgets/input/LabeledCommand",["orion/objects","orion/webui/littlelib"],function(h,i){function g(c,d){h.mixin(this,c);this.node=d||document.createElement("div")}h.mixin(g.prototype,{templateString:'<label><span class="setting-repository-label"></span><span class="setting-command"></span></label>',show:function(){this.node.innerHTML=this.templateString;this.mylabel=i.$(".setting-repository-label",this.node);this.myCommand=i.$(".setting-command",this.node);this.postCreate()},destroy:function(){i.empty(this.node)},
postCreate:function(){this.mylabel.textContent=this.fieldlabel;this.commandService.renderCommands(this.scopeId,this.myCommand,{gitUrl:this.fieldlabel,keyIndex:this.keyIndex},this,"button")}});return g});
define("orion/widgets/settings/UserSettings","i18n!orion/settings/nls/messages,require,orion/commands,orion/section,orion/webui/littlelib,orion/objects,orion/i18nUtil,orion/widgets/settings/Subsection,profile/UsersService,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledCommand".split(","),function(h,i,g,c,d,f,b,e,a,j,l){function k(a,b){f.mixin(this,a);this.node=b}f.mixin(k.prototype,{dispatch:!0,templateString:'<div><div class="sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft">${User Profile}</div><div id="userCommands" class="layoutRight sectionActions"></div></div><div class="sections"></div><div></div></div><div class="linkedSection"></div>',
createElements:function(){this.node.innerHTML=this.templateString;d.processTextNodes(this.node,h);this.sections=d.$(".sections",this.node);this.linkedSection=d.$(".linkedSection",this.node);this.createSections()},setHash:function(a,b){a.src=a.src.indexOf("#")>0?a.src.substr(0,a.src.indexOf("#"))+"#"+b:a.src+"#"+b},createSections:function(){this.accountFields=[new j({fieldlabel:h.Username,editmode:"readonly"}),new j({fieldlabel:h["Full Name"]}),new j({fieldlabel:h["Email Address"]}),new l({fieldlabel:h["Email Confirmed"],
editmode:"readonly"})];(new e({sectionName:h.Account,parentNode:this.sections,children:this.accountFields})).show();this.passwordFields=[new j({fieldlabel:h["Current Password"],inputType:"password"}),new j({fieldlabel:h["New Password"],inputType:"password"}),new j({fieldlabel:h["Verify Password"],inputType:"password"})];(new e({sectionName:h.Password,parentNode:this.sections,children:this.passwordFields})).show();this.commandService.addCommand(new g.Command({name:h.Update,tooltip:h["Update Profile Settings"],
id:"orion.updateprofile",callback:function(a){this.update(a.items)}.bind(this)}));this.commandService.registerCommandContribution("profileCommands","orion.updateprofile",3);this.commandService.renderCommands("profileCommands",d.node("userCommands"),this,this,"button");this.linkedAccountSection=new c.Section(this.linkedSection,{id:"linkedAccountSection",title:"Linked Accounts",content:'<div id="iFrameContent"></div>',canHide:!0,useAuxStyle:!0,hidden:!0,slideout:!0});var a=this.iframe=document.createElement("iframe");
a.src="../mixloginstatic/manageOpenids.html";a.style.border="0";a.style.width="500px";d.node("iFrameContent").appendChild(a)},confirmOpenId:function(a){if(a!==""&&a!==null)this.win=window.open("../mixlogin/manageopenids/openid?openid="+encodeURIComponent(a),"openid_popup","width=790,height=580")},update:function(){var a=[],b=this.registry.getServiceReferences("orion.core.auth"),c=this.registry.getService("orion.page.message"),d=this.userService,e={};e.login=this.accountFields[0].getValue();e.Name=
this.accountFields[1].getValue();e.email=this.accountFields[2].getValue();var f=this.passwordFields[1].getValue(),g=this.passwordFields[2].getValue();if(f.length>0)f!==g?(c.setProgressResult("New password, and retyped password do not match"),this.dispatch=!1):this.passwordFields[0].getValue().length>0?(e.oldPassword=this.passwordFields[0].getValue(),e.password=f,e.passwordRetype=g,this.dispatch=!0):(c.setProgressResult("Need to type your current password"),this.dispatch=!1);if(this.dispatch===!0)for(f=
0;f<b.length;f++){var i=this.registry.getService(b[f]);i.getKey().then(function(b){a.push(b);i.getUser().then(function(a){d.updateUserInfo(a.Location,e).then(function(a){a?c.setProgressResult(a):c.setProgressResult(h["User profile data successfully updated."])},function(a){c.setProgressResult(a)})})})}},show:function(){this.createElements();this.userService=this.registry.getService("orion.core.user");for(var a=[],b=this.registry.getServiceReferences("orion.core.auth"),c=this.userService,d=this,e=
0;e<b.length;e++){var f=this.registry.getService(b[e]);f.getKey().then(function(b){a.push(b);f.getUser().then(function(a){c.getUserInfo(a.Location).then(function(a){d.accountFields[0].setValue(a.login);d.accountFields[1].setValue(a.Name);d.accountFields[2].setValue(a.email);d.accountFields[3].setChecked(a.emailConfirmed)});d.setHash(d.iframe,a.Location)})})}},destroy:function(){if(this.node)d.empty(this.node),this.node=this.sections=this.linkedSection=null}});return k});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(h){function i(g){this._prefix="/git/credentials";this._preferenceService=g.getService("orion.core.preference")}i.prototype={put:function(g,c){var d={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(c!==void 0){if(c.gitSshUsername!==void 0&&c.gitSshUsername!==null)d.gitSshUsername=c.gitSshUsername;if(c.gitSshPassword!==void 0&&c.gitSshPassword!==null)d.gitSshPassword=c.gitSshPassword;if(c.gitPrivateKey!==void 0&&
c.gitPrivateKey!==null)d.gitPrivateKey=c.gitPrivateKey;if(c.gitPassphrase!==void 0&&c.gitPassphrase!==null)d.gitPassphrase=c.gitPassphrase}var f=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(b){var c=b.get("settings");c===void 0?f.reject():c.enabled?(b.put(g,d),f.resolve()):f.reject()});return f},get:function(g){var c={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},d=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(f){var b=
f.get("settings");b===void 0?d.reject():b.enabled?(f=f.get(g),f!==void 0?d.resolve(f):d.resolve(c)):d.reject()});return d},isEnabled:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(c){c=c.get("settings");c===void 0?g.resolve(!1):g.resolve(c.enabled)});return g},enable:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(c){c.put("settings",{enabled:!0});g.resolve()});return g},disable:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,
2).then(function(c){c.put("settings",{enabled:!1});g.resolve()});return g},remove:function(g){var c=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d.remove(g);c.resolve()});return c},getRepositories:function(){var g=new h;this._preferenceService.getPreferences(this._prefix,2).then(function(c){for(var d=[],c=c.keys(),f=0;f<c.length;++f)c[f]!=="settings"&&d.push(c[f]);g.resolve(d)});return g}};return i.prototype.constructor=i});
define("orion/git/gitConfigPreference",["orion/Deferred"],function(h){function i(g){this._prefix="/git/config";this._preferenceService=g.getService("orion.core.preference")}i.prototype={getConfig:function(){var g=new h;this._preferenceService.getPreferences(this._prefix).then(function(c){c=c.get("userInfo");g.resolve(c)});return g},setConfig:function(g){var c=new h;this._preferenceService.getPreferences(this._prefix).then(function(d){d.put("userInfo",g);c.resolve()});return c}};return i.prototype.constructor=
i});
define("orion/widgets/settings/GitSettings","i18n!orion/settings/nls/messages,require,orion/commands,orion/section,orion/git/gitPreferenceStorage,orion/git/gitConfigPreference,orion/webui/littlelib,orion/objects,orion/i18nUtil,orion/widgets/settings/Subsection,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledCommand".split(","),function(h,i,g,c,d,f,b,e,a,j,l,k,m){function n(a,b){e.mixin(this,a);this.node=b}e.mixin(n.prototype,{dispatch:!0,templateString:'<div><div class="sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft">${Git Settings}</div><div id="userCommands" class="layoutRight sectionActions"></div></div><div class="sections"></div><div></div></div><div><div class="sectionWrapper toolComposite"><div class="sectionAnchor sectionTitle layoutLeft">${Git Credentials Storage}</div><div id="gitCommands" class="layoutRight sectionActions"></div></div><div class="gitSections"></div><div></div></div>',createElements:function(){this.node.innerHTML=
this.templateString;b.processTextNodes(this.node,h);this.sections=b.$(".sections",this.node);this.gitSections=b.$(".gitSections",this.node);this.createSections()},setHash:function(a,b){a.src=a.src.indexOf("#")>0?a.src.substr(0,a.src.indexOf("#"))+"#"+b:a.src+"#"+b},refreshGitCredentials:function(){var a=this;(new d(this.registry)).isEnabled().then(function(b){a.gitCredentialsFields[0].setChecked(b)})},createSections:function(){this.gitFields=[new l({fieldlabel:h["Git Email Address"]}),new l({fieldlabel:h["Git Username"]})];
(new j({sectionName:h["Git Config"],parentNode:this.sections,children:this.gitFields})).show();this.commandService.addCommand(new g.Command({name:h.Update,tooltip:h["Update Git User Settings"],id:"orion.updateGitUser",callback:function(a){this.update(a.items)}.bind(this)}));this.commandService.registerCommandContribution("gitUserCommands","orion.updateGitUser",3);this.commandService.renderCommands("gitUserCommands",b.node("userCommands"),this,this,"button");this.gitCredentialsFields=[new k({fieldlabel:h["Enable Storage"]})];
var c,e=this;this.commandService.addCommand(new g.Command({name:h.Delete,id:"eclipse.orion.git.eraseGitCredentials",callback:function(b){var c=b.items.gitUrl,f=b.items.keyIndex,g=e.registry.getService("orion.page.message");(new d(e.registry)).remove(c).then(function(){g.setProgressResult(a.formatMessage(h["Deleted git credentials for ${0}"],[c]));e.gitCredentialsFields[f+1].destroy()})},visibleWhen:function(){return!0}}));this.commandService.registerCommandContribution("repositoryItemCommands","eclipse.orion.git.eraseGitCredentials",
1);(new d(this.registry)).getRepositories().then(function(a){for(var d=0;d<a.length;++d){var f=new m({keyIndex:d,fieldlabel:a[d],commandService:e.commandService,scopeId:"repositoryItemCommands"});e.gitCredentialsFields.push(f)}c=new j({sectionName:"",parentNode:e.gitSections,children:e.gitCredentialsFields});c.show();a=new g.Command({name:h.Update,tooltip:h["Update Git Credentials"],id:"orion.updateGitCredentials",callback:function(a){e.updateGitCredentials(a.items)}.bind(e)});e.commandService.addCommand(a);
e.commandService.registerCommandContribution("gitProfileCommands","orion.updateGitCredentials",2);e.commandService.renderCommands("gitProfileCommands",b.node("gitCommands"),e,e,"button")})},update:function(){var a=new f(this.registry),b=this.registry.getService("orion.page.message");a.setConfig({GitMail:this.gitFields[0].getValue(),GitName:this.gitFields[1].getValue()}).then(function(){b.setProgressResult(h["Git user data successfully updated."])})},updateGitCredentials:function(){var a=this.registry.getService("orion.page.message"),
b=new d(this.registry);this.gitCredentialsFields[0].isChecked()?window.confirm(h["Please be aware that your credentials will be stored persistently in the browser."]+"\n"+h["Do you wish to enable the Key Storage?"])&&b.enable().then(function(){a.setProgressResult(h["Git Credentials successfully updated."])}):b.disable().then(function(){a.setProgressResult(h["Git Credentials successfully updated."])})},show:function(){this.createElements();(new f(this.registry)).getConfig().then(function(a){a&&(a.GitMail&&
this.gitFields[0].setValue(a.GitMail),a.GitName&&this.gitFields[1].setValue(a.GitName))}.bind(this));this.refreshGitCredentials()},destroy:function(){if(this.node)b.empty(this.node),this.node=this.sections=this.gitSections=null}});return n});
define("orion/widgets/settings/EditorSettings","require,orion/widgets/themes/ThemeBuilder,orion/widgets/themes/ThemePreferences,orion/widgets/themes/editor/ThemeData,orion/util,orion/objects,orion/webui/littlelib,i18n!orion/settings/nls/messages,orion/widgets/input/LabeledTextfield,orion/widgets/input/LabeledCheckbox,orion/widgets/input/LabeledSelect,orion/section,orion/widgets/settings/Subsection,orion/commands".split(","),function(h,i,g,c,d,f,b,e,a,j,l,k,m,n){function r(a,b){f.mixin(this,a);this.node=
b;this._editorPref=a.preferences}var o=[e.Default,"Emacs","vi"];f.mixin(r.prototype,{templateString:'<div class="sections"></div>',commandTemplate:'<div id="commandButtons"><div id="editorCommands" class="layoutRight sectionActions"></div></div>',createElements:function(){this.node.innerHTML=this.templateString;document.getElementById("pageActions").innerHTML=this.commandTemplate;this.sections=b.$(".sections",this.node);this.createSections()},createSections:function(){this.editorThemeSection=new k.Section(this.sections,
{id:"editorThemeSettings",title:e.EditorThemes,canHide:!0,slideout:!0});var d=new c.ThemeData,f=new g.ThemePreferences(this._editorPref._preferences,d);this.editorThemeWidget=new i({commandService:this.commandService,preferences:f,themeData:d,toolbarId:"editorThemeSettingsToolActionsArea"});this.editorThemeWidget.addAdditionalCommand({name:e.Import,tip:e["Import a theme"],id:0,callback:d.importTheme.bind(d)});this.editorThemeWidget.renderData(this.editorThemeSection.getContentElement(),"INITIALIZE");
this.settingsSection=new k.Section(this.sections,{id:"editorSettings",title:e.EditorSettings,canHide:!0,slideout:!0});d=[];if(this.oldPrefs.autoSaveVisible)d.push(this.autoSaveCheck=new j({fieldlabel:e["Autosave Enabled"]})),d.push(this.autoSaveField=new a({fieldlabel:e["Save interval"]}));if(this.oldPrefs.autoLoadVisible)d.push(this.autoLoadCheck=new j({fieldlabel:e["Autoload Enabled"]}));d.length>0&&(new m({sectionName:e.FileMgt,parentNode:this.settingsSection.getContentElement(),children:d})).show();
d=[];if(this.oldPrefs.keyBindingsVisible){for(var f=[],h=0;h<o.length;h++){var w=o[h],t={value:w,label:w};if(w===this.oldPrefs.keyBindings)t.selected=!0;f.push(t)}d.push(this.kbSelect=new l({fieldlabel:e.Scheme,options:f}));(new m({sectionName:e.KeyBindings,parentNode:this.settingsSection.getContentElement(),children:d})).show()}d=[];if(this.oldPrefs.tabSizeVisible)d.push(this.tabField=new a({fieldlabel:e.TabSize}));if(this.oldPrefs.expandTabVisible)d.push(this.expandTabCheck=new j({fieldlabel:e.ExpandTab}));
d.length>0&&(new m({sectionName:e.Tabs,parentNode:this.settingsSection.getContentElement(),children:d})).show();d=[];if(this.oldPrefs.scrollAnimationVisible)d.push(this.scrollAnimationCheck=new j({fieldlabel:e.ScrollAnimationEnabled})),d.push(this.scrollAnimationField=new a({fieldlabel:e.ScrollAnimationTimeout}));d.length>0&&(new m({sectionName:e.ScrollAnimation,parentNode:this.settingsSection.getContentElement(),children:d})).show();d=b.node("editorSettingsToolActionsArea");this.commandService.addCommand(new n.Command({name:e.Restore,
tooltip:e["Restore default Editor Settings"],id:"orion.restoreeditorsettings",callback:function(a){this.restore(a.items)}.bind(this)}));this.commandService.registerCommandContribution("restoreEditorSettingCommand","orion.restoreeditorsettings",2);this.commandService.renderCommands("restoreEditorSettingCommand",d,this,this,"button");this.commandService.addCommand(new n.Command({name:e.Update,tooltip:e["Update Editor Settings"],id:"orion.updateeditorsettings",callback:function(a){this.update(a.items)}.bind(this)}));
this.commandService.registerCommandContribution("editorSettingCommand","orion.updateeditorsettings",1);this.commandService.renderCommands("editorSettingCommand",d,this,this,"button")},valueChanged:function(){var a={},b;for(b in this.oldPrefs)this.oldPrefs.hasOwnProperty(b)&&(a[b]=this.oldPrefs[b]);this.getValues(a);for(var c in a)if(a.hasOwnProperty(c)&&a[c]!==this.oldPrefs[c])return a},validate:function(a){return isNaN(a.autoSaveTimeout)||!isFinite(a.autoSaveTimeout)?e["Invalid save interval."]:
isNaN(a.scrollAnimation)||!isFinite(a.scrollAnimation)?e["Invalid scrolling duration."]:!(1<=a.tabSize&&a.tabSize<=16)?e["Invalid tab size."]:""},update:function(){var a=this.valueChanged();if(a){var b=this.registry.getService("orion.page.message"),c=this.validate(a);if(c)b.setProgressResult({Message:c,Severity:"Error"});else{var d=this;this._editorPref.setPrefs(a,function(){d.setValues(d.oldPrefs=a);b.setProgressResult({Message:e["Editor preferences updated"],Severity:"Normal"})})}}else this.setValues(this.oldPrefs)},
restore:function(){this._editorPref.setPrefs({},function(a){this.registry.getService("orion.page.message").setProgressResult({Message:e["Editor defaults restored"],Severity:"Normal"});this._show(a)}.bind(this))},show:function(){this._editorPref.getPrefs(function(a){this._show(a)}.bind(this))},_show:function(a){this.oldPrefs=a;this.createElements();this.setValues(a)},getValues:function(a){if(this.autoSaveCheck)a.autoSaveEnabled=this.autoSaveCheck.isChecked();if(this.autoSaveField)a.autoSaveTimeout=
parseInt(this.autoSaveField.getValue(),10);if(this.autoLoadCheck)a.autoLoadEnabled=this.autoLoadCheck.isChecked();if(this.tabField)a.tabSize=parseInt(this.tabField.getValue(),10);if(this.expandTabCheck)a.expandTab=this.expandTabCheck.isChecked();if(this.scrollAnimationCheck)a.scrollAnimationEnabled=this.scrollAnimationCheck.isChecked();if(this.scrollAnimationField)a.scrollAnimation=parseInt(this.scrollAnimationField.getValue(),10);if(this.kbSelect)a.keyBindings=this.kbSelect.getSelected()},setValues:function(a){this.autoSaveCheck&&
this.autoSaveCheck.setChecked(a.autoSaveEnabled);this.autoSaveField&&this.autoSaveField.setValue(a.autoSaveTimeout);this.autoLoadCheck&&this.autoLoadCheck.setChecked(a.autoLoadEnabled);this.tabField&&this.tabField.setValue(a.tabSize);this.expandTabCheck&&this.expandTabCheck.setChecked(a.expandTab);this.scrollAnimationCheck&&this.scrollAnimationCheck.setChecked(a.scrollAnimationEnabled);this.scrollAnimationField&&this.scrollAnimationField.setValue(a.scrollAnimation);this.kbSelect&&this.kbSelect.setSelectedIndex(Math.max(o.indexOf(a.keyBindings),
0))},destroy:function(){if(this.node)this.node=null;if(this.editorThemeWidget)this.editorThemeWidget.destroy(),this.editorThemeWidget=null}});return r});
define("edit/editorPreferences",[],function(){function h(c,d){this._preferences=c;if(this._callback=d)var f=c.listenForChangedSettings(i,function(b){b.key===f&&d()}.bind(this))}var i="/editor/settings",g={autoSaveEnabled:!1,autoSaveTimeout:1E3,autoSaveVisible:!0,autoLoadEnabled:!0,autoLoadVisible:!0,tabSize:4,tabSizeVisible:!0,expandTab:!1,expandTabVisible:!0,scrollAnimationEnabled:!0,scrollAnimation:300,scrollAnimationVisible:!0,keyBindingsVisible:!0,keyBindings:"Default"};h.prototype={_initialize:function(c){var c=
c.get("editorSettings")||{},d;for(d in g)c.hasOwnProperty(d)||(c[d]=g[d]);return c},getPrefs:function(c){this._preferences.getPreferences(i).then(function(d){d=this._initialize(d);typeof d==="string"&&(d=JSON.parse(d));c(d)}.bind(this))},setPrefs:function(c,d){this._preferences.getPreferences(i).then(function(f){f.put("editorSettings",c);c=this._initialize(f);d&&d(c);this._callback&&this._callback(c)}.bind(this))}};return{EditorPreferences:h}});
define("orion/widgets/settings/SettingsContainer","i18n!orion/settings/nls/messages,require,orion/globalCommands,orion/PageUtil,orion/webui/littlelib,orion/objects,orion/URITemplate,orion/widgets/themes/ThemeBuilder,orion/settings/ui/PluginSettings,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/widgets/settings/SplitSelectionLayout,orion/widgets/plugin/PluginList,orion/widgets/settings/UserSettings,orion/widgets/settings/GitSettings,orion/widgets/settings/EditorSettings,edit/editorPreferences".split(","),function(h,
i,g,c,d,f,b,e,a,j,l,k,m,n,r,o,q){function p(a,b){k.apply(this,arguments);this.settingsCategories=[{id:"userSettings",textContent:h["User Profile"],show:this.showUserSettings},{id:"gitSettings",textContent:h["Git Settings"],show:this.showGitSettings},{id:"themeBuilder",textContent:"UI Theme",show:this.showThemeBuilder},{id:"editorSettings",textContent:h.Editor,show:this.showEditor},{id:"plugins",textContent:h.Plugins,show:this.showPlugins}];this.settingsCategories.forEach(function(a){a.show=a.show.bind(this,
a.id)}.bind(this));this.settingsRegistry.getCategories().sort().forEach(function(a){this.settingsCategories.push({id:a,textContent:h[a]||a,show:this.showPluginSettings.bind(this,a)})}.bind(this))}var u=k.prototype;p.prototype=Object.create(k.prototype);f.mixin(p.prototype,{show:function(){this.itemToIndexMap={};this.toolbar=d.node(this.pageActions);this.manageDefaultData();window.setTimeout(function(){this.drawUserInterface()}.bind(this),100);window.addEventListener("hashchange",this.processHash.bind(this));
g.setPageTarget({task:"Settings",serviceRegistry:this.registry,commandService:this.commandService})},processHash:function(){var a=c.matchResourceParameters(),b=this;this.preferences.getPreferences("/settingsContainer",2).then(function(c){c=c.get("selection");c=a.category||c;b.selectedCategory&&b.selectedCategory.id===c||b.showByCategory(c)});window.setTimeout(function(){this.commandService.processURL(window.location.href)}.bind(this),0)},showThemeBuilder:function(a){this.selectCategory(a);this.updateToolbar(a);
this.themeWidget&&this.themeWidget.destroy();var a=new l.ThemeData,b=new j.ThemePreferences(this.preferences,a);this.themeWidget=new e({commandService:this.commandService,preferences:b,themeData:a});d.empty(this.table);a=document.createElement("div");this.table.appendChild(a);this.themeWidget.renderData(a,"INITIALIZE")},showEditor:function(a){this.selectCategory(a);d.empty(this.table);this.editorSettingWidget&&this.editorSettingWidget.destroy();this.updateToolbar(a);a=document.createElement("div");
this.table.appendChild(a);var b=new q.EditorPreferences(this.preferences);this.editorSettings=new o({registry:this.registry,preferences:b,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.editorSettings.show()},showUserSettings:function(a){this.selectCategory(a);d.empty(this.table);this.userWidget&&this.userWidget.destroy();this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);
this.userWidget=new n({registry:this.registry,settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.userWidget.show()},showGitSettings:function(a){this.selectCategory(a);d.empty(this.table);this.gitWidget&&this.gitWidget.destroy();this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);this.gitWidget=new r({registry:this.registry,
settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.gitWidget.show()},initPlugins:function(){d.empty(this.table);this.pluginWidget&&this.pluginWidget.destroy();var a=document.createElement("div");this.table.appendChild(a);this.pluginWidget=new m({settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,
dialogService:this.preferenceDialogService,commandService:this.commandService,registry:this.registry,pluginsUri:"http://mamacdon.github.io/#?target={OrionHome}/settings/settings.html&version=3.0&OrionHome={OrionHome}"},a);this.pluginWidget.show()},initPluginSettings:function(b){d.empty(this.table);this.pluginSettingsWidget&&this.pluginSettingsWidget.destroy();this.pluginSettingsWidget=new a({parent:this.table,serviceRegistry:this.registry,settings:this.settingsRegistry.getSettings(b).sort(function(a,
b){var c=a.getName(),d=b.getName();return typeof c==="string"&&typeof d==="string"?c.localeCompare(d):a.getPid().localeCompare(b.getPid())}),title:h[b]||b})},showPlugins:function(a){this.selectCategory(a);this.updateToolbar(a);this.initPlugins(a)},showPluginSettings:function(a){this.selectCategory(a);this.updateToolbar(a);this.initPluginSettings(a)},selectCategory:function(a){this.preferences.getPreferences("/settingsContainer",2).then(function(b){b.put("selection",a)});u.selectCategory.apply(this,
arguments);var d=c.matchResourceParameters();if(d.category!==a)d.category=a,delete d.resource,window.location=(new b("#,{params*}")).expand({params:d})},showByCategory:function(a){this.updateToolbar(a);this.settingsCategories.some(function(b){if(b.id===a)return b.show(),!0})||this.selectCategory(a)},addCategory:function(a){a["class"]=(a["class"]||"")+" navbar-item";a.role="tab";a.tabindex=-1;a["aria-selected"]="false";a.onclick=a.show;u.addCategory.apply(this,arguments)},addCategories:function(){var a=
this;this.settingsCategories.forEach(function(b){a.addCategory(b)})},drawUserInterface:function(a){u.drawUserInterface.apply(this,arguments);this.addCategories();this.processHash()},handleError:function(a){console.log(a)},manageDefaultData:function(){this.preferences.getPreferences("/settingsContainer",2).then(function(a){a.get("selection")||a.put("selection","userSettings")})}});return p});
define('built-settings.js',"i18n!orion/settings/nls/messages,orion/browserCompatibility,orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/commands,orion/keyBinding,orion/profile/usersClient,orion/operationsClient,orion/fileClient,orion/searchClient,orion/dialogs,orion/globalCommands,orion/webui/littlelib,orion/config,orion/metatype,orion/settings/settingsRegistry,orion/widgets/settings/SettingsContainer".split(","),function(h,i,g,c,d,f,b,e,a,j,l,k,m,n,r,o,q,p,u){g.startup().then(function(g){var i=
g.serviceRegistry,o=g.preferences,x=g.pluginRegistry,v=new j.OperationsClient(i),E=new c.StatusReportingService(i,v,"statusPane","notifications","notificationArea"),C=new f.CommandRegistry({});new d.ProgressService(i,v,C);var v=new l.FileClient(i),v=new k.Searcher({serviceRegistry:i,commandService:C,fileService:v}),x=new a.UsersClient(i,x),D=new b.Command({name:"Clear themes and editor settings",tooltip:"Clear all settings associated with editor themes and window themes",id:"orion.clearThemes",callback:function(){o.getPreferences("/themes",
2).then(function(a){a.put("styles",null);a.put("selected",null);E.setMessage("Theme settings have been cleared.")})}});C.addCommand(D);C.registerCommandContribution("globalActions","orion.clearThemes",1,null,!0,new e.KeyBinding("t",!0,!0,!0));D=new m.DialogService(i);n.generateBanner("orion-settings",i,C,o,v);v=new p(i,new q.MetaTypeRegistry(i));E.setMessage(h["Loading..."]);(new u({preferences:o,registry:i,preferencesStatusService:E,commandService:C,preferenceDialogService:D,settingsCore:g,pageActions:"pageActions",
userClient:x,settingsRegistry:v},r.node("categoriesContainer"),r.node("settings"))).show();E.setMessage("")})});