/**
 * @license RequireJS domReady 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs 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). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010-2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/**
 * @license RequireJS i18n 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/**
 * @license RequireJS text 1.0.7 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*******************************************************************************
 * @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) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 *		Mihai Sucan (Mozilla Foundation) - fix for Bug#334583 Bug#348471 Bug#349485 Bug#350595 Bug#360726 Bug#361180 Bug#362835 Bug#362428 Bug#362286 Bug#354270 Bug#361474 Bug#363945 Bug#366312 Bug#370584
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * 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
 *               Alex Lakatos - fix for bug#369781
 ******************************************************************************/
/******************************************************************************* 
 * @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) 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: 
 *		Anton McConville (IBM Corporation) - initial API and implementation
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation 
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2010,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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
 *     Andy Clement (vmware) - bug 344614
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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
 * 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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*
 RequireJS domReady 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs 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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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) 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). 


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

 Contributors: IBM Corporation - initial API and implementation

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


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


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


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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 1.0.7 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details

 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) 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). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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). 


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: 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) 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). 


 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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) 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) 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) 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

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://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) 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) 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

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://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) 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

 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

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

 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

 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

 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation
 Mihai Sucan (Mozilla Foundation) - fix for Bug#334583 Bug#348471 Bug#349485 Bug#350595 Bug#360726 Bug#361180 Bug#362835 Bug#362428 Bug#362286 Bug#354270 Bug#361474 Bug#363945 Bug#366312 Bug#370584

 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) 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) 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). 

 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
 Alex Lakatos - fix for bug#369781

 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: 
 Anton McConville (IBM Corporation) - initial API and implementation
 Felipe Heidrich (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) 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) 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) 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
 Andy Clement (vmware) - bug 344614

 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). 

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(){function b(a,b,c){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var d="assert,count,debug,dir,dirxml,error,group,groupEnd,info,profile,profileEnd,time,timeEnd,trace,warn,log".split(","),g=0,h;h=d[g++];)console[h]||function(){var a=h+"";console[a]="log"in console?function(){var b=Array.apply({},arguments);b.unshift(a+":");console.log(b.join(" "))}:function(){};console[a]._fake=!0}()}typeof a=="undefined"&&(a={_scopeName:"dojo",
_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}});var j=a;typeof b=="undefined"&&(b={_scopeName:"dijit"});typeof c=="undefined"&&(c={_scopeName:"dojox"});if(!j._scopeArgs)j._scopeArgs=[a,b,c];j.global=this;j.config={isDebug:!1,debugAtAllCosts:!1};if(d=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var k in d)j.config[k]=d[k];a.locale=j.config.locale;k="$Rev: 24595 $".match(/\d+/);a.version={major:1,minor:6,patch:1,flag:"",
revision:k?+k[0]:NaN,toString:function(){with(j.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",j.version.toString());var l,f,o={};for(g in{toString:1}){l=[];break}a._extraNames=l=l||"hasOwnProperty,valueOf,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,constructor".split(",");f=l.length;a._mixin=function(a,b){var j,c,e;for(j in b)if(c=b[j],!(j in a)||a[j]!==c&&(!(j in o)||
o[j]!==c))a[j]=c;if(f&&b)for(e=0;e<f;++e)if(j=l[e],c=b[j],!(j in a)||a[j]!==c&&(!(j in o)||o[j]!==c))a[j]=c;return a};a.mixin=function(a,b){a||(a={});for(var c=1,e=arguments.length;c<e;c++)j._mixin(a,arguments[c]);return a};a._getProp=function(a,b,c){for(var c=c||j.global,e=0,d;c&&(d=a[e]);e++)e==0&&j._scopeMap[d]&&(d=j._scopeMap[d]),c=d in c?c[d]:b?c[d]={}:void 0;return c};a.setObject=function(a,b,c){var e=a.split("."),a=e.pop();return(c=j._getProp(e,!0,c))&&a?c[a]=b:void 0};a.getObject=function(a,
b,c){return j._getProp(a.split("."),b,c)};a.exists=function(a,b){return j.getObject(a,!1,b)!==void 0};a.eval=function(a){return j.global.eval?j.global.eval(a):eval(a)};j.deprecated=j.experimental=function(){}})();return{dojo:a,dijit:b,dojox:c}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=b();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var f=b();dojo=f.dojo;dijit=f.dijit;dojox=f.dojox}})();
define("domReady",[],function(){function b(a){for(var b=0,j;j=a[b];b++)j(g)}function f(){var a=h,c=j;d&&(a.length&&(h=[],b(a)),k.resourcesDone&&c.length&&(j=[],b(c)))}function a(){d||(d=!0,n&&clearInterval(n),f())}function e(a){d?a(g):h.push(a);return e}var c=typeof window!=="undefined"&&window.document,d=!c,g=c?document:null,h=[],j=[],k=requirejs||require||{},l=k.resourcesReady,n;if("resourcesReady"in k)k.resourcesReady=function(a){l&&l(a);a&&f()};c&&(document.addEventListener?(document.addEventListener("DOMContentLoaded",
a,!1),window.addEventListener("load",a,!1)):window.attachEvent&&(window.attachEvent("onload",a),self===self.top&&(n=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),a())}catch(b){}},30))),document.readyState==="complete"&&a());e.withResources=function(a){d&&k.resourcesDone?a(g):j.push(a);return e};e.version="1.0.0";e.load=function(a,b,j,c){c.isBuild?j(null):e(j)};return e});
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap","domReady"],function(b,f,a){var e="_moduleHasPrefix,_loadPath,_loadUri,_loadUriAndCheck,loaded,_callLoaded,_getModuleSymbols,_loadModule,require,provide,platformRequire,requireIf,requireAfterIf,registerModulePath".split(","),c,d;for(c=0;c<e.length;)d=e[c++],f[d]=function(a){return function(){console.warn("dojo."+a+" not available when using an AMD loader.")}}(d);var g=function(a){var b=[],j;for(j=0;j<a.length;)b.push(a[j++]);return b},
h=function(a,b){return b?typeof b=="string"?function(){a[b]()}:function(){b.call(a)}:a};f.ready=f.addOnLoad=function(b,j){a(j?h(b,j):b)};f.addOnLoad(function(){f.postLoad=f.config.afterOnLoad=!0});if(e=f.config.addOnLoad)f.addOnLoad[e instanceof Array?"apply":"call"](f,e);var j=f._loaders=[],k=function(){var a=j.slice(0);for(Array.prototype.splice.apply(j,[0,j.length]);a.length;)a.shift().call()};j.unshift=function(){Array.prototype.unshift.apply(j,g(arguments));a(k)};j.splice=function(){Array.prototype.splice.apply(j,
g(arguments));a(k)};var l=f._unloaders=[];f.unloaded=function(){for(;l.length;)l.pop().call()};f._onto=function(a,b,j){a.push(j?h(b,j):b)};f._modulesLoaded=function(){};f.loadInit=function(a){a()};f.getL10nName=function(a,b,j){j=j?j.toLowerCase():f.locale;a="i18n!"+a.replace(/\./g,"/");return/root/i.test(j)?a+"/nls/"+b:a+"/nls/"+j+"/"+b};f.requireLocalization=function(a,j,c){b.vendor!="altoviso.com"&&(c=!c||c.toLowerCase()===f.locale?"root":c);return b(f.getL10nName(a,j,c))};f.i18n={getLocalization:f.requireLocalization,
normalizeLocale:function(a){a=a?a.toLowerCase():f.locale;a=="root"&&(a="ROOT");return a}};var n=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,o=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;f._Url=function(){for(var a=arguments,b=[a[0]],j=1;j<a.length;j++)if(a[j]){var c=new f._Url(a[j]+""),b=new f._Url(b[0]+"");if(c.path==""&&!c.scheme&&!c.authority&&!c.query){if(c.fragment!=null)b.fragment=c.fragment;c=b}else if(!c.scheme&&(c.scheme=b.scheme,!c.authority&&(c.authority=
b.authority,c.path.charAt(0)!="/"))){for(var b=(b.path.substring(0,b.path.lastIndexOf("/")+1)+c.path).split("/"),e=0;e<b.length;e++)b[e]=="."?e==b.length-1?b[e]="":(b.splice(e,1),e--):e>0&&!(e==1&&b[0]=="")&&b[e]==".."&&b[e-1]!=".."&&(e==b.length-1?(b.splice(e,1),b[e-1]=""):(b.splice(e-1,2),e-=2));c.path=b.join("/")}b=[];c.scheme&&b.push(c.scheme,":");c.authority&&b.push("//",c.authority);b.push(c.path);c.query&&b.push("?",c.query);c.fragment&&b.push("#",c.fragment)}this.uri=b.join("");a=this.uri.match(n);
this.scheme=a[2]||(a[1]?"":null);this.authority=a[4]||(a[3]?"":null);this.path=a[5];this.query=a[7]||(a[6]?"":null);this.fragment=a[9]||(a[8]?"":null);if(this.authority!=null)a=this.authority.match(o),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null};f._Url.prototype.toString=function(){return this.uri};f.moduleUrl=function(a,j){if(!a)return null;var a=a.replace(/\./g,"/")+(j?"/"+j:""),c="",e=a.match(/(.+)(\.[^\/]*)$/);e&&(a=e[1],c=e[2]);return new f._Url(b.nameToUrl(a,
c))};return f});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(b){if(typeof window!="undefined"){b.isBrowser=!0;b._name="browser";(function(){var a=b;if(document&&document.getElementsByTagName)for(var e=document.getElementsByTagName("script"),c=/dojo(\.xd)?\.js(\W|$)/i,d=0;d<e.length;d++){var g=e[d].getAttribute("src");if(g){var h=g.match(c);if(h){if(!a.config.baseUrl)a.config.baseUrl=g.substring(0,h.index);if(e=e[d].getAttribute("djConfig")||e[d].getAttribute("data-dojo-config")){var e=eval("({ "+
e+" })"),j;for(j in e)b.config[j]=e[j]}break}}}a.baseUrl=a.config.baseUrl;j=navigator;e=j.userAgent;c=j.appVersion;d=parseFloat(c);if(e.indexOf("Opera")>=0)a.isOpera=d;if(e.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=c.indexOf("Konqueror")>=0?d:0;a.isWebKit=parseFloat(e.split("WebKit/")[1])||void 0;a.isChrome=parseFloat(e.split("Chrome/")[1])||void 0;a.isMac=c.indexOf("Macintosh")>=0;if((g=Math.max(c.indexOf("WebKit"),c.indexOf("Safari"),0))&&!b.isChrome)if(a.isSafari=parseFloat(c.split("Version/")[1]),
!a.isSafari||parseFloat(c.substr(g+7))<=419.3)a.isSafari=2;if(e.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=d;if(a.isMoz)a.isFF=parseFloat(e.split("Firefox/")[1]||e.split("Minefield/")[1])||void 0;if(document.all&&!a.isOpera&&(a.isIE=parseFloat(c.split("MSIE ")[1])||void 0,(e=document.documentMode)&&e!=5&&Math.floor(a.isIE)!=e))a.isIE=e;if(b.isIE&&window.location.protocol==="file:")b.config.ieForceActiveXXhr=!0;a.isQuirks=document.compatMode=="BackCompat";a.locale=b.config.locale||
(a.isIE?j.userLanguage:j.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var j,c;if(!b.isIE||!b.config.ieForceActiveXXhr)try{j=new XMLHttpRequest}catch(e){}if(!j)for(var d=0;d<3;++d){var k=a._XMLHTTP_PROGIDS[d];try{j=new ActiveXObject(k)}catch(h){c=h}if(j){a._XMLHTTP_PROGIDS=[k];break}}if(!j)throw Error("XMLHTTP not available: "+c);return j};a._isDocumentOk=function(a){var a=a.status||0,b=location.protocol;return a>=200&&
a<300||a==304||a==1223||!a&&(b=="file:"||b=="chrome:"||b=="chrome-extension:"||b=="app:")};var k=window.location+"",l=(j=document.getElementsByTagName("base"))&&j.length>0;a._getText=function(j,c){var e=a._xhrObj();!l&&b._Url&&(j=(new b._Url(k,j)).toString());a.config.cacheBust&&(j+="",j+=(j.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,""));e.open("GET",j,!1);try{if(e.send(null),!a._isDocumentOk(e)){var d=Error("Unable to load "+j+" status:"+e.status);d.status=e.status;d.responseText=
e.responseText;throw d;}}catch(h){if(c)return null;throw h;}return e.responseText};var f=window,o=function(a,b){var j=f.attachEvent||f.addEventListener,a=f.attachEvent?a:a.substring(2);j(a,function(){b.apply(f,arguments)},!1)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var b=a._windowUnloaders;b.length;)b.pop()();a=null};var m=0;a.addOnWindowUnload=function(b,j){a._onto(a._windowUnloaders,b,j);m||(m=1,o("onunload",a.windowUnloaded))};var p=0;a.addOnUnload=function(j,c){a._onto(a._unloaders,
j,c);p||(p=1,o("onbeforeunload",b.unloaded))}})();b._initFired=!1;b._loadInit=function(){if(b._scrollIntervalId)clearInterval(b._scrollIntervalId),b._scrollIntervalId=0;if(!b._initFired)b._initFired=!0,!b.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",b._loadInit),b._inFlightCount==0&&b._modulesLoaded()};if(!b.config.afterOnLoad)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b._loadInit,!1),window.addEventListener("load",b._loadInit,!1);else if(window.attachEvent&&
(window.attachEvent("onload",b._loadInit),!b.config.skipIeDomLoaded&&self===self.top))b._scrollIntervalId=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),b._loadInit())}catch(a){}},30);if(b.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a="*,group,roundrect,oval,shape,rect,imagedata,path,textpath,text".split(","),e=0,c=1,d=document.createStyleSheet();if(b.isIE>=8)e=1,c=a.length;for(;e<c;++e)d.addRule("v\\:"+a[e],"behavior:url(#default#VML); display:inline-block")})()}catch(f){}}(function(){var a=
b.config.modulePaths;if(a)for(var e in a)b.registerModulePath(e,a[e])})();b.config.isDebug&&b.require("dojo._firebug.firebug");b.config.debugAtAllCosts&&(b.require("dojo._base._loader.loader_debug"),b.require("dojo.i18n"));return b});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(b){return dojo=b});
define("dojo/_base/lang",["dojo/lib/kernel"],function(b){(function(){var f=Object.prototype.toString;b.isString=function(a){return typeof a=="string"||a instanceof String};b.isArray=function(a){return a&&(a instanceof Array||typeof a=="array")};b.isFunction=function(a){return f.call(a)==="[object Function]"};b.isObject=function(a){return a!==void 0&&(a===null||typeof a=="object"||b.isArray(a)||b.isFunction(a))};b.isArrayLike=function(a){return a&&a!==void 0&&!b.isString(a)&&!b.isFunction(a)&&!(a.tagName&&
a.tagName.toLowerCase()=="form")&&(b.isArray(a)||isFinite(a.length))};b.isAlien=function(a){return a&&!b.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))};b.extend=function(a,c){for(var e=1,d=arguments.length;e<d;e++)b._mixin(a.prototype,arguments[e]);return a};b._hitchArgs=function(a,c){var e=b._toArray(arguments,2),d=b.isString(c);return function(){var h=b._toArray(arguments),g=d?(a||b.global)[c]:c;return g&&g.apply(a||this,e.concat(h))}};b.hitch=function(a,c){if(arguments.length>2)return b._hitchArgs.apply(b,
arguments);c||(c=a,a=null);if(b.isString(c)){a=a||b.global;if(!a[c])throw['dojo.hitch: scope["',c,'"] is null (scope="',a,'")'].join("");return function(){return a[c].apply(a,arguments||[])}}return!a?c:function(){return c.apply(a,arguments||[])}};b.delegate=b._delegate=function(){function a(){}return function(c,e){a.prototype=c;var d=new a;a.prototype=null;e&&b._mixin(d,e);return d}}();var a=function(a,b,c){return(c||[]).concat(Array.prototype.slice.call(a,b||0))},e=function(a,b,c){c=c||[];for(b=
b||0;b<a.length;b++)c.push(a[b]);return c};b._toArray=b.isIE?function(b){return(b.item?e:a).apply(this,arguments)}:a;b.partial=function(a){return b.hitch.apply(b,[null].concat(b._toArray(arguments)))};var c=b._extraNames,d=c.length,g={};b.clone=function(a){if(!a||typeof a!="object"||b.isFunction(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return RegExp(a);var e,h,f,o;if(b.isArray(a)){e=[];for(h=0,f=a.length;h<
f;++h)h in a&&e.push(b.clone(a[h]))}else e=a.constructor?new a.constructor:{};for(o in a)if(f=a[o],!(o in e)||e[o]!==f&&(!(o in g)||g[o]!==f))e[o]=b.clone(f);if(d)for(h=0;h<d;++h)if(o=c[h],f=a[o],!(o in e)||e[o]!==f&&(!(o in g)||g[o]!==f))e[o]=f;return e};b.trim=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var h=/\{([^\}]+)\}/g;b.replace=function(a,c,e){return a.replace(e||h,b.isFunction(c)?c:function(a,e){return b.getObject(e,
!1,c)})}})();return b});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var f=function(a,c,d){return[typeof a=="string"?a.split(""):a,c||b.global,typeof d=="string"?new Function("item","index","array",d):d]},a=function(a,b,d,g){for(var d=f(b,g,d),b=d[0],g=0,h=b.length;g<h;++g){var j=!!d[2].call(d[1],b[g],g,b);if(a^j)return j}return a};b.mixin(b,{indexOf:function(a,b,d,g){var h=1,j=a.length||0,k=0;g&&(k=j-1,h=j=-1);d!=void 0&&(k=d);if(g&&k>j||k<j)for(;k!=j;k+=h)if(a[k]==b)return k;
return-1},lastIndexOf:function(a,c,d){return b.indexOf(a,c,d,!0)},forEach:function(a,b,d){if(a&&a.length)for(var b=f(a,d,b),a=b[0],d=0,g=a.length;d<g;++d)b[2].call(b[1],a[d],d,a)},every:function(b,c,d){return a(!0,b,c,d)},some:function(b,c,d){return a(!1,b,c,d)},map:function(a,b,d,g){for(var b=f(a,d,b),a=b[0],g=g?new g:[],d=0,h=a.length;d<h;++d)g.push(b[2].call(b[1],a[d],d,a));return g},filter:function(a,b,d){for(var b=f(a,d,b),a=b[0],d=[],g=0,h=a.length;g<h;++g)b[2].call(b[1],a[g],g,a)&&d.push(a[g]);
return d}})})();return b});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(b){(function(){function f(a,b){throw Error("declare"+(b?" "+b:"")+": "+a);}function a(a,b,c){var e,j,d,h,k,g,l,n=this._inherited=this._inherited||{};typeof a=="string"&&(e=a,a=b,b=c);c=0;h=a.callee;(e=e||h.nom)||f("can't deduce a name to call inherited()",this.declaredClass);k=this.constructor._meta;d=k.bases;l=n.p;if(e!=w){if(n.c!==h&&(l=0,g=d[0],k=g._meta,k.hidden[e]!==h)){(j=k.chains)&&typeof j[e]=="string"&&
f("calling chained method with inherited: "+e,this.declaredClass);do if(k=g._meta,j=g.prototype,k&&(j[e]===h&&j.hasOwnProperty(e)||k.hidden[e]===h))break;while(g=d[++l]);l=g?l:-1}if(g=d[++l])if(j=g.prototype,g._meta&&j.hasOwnProperty(e))c=j[e];else{h=r[e];do if(j=g.prototype,(c=j[e])&&(g._meta?j.hasOwnProperty(e):c!==h))break;while(g=d[++l])}c=g&&c||r[e]}else{if(n.c!==h&&(l=0,(k=d[0]._meta)&&k.ctor!==h)){j=k.chains;for((!j||j.constructor!=="manual")&&f("calling chained constructor with inherited",
this.declaredClass);g=d[++l];)if((k=g._meta)&&k.ctor===h)break;l=g?l:-1}for(;g=d[++l];)if(c=(k=g._meta)?k.ctor:g)break;c=g&&c}n.c=c;n.p=l;if(c)return b===!0?c:c.apply(this,b||a)}function e(a,b){return typeof a=="string"?this.inherited(a,b,!0):this.inherited(a,!0)}function c(a){for(var b=this.constructor._meta.bases,c=0,e=b.length;c<e;++c)if(b[c]===a)return!0;return this instanceof a}function d(a,b){var c,e=0,j=p._extraNames.length;for(c in b)c!=w&&b.hasOwnProperty(c)&&(a[c]=b[c]);for(;e<j;++e)c=p._extraNames[e],
c!=w&&b.hasOwnProperty(c)&&(a[c]=b[c])}function g(a,b){var c,e,j=0,d=p._extraNames.length;for(c in b)if(e=b[c],(e!==r[c]||!(c in r))&&c!=w){if(s.call(e)=="[object Function]")e.nom=c;a[c]=e}for(;j<d;++j)if(c=p._extraNames[j],e=b[c],(e!==r[c]||!(c in r))&&c!=w){if(s.call(e)=="[object Function]")e.nom=c;a[c]=e}return a}function h(a){g(this.prototype,a);return this}function j(a,b){return function(){var t;var c=arguments,e=c,j=c[0],d,h;h=a.length;var k;if(!(this instanceof c.callee))return m(c);if(b&&
(j&&j.preamble||this.preamble)){k=Array(a.length);k[0]=c;for(d=0;;){if(j=c[0])(j=j.preamble)&&(c=j.apply(this,c)||c);j=a[d].prototype;(j=j.hasOwnProperty("preamble")&&j.preamble)&&(c=j.apply(this,c)||c);if(++d==h)break;k[d]=c}}for(d=h-1;d>=0;--d)j=a[d],(t=(h=j._meta)?h.ctor:j,j=t)&&j.apply(this,k?k[d]:c);(j=this.postscript)&&j.apply(this,e)}}function k(a,b){return function(){var c=arguments,e=c,j=c[0];if(!(this instanceof c.callee))return m(c);if(b){if(j)(j=j.preamble)&&(e=j.apply(this,e)||e);(j=
this.preamble)&&j.apply(this,e)}a&&a.apply(this,c);(j=this.postscript)&&j.apply(this,c)}}function l(a){return function(){var t;var b=arguments,c=0,e,j;if(!(this instanceof b.callee))return m(b);for(;e=a[c];++c)if(t=(j=e._meta)?j.ctor:e,e=t){e.apply(this,b);break}(e=this.postscript)&&e.apply(this,b)}}function n(a,b,c){return function(){var e,j,d=0,h=1;c&&(d=b.length-1,h=-1);for(;e=b[d];d+=h)j=e._meta,(e=(j?j.hidden:e.prototype)[a])&&e.apply(this,arguments)}}function o(a){u.prototype=a.prototype;a=
new u;u.prototype=null;return a}function m(a){var b=a.callee,c=o(b);b.apply(c,a);return c}var p=b,q=p._mixin,r=Object.prototype,s=r.toString,u=new Function,v=0,w="constructor";p.declare=function(b,m,x){typeof b!="string"&&(x=m,m=b,b="");var x=x||{},u,A,B,z,J,C,H,M=1,R=m;if(s.call(m)=="[object Array]"){M=b;B=[];z=[{cls:0,refs:[]}];C={};for(var V=1,P=m.length,K=0,D,I,E,F;K<P;++K){(D=m[K])?s.call(D)!="[object Function]"&&f("mixin #"+K+" is not a callable constructor.",M):f("mixin #"+K+" is unknown. Did you use dojo.require to pull it in?",
M);I=D._meta?D._meta.bases:[D];E=0;for(D=I.length-1;D>=0;--D){F=I[D].prototype;if(!F.hasOwnProperty("declaredClass"))F.declaredClass="uniqName_"+v++;F=F.declaredClass;C.hasOwnProperty(F)||(C[F]={count:0,refs:[],cls:I[D]},++V);F=C[F];E&&E!==F&&(F.refs.push(E),++E.count);E=F}++E.count;z[0].refs.push(E)}for(;z.length;){E=z.pop();B.push(E.cls);for(--V;A=E.refs,A.length==1;){E=A[0];if(!E||--E.count){E=0;break}B.push(E.cls);--V}if(E)for(K=0,P=A.length;K<P;++K)E=A[K],--E.count||z.push(E)}V&&f("can't build consistent linearization",
M);D=m[0];B[0]=D?D._meta&&D===B[B.length-D._meta.bases.length]?D._meta.bases.length:1:0;C=B;B=C[0];M=C.length-B;m=C[M]}else C=[0],m?s.call(m)=="[object Function]"?(B=m._meta,C=C.concat(B?B.bases:m)):f("base class is not a callable constructor.",b):m!==null&&f("unknown base class. Did you use dojo.require to pull it in?",b);if(m)for(A=M-1;;--A){u=o(m);if(!A)break;B=C[A];(B._meta?d:q)(u,B.prototype);z=new Function;z.superclass=m;z.prototype=u;m=u.constructor=z}else u={};g(u,x);B=x.constructor;if(B!==
r.constructor)B.nom=w,u.constructor=B;for(A=M-1;A;--A)(B=C[A]._meta)&&B.chains&&(H=q(H||{},B.chains));u["-chains-"]&&(H=q(H||{},u["-chains-"]));B=!H||!H.hasOwnProperty(w);C[0]=z=H&&H.constructor==="manual"?l(C):C.length==1?k(x.constructor,B):j(C,B);z._meta={bases:C,hidden:x,chains:H,parents:R,ctor:x.constructor};z.superclass=m&&m.prototype;z.extend=h;z.prototype=u;u.constructor=z;u.getInherited=e;u.inherited=a;u.isInstanceOf=c;if(b)u.declaredClass=b,p.setObject(b,z);if(H)for(J in H)if(u[J]&&typeof H[J]==
"string"&&J!=w)B=u[J]=n(J,C,H[J]==="after"),B.nom=J;return z};p.safeMixin=g})();return b.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(b){b._listener={getDispatcher:function(){return function(){var b=Array.prototype,a=arguments.callee,e=a._listeners,a=(a=a.target)&&a.apply(this,arguments),c,e=[].concat(e);for(c in e)c in b||e[c].apply(this,arguments);return a}},add:function(f,a,e){var f=f||b.global,c=f[a];if(!c||!c._listeners){var d=b._listener.getDispatcher();d.target=c;d._listeners=[];c=f[a]=d}return c._listeners.push(e)},remove:function(f,a,e){(f=(f||b.global)[a])&&
f._listeners&&e--&&delete f._listeners[e]}};b.connect=function(f,a,e,c,d){var g=arguments,h=[],j=0;h.push(b.isString(g[0])?null:g[j++],g[j++]);var k=g[j+1];h.push(b.isString(k)||b.isFunction(k)?g[j++]:null,g[j++]);for(k=g.length;j<k;j++)h.push(g[j]);return b._connect.apply(this,h)};b._connect=function(f,a,e,c){var d=b._listener,e=d.add(f,a,b.hitch(e,c));return[f,a,e,d]};b.disconnect=function(f){f&&f[0]!==void 0&&(b._disconnect.apply(this,f),delete f[0])};b._disconnect=function(b,a,e,c){c.remove(b,
a,e)};b._topics={};b.subscribe=function(f,a,e){return[f,b._listener.add(b._topics,f,b.hitch(a,e))]};b.unsubscribe=function(f){f&&b._listener.remove(b._topics,f[0],f[1])};b.publish=function(f,a){var e=b._topics[f];e&&e.apply(this,a||[])};b.connectPublisher=function(f,a,e){var c=function(){b.publish(f,arguments)};return e?b.connect(a,e,c):b.connect(a,c)};return b.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var f=function(){},a=Object.freeze||function(){},e=function(){var a,b,e,h,j=!1,k=function(){};return function(l){if(j)a?(b.next={task:l,next:null},b=b.next):b=a={task:l,next:null};else{j=!0;do try{for(;l;){l();if(e)a?b.next=e:a=e,b=h;a?(e=a.next,h=b,l=a.task,a=b=null):l=null}j=!1}catch(f){l=k,console.error(f)}while(j)}}}();b.Deferred=function(c){function d(a){if(j)throw Error("This deferred has already been resolved");
h=a;j=!0;e(g)}function g(){for(var a;!a&&n;){var c=n;n=n.next;if(a=c.progress==f)j=!1;var e=k?c.error:c.resolved;if(e)try{var d=e(h);d&&typeof d.then==="function"?d.then(b.hitch(c.deferred,"resolve"),b.hitch(c.deferred,"reject"),b.hitch(c.deferred,"progress")):(e=a&&d===void 0,a&&!e&&(k=d instanceof Error),c.deferred[e&&k?"reject":"resolve"](e?h:d))}catch(g){c.deferred.reject(g)}else k?c.deferred.reject(h):c.deferred.resolve(h)}}var h,j,k,l,n,o=this.promise={};this.resolve=this.callback=function(a){this.fired=
0;this.results=[a,null];d(a)};this.reject=this.errback=function(a){k=!0;this.fired=1;d(a);this.results=[null,a];if(!a||a.log!==!1)(b.config.deferredOnError||function(a){console.error(a)})(a)};this.progress=function(a){for(var b=n;b;){var c=b.progress;c&&c(a);b=b.next}};this.addCallbacks=function(a,b){this.then(a,b,f);return this};this.then=o.then=function(a,c,d){var h=d==f?this:new b.Deferred(o.cancel),a={resolved:a,error:c,progress:d,deferred:h};n?l=l.next=a:n=l=a;j&&e(g);return h.promise};var m=
this;this.cancel=o.cancel=function(){if(!j){var a=c&&c(m);if(!j)a instanceof Error||(a=Error(a)),a.log=!1,m.reject(a)}};a(o)};b.extend(b.Deferred,{addCallback:function(a){return this.addCallbacks(b.hitch.apply(b,arguments))},addErrback:function(a){return this.addCallbacks(null,b.hitch.apply(b,arguments))},addBoth:function(a){var e=b.hitch.apply(b,arguments);return this.addCallbacks(e,e)},fired:-1})})();b.when=function(b,a,e,c){return b&&typeof b.then==="function"?b.then(a,e,c):a(b)};return b.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(b){b.fromJson=function(b){return eval("("+b+")")};b._escapeString=function(b){return('"'+b.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};b.toJsonIndentStr="\t";b.toJson=function(f,a,e){if(f===void 0)return"undefined";var c=typeof f;if(c=="number"||c=="boolean")return f+"";if(f===null)return"null";if(b.isString(f))return b._escapeString(f);var d=
arguments.callee,g,e=e||"",h=a?e+b.toJsonIndentStr:"";g=f.__json__||f.json;if(b.isFunction(g)&&(g=g.call(f),f!==g))return d(g,a,h);if(f.nodeType&&f.cloneNode)throw Error("Can't serialize DOM nodes");g=a?" ":"";var j=a?"\n":"";if(b.isArray(f))return"["+b.map(f,function(b){b=d(b,a,h);typeof b!="string"&&(b="undefined");return j+h+b}).join(","+g)+j+e+"]";if(c=="function")return null;var c=[],k;for(k in f){var l,n;if(typeof k=="number")l='"'+k+'"';else if(typeof k=="string")l=b._escapeString(k);else continue;
n=d(f[k],a,h);typeof n=="string"&&c.push(j+h+l+":"+g+n)}return"{"+c.join(","+g)+j+e+"}"};return b});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(b){(function(){b.Color=function(b){b&&this.setColor(b)};b.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:b.config.transparentColor||[255,255,255]};b.extend(b.Color,
{r:255,g:255,b:255,a:1,_set:function(b,a,e,c){this.r=b;this.g=a;this.b=e;this.a=c},setColor:function(f){b.isString(f)?b.colorFromString(f,this):b.isArray(f)?b.colorFromArray(f,this):(this._set(f.r,f.g,f.b,f.a),f instanceof b.Color||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+b.map(["r","g","b"],function(b){b=this[b].toString(16);return b.length<2?"0"+
b:b},this).join("")},toCss:function(b){var a=this.r+", "+this.g+", "+this.b;return(b?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(!0)}});b.blendColors=function(f,a,e,c){var d=c||new b.Color;b.forEach(["r","g","b","a"],function(b){d[b]=f[b]+(a[b]-f[b])*e;b!="a"&&(d[b]=Math.round(d[b]))});return d.sanitize()};b.colorFromRgb=function(f,a){var e=f.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return e&&b.colorFromArray(e[1].split(/\s*,\s*/),a)};b.colorFromHex=function(f,
a){var e=a||new b.Color,c=f.length==4?4:8,d=(1<<c)-1,f=Number("0x"+f.substr(1));if(isNaN(f))return null;b.forEach(["b","g","r"],function(a){var b=f&d;f>>=c;e[a]=c==4?17*b:b});e.a=1;return e};b.colorFromArray=function(f,a){var e=a||new b.Color;e._set(Number(f[0]),Number(f[1]),Number(f[2]),Number(f[3]));if(isNaN(e.a))e.a=1;return e.sanitize()};b.colorFromString=function(f,a){var e=b.Color.named[f];return e&&b.colorFromArray(e,a)||b.colorFromRgb(f,a)||b.colorFromHex(f,a)}})();return b.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(b){b.doc=window.document||null;b.body=function(){return b.doc.body||b.doc.getElementsByTagName("body")[0]};b.setContext=function(f,a){b.global=f;b.doc=a};b.withGlobal=function(f,a,e,c){var d=b.global;try{return b.global=f,b.withDoc.call(null,f.document,a,e,c)}finally{b.global=d}};b.withDoc=function(f,a,e,c){var d=b.doc,g=b._bodyLtr,h=b.isQuirks;try{return b.doc=f,delete b._bodyLtr,b.isQuirks=b.doc.compatMode=="BackCompat",e&&typeof a=="string"&&
(a=e[a]),a.apply(e,c||[])}finally{b.doc=d;delete b._bodyLtr;if(g!==void 0)b._bodyLtr=g;b.isQuirks=h}};return b});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(b){(function(){var f=b._event_listener={add:function(a,c,e){if(a){c=f._normalizeEventName(c);e=f._fixCallback(c,e);if(!b.isIE&&(c=="mouseenter"||c=="mouseleave"))var d=e,c=c=="mouseenter"?"mouseover":"mouseout",e=function(c){if(!b.isDescendant(c.relatedTarget,a))return d.call(this,c)};a.addEventListener(c,e,!1);return e}},remove:function(a,c,e){if(a){c=f._normalizeEventName(c);if(!b.isIE&&(c=="mouseenter"||c=="mouseleave"))c=
c=="mouseenter"?"mouseover":"mouseout";a.removeEventListener(c,e,!1)}},_normalizeEventName:function(a){return a.slice(0,2)=="on"?a.slice(2):a},_fixCallback:function(a,b){return a!="keypress"?b:function(a){return b.call(this,f._fixEvent(a,this))}},_fixEvent:function(a){switch(a.type){case "keypress":f._setKeyChar(a)}return a},_setKeyChar:function(a){a.keyChar=a.charCode>=32?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,
191:47,192:96,219:91,220:92,221:93,222:39}};b.fixEvent=function(a,b){return f._fixEvent(a,b)};b.stopEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};var a=b._listener;b._connect=function(c,e,d,h,g){g=c&&(c.nodeType||c.attachEvent||c.addEventListener)?g?2:1:0;d=[b._listener,f,a][g].add(c,e,b.hitch(d,h));return[c,e,d,g]};b._disconnect=function(c,e,d,h){[b._listener,f,a][h].remove(c,e,d)};b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,
META:b.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,
F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:b.isMac&&!b.isAIR?b.isSafari?91:224:17};var e=b.isMac?"metaKey":"ctrlKey";b.isCopyKey=function(a){return a[e]};b.mouseButtons=b.isIE<9||b.isIE&&b.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(a,b){return a.button&b},isLeft:function(a){return a.button&1},isMiddle:function(a){return a.button&4},isRight:function(a){return a.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(a,b){return a.button==
b},isLeft:function(a){return a.button==0},isMiddle:function(a){return a.button==1},isRight:function(a){return a.button==2}};if(b.isIE){var c=function(a,b){try{return a.keyCode=b}catch(c){return 0}},d=b._listener,g=b._ieListenersName="_"+b._scopeName+"_listeners";if(!b.config._allow_leaks)var a=d=b._ie_listener={handlers:[],add:function(a,c,e){var a=a||b.global,d=a[c];if(!d||!d[g]){var f=b._getIeDispatcher();f.target=d&&h.push(d)-1;f[g]=[];d=a[c]=f}return d[g].push(h.push(e)-1)},remove:function(a,
c,e){var j;j=(a=(a||b.global)[c])&&a[g],c=j;a&&c&&e--&&(delete h[c[e]],delete c[e])}},h=d.handlers;b.mixin(f,{add:function(a,b,c){if(a){b=f._normalizeEventName(b);if(b=="onkeypress"){var e=a.onkeydown;if(!e||!e[g]||!e._stealthKeydownHandle){var h=f.add(a,"onkeydown",f._stealthKeyDown),e=a.onkeydown;e._stealthKeydownHandle=h;e._stealthKeydownRefs=1}else e._stealthKeydownRefs++}return d.add(a,b,f._fixCallback(c))}},remove:function(a,b,c){b=f._normalizeEventName(b);d.remove(a,b,c);if(b=="onkeypress")b=
a.onkeydown,--b._stealthKeydownRefs<=0&&(d.remove(a,"onkeydown",b._stealthKeydownHandle),delete b._stealthKeydownHandle)},_normalizeEventName:function(a){return a.slice(0,2)!="on"?"on"+a:a},_nop:function(){},_fixEvent:function(a,c){if(!a)a=(c&&(c.ownerDocument||c.document||c).parentWindow||window).event;if(!a)return a;a.target=a.srcElement;a.currentTarget=c||a.srcElement;a.layerX=a.offsetX;a.layerY=a.offsetY;var e=a.srcElement,e=e&&e.ownerDocument||document,e=b.isIE<6||e.compatMode=="BackCompat"?
e.body:e.documentElement,d=b._getIeDocumentElementOffset();a.pageX=a.clientX+b._fixIeBiDiScrollLeft(e.scrollLeft||0)-d.x;a.pageY=a.clientY+(e.scrollTop||0)-d.y;if(a.type=="mouseover")a.relatedTarget=a.fromElement;if(a.type=="mouseout")a.relatedTarget=a.toElement;if(b.isIE<9||b.isQuirks)a.stopPropagation=f._stopPropagation,a.preventDefault=f._preventDefault;return f._fixKeys(a)},_fixKeys:function(a){switch(a.type){case "keypress":var b="charCode"in a?a.charCode:a.keyCode;b==10?(b=0,a.keyCode=13):b==
13||b==27?b=0:b==3&&(b=99);a.charCode=b;f._setKeyChar(a)}return a},_stealthKeyDown:function(a){var e=a.currentTarget.onkeypress;if(e&&e[g]){var d=a.keyCode,h=(d!=13||b.isIE>=9&&!b.isQuirks)&&d!=32&&d!=27&&(d<48||d>90)&&(d<96||d>111)&&(d<186||d>192)&&(d<219||d>222);if(h||a.ctrlKey){h=h?0:d;if(a.ctrlKey)if(d==3||d==13)return;else h>95&&h<106?h-=48:!a.shiftKey&&h>=65&&h<=90?h+=32:h=f._punctMap[h]||h;d=f._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:h});e.call(a.currentTarget,d);if(b.isIE<9||b.isIE&&
b.isQuirks)a.cancelBubble=d.cancelBubble;a.returnValue=d.returnValue;c(a,d.keyCode)}}},_stopPropagation:function(){this.cancelBubble=!0},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&c(this,0);this.returnValue=!1}});b.stopEvent=b.isIE<9||b.isQuirks?function(a){a=a||window.event;f._stopPropagation.call(a);f._preventDefault.call(a)}:b.stopEvent}f._synthesizeEvent=function(a,c){var e=b.mixin({},a,c);f._setKeyChar(e);e.preventDefault=function(){a.preventDefault()};e.stopPropagation=
function(){a.stopPropagation()};return e};b.isOpera&&b.mixin(f,{_fixEvent:function(a){switch(a.type){case "keypress":var b=a.which;b==3&&(b=99);b=b<41&&!a.shiftKey?0:b;a.ctrlKey&&!a.shiftKey&&b>=65&&b<=90&&(b+=32);return f._synthesizeEvent(a,{charCode:b})}return a}});if(b.isWebKit)f._add=f.add,f._remove=f.remove,b.mixin(f,{add:function(a,b,c){if(a){var e=f._add(a,b,c);if(f._normalizeEventName(b)=="keypress")e._stealthKeyDownHandle=f._add(a,"keydown",function(a){var b=a.keyCode,e=b!=13&&b!=32&&(b<
48||b>90)&&(b<96||b>111)&&(b<186||b>192)&&(b<219||b>222);if(e||a.ctrlKey){e=e?0:b;if(a.ctrlKey)if(b==3||b==13)return;else e>95&&e<106?e-=48:!a.shiftKey&&e>=65&&e<=90?e+=32:e=f._punctMap[e]||e;b=f._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:e});c.call(a.currentTarget,b)}});return e}},remove:function(a,b,c){a&&(c._stealthKeyDownHandle&&f._remove(a,"keydown",c._stealthKeyDownHandle),f._remove(a,b,c))},_fixEvent:function(a){switch(a.type){case "keypress":if(a.faux)break;var b=a.charCode;return f._synthesizeEvent(a,
{charCode:b>=32?b:0,faux:!0})}return a}})})();if(b.isIE)b._ieDispatcher=function(f,a){var e=Array.prototype,c=b._ie_listener.handlers,d=f.callee,g=d[b._ieListenersName],d=(d=c[d.target])&&d.apply(a,f),g=[].concat(g),h;for(h in g){var j=c[g[h]];!(h in e)&&j&&j.apply(a,f)}return d},b._getIeDispatcher=function(){return new Function(b._scopeName+"._ieDispatcher(arguments, this)")},b._event_listener._fixCallback=function(f){var a=b._event_listener._fixEvent;return function(b){return f.call(this,a(b,this))}};
return b.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(b){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(f){}b.byId=b.isIE?function(a,e){if(typeof a!="string")return a;var c=e||b.doc,d=c.getElementById(a);if(d&&(d.attributes.id.value==a||d.id==a))return d;else{c=c.all[a];if(!c||c.nodeName)c=[c];for(var g=0;d=c[g++];)if(d.attributes&&d.attributes.id&&d.attributes.id.value==a||d.id==a)return d}}:function(a,e){return(typeof a=="string"?(e||b.doc).getElementById(a):a)||
null};(function(){var a=b.byId,e=null,c;b.addOnWindowUnload(function(){e=null});b._destroyElement=b.destroy=function(b){b=a(b);try{var d=b.ownerDocument;if(!e||c!=d)e=d.createElement("div"),c=d;e.appendChild(b.parentNode?b.parentNode.removeChild(b):b);e.innerHTML=""}catch(j){}};b.isDescendant=function(b,c){try{b=a(b);for(c=a(c);b;){if(b==c)return!0;b=b.parentNode}}catch(e){}return!1};b.setSelectable=function(c,e){c=a(c);if(b.isMozilla)c.style.MozUserSelect=e?"":"none";else if(b.isKhtml||b.isWebKit)c.style.KhtmlUserSelect=
e?"auto":"none";else if(b.isIE){var d=c.unselectable=e?"":"on";b.query("*",c).forEach("item.unselectable = '"+d+"'")}};var d=function(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)};b.place=function(c,e,j){e=a(e);typeof c=="string"&&(c=/^\s*</.test(c)?b._toDom(c,e.ownerDocument):a(c));if(typeof j=="number"){var h=e.childNodes;!h.length||h.length<=j?e.appendChild(c):d(c,h[j<0?0:j])}else switch(j){case "before":d(c,e);break;case "after":j=c;(h=e.parentNode)&&(h.lastChild==e?h.appendChild(j):h.insertBefore(j,
e.nextSibling));break;case "replace":e.parentNode.replaceChild(c,e);break;case "only":b.empty(e);e.appendChild(c);break;case "first":if(e.firstChild){d(c,e.firstChild);break}default:e.appendChild(c)}return c};b.boxModel="content-box";if(b.isIE)b.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var g;g=b.isWebKit?function(a){var b;if(a.nodeType==1){var c=a.ownerDocument.defaultView;b=c.getComputedStyle(a,null);if(!b&&a.style)a.style.display="",b=c.getComputedStyle(a,null)}return b||
{}}:b.isIE?function(a){return a.nodeType==1?a.currentStyle:{}}:function(a){return a.nodeType==1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};b.getComputedStyle=g;b._toPixelValue=b.isIE?function(a,b){if(!b)return 0;if(b=="medium")return 4;if(b.slice&&b.slice(-2)=="px")return parseFloat(b);with(a){var c=style.left,e=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=b,b=style.pixelLeft}catch(d){b=0}style.left=c;runtimeStyle.left=e}return b}:function(a,b){return parseFloat(b)||
0};var h=b._toPixelValue,j=function(a,b){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return b?{}:null}};b._getOpacity=b.isIE<9?function(a){try{return j(a).Opacity/100}catch(b){return 1}}:function(a){return g(a).opacity};b._setOpacity=b.isIE<9?function(a,c){var e=c*100,d=c==1;a.style.zoom=d?"":1;if(j(a))j(a,1).Opacity=e;else{if(d)return c;a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+e+")"}j(a,1).Enabled=!d;a.nodeName.toLowerCase()=="tr"&&b.query("> td",
a).forEach(function(a){b._setOpacity(a,c)});return c}:function(a,b){return a.style.opacity=b};var k={left:!0,top:!0},f=/margin|padding|width|height|max|min|offset/,n=function(a,c,e){c=c.toLowerCase();if(b.isIE){if(e=="auto"){if(c=="height")return a.offsetHeight;if(c=="width")return a.offsetWidth}if(c=="fontweight")switch(e){case 700:return"bold";default:return"normal"}}c in k||(k[c]=f.test(c));return k[c]?h(a,e):e},o=b.isIE?"styleFloat":"cssFloat",m={cssFloat:o,styleFloat:o,"float":o};b.style=function(c,
e,d){var j=a(c),h=arguments.length,k=e=="opacity",e=m[e]||e;if(h==3)return k?b._setOpacity(j,d):j.style[e]=d;if(h==2&&k)return b._getOpacity(j);k=g(j);if(h==2&&typeof e!="string"){for(var f in e)b.style(c,f,e[f]);return k}return h==1?k:n(j,e,k[e]||j.style[e])};b._getPadExtents=function(a,b){var c=b||g(a),e=h(a,c.paddingLeft),d=h(a,c.paddingTop);return{l:e,t:d,w:e+h(a,c.paddingRight),h:d+h(a,c.paddingBottom)}};b._getBorderExtents=function(a,b){var c=b||g(a),e=c.borderLeftStyle!="none"?h(a,c.borderLeftWidth):
0,d=c.borderTopStyle!="none"?h(a,c.borderTopWidth):0;return{l:e,t:d,w:e+(c.borderRightStyle!="none"?h(a,c.borderRightWidth):0),h:d+(c.borderBottomStyle!="none"?h(a,c.borderBottomWidth):0)}};b._getPadBorderExtents=function(a,c){var e=c||g(a),d=b._getPadExtents(a,e),e=b._getBorderExtents(a,e);return{l:d.l+e.l,t:d.t+e.t,w:d.w+e.w,h:d.h+e.h}};b._getMarginExtents=function(a,c){var e=c||g(a),d=h(a,e.marginLeft),j=h(a,e.marginTop),k=h(a,e.marginRight),f=h(a,e.marginBottom);b.isWebKit&&e.position!="absolute"&&
(k=d);return{l:d,t:j,w:d+k,h:j+f}};b._getMarginBox=function(a,c){var e=c||g(a),d=b._getMarginExtents(a,e),j=a.offsetLeft-d.l,h=a.offsetTop-d.t,k=a.parentNode;if(b.isMoz){var f=parseFloat(e.left),e=parseFloat(e.top);!isNaN(f)&&!isNaN(e)?(j=f,h=e):k&&k.style&&(f=g(k),f.overflow!="visible"&&(k=b._getBorderExtents(k,f),j+=k.l,h+=k.t))}else if((b.isOpera||b.isIE>7&&!b.isQuirks)&&k)k=b._getBorderExtents(k),j-=k.l,h-=k.t;return{l:j,t:h,w:a.offsetWidth+d.w,h:a.offsetHeight+d.h}};b._getMarginSize=function(c,
e){var c=a(c),d=b._getMarginExtents(c,e||g(c)),j=c.getBoundingClientRect();return{w:j.right-j.left+d.w,h:j.bottom-j.top+d.h}};b._getContentBox=function(a,c){var e=c||g(a),d=b._getPadExtents(a,e),e=b._getBorderExtents(a,e),j=a.clientWidth,h;j?(h=a.clientHeight,e.w=e.h=0):(j=a.offsetWidth,h=a.offsetHeight);b.isOpera&&(d.l+=e.l,d.t+=e.t);return{l:d.l,t:d.t,w:j-d.w-e.w,h:h-d.h-e.h}};b._getBorderBox=function(a,c){var e=c||g(a),d=b._getPadExtents(a,e),e=b._getContentBox(a,e);return{l:e.l-d.l,t:e.t-d.t,
w:e.w+d.w,h:e.h+d.h}};b._setBox=function(a,b,c,e,d,j){j=j||"px";a=a.style;if(!isNaN(b))a.left=b+j;if(!isNaN(c))a.top=c+j;if(e>=0)a.width=e+j;if(d>=0)a.height=d+j};b._isButtonTag=function(a){return a.tagName=="BUTTON"||a.tagName=="INPUT"&&(a.getAttribute("type")||"").toUpperCase()=="BUTTON"};b._usesBorderBox=function(a){var c=a.tagName;return b.boxModel=="border-box"||c=="TABLE"||b._isButtonTag(a)};b._setContentSize=function(a,c,e,d){b._usesBorderBox(a)&&(d=b._getPadBorderExtents(a,d),c>=0&&(c+=d.w),
e>=0&&(e+=d.h));b._setBox(a,NaN,NaN,c,e)};b._setMarginBox=function(a,c,e,d,j,h){var k=h||g(a),h=b._usesBorderBox(a)?p:b._getPadBorderExtents(a,k);if(b.isWebKit&&b._isButtonTag(a)){var f=a.style;if(d>=0&&!f.width)f.width="4px";if(j>=0&&!f.height)f.height="4px"}k=b._getMarginExtents(a,k);d>=0&&(d=Math.max(d-h.w-k.w,0));j>=0&&(j=Math.max(j-h.h-k.h,0));b._setBox(a,c,e,d,j)};var p={l:0,t:0,w:0,h:0};b.marginBox=function(c,e){var d=a(c),j=g(d);return!e?b._getMarginBox(d,j):b._setMarginBox(d,e.l,e.t,e.w,
e.h,j)};b.contentBox=function(c,e){var d=a(c),j=g(d);return!e?b._getContentBox(d,j):b._setContentSize(d,e.w,e.h,j)};b._docScroll=function(){var a=b.global;return"pageXOffset"in a?{x:a.pageXOffset,y:a.pageYOffset}:(a=b.isQuirks?b.doc.body:b.doc.documentElement,{x:b._fixIeBiDiScrollLeft(a.scrollLeft||0),y:a.scrollTop||0})};b._isBodyLtr=function(){return"_bodyLtr"in b?b._bodyLtr:b._bodyLtr=(b.body().dir||b.doc.documentElement.dir||"ltr").toLowerCase()=="ltr"};b._getIeDocumentElementOffset=function(){var a=
b.doc.documentElement;if(b.isIE<8){var c=a.getBoundingClientRect(),e=c.left,c=c.top;b.isIE<7&&(e+=a.clientLeft,c+=a.clientTop);return{x:e<0?0:e,y:c<0?0:c}}else return{x:0,y:0}};b._fixIeBiDiScrollLeft=function(a){var c=b.isIE;if(c&&!b._isBodyLtr()){var e=b.isQuirks,d=e?b.doc.body:b.doc.documentElement;c==6&&!e&&b.global.frameElement&&d.scrollHeight>d.clientHeight&&(a+=d.clientLeft);return c<8||e?a+d.clientWidth-d.scrollWidth:-a}return a};b._abs=b.position=function(c,e){var c=a(c),d=b.body(),j=d.parentNode,
k=c.getBoundingClientRect(),k={x:k.left,y:k.top,w:k.right-k.left,h:k.bottom-k.top};b.isIE?(j=b._getIeDocumentElementOffset(),k.x-=j.x+(b.isQuirks?d.clientLeft+d.offsetLeft:0),k.y-=j.y+(b.isQuirks?d.clientTop+d.offsetTop:0)):b.isFF==3&&(d=g(j),k.x-=h(j,d.marginLeft)+h(j,d.borderLeftWidth),k.y-=h(j,d.marginTop)+h(j,d.borderTopWidth));e&&(d=b._docScroll(),k.x+=d.x,k.y+=d.y);return k};b.coords=function(c,e){var d=a(c),j=g(d),j=b._getMarginBox(d,j),d=b.position(d,e);j.x=d.x;j.y=d.y;return j};var q={"class":"className",
"for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},r={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},s={innerHTML:1,className:1,htmlFor:b.isIE,value:1},u=function(a,b){var c=a.getAttributeNode&&a.getAttributeNode(b);return c&&c.specified};b.hasAttr=function(b,c){var e=c.toLowerCase();return s[q[e]||c]||u(a(b),r[e]||c)};var v={},w=0,t=b._scopeName+"attrid",y={col:1,colgroup:1,table:1,
tbody:1,tfoot:1,thead:1,tr:1,title:1};b.attr=function(c,e,d){var c=a(c),j=arguments.length;if(j==2&&typeof e!="string"){for(var h in e)b.attr(c,h,e[h]);return c}var g=e.toLowerCase();h=q[g]||e;var k=s[h],g=r[g]||e;if(j==3){if(h=="style"&&typeof d!="string")b.style(c,d);else if(h=="innerHTML")b.isIE&&c.tagName.toLowerCase()in y?(b.empty(c),c.appendChild(b._toDom(d,c.ownerDocument))):c[h]=d;else if(b.isFunction(d)){j=b.attr(c,t);j||(j=w++,b.attr(c,t,j));v[j]||(v[j]={});if(k=v[j][h])b.disconnect(k);
else try{delete c[h]}catch(f){}v[j][h]=b.connect(c,h,d)}else k||typeof d=="boolean"?c[h]=d:c.setAttribute(g,d);return c}d=c[h];return k&&typeof d!="undefined"?d:h!="href"&&(typeof d=="boolean"||b.isFunction(d))?d:u(c,g)?c.getAttribute(g):null};b.removeAttr=function(b,c){a(b).removeAttribute(r[c.toLowerCase()]||c)};b.getNodeProp=function(b,c){var b=a(b),e=c.toLowerCase(),d=q[e]||c;if(d in b&&d!="href")return b[d];e=r[e]||c;return u(b,e)?b.getAttribute(e):null};b.create=function(c,e,d,j){var h=b.doc;
if(d)d=a(d),h=d.ownerDocument;typeof c=="string"&&(c=h.createElement(c));e&&b.attr(c,e);d&&b.place(c,d,j);return c};b.empty=b.isIE?function(c){for(var c=a(c),e;e=c.lastChild;)b.destroy(e)}:function(b){a(b).innerHTML=""};var x={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},G=/<\s*([\w\:]+)/,A={},B=0,z="__"+b._scopeName+
"ToDomId",J;for(J in x)if(x.hasOwnProperty(J))o=x[J],o.pre=J=="option"?'<select multiple="multiple">':"<"+o.join("><")+">",o.post="</"+o.reverse().join("></")+">";b._toDom=function(a,c){var c=c||b.doc,e=c[z];e||(c[z]=e=++B+"",A[e]=c.createElement("div"));a+="";var d=a.match(G),j=d?d[1].toLowerCase():"",e=A[e];if(d&&x[j]){d=x[j];e.innerHTML=d.pre+a+d.post;for(d=d.length;d;--d)e=e.firstChild}else e.innerHTML=a;if(e.childNodes.length==1)return e.removeChild(e.firstChild);for(j=c.createDocumentFragment();d=
e.firstChild;)j.appendChild(d);return j};b.hasClass=function(b,c){return(" "+a(b).className+" ").indexOf(" "+c+" ")>=0};var C=/\s+/,H=[""],M={},R=function(a){return typeof a=="string"||a instanceof String?a.indexOf(" ")<0?(H[0]=a,H):a.split(C):a||""};b.addClass=function(b,c){var b=a(b),c=R(c),e=b.className,d,e=e?" "+e+" ":" ";d=e.length;for(var j=0,h=c.length,g;j<h;++j)(g=c[j])&&e.indexOf(" "+g+" ")<0&&(e+=g+" ");d<e.length&&(b.className=e.substr(1,e.length-2))};b.removeClass=function(c,e){var c=
a(c),d;if(e!==void 0){e=R(e);d=" "+c.className+" ";for(var j=0,h=e.length;j<h;++j)d=d.replace(" "+e[j]+" "," ");d=b.trim(d)}else d="";c.className!=d&&(c.className=d)};b.replaceClass=function(c,e,d){c=a(c);M.className=c.className;b.removeClass(M,d);b.addClass(M,e);if(c.className!==M.className)c.className=M.className};b.toggleClass=function(a,c,e){e===void 0&&(e=!b.hasClass(a,c));b[e?"addClass":"removeClass"](a,c)}})();return b});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(b){(function(){var f=Array.prototype,a=f.slice,e=f.concat,c=function(c,e,d){c.sort||(c=a.call(c,0));d=d||this._NodeListCtor||b._NodeListCtor;c.constructor=d;b._mixin(c,d.prototype);c._NodeListCtor=d;return e?c._stash(e):c},d=function(c,e,d){e=[0].concat(a.call(e,0));d=d||b.global;return function(a){e[0]=a;return c.apply(d,e)}},g=function(a,b){return function(){this.forEach(d(a,
arguments,b));return this}},h=function(a,b){return function(){return this.map(d(a,arguments,b))}},j=function(a,c,e){return function(){var j=arguments,h=d(a,j,e);if(c.call(e||b.global,j))return this.map(h);this.forEach(h);return this}},k=function(a){return a.length==1&&typeof a[0]=="string"},l=function(a){var b=a.parentNode;b&&b.removeChild(a)};b.NodeList=function(){return c(Array.apply(null,arguments))};var n=b._NodeListCtor=b.NodeList,o=n.prototype;n._wrap=o._wrap=c;n._adaptAsMap=h;n._adaptAsForEach=
g;n._adaptAsFilter=function(a,b){return function(){return this.filter(d(a,arguments,b))}};n._adaptWithCondition=j;b.forEach(["slice","splice"],function(a){var b=f[a];o[a]=function(){return this._wrap(b.apply(this,arguments),a=="slice"?this:null)}});b.forEach(["indexOf","lastIndexOf","every","some"],function(c){var e=b[c];o[c]=function(){return e.apply(b,[this].concat(a.call(arguments,0)))}});b.forEach(["attr","style"],function(a){o[a]=j(b[a],k)});b.forEach("connect,addClass,removeClass,replaceClass,toggleClass,empty,removeAttr".split(","),
function(a){o[a]=g(b[a])});b.extend(b.NodeList,{_normalize:function(a,c){var e=a.parse===!0?!0:!1;if(typeof a.template=="string")var d=a.templateFunc||b.string&&b.string.substitute,a=d?d(a.template,a):a;d=typeof a;d=="string"||d=="number"?(a=b._toDom(a,c&&c.ownerDocument),a=a.nodeType==11?b._toArray(a.childNodes):[a]):b.isArrayLike(a)?b.isArray(a)||(a=b._toArray(a)):a=[a];if(e)a._runParse=!0;return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,c,e,d){if(!(c.nodeType!=1&&e=="only"))for(var j,
h=a.length,g=h-1;g>=0;g--){var k=d?this._cloneNode(a[g]):a[g];if(a._runParse&&b.parser&&b.parser.parse){j||(j=c.ownerDocument.createElement("div"));j.appendChild(k);b.parser.parse(j);for(k=j.firstChild;j.firstChild;)j.removeChild(j.firstChild)}g==h-1?b.place(k,c,e):c.parentNode.insertBefore(k,c);c=k}},_stash:function(a){this._parent=a;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(c){var d=b.isArray(this)?this:a.call(this,0),j=b.map(arguments,
function(c){return c&&!b.isArray(c)&&(typeof NodeList!="undefined"&&c.constructor===NodeList||c.constructor===this._NodeListCtor)?a.call(c,0):c});return this._wrap(e.apply(d,j),this)},map:function(a,c){return this._wrap(b.map(this,a,c),this)},forEach:function(a,c){b.forEach(this,a,c);return this},coords:h(b.coords),position:h(b.position),place:function(a,c){var e=b.query(a)[0];return this.forEach(function(a){b.place(a,e,c)})},orphan:function(a){return(a?b._filterQueryResult(this,a):this).forEach(l)},
adopt:function(a,c){return b.query(a).place(this[0],c)._stash(this)},query:function(a){if(!a)return this;var c=this.map(function(c){return b.query(a,c).filter(function(a){return a!==void 0})});return this._wrap(e.apply([],c),this)},filter:function(a){var c=arguments,e=this,d=0;if(typeof a=="string"){e=b._filterQueryResult(this,c[0]);if(c.length==1)return e._stash(this);d=1}return this._wrap(b.filter(e,c[d],c[d+1]),this)},addContent:function(a,b){for(var a=this._normalize(a,this[0]),c=0,e;e=this[c];c++)this._place(a,
e,b,c>0);return this},instantiate:function(a,c){var e=b.isFunction(a)?a:b.getObject(a),c=c||{};return this.forEach(function(a){new e(c,a)})},at:function(){var a=new this._NodeListCtor;b.forEach(arguments,function(b){b<0&&(b=this.length+b);this[b]&&a.push(this[b])},this);return a._stash(this)}});n.events="blur,focus,change,click,error,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,submit".split(",");b.forEach(n.events,function(a){var b="on"+a;o[b]=
function(a,c){return this.connect(b,a,c)}})})();return b.NodeList});
(function(){var b=function(a){var b=a.trim,c=a.forEach,d=a._NodeListCtor=a.NodeList,g=(a.isWebKit||a.isMozilla)&&a.doc.compatMode=="BackCompat",h=a.doc.firstChild.children?"children":"childNodes",j=!1,k=function(){return!0},f=function(a){a+=">~+".indexOf(a.slice(-1))>=0?" * ":" ";for(var c=function(c,d){return b(a.slice(c,d))},d=[],h=-1,g=-1,k=-1,f=-1,l=-1,C=-1,n=-1,H="",o="",t,m=0,M=a.length,p=null,q=null,R=function(){if(C>=0)p.id=c(C,m).replace(/\\/g,""),C=-1;if(n>=0){var a=n==m?null:c(n,m);p[">~+".indexOf(a)<
0?"tag":"oper"]=a;n=-1}l>=0&&(p.classes.push(c(l+1,m).replace(/\\/g,"")),l=-1)};H=o,o=a.charAt(m),m<M;m++)if(H!="\\")if(p||(t=m,p={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return j?this.otag:this.tag}},n=m),h>=0)if(o=="]"){q.attr?q.matchFor=c(k||h+1,m):q.attr=c(h+1,m);if((h=q.matchFor)&&(h.charAt(0)=='"'||h.charAt(0)=="'"))q.matchFor=h.slice(1,-1);p.attrs.push(q);q=null;h=k=-1}else{if(o=="=")k="|~^$*".indexOf(H)>=0?H:"",q.type=k+o,q.attr=c(h+1,m-k.length),
k=m+1}else if(g>=0){if(o==")"){if(f>=0)q.value=c(g+1,m);f=g=-1}}else if(o=="#")R(),C=m+1;else if(o==".")R(),l=m;else if(o==":")R(),f=m;else if(o=="[")R(),h=m,q={};else if(o=="(")f>=0&&(q={name:c(f+1,m),value:null},p.pseudos.push(q)),g=m;else if(o==" "&&H!=o){R();f>=0&&p.pseudos.push({name:c(f+1,m)});p.loops=p.pseudos.length||p.attrs.length||p.classes.length;p.oquery=p.query=c(t,m);p.otag=p.tag=p.oper?null:p.tag||"*";if(p.tag)p.tag=p.tag.toUpperCase();if(d.length&&d[d.length-1].oper)p.infixOper=d.pop(),
p.query=p.infixOper.query+" "+p.query;d.push(p);p=null}return d},n=function(a,b){return!a?b:!b?a:function(){return a.apply(window,arguments)&&b.apply(window,arguments)}},o=function(a,b){var c=b||[];a&&c.push(a);return c},m=function(a){return 1==a.nodeType},p=function(a,b){return!a?"":b=="class"?a.className||"":b=="for"?a.htmlFor||"":b=="style"?a.style.cssText||"":(j?a.getAttribute(b):a.getAttribute(b,2))||""},q={"*=":function(a,b){return function(c){return p(c,a).indexOf(b)>=0}},"^=":function(a,b){return function(c){return p(c,
a).indexOf(b)==0}},"$=":function(a,b){return function(c){c=" "+p(c,a);return c.lastIndexOf(b)==c.length-b.length}},"~=":function(a,b){var c=" "+b+" ";return function(b){return(" "+p(b,a)+" ").indexOf(c)>=0}},"|=":function(a,b){var c=" "+b+"-";return function(e){e=" "+p(e,a);return e==b||e.indexOf(c)==0}},"=":function(a,b){return function(c){return p(c,a)==b}}},r=typeof a.doc.firstChild.nextElementSibling=="undefined",s=!r?"nextElementSibling":"nextSibling",u=!r?"previousElementSibling":"previousSibling",
v=r?m:k,w=function(a){for(;a=a[u];)if(v(a))return!1;return!0},t=function(a){for(;a=a[s];)if(v(a))return!1;return!0},y=function(a){var b=a.parentNode,c=0,e=b[h],d=a._i||-1,j=b._l||-1;if(!e)return-1;e=e.length;if(j==e&&d>=0&&j>=0)return d;b._l=e;d=-1;for(b=b.firstElementChild||b.firstChild;b;b=b[s])if(v(b))b._i=++c,a===b&&(d=c);return d},x=function(a){return!(y(a)%2)},G=function(a){return y(a)%2},A={checked:function(){return function(a){return!!("checked"in a?a.checked:a.selected)}},"first-child":function(){return w},
"last-child":function(){return t},"only-child":function(){return function(a){return!w(a)?!1:!t(a)?!1:!0}},empty:function(){return function(a){for(var b=a.childNodes,a=a.childNodes.length-1;a>=0;a--){var c=b[a].nodeType;if(c===1||c==3)return!1}return!0}},contains:function(a,b){var c=b.charAt(0);if(c=='"'||c=="'")b=b.slice(1,-1);return function(a){return a.innerHTML.indexOf(b)>=0}},not:function(a,b){var c=f(b)[0],e={el:1};if(c.tag!="*")e.tag=1;if(!c.classes.length)e.classes=1;var d=z(c,e);return function(a){return!d(a)}},
"nth-child":function(a,b){var c=parseInt;if(b=="odd")return G;else if(b=="even")return x;if(b.indexOf("n")!=-1){var e=b.split("n",2),d=e[0]?e[0]=="-"?-1:c(e[0]):1,j=e[1]?c(e[1]):0,h=0,g=-1;d>0?j<0?j=j%d&&d+j%d:j>0&&(j>=d&&(h=j-j%d),j%=d):d<0&&(d*=-1,j>0&&(g=j,j%=d));if(d>0)return function(a){a=y(a);return a>=h&&(g<0||a<=g)&&a%d==j};else b=j}var k=c(b);return function(a){return y(a)==k}}},B=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(a){var b=a.toLowerCase();b=="class"&&(a="className");return function(c){return j?
c.getAttribute(a):c[a]||c[b]}}:function(a){return function(b){return b&&b.getAttribute&&b.hasAttribute(a)}},z=function(a,b){if(!a)return k;var b=b||{},e=null;"el"in b||(e=n(e,m));"tag"in b||a.tag!="*"&&(e=n(e,function(b){return b&&b.tagName==a.getTag()}));"classes"in b||c(a.classes,function(a,b){var c=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");e=n(e,function(a){return c.test(a.className)});e.count=b});"pseudos"in b||c(a.pseudos,function(a){var b=a.name;A[b]&&(e=n(e,A[b](b,a.value)))});"attrs"in b||c(a.attrs,
function(a){var b,c=a.attr;a.type&&q[a.type]?b=q[a.type](c,a.matchFor):c.length&&(b=B(c));b&&(e=n(e,b))});"id"in b||a.id&&(e=n(e,function(b){return!!b&&b.id==a.id}));e||"default"in b||(e=k);return e},J=function(a){return function(b,c,e){for(;b=b[s];)if(!r||m(b)){(!e||N(b,e))&&a(b)&&c.push(b);break}return c}},C=function(a){return function(b,c,e){for(b=b[s];b;){if(v(b)){if(e&&!N(b,e))break;a(b)&&c.push(b)}b=b[s]}return c}},H=function(a){a=a||k;return function(b,c,e){for(var d=0,j=b[h];b=j[d++];)v(b)&&
(!e||N(b,e))&&a(b,d)&&c.push(b);return c}},M={},R=function(b){var c=M[b.query];if(c)return c;var e=b.infixOper,e=e?e.oper:"",d=z(b,{el:1}),j="*"==b.tag,h=a.doc.getElementsByClassName;if(e){h={el:1};if(j)h.tag=1;d=z(b,h);"+"==e?c=J(d):"~"==e?c=C(d):">"==e&&(c=H(d))}else if(b.id)d=!b.loops&&j?k:z(b,{el:1,id:1}),c=function(c,e){var j=a.byId(b.id,c.ownerDocument||c);if(j&&d(j))if(9==c.nodeType)return o(j,e);else{for(var h=j.parentNode;h;){if(h==c)break;h=h.parentNode}if(h)return o(j,e)}};else if(h&&/\{\s*\[native code\]\s*\}/.test(String(h))&&
b.classes.length&&!g)var d=z(b,{el:1,classes:1,id:1}),f=b.classes.join(" "),c=function(a,b,c){for(var b=o(0,b),e,j=0,h=a.getElementsByClassName(f);e=h[j++];)d(e,a)&&N(e,c)&&b.push(e);return b};else!j&&!b.loops?c=function(a,c,e){for(var c=o(0,c),d=0,j=a.getElementsByTagName(b.getTag());a=j[d++];)N(a,e)&&c.push(a);return c}:(d=z(b,{el:1,tag:1,id:1}),c=function(a,c,e){for(var c=o(0,c),j,h=0,g=a.getElementsByTagName(b.getTag());j=g[h++];)d(j,a)&&N(j,e)&&c.push(j);return c});return M[b.query]=c},V={},
P={},K=function(a){var c=f(b(a));if(c.length==1){var j=R(c[0]);return function(a){if(a=j(a,new d))a.nozip=!0;return a}}return function(a){for(var a=o(a),b,e,d=c.length,j,h,g=0;g<d;g++){h=[];b=c[g];e=a.length-1;if(e>0)j={},h.nozip=!0;e=R(b);for(var k=0;b=a[k];k++)e(b,h,j);if(!h.length)break;a=h}return h}},D=navigator.userAgent,D=a.isWebKit&&D.indexOf("WebKit/")>0&&parseFloat(D.split("WebKit/")[1])>528,I=a.isIE?"commentStrip":"nozip",E=!!a.doc.querySelectorAll&&(!a.isSafari||a.isSafari>3.1||D),F=/n\+\d|([^ ])?([>~+])([^ =])?/g,
O=function(a,b,c,e){return c?(b?b+" ":"")+c+(e?" "+e:""):a},$=function(b,c){b=b.replace(F,O);if(E){var e=P[b];if(e&&!c)return e}if(e=V[b])return e;var e=b.charAt(0),d=-1==b.indexOf(" ");b.indexOf("#")>=0&&d&&(c=!0);if(E&&!c&&">~+".indexOf(e)==-1&&(!a.isIE||b.indexOf(":")==-1)&&!(g&&b.indexOf(".")>=0)&&b.indexOf(":contains")==-1&&b.indexOf(":checked")==-1&&b.indexOf("|=")==-1){var j=">~+".indexOf(b.charAt(b.length-1))>=0?b+" *":b;return P[b]=function(a){try{if(!(9==a.nodeType||d))throw"";var c=a.querySelectorAll(j);
c[I]=!0;return c}catch(e){return $(b,!0)(a)}}}else{var h=b.split(/\s*,\s*/);return V[b]=h.length<2?K(b):function(a){for(var b=0,c=[],e;e=h[b++];)c=c.concat(K(e)(a));return c}}},U=0,L=a.isIE?function(a){return j?a.getAttribute("_uid")||a.setAttribute("_uid",++U)||U:a.uniqueID}:function(a){return a._uid||(a._uid=++U)},N=function(a,b){if(!b)return 1;var c=L(a);return!b[c]?b[c]=1:0},Z=function(b){if(b&&b.nozip)return d._wrap?d._wrap(b):b;var c=new d;if(!b||!b.length)return c;b[0]&&c.push(b[0]);if(b.length<
2)return c;U++;if(a.isIE&&j){var e=U+"";b[0].setAttribute("_zipIdx",e);for(var h=1,g;g=b[h];h++)b[h].getAttribute("_zipIdx")!=e&&c.push(g),g.setAttribute("_zipIdx",e)}else if(a.isIE&&b.commentStrip)try{for(h=1;g=b[h];h++)m(g)&&c.push(g)}catch(k){}else{b[0]&&(b[0]._zipIdx=U);for(h=1;g=b[h];h++)b[h]._zipIdx!=U&&c.push(g),g._zipIdx=U}return c};a.query=function(b,c){d=a._NodeListCtor;if(!b)return new d;if(b.constructor==d)return b;if(typeof b!="string")return new d(b);if(typeof c=="string"&&(c=a.byId(c),
!c))return new d;var c=c||a.doc,e=c.ownerDocument||c.documentElement;j=c.contentType&&c.contentType=="application/xml"||a.isOpera&&(c.doctype||e.toString()=="[object XMLDocument]")||!!e&&(a.isIE?e.xml:c.xmlVersion||e.xmlVersion);return(e=$(b)(c))&&e.nozip&&!d._wrap?e:Z(e)};a.query.pseudos=A;a._filterQueryResult=function(b,c,e){for(var d=new a._NodeListCtor,j=f(c),j=j.length==1&&!/[^\w#\.]/.test(c)?z(j[0]):function(a){return dojo.query(c,e).indexOf(a)!=-1},h=0,g;g=b[h];h++)j(g)&&d.push(g);return d}},
f=function(){acme={trim:function(a){for(var a=a.replace(/^\s+/,""),b=a.length-1;b>=0;b--)if(/\S/.test(a.charAt(b))){a=a.substring(0,b+1);break}return a},forEach:function(a,b,c){if(a&&a.length)for(var e=0,k=a.length;e<k;++e)b.call(c||window,a[e],e,a)},byId:function(a,b){return typeof a=="string"?(b||document).getElementById(a):a},doc:document,NodeList:Array};var a=navigator,b=a.userAgent,a=a.appVersion,c=parseFloat(a);acme.isOpera=b.indexOf("Opera")>=0?c:void 0;acme.isKhtml=a.indexOf("Konqueror")>=
0?c:void 0;acme.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0;acme.isChrome=parseFloat(b.split("Chrome/")[1])||void 0;if((b=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome)if(acme.isSafari=parseFloat(a.split("Version/")[1]),!acme.isSafari||parseFloat(a.substr(b+7))<=419.3)acme.isSafari=2;if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||void 0;Array._wrap=function(a){return a};return acme};typeof define=="function"&&define("dojo/_base/query",["dojo/lib/kernel",
"dojo/_base/NodeList","dojo/_base/lang","dojo/_base/window"],function(a){b(this.queryPortability||this.acme||a)});typeof define!="function"&&(this.dojo?(dojo.provide("dojo._base.query"),dojo.require("dojo._base.NodeList"),dojo.require("dojo._base.lang"),b(this.queryPortability||this.acme||dojo)):b(this.queryPortability||this.acme||f()))})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(b){(function(){var f=b.config;b.fieldToObject=function(a){var c=null;if(a=b.byId(a)){var e=a.name,d=(a.type||"").toLowerCase();if(e&&d&&!a.disabled)if(d=="radio"||d=="checkbox"){if(a.checked)c=a.value}else a.multiple?(c=[],b.query("option",a).forEach(function(a){a.selected&&c.push(a.value)})):c=a.value}return c};b.formToObject=function(a){var c={};b.forEach(b.byId(a).elements,
function(a){var e=a.name,d=(a.type||"").toLowerCase();if(e&&d&&"file|submit|image|reset|button|".indexOf(d)==-1&&!a.disabled){a=b.fieldToObject(a);if(a!==null){var j=c[e];typeof j=="string"?c[e]=[j,a]:b.isArray(j)?j.push(a):c[e]=a}if(d=="image")c[e+".x"]=c[e+".y"]=c[e].x=c[e].y=0}});return c};b.objectToQuery=function(a){var c=encodeURIComponent,e=[],d={},j;for(j in a){var h=a[j];if(h!=d[j]){var g=c(j)+"=";if(b.isArray(h))for(var k=0;k<h.length;k++)e.push(g+c(h[k]));else e.push(g+c(h))}}return e.join("&")};
b.formToQuery=function(a){return b.objectToQuery(b.formToObject(a))};b.formToJson=function(a,c){return b.toJson(b.formToObject(a),c)};b.queryToObject=function(a){var c={},a=a.split("&"),e=decodeURIComponent;b.forEach(a,function(a){if(a.length){var d=a.split("="),a=e(d.shift()),d=e(d.join("="));typeof c[a]=="string"&&(c[a]=[c[a]]);b.isArray(c[a])?c[a].push(d):c[a]=d}});return c};b._blockAsync=!1;var a=b._contentHandlers=b.contentHandlers={text:function(a){return a.responseText},json:function(a){return b.fromJson(a.responseText||
null)},"json-comment-filtered":function(a){b.config.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");var a=a.responseText,c=a.indexOf("/*"),e=a.lastIndexOf("*/");if(c==-1||e==-1)throw Error("JSON was not comment filtered");return b.fromJson(a.substring(c+
2,e))},javascript:function(a){return b.eval(a.responseText)},xml:function(a){var c=a.responseXML;if(b.isIE&&(!c||!c.documentElement)){var e=function(a){return"MSXML"+a+".DOMDocument"},e=["Microsoft.XMLDOM",e(6),e(4),e(3),e(2)];b.some(e,function(b){try{var e=new ActiveXObject(b);e.async=!1;e.loadXML(a.responseText);c=e}catch(d){return!1}return!0})}return c},"json-comment-optional":function(b){return b.responseText&&/^[^{\[]*\/\*/.test(b.responseText)?a["json-comment-filtered"](b):a.json(b)}};b._ioSetArgs=
function(a,c,e,d){var j={args:a,url:a.url},h=null;if(a.form){var h=b.byId(a.form),g=h.getAttributeNode("action");j.url=j.url||(g?g.value:null);h=b.formToObject(h)}g=[{}];h&&g.push(h);a.content&&g.push(a.content);a.preventCache&&g.push({"dojo.preventCache":(new Date).valueOf()});j.query=b.objectToQuery(b.mixin.apply(null,g));j.handleAs=a.handleAs||"text";var k=new b.Deferred(c);k.addCallbacks(e,function(a){return d(a,k)});var l=a.load;l&&b.isFunction(l)&&k.addCallback(function(b){return l.call(a,b,
j)});var n=a.error;n&&b.isFunction(n)&&k.addErrback(function(b){return n.call(a,b,j)});var o=a.handle;o&&b.isFunction(o)&&k.addBoth(function(b){return o.call(a,b,j)});f.ioPublish&&b.publish&&j.args.ioPublish!==!1&&(k.addCallbacks(function(a){b.publish("/dojo/io/load",[k,a]);return a},function(a){b.publish("/dojo/io/error",[k,a]);return a}),k.addBoth(function(a){b.publish("/dojo/io/done",[k,a]);return a}));k.ioArgs=j;return k};var e=function(a){a.canceled=!0;var b=a.ioArgs.xhr,c=typeof b.abort;(c==
"function"||c=="object"||c=="unknown")&&b.abort();a=a.ioArgs.error;if(!a)a=Error("xhr cancelled"),a.dojoType="cancel";return a},c=function(b){b=a[b.ioArgs.handleAs](b.ioArgs.xhr);return b===void 0?null:b},d=function(a,b){b.ioArgs.args.failOk||console.error(a);return a},g=null,h=[],j=0,k=function(a){j<=0&&(j=0,f.ioPublish&&b.publish&&(!a||a&&a.ioArgs.args.ioPublish!==!1)&&b.publish("/dojo/io/stop"))},l=function(){var a=(new Date).getTime();if(!b._blockAsync)for(var c=0,e;c<h.length&&(e=h[c]);c++){var d=
e.dfd,f=function(){if(!d||d.canceled||!e.validCheck(d))h.splice(c--,1),j-=1;else if(e.ioCheck(d))h.splice(c--,1),e.resHandle(d),j-=1;else if(d.startTime&&d.startTime+(d.ioArgs.args.timeout||0)<a){h.splice(c--,1);var b=Error("timeout exceeded");b.dojoType="timeout";d.errback(b);d.cancel();j-=1}};if(b.config.debugAtAllCosts)f.call(this);else try{f.call(this)}catch(l){d.errback(l)}}k(d);h.length||(clearInterval(g),g=null)};b._ioCancelAll=function(){try{b.forEach(h,function(a){try{a.dfd.cancel()}catch(b){}})}catch(a){}};
b.isIE&&b.addOnWindowUnload(b._ioCancelAll);b._ioNotifyStart=function(a){f.ioPublish&&b.publish&&a.ioArgs.args.ioPublish!==!1&&(j||b.publish("/dojo/io/start"),j+=1,b.publish("/dojo/io/send",[a]))};b._ioWatch=function(a,b,c,e){var d=a.ioArgs.args;if(d.timeout)a.startTime=(new Date).getTime();h.push({dfd:a,validCheck:b,ioCheck:c,resHandle:e});g||(g=setInterval(l,50));d.sync&&l()};var n=function(a){return a.ioArgs.xhr.readyState},o=function(a){return 4==a.ioArgs.xhr.readyState},m=function(a){var c=a.ioArgs.xhr;
if(b._isDocumentOk(c))a.callback(a);else{var e=Error("Unable to load "+a.ioArgs.url+" status:"+c.status);e.status=c.status;e.responseText=c.responseText;a.errback(e)}};b._ioAddQueryToUrl=function(a){if(a.query.length)a.url+=(a.url.indexOf("?")==-1?"?":"&")+a.query,a.query=null};b.xhr=function(a,j,h){var g=b._ioSetArgs(j,e,c,d),k=g.ioArgs,f=k.xhr=b._xhrObj(k.args);if(!f)return g.cancel(),g;"postData"in j?k.query=j.postData:"putData"in j?k.query=j.putData:"rawBody"in j?k.query=j.rawBody:(arguments.length>
2&&!h||"POST|PUT".indexOf(a.toUpperCase())==-1)&&b._ioAddQueryToUrl(k);f.open(a,k.url,j.sync!==!0,j.user||void 0,j.password||void 0);if(j.headers)for(var l in j.headers)l.toLowerCase()==="content-type"&&!j.contentType?j.contentType=j.headers[l]:j.headers[l]&&f.setRequestHeader(l,j.headers[l]);f.setRequestHeader("Content-Type",j.contentType||"application/x-www-form-urlencoded");(!j.headers||!("X-Requested-With"in j.headers))&&f.setRequestHeader("X-Requested-With","XMLHttpRequest");b._ioNotifyStart(g);
if(b.config.debugAtAllCosts)f.send(k.query);else try{f.send(k.query)}catch(t){k.error=t,g.cancel()}b._ioWatch(g,n,o,m);return g};b.xhrGet=function(a){return b.xhr("GET",a)};b.rawXhrPost=b.xhrPost=function(a){return b.xhr("POST",a,!0)};b.rawXhrPut=b.xhrPut=function(a){return b.xhr("PUT",a,!0)};b.xhrDelete=function(a){return b.xhr("DELETE",a)}})();return b.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(b){(function(){var f=b._mixin;b._Line=function(a,b){this.start=a;this.end=b};b._Line.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};b.Animation=function(a){f(this,a);if(b.isArray(this.curve))this.curve=new b._Line(this.curve[0],this.curve[1])};b._Animation=b.Animation;b.extend(b.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var a=this._percent,b=this.easing;return b?b(a):a},_fire:function(a,c){var e=c||[];if(this[a])if(b.config.debugAtAllCosts)this[a].apply(this,e);else try{this[a].apply(this,e)}catch(d){console.error("exception in animation handler for:",a),console.error(d)}return this},play:function(a,c){this._delayTimer&&this._clearTimer();if(c)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);var e=
a||this.delay,d=b.hitch(this,"_play",c);if(e>0)return this._delayTimer=setTimeout(d,e),this;d();return this},_play:function(){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;var a=this.curve.getValue(this._getStep());if(!this._percent){if(!this._startRepeatCount)this._startRepeatCount=this.repeat;this._fire("onBegin",[a])}this._fire("onPlay",[a]);this._cycle();return this},pause:function(){this._delayTimer&&
this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(a,b){this._stopTimer();this._active=this._paused=!0;this._percent=a;b&&this.play();return this},stop:function(a){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();if(a)this._percent=1;this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},status:function(){return this._active?
this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var a=((new Date).valueOf()-this._startTime)/this.duration;a>=1&&(a=1);this._percent=a;this.easing&&(a=this.easing(a));this._fire("onAnimate",[this.curve.getValue(a)]);if(this._percent<1)this._startTimer();else{this._active=!1;if(this.repeat>0)this.repeat--,this.play(null,!0);else if(this.repeat==-1)this.play(null,!0);else if(this._startRepeatCount)this.repeat=this._startRepeatCount,this._startRepeatCount=0;this._percent=
0;this._fire("onEnd",[this.node]);!this.repeat&&this._stopTimer()}}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var a=0,e=null,c={run:function(){}};b.extend(b.Animation,{_startTimer:function(){if(!this._timer)this._timer=b.connect(c,"run",this,"_cycle"),a++;e||(e=setInterval(b.hitch(c,"run"),this.rate))},_stopTimer:function(){if(this._timer)b.disconnect(this._timer),this._timer=null,a--;a<=0&&(clearInterval(e),e=null,a=0)}});var d=b.isIE?function(a){var c=
a.style;if(!c.width.length&&b.style(a,"width")=="auto")c.width="auto"}:function(){};b._fade=function(a){a.node=b.byId(a.node);var c=f({properties:{}},a),a=c.properties.opacity={};a.start=!("start"in c)?function(){return+b.style(c.node,"opacity")||0}:c.start;a.end=c.end;a=b.animateProperty(c);b.connect(a,"beforeBegin",b.partial(d,c.node));return a};b.fadeIn=function(a){return b._fade(f({end:1},a))};b.fadeOut=function(a){return b._fade(f({end:0},a))};b._defaultEasing=function(a){return 0.5+Math.sin((a+
1.5)*Math.PI)/2};var g=function(a){this._properties=a;for(var c in a){var e=a[c];if(e.start instanceof b.Color)e.tempColor=new b.Color}};g.prototype.getValue=function(a){var c={},e;for(e in this._properties){var d=this._properties[e],g=d.start;g instanceof b.Color?c[e]=b.blendColors(g,d.end,a,d.tempColor).toCss():b.isArray(g)||(c[e]=(d.end-g)*a+g+(e!="opacity"?d.units||"px":0))}return c};b.animateProperty=function(a){var c=a.node=b.byId(a.node);if(!a.easing)a.easing=b._defaultEasing;a=new b.Animation(a);
b.connect(a,"beforeBegin",a,function(){var a={},e;for(e in this.properties){if(e=="width"||e=="height")this.node.display="block";var d=this.properties[e];b.isFunction(d)&&(d=d(c));d=a[e]=f({},b.isObject(d)?d:{end:d});if(b.isFunction(d.start))d.start=d.start(c);if(b.isFunction(d.end))d.end=d.end(c);var h=e.toLowerCase().indexOf("color")>=0,m=function(a,c){var e={height:a.offsetHeight,width:a.offsetWidth}[c];if(e!==void 0)return e;e=b.style(a,c);return c=="opacity"?+e:h?e:parseFloat(e)};if("end"in d){if(!("start"in
d))d.start=m(c,e)}else d.end=m(c,e);h?(d.start=new b.Color(d.start),d.end=new b.Color(d.end)):d.start=e=="opacity"?+d.start:parseFloat(d.start)}this.curve=new g(a)});b.connect(a,"onAnimate",b.hitch(b,"style",a.node));return a};b.anim=function(a,c,e,d,g,f){return b.animateProperty({node:a,duration:e||b.Animation.prototype.duration,properties:c,easing:d,onEnd:g}).play(f||0)}})();return b.animateProperty});
define("dojo","dojo/lib/kernel,dojo/_base/lang,dojo/_base/array,dojo/_base/declare,dojo/_base/connect,dojo/_base/Deferred,dojo/_base/json,dojo/_base/Color,dojo/_base/window,dojo/_base/event,dojo/_base/html,dojo/_base/NodeList,dojo/_base/query,dojo/_base/xhr,dojo/_base/fx".split(","),function(b){return b});
(function(b,f){typeof define==="function"&&define.amd?define("orion/Deferred",[],f):typeof exports==="object"?module.exports=f():(b.orion=b.orion||{},b.orion.Deferred=f())})(this,function(){function b(a){if(h)e?(c.next={fn:a,next:null},c=c.next):c=e={fn:a,next:null};else{h=!0;do{for(;a;){a();if(d)e?c.next=d:e=d,c=g;e?(d=e.next,g=c,a=e.fn,e=c=null):a=null}h=!1}while(h)}}function f(a){return function(){a.apply(null,arguments)}}function a(c){function e(){for(;m;){var a=m;m=m.next;var b=a.deferred,c=
r.isResolved()?"resolve":"reject";if(a[c])try{var d=a[c](h);d&&typeof d.then==="function"?(a.cancel=d.cancel,d.then(f(b.resolve),f(b.reject),b.progress)):b.resolve(d)}catch(j){b.reject(j)}else b[c](h)}m=p=null}function d(a){if(g){if(a)throw Error("already "+g);return!0}return!1}var h,g,m,p,q=!1,r=this;this.reject=function(a,c){d(c)||(g="rejected",h=a,m&&b(e));return r.promise};this.resolve=function(a,c){d(c)||(g="resolved",h=a,m&&b(e));return r.promise};this.progress=function(a,b){if(!d(b))for(var c=
m;c;)c.progress&&c.progress(a),c=c.next;return r.promise};this.cancel=function(a,h){if(!d(h))return q=!0,c&&(a=c(a)||a),a=a||Error("canceled"),b(r.reject.bind(r,a)),a;for(var g=m;g;){if(g.canceling)return delete g.canceling,e(),g.cancel&&g.cancel(a);g=g.next}};this.then=function(c,d,j){var h={resolve:c,reject:d,progress:j,cancel:this.cancel,deferred:new a(function(a){h.canceling=!0;return h.cancel&&h.cancel(a)})};m?p.next=h:m=h;p=h;g&&b(e);return h.deferred.promise};this.isResolved=function(){return g===
"resolved"};this.isRejected=function(){return g==="rejected"};this.isFulfilled=function(){return!!g};this.isCanceled=function(){return q};this.promise={then:this.then,cancel:this.cancel,isResolved:this.isResolved,isRejected:this.isRejected,isFulfilled:this.isFulfilled,isCanceled:this.isCanceled};this.notify=this.progress;this.state=function(){return g||"pending"};this.promise.state=this.state}var e,c,d,g,h=!1;a.all=function(b,c){function e(a,b){f.isFulfilled()||(g[a]=b,--h===0&&f.resolve(g))}function d(a,
b){if(!f.isFulfilled()){if(c)try{e(a,c(b));return}catch(j){b=j}f.reject(b)}}var h=b.length,g=[],f=new a(function(a){b.forEach(function(b){b.cancel&&b.cancel(a)})});h===0?f.resolve(g):b.forEach(function(a,b){a.then(e.bind(null,b),d.bind(null,b))});return f.promise};a.when=function(b,c,e,d){var h;if(!(b&&typeof b.then==="function"))h=new a,h.resolve(b),b=h.promise;return b.then(c,e,d)};return a});
define("orion/EventTarget",[],function(){function b(){this._namedListeners={}}b.prototype={dispatchEvent:function(b){if(!b.type)throw Error("unspecified type");var a=this._namedListeners[b.type];a&&a.forEach(function(a){try{typeof a==="function"?a(b):a.handleEvent(b)}catch(c){typeof console!=="undefined"&&console.log(c)}});return!b.defaultPrevented},addEventListener:function(b,a){if(typeof a==="function"||a.handleEvent)this._namedListeners[b]=this._namedListeners[b]||[],this._namedListeners[b].push(a)},
removeEventListener:function(b,a){var e=this._namedListeners[b];if(e)for(var c=0;c<e.length;c++)if(e[c]===a){e.length===1?delete this._namedListeners[b]:e.splice(c,1);break}}};b.prototype.constructor=b;b.attach=function(f){var a=new b;f.dispatchEvent=a.dispatchEvent.bind(a);f.addEventListener=a.addEventListener.bind(a);f.removeEventListener=a.removeEventListener.bind(a)};return b});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(b,f){function a(a,b,c){this._properties=c||{};this._properties["service.id"]=a;this._properties.objectClass=b;this._properties["service.names"]=b}function e(a,b,c){this._serviceId=a;this._serviceReference=b;this._internalRegistry=c}function c(a,c){function e(d){return function(){var e;try{if(!c())throw Error("Service was unregistered");var g=a[d].apply(a,Array.prototype.slice.call(arguments));if(g&&typeof g.then==="function")return g;
else e=new b,e.resolve(g)}catch(k){e=new b,e.reject(k)}return e.promise}}for(var d in a)typeof a[d]==="function"&&(this[d]=e(d))}function d(a,b){this.type=a;this.serviceReference=b}function g(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new f;var a=this;this._internalRegistry={isRegistered:function(b){return a._entries[b]?!0:!1},unregisterService:function(b){var c=a._entries[b];if(!c)throw Error("already unregistered");var e=c.reference;a._serviceEventTarget.dispatchEvent(new d("unregistering",
e));a._entries[b]=null;e.getProperty("objectClass").forEach(function(b){for(var c=a._namedReferences[b],d=0;d<c.length;d++)if(c[d]===e){c.length===1?delete a._namedReferences[b]:c.splice(d,1);break}})},modifyService:function(b){b=a._entries[b];if(!b)throw Error("already unregistered");a._serviceEventTarget.dispatchEvent(new d("modified",b.reference))}}}a.prototype={getPropertyKeys:function(){var a=[],b;for(b in this._properties)this._properties.hasOwnProperty(b)&&a.push(b);return a},getProperty:function(a){return this._properties[a]}};
a.prototype.constructor=a;e.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(a){var b=this._serviceReference._properties;this._serviceReference._properties=a||{};a["service.id"]=this._serviceId;a.objectClass=b.objectClass;a["service.names"]=b["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
e.prototype.constructor=e;g.prototype={getService:function(a){var b;if(typeof a==="string")(a=this._namedReferences[a])&&a.some(function(a){b=this._entries[a.getProperty("service.id")].service;return!!b},this);else if(a=this._entries[a.getProperty("service.id")])b=a.service;return b||null},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:[];var b=[];this._entries.forEach(function(a){a&&b.push(a.reference)});return b},registerService:function(b,j,g){if(typeof j===
"undefined"||j===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var f=this._entries.length,n=new a(f,b,g),o=this._namedReferences;b.forEach(function(a){o[a]=o[a]||[];o[a].push(n)});b=new c(j,this._internalRegistry.isRegistered.bind(null,f));this._entries.push({reference:n,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new d("registered",n));return new e(f,n,b)},addEventListener:function(a,b){this._serviceEventTarget.addEventListener(a,
b)},removeEventListener:function(a,b){this._serviceEventTarget.removeEventListener(a,b)}};g.prototype.constructor=g;return{ServiceRegistry:g}});
define("orion/xhr",["orion/Deferred"],function(b){function f(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()})}function a(a,b,d,g){var h=typeof d.response!=="undefined"?d.response:d.responseText,a={args:b,response:h,responseText:typeof h==="string"?h:null,status:d.status,url:a,xhr:d};if(typeof g!=="undefined")a.error=g;return a}return function(e,c,d){var d=d||{},g=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,h=
new b,j=d.headers||{},k=d.log||!1,l,n;typeof j["X-Requested-With"]==="undefined"&&(j["X-Requested-With"]="XMLHttpRequest");if(d.query&&typeof d.query==="object"){var o=d.query,m=Object.keys(o),p=[];for(n=0;n<m.length;n++){var q=m[n],r=o[q];p.push(f(q)+"="+f(r))}p.length&&(o=c.split("#"),o[0]+=(o[0].indexOf("?")===-1?"?":"&")+p.join("&"),c=o.join("#"))}if(typeof d.data!=="undefined"&&(e==="POST"||e==="PUT"))l=d.data;if(typeof d.responseType==="string")g.responseType=d.responseType;g.onreadystatechange=
function(){if(g.readyState===4){var b=a(c,d,g),e=g.status;200<=e&&e<400?h.resolve(b):(k&&typeof console!=="undefined"&&console.log(Error(g.statusText)),h.reject(b))}};try{g.open(e,c,!0);if(typeof d.timeout==="number")typeof g.timeout==="number"?(g.timeout=d.timeout,g.addEventListener("timeout",function(){h.reject(a(c,d,g,"Timeout exceeded"))})):setTimeout(function(){h.state()!=="resolved"&&h.state()!=="rejected"&&h.reject(a(c,d,g,"Timeout exceeded"))},d.timeout);var s=Object.keys(j);for(n=0;n<s.length;n++){var u=
s[n];g.setRequestHeader(u,j[u])}g.send(l)}catch(v){h.reject(a(c,d,g,v))}return h}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(b,f,a){function e(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function c(a,b){return{get:function(c,e){if(b===0)return null;var d=localStorage.getItem(a+c);if(d===null)return null;d=JSON.parse(d);return e||b===-1||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(c,e){if(b!==0){if(b!==-1)e._expires=(new Date).getTime()+1E3*b;
if(Object.keys(e).length===0)localStorage.removeItem(a+c);else{var d=JSON.stringify(e);localStorage.setItem(a+c,d);delete e._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function d(a){this._currentPromises={};this._cache=new c("/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 g(a){this._location=
a;this._currentPromise=null;this._cache=new c("/orion/preferences/default",3600)}function h(){this._cache=new c("/orion/preferences/local",-1)}function j(a,c){this._userProvider=new d(a);this._localProvider=new h;c=c||"defaults.pref";c.indexOf("://")===-1&&(c=b.toUrl(c));this._defaultsProvider=new g(c);this._serviceRegistration=a.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[b].put(this._name,c))}this._dirty=[];return f.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],c;for(c in b)b.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
b[c])}}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 c=this._stores[0];if(c[a]!==b)c[a]=b,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._cached=null,this._scheduleFlush(c),!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,c=[],e=0;e<this._providers.length;++e)c.push(this._providers[e].get(this._name,a).then(function(a){return function(c){b._stores[a]=c}}(e)));return f.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};d.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new f,e=null;
b?this._cache.remove(a):e=this._cache.get(a);if(e!==null)c.resolve(e);else{this._currentPromises[a]=c;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},d._cache.set(a,b),delete d._currentPromises[a],c.resolve(b)):(delete d._currentPromises[a],c.resolve(d._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};g.prototype={get:function(b,c){if(this._currentPromise)return this._currentPromise;
var e=new f,d=null;c?this._cache.remove(b):d=this._cache.get(b);if(d!==null)e.resolve(d);else{this._currentPromise=e;var j=this;a("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=JSON.parse(a.response);j._cache.set(b,a[b]||{});j._currentPromise=null;e.resolve(a[b]||{})},function(a){a.xhr.status===401||a.xhr.status===404?(j._cache.set(b,{}),j._currentPromise=null,e.resolve({})):(j._currentPromise=null,a=j._cache.get(b,!0),a!==null?e.resolve(a[b]||{}):e.resolve({}))})}return e},
put:function(){var a=new f;a.resolve();return a}};h.prototype={get:function(a){var b=new f,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new f;this._cache.set(a,b);c.resolve();return c}};j.DEFAULT_SCOPE=1;j.LOCAL_SCOPE=2;j.USER_SCOPE=4;j.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(a,b){if(!b||typeof b!=="number"||b>7||b<1)b=j.DEFAULT_SCOPE|j.LOCAL_SCOPE|
j.USER_SCOPE;var c=[];j.USER_SCOPE&b&&this._userProvider.available()&&c.push(this._userProvider);j.LOCAL_SCOPE&b&&c.push(this._localProvider);j.DEFAULT_SCOPE&b&&c.push(this._defaultsProvider);var d=new e(a,c);return d.sync().then(function(){return d})},getSetting:function(a,b,c){for(var e,d=0;d<a.length;d++)if(a[d].label===b)for(var j=0;j<a[d].data.length;j++)if(a[d].data[j].label===c){e=a[d].data[j].value;break}return e}};return{PreferencesService:j}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(b,f){function a(a,b){var c=Object.keys(a),e=Object.keys(b);if(c.length!==e.length)return!1;c.sort();e.sort();for(var d=0,g=c.length;d<g;d++){var h=c[d];if(h!==e[d])return!1;var f=a[h],h=b[h];if(f!==h&&JSON.stringify(f)!==JSON.stringify(h))return!1}return!0}function e(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function c(a){var b=null;return{key:function(c){return(b=b||
Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,e){a[c]=e;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function d(a,b){return{type:a,plugin:b}}function g(c,e,g){function h(a,c,e){if(!B)return(new b).reject(Error("plugin not connected"));var d=J++,j=new b(function(a){x==="active"&&g.postMessage({id:d,cancel:typeof a==="string"?a:"canceled"},B)});C[String(d)]=j;g.postMessage({id:d,
serviceId:a,method:c,params:e},B);return j.promise}function o(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b=Array.prototype.slice.call(arguments);return x==="active"?h(a.serviceId,c,b):s.start({"transient":!0}).then(function(){return h(a.serviceId,c,b)})}}),b.addEventListener&&b.removeEventListener)){var c=new f;b.dispatchEvent=c.dispatchEvent.bind(c);var e=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||e(a);c.addEventListener(a,b)};var d=
b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]&&d(a)}}return b}function m(a){var b=JSON.parse(JSON.stringify(a.properties));b.__plugin__=c;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);b.objectClass=a;return b}function p(a){var b=o(a),c=m(a),c=g.registerService(a.names||a.type,b,c);z[a.serviceId]={registration:c,proxy:b}}function q(){g.persist(c,{created:u,headers:v,services:w,autostart:t,lastModified:y})}function r(b){var e;try{if(b.method)if("manifest"===
b.method||"plugin"===b.method){var d=b.params[0];d.headers=d.headers||{};d.services=d.services||{};a(d.headers,v)&&a(d.services,w)?A.resolve(s):s.update({headers:d.headers,services:d.services}).then(function(){A.resolve(s)})}else if("dispatchEvent"===b.method){var h=z[b.serviceId].proxy;h.dispatchEvent.apply(h,b.params)}else if("progress"===b.method)e=C[String(b.requestId)],e.progress.apply(e,b.params);else if("timeout"===b.method)A&&A.reject(Error("Load timeout for plugin: "+c));else throw Error("Bad response method: "+
b.method);else if(e=C[String(b.id)],delete C[String(b.id)],b.error){var k=g.handleServiceError(s,b.error);e.reject(k)}else e.resolve(b.result)}catch(f){console.log("Plugin._responseHandler "+f)}}var s=this,e=e||{},u=e.created||(new Date).getTime(),v=e.headers||{},w=e.services||[],t=e.autostart,y=e.lastModified||0,x="installed",G,A,B,z={},J=0,C={};this._persist=q;this._resolve=function(){x="resolved";g.dispatchEvent(new d("resolved",s))};this._getAutostart=function(){return t};this._getCreated=function(){return u};
this.getLocation=function(){return c};this.getHeaders=function(){return JSON.parse(JSON.stringify(v))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return y};this.getServiceReferences=function(){var a=[];Object.keys(z).forEach(function(b){a.push(z[b].registration.getReference())});return a};this.getState=function(){return x};this.start=function(a){if(x===
"uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(G)return G.promise.then(this.start.bind(this,a));if(x==="active")return(new b).resolve();if(!a||!a["transient"]){var e=a&&a.lazy?"lazy":"started";e!==t&&(t=e,q())}e=g.getState();if(e!=="starting"&&e!=="active")return a["transient"]?(new b).reject(Error("start transient error")):(new b).resolve();if(x==="installed")try{this._resolve()}catch(h){return(new b).reject(h)}x==="resolved"&&w.forEach(function(a){p(a)});if(a&&a.lazy)return x!==
"starting"&&(x="starting",g.dispatchEvent(new d("lazy activation",s))),(new b).resolve();var k=new b;G=k;x="starting";g.dispatchEvent(new d("starting",s));A=new b;B=g.connect(c,r);A.then(function(){A=null;x="active";g.dispatchEvent(new d("started",s));G=null;k.resolve()},function(){A=null;x="stopping";g.dispatchEvent(new d("stopping",s));Object.keys(z).forEach(function(a){z[a].registration.unregister();delete z[a]});g.disconnect(B);B=null;x="resolved";G=null;g.dispatchEvent(new d("stopped",s));k.reject(Error("plugin activation error"))});
return k.promise};this.stop=function(a){if(x==="uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(G)return G.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==t)t="stopped",q();if(x!=="active"&&x!=="starting")return(new b).resolve();G=a=new b;x="stopping";g.dispatchEvent(new d("stopping",s));Object.keys(z).forEach(function(a){z[a].registration.unregister();delete z[a]});B&&(g.disconnect(B),B=null);x="resolved";G=null;g.dispatchEvent(new d("stopped",s));
a.resolve();return a.promise};this.update=function(e){if(x==="uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(!e)return y===0&&(y=(new Date).getTime(),q()),g.loadManifest(c).then(this.update.bind(this));v=e.headers||{};w=e.services||{};t=e.autostart||t;e.lastModified?y=e.lastModified:(y=(new Date).getTime(),q());if(x==="active"||x==="starting"){var h=[];Object.keys(w).forEach(function(b){var c=w[b];h.push(b);var e=z[b];if(e){if(a(c.methods,Object.keys(e.proxy))){var b=m(c),d=
e.registration.getReference(),j={};d.getPropertyKeys().forEach(function(a){j[a]=d.getProperty(a)});a(b,j)||e.registration.setProperties(b);return}e.registration.unregister();delete z[b]}p(c)});Object.keys(z).forEach(function(a){h.indexOf(a)===-1&&(z[a].registration.unregister(),delete z[a])})}x==="active"&&(g.disconnect(B),A=new b,B=g.connect(c,r),A.then(function(){A=null},function(){A=null;x="stopping";g.dispatchEvent(new d("stopping"),s);Object.keys(z).forEach(function(a){z[a].registration.unregister();
delete z[a]});g.disconnect(B);B=null;x="resolved";g.dispatchEvent(new d("stopped",s))}));g.dispatchEvent(new d("updated",s));return(new b).resolve()};this.uninstall=function(){if(x==="uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(x==="active"||x==="starting"||x==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));g.removePlugin(this);x="uninstalled";g.dispatchEvent(new d("uninstalled",s));return(new b).resolve()}}var h=/^http[s]?/i;return{Plugin:g,
PluginRegistry:function(a,k){function l(a){var b=a.source;p.some(function(c){if(b===c.target){if(typeof c.useStructuredClone==="undefined")c.useStructuredClone=typeof a.data!=="string";c.handler(c.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var k=k||{},n=k.storage||localStorage;n.getItem||(n=c(n));var o="installed",m=[],p=[],q=new f,r={},s={registerService:a.registerService.bind(a),connect:function(a,b,c){function e(){b({method:"timeout"})}var d={handler:b,url:a},j=setTimeout(e,c||15E3);
if(a.match(/\.js$/)&&typeof Worker!=="undefined"){var g=new Worker(a);g.onmessage=function(a){if(typeof d.useStructuredClone==="undefined")d.useStructuredClone=typeof a.data!=="string";d.handler(d.useStructuredClone?a.data:JSON.parse(a.data))};d.target=g;d.close=function(){g.terminate()}}else{var h=document.createElement("iframe");h.name=a+"_"+(new Date).getTime();if(!k.visible)h.style.display="none",h.style.visibility="hidden";h.src=a;h.onload=function(){clearTimeout(j);setTimeout(e,5E3)};h.sandbox=
"allow-scripts allow-same-origin";document.body.appendChild(h);d.target=h.contentWindow;d.close=function(){h&&(document.body.removeChild(h),h=null)}}p.push(d);return d},disconnect:function(a){for(var b=0;b<p.length;b++)if(a===p[b]){p.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<m.length;b++)if(a===m[b]){m.splice(b,1);break}n.removeItem("plugin."+a.getLocation())},persist:function(a,b){n.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{q.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var c=new b,e=s.connect(a,function(b){e&&b.method&&("manifest"===b.method||"plugin"===b.method?(b=b.params[0],s.disconnect(e),e=null,c.resolve(b)):"timeout"===b.method&&(s.disconnect(e),e=null,c.reject(Error("Load timeout for plugin: "+a))))});return c.promise},getState:function(){return o},handleServiceError:function(a,b){if(b&&b.status===
401){var c=a.getHeaders(),e=a.getName()||a.getLocation(),d=document.createElement("span");d.appendChild(document.createTextNode("Authentication required for: "+e+"."));if(c.login)d.appendChild(document.createTextNode(" ")),e=document.createElement("a"),e.target="_blank",e.textContent="Login",e.href=c.login,h.test(e.href)?(d.appendChild(e),d.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+c.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(d)}}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=s.getState;this.init=function(){if(!(o==="starting"||o==="active"||o==="stopping")){addEventListener("message",l,!1);for(var a=[],b=0,c=n.length;b<c;b++)a.push(n.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(n.getItem(a));a.created&&m.push(new g(b,
a,s))}});m.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});k.plugins&&Object.keys(k.plugins).forEach(function(a){a=e(a);if(h.test(a)){if(!this.getPlugin(a)){var b=k.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||k.defaultAutostart||"lazy";m.push(new g(a,b,s))}}else console.log("Illegal Plugin URL: "+a)}.bind(this));o="starting"}};this.start=function(){o!=="starting"&&this.init();if(o!=="starting")return(new b).reject("Cannot start framework. Framework is already "+
o+".");var a=[];m.forEach(function(b){var c=b._getAutostart();b.getLastModified()===0?a.push(b.update().then(function(){if("started"===c)return b.start({"transient":!0});if("lazy"===c)return b.start({lazy:!0,"transient":!0});b._resolve()})):"started"===c?a.push(b.start({"transient":!0})):"lazy"===c?a.push(b.start({lazy:!0,"transient":!0})):b._resolve()});return b.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){o="active"})};this.stop=function(){if(o!=="starting"&&o!=="active")return(new b).reject("Cannot stop registry. Registry is already "+
o+".");o="stopping";var a=[];m.forEach(function(b){a.push(b.stop({"transient":!0}))});return b.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",l);o="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new b).reject("Cannot uninstall registry")};this.installPlugin=function(a,c){a=e(a);if(!h.test(a))return(new b).reject("Illegal Plugin URL: "+a);var j=this.getPlugin(a);if(j)return(new b).resolve(j);
if(r[a])return r[a];if(c)return j=new g(a,c,s),m.push(j),j._persist(),s.dispatchEvent(new d("installed",j)),(new b).resolve(j);var k=s.loadManifest(a).then(function(b){j=new g(a,b,s);m.push(j);j._persist();delete r[a];s.dispatchEvent(new d("installed",j));return j},function(b){delete r[a];throw b;});return r[a]=k};this.getPlugins=function(){return m.slice()};this.getPlugin=function(a){var b=null,a=e(a);m.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=q.addEventListener.bind(q);
this.removeEventListener=q.removeEventListener.bind(q);this.resolvePlugins=function(){var a=!0;m.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/textview/eventTarget",[],function(){function b(){}b.addMixin=function(f){var a=b.prototype,e;for(e in a)a.hasOwnProperty(e)&&(f[e]=a[e])};b.prototype={addEventListener:function(b,a,e){if(!this._eventTypes)this._eventTypes={};var c=this._eventTypes[b];c||(c=this._eventTypes[b]={level:0,listeners:[]});c.listeners.push({listener:a,useCapture:e})},dispatchEvent:function(b){var a=b.type;this._dispatchEvent("pre"+a,b);this._dispatchEvent(a,b);this._dispatchEvent("post"+a,b)},_dispatchEvent:function(b,
a){var e=this._eventTypes?this._eventTypes[b]:null;if(e){var c=e.listeners;try{if(e.level++,c)for(var d=0,g=c.length;d<g;d++)if(c[d]){var h=c[d].listener;typeof h==="function"?h.call(this,a):h.handleEvent&&typeof h.handleEvent==="function"&&h.handleEvent(a)}}finally{if(e.level--,e.compact&&e.level===0){for(d=c.length-1;d>=0;d--)c[d]||c.splice(d,1);c.length===0&&delete this._eventTypes[b];e.compact=!1}}}},isListening:function(b){return!this._eventTypes?!1:this._eventTypes[b]!==void 0},removeEventListener:function(b,
a,e){if(this._eventTypes){var c=this._eventTypes[b];if(c){for(var d=c.listeners,g=0,h=d.length;g<h;g++){var j=d[g];if(j&&j.listener===a&&j.useCapture===e){c.level!==0?(d[g]=null,c.compact=!0):d.splice(g,1);break}}d.length===0&&delete this._eventTypes[b]}}}};return{EventTarget:b}});
define("orion/serviceTracker",[],function(){function b(b,c){function d(a){var b=a.getProperty("service.id"),c=this.addingService(a);c&&(h[b]=a,j[b]=c)}function g(a){var b=a.getProperty("service.id"),c=j[b];delete h[b];delete j[b];this.removedService(a,c)}this.serviceRegistry=b;var h={},j={},k=f,l,n;this.close=function(){if(k!==a)throw"Already closed";k=f;b.removeEventListener("registered",l);b.removeEventListener("unregistering",n);n=l=null;var c=this;this.getServiceReferences().forEach(function(a){g.call(c,
a)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=a;return a.length?Object.keys(a).map(function(b){return a[b]}):null};this.open=function(){if(k!==f)throw"Already open";k=a;var j=this;l=function(a){if(a.serviceReference.getProperty("objectClass").indexOf(c)!==-1&&(d.call(j,a.serviceReference),typeof j.onServiceAdded==="function"))return j.onServiceAdded(a.serviceReference,j.serviceRegistry.getService(a.serviceReference))};n=function(a){a.serviceReference.getProperty("objectClass").indexOf(c)!==
-1&&g.call(j,a.serviceReference)};b.addEventListener("registered",l);b.addEventListener("unregistering",n);b.getServiceReferences(c).forEach(function(a){d.call(j,a)});if(typeof this.onOpen==="function")this.onOpen()}}var f=0,a=1;b.prototype={addingService:function(a){return this.serviceRegistry.getService(a)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return b});
define("orion/config",["orion/textview/eventTarget","orion/Deferred","orion/serviceTracker"],function(b,f,a){var e,c,d,g,h="pid";e=function(b,c,e){function d(a,b,e){b.forEach(function(d,j){try{var g=a[j].getProperty("__plugin__"),h=g&&c.getPlugin(g);(!g||h&&h.getState()==="active")&&b[j].updated(e)}catch(k){typeof console!=="undefined"&&console.log(k)}})}a.call(this,b,"orion.cm.managedservice");var j={},g={},q=function(a){var c=[];a.plugin.getServiceReferences().forEach(function(a){if(a.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var d=a.getProperty(h),a=b.getService(a);d&&a&&(d=(d=e._find(d))&&d.getProperties(),c.push(a.updated(d)))}});return f.all(c)};this.addingService=function(a){var c=a.getProperty(h),e=b.getService(a);if(!c||!e)return null;j[c]||(j[c]=[]);g[c]||(g[c]=[]);j[c].push(a);g[c].push(e);return e};this.onServiceAdded=function(a,b){var c=a.getProperty(h),c=e._find(c);d([a],[b],c&&c.getProperties())};this.onOpen=function(){c.addEventListener("started",q)};this.onClose=function(){c.removeEventListener("started",
q)};this.notifyUpdated=function(a){var b=a.getPid();d(j[b]||[],g[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(j[a]||[],g[a]||[],null)};this.removedService=function(a,b){var c=a.getProperty(h),e=j[c],d=g[c];e.length>1?e.splice(e.indexOf(a),1):delete j[c];d.length>1?d.splice(d.indexOf(b),1):delete g[c]}};b=function(){function a(b,j,g){this.store=new c(this,g);this.configAdmin=new d(this,this.store);this.tracker=new e(b,j,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}();d=function(){function a(b,c){this.factory=b;this.store=c}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var j="/cm/configurations";
c=function(){function a(b,c){this.factory=b;this.prefsService=c;this.configs=Object.create(null);this.pref=null;var e=this;this.initPromise=this.prefsService.getPreferences(j).then(function(a){e.pref=a;a.keys().forEach(function(b){if(!e.configs[b]){var c=a.get(b);typeof c==="object"&&c!==null&&Object.keys(c).length>0&&(c[h]=b,e.configs[b]=new g(e.factory,e,c))}})})}a.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new g(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&c.getProperties()!==null&&b.push(c)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return a}();g=function(){function a(b){for(var c={},e=Object.keys(b),d=0;d<e.length;d++){var j=e[d],g=b[j];c[j]=g instanceof Array?g.slice():g}return c}function b(c,e,d){this.factory=
c;this.store=e;if(d!==null&&typeof d==="object")this.pid=d[h],c=a(d),delete c[h],this.properties=c;else if(typeof d==="string")this.pid=d,this.properties=null;else throw Error("Invalid pid/properties "+d);}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[h]=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[h];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:b}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(b,f,a,e,c,d){var g;return{startup:function(){if(g)return g;g=new f;var h=window.serviceRegistry=new a.ServiceRegistry,j=new e.PreferencesService(h);return j.getPreferences("/plugins").then(function(a){var e={plugins:{}};a.keys().forEach(function(c){var d=b.toUrl(c);e.plugins[d]=a[c]});var n=window.pluginRegistry=new c.PluginRegistry(h,e);return n.start().then(function(){if(h.getServiceReferences("orion.core.preference.provider").length>
0)return j.getPreferences("/plugins",j.USER_SCOPE).then(function(a){var c=[];a.keys().forEach(function(a){a=b.toUrl(a);n.getPlugin(a)||c.push(n.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return f.all(c,function(a){console.log(a)})})}).then(function(){return(new d.ConfigurationAdminFactory(h,n,j)).getConfigurationAdmin().then(h.registerService.bind(h,"orion.cm.configadmin"))}).then(function(){var a=h.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){window.location=a})}),c=localStorage.getItem("lastLogin");if(!c||c<(new Date).getTime()-9E5)return b}}).then(function(){var a={serviceRegistry:h,preferences:j,pluginRegistry:n};g.resolve(a);return a})})}}});
(function(){function b(a,b,e,h,j,k){b[a]&&(e.push(a),(b[a]===!0||b[a]===1)&&h.push(j+a+"/"+k))}function f(a,b,e,h,j){b=h+b+"/"+j;require._fileExists(a.toUrl(b))&&e.push(b)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,e={};define("i18n",{version:"1.0.0",load:function(c,d,g,h){var h=h||{},j=a.exec(c),k=j[1],l=j[4],n=j[5],o=l.split("-"),m=[],p={},q,r,s="";j[5]?(k=j[1],c=k+n):(n=j[4],l=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
o=l.split("-"));if(h.isBuild){m.push(c);f(d,"root",m,k,n);for(q=0;r=o[q];q++)s+=(s?"-":"")+r,f(d,s,m,k,n);d(m,function(){g()})}else d([c],function(a){var c=[];b("root",a,c,m,k,n);for(q=0;r=o[q];q++)s+=(s?"-":"")+r,b(s,a,c,m,k,n);d(m,function(){var b,j;for(b=c.length-1;b>-1&&(r=c[b]);b--){j=a[r];if(j===!0||j===1)j=d(k+r+"/"+n);var h=p,f=void 0;for(f in j)!(f in e)&&!(f in h)&&(h[f]=j[f])}g(p)})})}})})();
define("orion/i18n",[],function(){return{load:function(b,f,a,e){var e=e||{},c=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,d=c.exec(b);if(d)if(f.defined(b))a(f(b));else if(e.isBuild||e.isTest)a({});else{var g=d[1],h=d[3]?d[2]:"",j=d[3]||d[2];f(["orion/bootstrap"],function(k){k.startup().then(function(k){var n=k.serviceRegistry,k=n.getServiceReferences("orion.i18n.message");if(h)k.some(function(c){return b===c.getProperty("name")?(n.getService(c).getMessageBundle().then(function(b){a(b)},function(){a({})}),
!0):!1})||a({});else{var o={},m;k.forEach(function(a){var b=a.getProperty("name");if((d=c.exec(b))&&g===d[1]&&j===(d[3]||d[2]))if(h=d[3]?d[2]:""){if((a=e.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&a.indexOf(h)===0)o[h]=!0,f.specified(b)||define(b,["orion/i18n!"+b],function(a){return a})}else m=a});f.specified(b)?a(o):m?n.getService(m).getMessageBundle().then(function(c){Object.keys(o).forEach(function(a){typeof c[a]==="undefined"&&(c[a]=o[a])});define(b,
[],c);a(c)},function(){define(b,[],o);a(o)}):(define(b,[],o),a(o))}})})}else a(null)}}});define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/edit/nls/root/messages",{"Fetching ":"Fetching ","An error occurred: ":"An error occurred: ","No File Selected":"No File Selected","There are unsaved changes.  Do you still want to navigate away?":"There are unsaved changes.  Do you still want to navigate away?","Search Files":"Search Files","Enter search term:":"Enter search term:","Searching for occurrences of ":"Searching for occurrences of ","Toggle Outliner":"Toggle Outliner","There are unsaved changes.":"There are unsaved changes.",
Save:"Save","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?","Save this file":"Save this file","Go to Line":"Go to Line","Go to specified line number":"Go to specified line number","Go to line:":"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find","No response from server.  Check your internet connection and try again.":"No response from server.  Check your internet connection and try again."});
define("orion/selection",["dojo","orion/EventTarget"],function(b,f){function a(a,b){b||(b="orion.page.selection");this._serviceRegistry=a;f.attach(this);this._serviceRegistration=a.registerService(b,this);this._selections=[]}a.prototype={getSelection:function(a){a(this._getSingleSelection())},getSelections:function(a){a(this._selections)},_getSingleSelection:function(){return this._selections&&this._selections.length>0?this._selections[0]:null},setSelections:function(a){this._selections=b.isArray(a)?
a:a?[a]:null;this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};a.prototype.constructor=a;return{Selection:a}});define("orion/nls/messages",["orion/i18n!orion/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Repositories:"Repositories",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","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":"Report a Bug",
"Privacy Policy":"Privacy Policy","Terms of Use":"Terms of Use","Copyright Agent":"Copyright Agent","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.":"Orion build I20121019-1304. See the FAQ for terms of service","Add this page to the favorites list":"Add this page to the favorites list","LOG: ":"LOG: ",Switch:"Switch","Switch the type of outliner used":"Switch the type of outliner used",
Outliner:"Outliner","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",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"});define("dijit",["dojo"],function(b){return dijit=b._dijit||{}});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("dijit/_base/manager",["dojo","dijit"],function(b,f){b.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw Error("Tried to register widget with id=="+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){this._hash[a]&&(delete this._hash[a],this.length--)},forEach:function(a,e){var e=e||b.global,c=0,d;for(d in this._hash)a.call(e,this._hash[d],c++,this._hash);return this},filter:function(a,
e){var e=e||b.global,c=new f.WidgetSet,d=0,g;for(g in this._hash){var h=this._hash[g];a.call(e,h,d++,this._hash)&&c.add(h)}return c},byId:function(a){return this._hash[a]},byClass:function(a){var b=new f.WidgetSet,c,d;for(c in this._hash)d=this._hash[c],d.declaredClass==a&&b.add(d);return b},toArray:function(){var a=[],b;for(b in this._hash)a.push(this._hash[b]);return a},map:function(a,e){return b.map(this.toArray(),a,e)},every:function(a,e){var e=e||b.global,c=0,d;for(d in this._hash)if(!a.call(e,
this._hash[d],c++,this._hash))return!1;return!0},some:function(a,e){var e=e||b.global,c=0,d;for(d in this._hash)if(a.call(e,this._hash[d],c++,this._hash))return!0;return!1}});(function(){f.registry=new f.WidgetSet;var a=f.registry._hash,e=b.attr,c=b.hasAttr,d=b.style;f.byId=function(b){return typeof b=="string"?a[b]:b};var g={};f.getUniqueId=function(b){var c;do c=b+"_"+(b in g?++g[b]:g[b]=0);while(a[c]);return f._scopeName=="dijit"?c:f._scopeName+"_"+c};f.findWidgets=function(b){function c(b){for(b=
b.firstChild;b;b=b.nextSibling)if(b.nodeType==1){var d=b.getAttribute("widgetId");d?(d=a[d])&&e.push(d):c(b)}}var e=[];c(b);return e};f._destroyAll=function(){f._curFocus=null;f._prevFocus=null;f._activeStack=[];b.forEach(f.findWidgets(b.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})};b.isIE&&b.addOnWindowUnload(function(){f._destroyAll()});f.byNode=function(b){return a[b.getAttribute("widgetId")]};f.getEnclosingWidget=function(b){for(;b;){var c=
b.getAttribute&&b.getAttribute("widgetId");if(c)return a[c];b=b.parentNode}return null};var h=f._isElementShown=function(a){var b=d(a);return b.visibility!="hidden"&&b.visibility!="collapsed"&&b.display!="none"&&e(a,"type")!="hidden"};f.hasDefaultTabStop=function(a){switch(a.nodeName.toLowerCase()){case "a":return c(a,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var b;try{var e=a.contentDocument;if("designMode"in e&&e.designMode==
"on")return!0;b=e.body}catch(d){try{b=a.contentWindow.document.body}catch(j){return!1}}return b.contentEditable=="true"||b.firstChild&&b.firstChild.contentEditable=="true";default:return a.contentEditable=="true"}};var j=f.isTabNavigable=function(a){return e(a,"disabled")?!1:c(a,"tabIndex")?e(a,"tabIndex")>=0:f.hasDefaultTabStop(a)};f._getTabNavigable=function(a){function d(a){return a&&a.tagName.toLowerCase()=="input"&&a.type&&a.type.toLowerCase()=="radio"&&a.name&&a.name.toLowerCase()}var g,f,m,
p,q,r,s={},u=function(a){b.query("> *",a).forEach(function(a){if(!(b.isIE&&a.scopeName!=="HTML")&&h(a)){if(j(a)){var k=e(a,"tabIndex");if(!c(a,"tabIndex")||k==0)g||(g=a),f=a;else if(k>0){if(!m||k<p)p=k,m=a;if(!q||k>=r)r=k,q=a}k=d(a);b.attr(a,"checked")&&k&&(s[k]=a)}a.nodeName.toUpperCase()!="SELECT"&&u(a)}})};h(a)&&u(a);return{first:s[d(g)]||g,last:s[d(f)]||f,lowest:s[d(m)]||m,highest:s[d(q)]||q}};f.getFirstInTabbingOrder=function(a){a=f._getTabNavigable(b.byId(a));return a.lowest?a.lowest:a.first};
f.getLastInTabbingOrder=function(a){a=f._getTabNavigable(b.byId(a));return a.last?a.last:a.highest};f.defaultDuration=b.config.defaultDuration||200})();return f});
define("dojo/Stateful",["dojo"],function(b){b.declare("dojo.Stateful",null,{postscript:function(f){f&&b.mixin(this,f)},get:function(b){return this[b]},set:function(b,a){if(typeof b==="object"){for(var e in b)this.set(e,b[e]);return this}e=this[b];this[b]=a;this._watchCallbacks&&this._watchCallbacks(b,e,a);return this},watch:function(f,a){var e=this._watchCallbacks;if(!e)var c=this,e=this._watchCallbacks=function(a,b,d,k){var f=function(e){if(e)for(var e=e.slice(),k=0,f=e.length;k<f;k++)try{e[k].call(c,
a,b,d)}catch(l){console.error(l)}};f(e["_"+a]);k||f(e["*"])};!a&&typeof f==="function"?(a=f,f="*"):f="_"+f;var d=e[f];typeof d!=="object"&&(d=e[f]=[]);d.push(a);return{unwatch:function(){d.splice(b.indexOf(d,a),1)}}}});return b.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(b,f){(function(){b.declare("dijit._WidgetBase",b.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,b){this.create(a,b)},create:function(a,e){this.srcNodeRef=
b.byId(e);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a)this.params=a,b._mixin(this,a);this.postMixInProperties();if(!this.id)this.id=f.getUniqueId(this.declaredClass.replace(/\./g,"_"));f.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var c=this.srcNodeRef;c&&c.parentNode&&this.domNode!==c&&c.parentNode.replaceChild(this.domNode,c)}this.domNode&&this.domNode.setAttribute("widgetId",
this.id);this.postCreate();this.srcNodeRef&&!this.srcNodeRef.parentNode&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a=function(a,b){(b.params&&a in b.params||b[a])&&b.set(a,b[a])},e;for(e in this.attributeMap)a(e,this);b.forEach(this._getSetterAttributes(),function(b){b in this.attributeMap||a(b,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var e=a._setterAttrs=[],c,d=a.prototype,g;for(g in d)b.isFunction(d[g])&&(c=g.match(/^_set([a-zA-Z]*)Attr$/))&&
c[1]&&e.push(c[1].charAt(0).toLowerCase()+c[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||b.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(b.map(a,function(a){return a+"Rtl"})));b.addClass(this.domNode,a)}},postCreate:function(){},startup:function(){this._started=!0},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},
destroy:function(a){this._beingDestroyed=!0;this.uninitialize();var e=b.forEach,c=b.unsubscribe;e(this._connects,function(a){e(a,b.disconnect)});e(this._subscribes,function(a){c(a)});e(this._supportingWidgets||[],function(a){a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy()});this.destroyRendering(a);f.registry.remove(this.id);this._destroyed=!0},destroyRendering:function(a){this.bgIframe&&(this.bgIframe.destroy(a),delete this.bgIframe);this.domNode&&(a?b.removeAttr(this.domNode,"widgetId"):
b.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||b.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){b.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setClassAttr:function(a){b.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var e=this[this.attributeMap.style||"domNode"];b.isObject(a)?b.style(e,a):e.style.cssText?
e.style.cssText+="; "+a:e.style.cssText=a;this._set("style",a)},_attrToDom:function(a,e){var c=this.attributeMap[a];b.forEach(b.isArray(c)?c:[c],function(c){var g=this[c.node||c||"domNode"];switch(c.type||"attribute"){case "attribute":b.isFunction(e)&&(e=b.hitch(this,e));c=c.attribute?c.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;b.attr(g,c,e);break;case "innerText":g.innerHTML="";g.appendChild(b.doc.createTextNode(e));break;case "innerHTML":g.innerHTML=e;break;case "class":b.replaceClass(g,
e,this[a])}},this)},get:function(a){var b=this._getAttrNames(a);return this[b.g]?this[b.g]():this[a]},set:function(a,b){if(typeof a==="object"){for(var c in a)this.set(c,a[c]);return this}c=this._getAttrNames(a);if(this[c.s])var d=this[c.s].apply(this,Array.prototype.slice.call(arguments,1));else a in this.attributeMap&&this._attrToDom(a,b),this._set(a,b);return d||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var c=a.charAt(0).toUpperCase()+a.substr(1);
return b[a]={n:a+"Node",s:"_set"+c+"Attr",g:"_get"+c+"Attr"}},_set:function(a,b){var c=this[a];this[a]=b;this._watchCallbacks&&this._created&&b!==c&&this._watchCallbacks(a,c,b)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?b.query("[widgetId]",this.containerNode).map(f.byNode):[]},getChildren:function(){return this.containerNode?f.findWidgets(this.containerNode):[]},connect:function(a,e,c){a=[b._connect(a,
e,this,c)];this._connects.push(a);return a},disconnect:function(a){for(var e=0;e<this._connects.length;e++)if(this._connects[e]==a){b.forEach(a,b.disconnect);this._connects.splice(e,1);break}},subscribe:function(a,e){var c=b.subscribe(a,this,e);this._subscribes.push(c);return c},unsubscribe:function(a){for(var e=0;e<this._subscribes.length;e++)if(this._subscribes[e]==a){b.unsubscribe(a);this._subscribes.splice(e,1);break}},isLeftToRight:function(){return this.dir?this.dir=="ltr":b._isBodyLtr()},placeAt:function(a,
e){a.declaredClass&&a.addChild?a.addChild(this,e):b.place(this.domNode,a,e);return this}})})();return f._WidgetBase});
define("dojo/window",["dojo"],function(b){b.getObject("window",!0,b);b.window.getBox=function(){var f=b.doc.compatMode=="BackCompat"?b.body():b.doc.documentElement,a=b._docScroll();return{w:f.clientWidth,h:f.clientHeight,l:a.x,t:a.y}};b.window.get=function(f){if(b.isIE&&window!==document.parentWindow){f.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=f._parentWindow;f._parentWindow=null;return a}return f.parentWindow||f.defaultView};b.window.scrollIntoView=function(f,
a){try{var f=b.byId(f),e=f.ownerDocument||b.doc,c=e.body||b.body(),d=e.documentElement||c.parentNode,g=b.isIE,h=b.isWebKit;if((!b.isMoz&&!g&&!h&&!b.isOpera||f==c||f==d)&&typeof f.scrollIntoView!="undefined")f.scrollIntoView(!1);else{var j=e.compatMode=="BackCompat",k=g>=9&&f.ownerDocument.parentWindow.frameElement?d.clientHeight>0&&d.clientWidth>0&&(c.clientHeight==0||c.clientWidth==0||c.clientHeight>d.clientHeight||c.clientWidth>d.clientWidth)?d:c:j?c:d,e=h?c:k,l=k.clientWidth,n=k.clientHeight,o=
!b._isBodyLtr(),m=a||b.position(f),p=f.parentNode,k=function(a){return g<=6||g&&j?!1:b.style(a,"position").toLowerCase()=="fixed"};if(!k(f))for(;p;){p==c&&(p=e);var q=b.position(p),r=k(p);if(p==e){q.w=l;q.h=n;e==d&&g&&o&&(q.x+=e.offsetWidth-q.w);if(q.x<0||!g)q.x=0;if(q.y<0||!g)q.y=0}else{var s=b._getPadBorderExtents(p);q.w-=s.w;q.h-=s.h;q.x+=s.l;q.y+=s.t;var u=p.clientWidth,v=q.w-u;if(u>0&&v>0)q.w=u,q.x+=o&&(g||p.clientLeft>s.l)?v:0;u=p.clientHeight;v=q.h-u;if(u>0&&v>0)q.h=u}if(r){if(q.y<0)q.h+=q.y,
q.y=0;if(q.x<0)q.w+=q.x,q.x=0;if(q.y+q.h>n)q.h=n-q.y;if(q.x+q.w>l)q.w=l-q.x}var w=m.x-q.x,t=m.y-Math.max(q.y,0),y=w+m.w-q.w,x=t+m.h-q.h;if(y*w>0){var G=Math[w<0?"max":"min"](w,y);if(o&&(g==8&&!j||g>=9))G=-G;m.x+=p.scrollLeft;p.scrollLeft+=G;m.x-=p.scrollLeft}x*t>0&&(m.y+=p.scrollTop,p.scrollTop+=Math[t<0?"max":"min"](t,x),m.y-=p.scrollTop);p=p!=e&&!r&&p.parentNode}}}catch(A){console.error("scrollIntoView: "+A),f.scrollIntoView(!1)}};return b.window});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(b,f){b.mixin(f,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return f.getBookmark().isCollapsed},getBookmark:function(){var a,e,c=b.doc.selection,d=f._curFocus;if(b.global.getSelection){if(c=b.global.getSelection())if(c.isCollapsed){if(a=d?d.tagName:"")if(a=a.toLowerCase(),a=="textarea"||a=="input"&&(!d.type||d.type.toLowerCase()=="text"))return c={start:d.selectionStart,end:d.selectionEnd,node:d,pRange:!0},
{isCollapsed:c.end<=c.start,mark:c};a={isCollapsed:!0};if(c.rangeCount)a.mark=c.getRangeAt(0).cloneRange()}else e=c.getRangeAt(0),a={isCollapsed:!1,mark:e.cloneRange()}}else if(c){a=d?d.tagName:"";a=a.toLowerCase();if(d&&a&&(a=="button"||a=="textarea"||a=="input"))return c.type&&c.type.toLowerCase()=="none"?{isCollapsed:!0,mark:null}:(e=c.createRange(),{isCollapsed:e.text&&e.text.length?!1:!0,mark:{range:e,pRange:!0}});a={};try{e=c.createRange(),a.isCollapsed=!(c.type=="Text"?e.htmlText.length:e.length)}catch(g){return a.isCollapsed=
!0,a}if(c.type.toUpperCase()=="CONTROL")if(e.length){a.mark=[];c=0;for(d=e.length;c<d;)a.mark.push(e.item(c++))}else a.isCollapsed=!0,a.mark=null;else a.mark=e.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var e=b.doc;if(a=a.mark)if(b.global.getSelection)(e=b.global.getSelection())&&e.removeAllRanges?a.pRange?(e=a.node,e.selectionStart=a.start,e.selectionEnd=a.end):(e.removeAllRanges(),e.addRange(a)):console.warn("No idea how to restore selection for this browser!");
else if(e.selection&&a){var c;a.pRange?c=a.range:b.isArray(a)?(c=e.body.createControlRange(),b.forEach(a,function(a){c.addElement(a)})):(c=e.body.createTextRange(),c.moveToBookmark(a));c.select()}},getFocus:function(a,e){var c=!f._curFocus||a&&b.isDescendant(f._curFocus,a.domNode)?f._prevFocus:f._curFocus;return{node:c,bookmark:c==f._curFocus&&b.withGlobal(e||b.global,f.getBookmark),openedForWindow:e}},focus:function(a){if(a){var e="node"in a?a.node:a,c=a.bookmark,a=a.openedForWindow,d=c?c.isCollapsed:
!1;if(e){var g=e.tagName.toLowerCase()=="iframe"?e.contentWindow:e;if(g&&g.focus)try{g.focus()}catch(h){}f._onFocusNode(e)}if(c&&b.withGlobal(a||b.global,f.isCollapsed)&&!d){a&&a.focus();try{b.withGlobal(a||b.global,f.moveToBookmark,null,[c])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return f.registerWin(a.contentWindow,a)},unregisterIframe:function(a){f.unregisterWin(a)},registerWin:function(a,e){var c=function(a){f._justMouseDowned=!0;setTimeout(function(){f._justMouseDowned=!1},
0);if(!b.isIE||!a||!(a.srcElement&&a.srcElement.parentNode==null))f._onTouchNode(e||a.target||a.srcElement,"mouse")},d=b.isIE?a.document.documentElement:a.document;if(d)if(b.isIE){a.document.body.attachEvent("onmousedown",c);var g=function(a){a.srcElement.tagName.toLowerCase()!="#document"&&f.isTabNavigable(a.srcElement)?f._onFocusNode(e||a.srcElement):f._onTouchNode(e||a.srcElement)};d.attachEvent("onactivate",g);var h=function(a){f._onBlurNode(e||a.srcElement)};d.attachEvent("ondeactivate",h);return function(){a.document.detachEvent("onmousedown",
c);d.detachEvent("onactivate",g);d.detachEvent("ondeactivate",h);d=null}}else{d.body.addEventListener("mousedown",c,!0);var j=function(a){f._onFocusNode(e||a.target)};d.addEventListener("focus",j,!0);var k=function(a){f._onBlurNode(e||a.target)};d.addEventListener("blur",k,!0);return function(){d.body.removeEventListener("mousedown",c,!0);d.removeEventListener("focus",j,!0);d.removeEventListener("blur",k,!0);d=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){f._prevFocus=f._curFocus;
f._curFocus=null;if(!f._justMouseDowned)f._clearActiveWidgetsTimer&&clearTimeout(f._clearActiveWidgetsTimer),f._clearActiveWidgetsTimer=setTimeout(function(){delete f._clearActiveWidgetsTimer;f._setStack([]);f._prevFocus=null},100)},_onTouchNode:function(a,e){f._clearActiveWidgetsTimer&&(clearTimeout(f._clearActiveWidgetsTimer),delete f._clearActiveWidgetsTimer);var c=[];try{for(;a;){var d=b.attr(a,"dijitPopupParent");if(d)a=f.byId(d).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===
b.body())break;a=b.window.get(a.ownerDocument).frameElement}else{var g=a.getAttribute&&a.getAttribute("widgetId"),h=g&&f.byId(g);h&&!(e=="mouse"&&h.get("disabled"))&&c.unshift(g);a=a.parentNode}}}catch(j){}f._setStack(c,e)},_onFocusNode:function(a){if(a&&a.nodeType!=9&&(f._onTouchNode(a),a!=f._curFocus)){if(f._curFocus)f._prevFocus=f._curFocus;f._curFocus=a;b.publish("focusNode",[a])}},_setStack:function(a,e){var c=f._activeStack;f._activeStack=a;for(var d=0;d<Math.min(c.length,a.length);d++)if(c[d]!=
a[d])break;for(var g,h=c.length-1;h>=d;h--)if(g=f.byId(c[h]))g._focused=!1,g.set("focused",!1),g._hasBeenBlurred=!0,g._onBlur&&g._onBlur(e),b.publish("widgetBlur",[g,e]);for(h=d;h<a.length;h++)if(g=f.byId(a[h]))g._focused=!0,g.set("focused",!0),g._onFocus&&g._onFocus(e),b.publish("widgetFocus",[g,e])}});b.addOnLoad(function(){var a=f.registerWin(window);b.isIE&&b.addOnWindowUnload(function(){f.unregisterWin(a);a=null})});return f});
define("dojo/AdapterRegistry",["dojo"],function(b){b.AdapterRegistry=function(b){this.pairs=[];this.returnWrappers=b||!1};b.extend(b.AdapterRegistry,{register:function(b,a,e,c,d){this.pairs[d?"unshift":"push"]([b,a,e,c])},match:function(){for(var b=0;b<this.pairs.length;b++){var a=this.pairs[b];if(a[1].apply(this,arguments))return a[3]||this.returnWrappers?a[2]:a[2].apply(this,arguments)}throw Error("No match found");},unregister:function(b){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
b)return this.pairs.splice(a,1),!0;return!1}});return b.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(b,f){f.getViewport=function(){return b.window.getBox()};f.placeOnScreen=function(a,e,c,d){c=b.map(c,function(a){var b={corner:a,pos:{x:e.x,y:e.y}};d&&(b.pos.x+=a.charAt(1)=="L"?d.x:-d.x,b.pos.y+=a.charAt(0)=="T"?d.y:-d.y);return b});return f._place(a,c)};f._place=function(a,e,c,d){var g=b.window.getBox();(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")&&b.body().appendChild(a);var h=null;b.some(e,
function(e){var j=e.corner,f=e.pos,o=0,m={w:j.charAt(1)=="L"?g.l+g.w-f.x:f.x-g.l,h:j.charAt(1)=="T"?g.t+g.h-f.y:f.y-g.t};c&&(o=c(a,e.aroundCorner,j,m,d),o=typeof o=="undefined"?0:o);var p=a.style,q=p.display,r=p.visibility;p.visibility="hidden";p.display="";var s=b.marginBox(a);p.display=q;p.visibility=r;p=Math.max(g.l,j.charAt(1)=="L"?f.x:f.x-s.w);q=Math.max(g.t,j.charAt(0)=="T"?f.y:f.y-s.h);r=Math.min(g.l+g.w,j.charAt(1)=="L"?p+s.w:f.x);f=Math.min(g.t+g.h,j.charAt(0)=="T"?q+s.h:f.y);r-=p;f-=q;o+=
s.w-r+(s.h-f);if(h==null||o<h.overflow)h={corner:j,aroundCorner:e.aroundCorner,x:p,y:q,w:r,h:f,overflow:o,spaceAvailable:m};return!o});h.overflow&&c&&c(a,h.aroundCorner,h.corner,h.spaceAvailable,d);var e=b._isBodyLtr(),j=a.style;j.top=h.y+"px";j[e?"left":"right"]=(e?h.x:g.w-h.x-h.w)+"px";return h};f.placeOnScreenAroundNode=function(a,e,c,d){e=b.byId(e);e=b.position(e,!0);return f._placeOnScreenAroundRect(a,e.x,e.y,e.w,e.h,c,d)};f.placeOnScreenAroundRectangle=function(a,b,c,d){return f._placeOnScreenAroundRect(a,
b.x,b.y,b.width,b.height,c,d)};f._placeOnScreenAroundRect=function(a,b,c,d,g,h,j){var k=[],l;for(l in h)k.push({aroundCorner:l,corner:h[l],pos:{x:b+(l.charAt(1)=="L"?0:d),y:c+(l.charAt(0)=="T"?0:g)}});return f._place(a,k,j,{w:d,h:g})};f.placementRegistry=new b.AdapterRegistry;f.placementRegistry.register("node",function(a,b){return typeof b=="object"&&typeof b.offsetWidth!="undefined"&&typeof b.offsetHeight!="undefined"},f.placeOnScreenAroundNode);f.placementRegistry.register("rect",function(a,b){return typeof b==
"object"&&"x"in b&&"y"in b&&"width"in b&&"height"in b},f.placeOnScreenAroundRectangle);f.placeOnScreenAroundElement=function(a,b,c,d){return f.placementRegistry.match.apply(f.placementRegistry,arguments)};f.getPopupAroundAlignment=function(a,e){var c={};b.forEach(a,function(a){switch(a){case "after":c[e?"BR":"BL"]=e?"BL":"BR";break;case "before":c[e?"BL":"BR"]=e?"BR":"BL";break;case "below-alt":e=!e;case "below":c[e?"BL":"BR"]=e?"TL":"TR";c[e?"BR":"BL"]=e?"TR":"TL";break;case "above-alt":e=!e;default:c[e?
"TL":"TR"]=e?"BL":"BR",c[e?"TR":"TL"]=e?"BR":"BL"}});return c};return f});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(b,f){f.scrollIntoView=function(a,e){b.window.scrollIntoView(a,e)};return f.scrollIntoView});
define("dojo/uacss",["dojo"],function(b){(function(){var f=b.doc.documentElement,a=b.isIE,e=b.isOpera,c=Math.floor,d=b.isFF,g=b.boxModel.replace(/-/,""),a={dj_ie:a,dj_ie6:c(a)==6,dj_ie7:c(a)==7,dj_ie8:c(a)==8,dj_ie9:c(a)==9,dj_quirks:b.isQuirks,dj_iequirks:a&&b.isQuirks,dj_opera:e,dj_khtml:b.isKhtml,dj_webkit:b.isWebKit,dj_safari:b.isSafari,dj_chrome:b.isChrome,dj_gecko:b.isMozilla,dj_ff3:c(d)==3};a["dj_"+g]=!0;var h="",j;for(j in a)a[j]&&(h+=j+" ");f.className=b.trim(f.className+" "+h);b._loaders.unshift(function(){if(!b._isBodyLtr()){var a=
"dj_rtl dijitRtl "+h.replace(/ /g,"-rtl ");f.className=b.trim(f.className+" "+a)}})})();return b});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(b,f){return f});
define("dijit/_base/typematic",["dojo","dijit"],function(b,f){f.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);this._timer=setTimeout(b.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,e,c,d,g,h,j,k){if(g!=this._obj)this.stop(),
this._initialDelay=j||500,this._subsequentDelay=h||0.9,this._minDelay=k||10,this._obj=g,this._evt=a,this._node=c,this._count=this._currentTimeout=-1,this._callback=b.hitch(e,d),this._fireEventAndReload(),this._evt=b.mixin({faux:!0},a)},stop:function(){if(this._timer)clearTimeout(this._timer),this._timer=null;if(this._obj)this._callback(-1,this._node,this._evt),this._obj=null},addKeyListener:function(a,e,c,d,g,h,j){if(e.keyCode)e.charOrCode=e.keyCode,b.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0");else if(e.charCode)e.charOrCode=String.fromCharCode(e.charCode),b.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");return[b.connect(a,"onkeypress",this,function(k){k.charOrCode==e.charOrCode&&(e.ctrlKey===void 0||e.ctrlKey==k.ctrlKey)&&(e.altKey===void 0||e.altKey==k.altKey)&&(e.metaKey===void 0||e.metaKey==(k.metaKey||!1))&&(e.shiftKey===void 0||e.shiftKey==k.shiftKey)?(b.stopEvent(k),f.typematic.trigger(k,c,a,
d,e,g,h,j)):f.typematic._obj==e&&f.typematic.stop()}),b.connect(a,"onkeyup",this,function(){f.typematic._obj==e&&f.typematic.stop()})]},addMouseListener:function(a,e,c,d,g,h){var j=b.connect;return[j(a,"mousedown",this,function(j){b.stopEvent(j);f.typematic.trigger(j,e,a,c,a,d,g,h)}),j(a,"mouseup",this,function(a){b.stopEvent(a);f.typematic.stop()}),j(a,"mouseout",this,function(a){b.stopEvent(a);f.typematic.stop()}),j(a,"mousemove",this,function(a){a.preventDefault()}),j(a,"dblclick",this,function(j){b.stopEvent(j);
b.isIE&&(f.typematic.trigger(j,e,a,c,a,d,g,h),setTimeout(b.hitch(this,f.typematic.stop),50))})]},addListener:function(a,b,c,d,g,h,j,k){return this.addKeyListener(b,c,d,g,h,j,k).concat(this.addMouseListener(a,d,g,h,j,k))}};return f.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(b,f){f.wai={onload:function(){var a=b.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif"))+'");'}},b.body()),e=b.getComputedStyle(a);if(e){var c=e.backgroundImage;b[e.borderTopColor==e.borderRightColor||c!=null&&(c=="none"||c=="url(invalid-url:)")?"addClass":"removeClass"](b.body(),
"dijit_a11y");b.isIE?a.outerHTML="":b.body().removeChild(a)}}};(b.isIE||b.isMoz)&&b._loaders.unshift(f.wai.onload);b.mixin(f,{hasWaiRole:function(a,b){var c=this.getWaiRole(a);return b?c.indexOf(b)>-1:c.length>0},getWaiRole:function(a){return b.trim((b.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,e){b.attr(a,"role",e)},removeWaiRole:function(a,e){var c=b.attr(a,"role");c&&(e?(c=b.trim((" "+c+" ").replace(" "+e+" "," ")),b.attr(a,"role",c)):a.removeAttribute("role"))},hasWaiState:function(a,
b){return a.hasAttribute?a.hasAttribute("aria-"+b):!!a.getAttribute("aria-"+b)},getWaiState:function(a,b){return a.getAttribute("aria-"+b)||""},setWaiState:function(a,b,c){a.setAttribute("aria-"+b,c)},removeWaiState:function(a,b){a.removeAttribute("aria-"+b)}});return f});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(b,f){f.getDocumentWindow=function(a){return b.window.get(a)};return f});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(b,f){f.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var e=a.declaredClass?a._popupWrapper:a.parentNode&&b.hasClass(a.parentNode,"dijitPopup"),c=a.domNode||a;if(!e&&(e=b.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},b.body()),e.appendChild(c),c=c.style,c.display="",c.visibility="",c.position="",c.top="0px",a.declaredClass))a._popupWrapper=
e,b.connect(a,"destroy",function(){b.destroy(e);delete a._popupWrapper});return e},moveOffScreen:function(a){a=this._createWrapper(a);b.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);b.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,b=a.length-1;b>0&&a[b].parent===a[b-1].widget;b--);return a[b]},open:function(a){for(var e=this._stack,c=a.popup,d=a.orient||((a.parent?a.parent.isLeftToRight():b._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),g=a.around,h=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;e.length&&(!a.parent||!b.isDescendant(a.parent.domNode,e[e.length-1].widget.domNode));)f.popup.close(e[e.length-1].widget);var j=this._createWrapper(c);b.attr(j,{id:h,style:{zIndex:this._beginZIndex+e.length},"class":"dijitPopup "+(c.baseClass||c["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if((b.isIE||b.isMoz)&&!c.bgIframe)c.bgIframe=
new f.BackgroundIframe(j);d=g?f.placeOnScreenAroundElement(j,g,d,c.orient?b.hitch(c,"orient"):null):f.placeOnScreen(j,a,d=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);j.style.display="";j.style.visibility="visible";c.domNode.style.visibility="visible";g=[];g.push(b.connect(j,"onkeypress",this,function(c){if(c.charOrCode==b.keys.ESCAPE&&a.onCancel)b.stopEvent(c),a.onCancel();else if(c.charOrCode===b.keys.TAB&&(b.stopEvent(c),(c=this.getTopPopup())&&c.onCancel))c.onCancel()}));c.onCancel&&
g.push(b.connect(c,"onCancel",a.onCancel));g.push(b.connect(c,c.onExecute?"onExecute":"onChange",this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()}));e.push({widget:c,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:g});if(c.onOpen)c.onOpen(d);return d},close:function(a){for(var e=this._stack;a&&b.some(e,function(b){return b.widget==a})||!a&&e.length;){var c=e.pop(),d=c.widget,g=c.onClose;if(d.onClose)d.onClose();b.forEach(c.handlers,b.disconnect);
d&&d.domNode&&this.hide(d);g&&g()}}};f._frames=new function(){var a=[];this.pop=function(){var e;a.length?(e=a.pop(),e.style.display=""):(b.isIE<9?(e="<iframe src='"+(b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>",e=b.doc.createElement(e)):(e=b.create("iframe"),e.src='javascript:""',e.className="dijitBackgroundIframe",b.style(e,"opacity",0.1)),e.tabIndex=-1,f.setWaiRole(e,
"presentation"));return e};this.push=function(b){b.style.display="none";a.push(b)}};f.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(b.isIE||b.isMoz){var e=this.iframe=f._frames.pop();a.appendChild(e);b.isIE<7||b.isQuirks?(this.resize(a),this._conn=b.connect(a,"onresize",this,function(){this.resize(a)})):b.style(e,{width:"100%",height:"100%"})}};b.extend(f.BackgroundIframe,{resize:function(a){this.iframe&&b.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){if(this._conn)b.disconnect(this._conn),
this._conn=null;this.iframe&&(f._frames.push(this.iframe),delete this.iframe)}});return f.popup});define("dijit/_base","dojo,dijit,dijit/_base/focus,dijit/_base/manager,dijit/_base/place,dijit/_base/popup,dijit/_base/scroll,dijit/_base/sniff,dijit/_base/typematic,dijit/_base/wai,dijit/_base/window".split(","),function(b,f){return f._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(b,f){b.connect(b,"_connect",function(a,e){a&&b.isFunction(a._onConnect)&&a._onConnect(e)});f._connectOnUseEventHandler=function(){};f._lastKeyDownNode=null;b.isIE?function(){var a=function(a){f._lastKeyDownNode=a.srcElement};b.doc.attachEvent("onkeydown",a);b.addOnWindowUnload(function(){b.doc.detachEvent("onkeydown",a)})}():b.doc.addEventListener("keydown",function(a){f._lastKeyDownNode=a.target},!0);(function(){b.declare("dijit._Widget",
f._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:f._connectOnUseEventHandler,onDblClick:f._connectOnUseEventHandler,onKeyDown:f._connectOnUseEventHandler,onKeyPress:f._connectOnUseEventHandler,onKeyUp:f._connectOnUseEventHandler,onMouseDown:f._connectOnUseEventHandler,onMouseMove:f._connectOnUseEventHandler,onMouseOut:f._connectOnUseEventHandler,
onMouseOver:f._connectOnUseEventHandler,onMouseLeave:f._connectOnUseEventHandler,onMouseEnter:f._connectOnUseEventHandler,onMouseUp:f._connectOnUseEventHandler,create:function(a,e){this._deferredConnects=b.clone(this._deferredConnects);for(var c in this.attributeMap)delete this._deferredConnects[c];for(c in this._deferredConnects)this[c]!==f._connectOnUseEventHandler&&delete this._deferredConnects[c];this.inherited(arguments);if(this.domNode)for(c in this.params)this._onConnect(c)},_onConnect:function(a){a in
this._deferredConnects&&(this.connect(this[this._deferredConnects[a]||"domNode"],a.toLowerCase(),a),delete this._deferredConnects[a])},focused:!1,isFocusable:function(){return this.focus&&b.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,e){b.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,e)},attr:function(a,
e){if(b.config.isDebug){var c=arguments.callee._ach||(arguments.callee._ach={}),d=(arguments.callee.caller||"unknown caller").toString();c[d]||(b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+d,"","2.0"),c[d]=!0)}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,e,c){var d=b._connect,g=this.inherited(arguments,[a,e=="ondijitclick"?"onclick":e,c]);if(e==
"ondijitclick"&&b.indexOf(this.nodesWithKeyClick,a.nodeName.toLowerCase())==-1){var h=b.hitch(this,c);g.push(d(a,"onkeydown",this,function(c){if((c.keyCode==b.keys.ENTER||c.keyCode==b.keys.SPACE)&&!c.ctrlKey&&!c.shiftKey&&!c.altKey&&!c.metaKey)f._lastKeyDownNode=c.target,"openDropDown"in this&&a==this._buttonNode||c.preventDefault()}),d(a,"onkeyup",this,function(a){if((a.keyCode==b.keys.ENTER||a.keyCode==b.keys.SPACE)&&a.target==f._lastKeyDownNode&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey)return f._lastKeyDownNode=
null,h(a)}))}return g},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}})})();return f._Widget});
define("dijit/_Contained",["dojo","dijit"],function(b,f){b.declare("dijit._Contained",null,{getParent:function(){var a=f.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var b=this.domNode;do b=b[a+"Sibling"];while(b&&b.nodeType!=1);return b&&f.byNode(b)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var a=this.getParent();return!a||!a.getIndexOfChild?
-1:a.getIndexOfChild(this)}});return f._Contained});
define("dijit/_Container",["dojo","dijit"],function(b,f){b.declare("dijit._Container",null,{isContainer:!0,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,e){var c=this.containerNode;if(e&&typeof e=="number"){var d=this.getChildren();if(d&&d.length>=e)c=d[e-1].domNode,e="after"}b.place(a.domNode,c,e);this._started&&!a._started&&a.startup()},removeChild:function(a){typeof a=="number"&&(a=this.getChildren()[a]);if(a)(a=
a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},hasChildren:function(){return this.getChildren().length>0},destroyDescendants:function(a){b.forEach(this.getChildren(),function(b){b.destroyRecursive(a)})},_getSiblingOfChild:function(a,b){var c=a.domNode,d=b>0?"nextSibling":"previousSibling";do c=c[d];while(c&&(c.nodeType!=1||!f.byNode(c)));return c&&f.byNode(c)},getIndexOfChild:function(a){return b.indexOf(this.getChildren(),a)},startup:function(){this._started||(b.forEach(this.getChildren(),
function(a){a.startup()}),this.inherited(arguments))}});return f._Container});
define("dijit/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(b,f){b.declare("dijit.layout._LayoutWidget",[f._Widget,f._Container,f._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!a||!a.isLayoutContainer)this.resize(),this.connect(b.isIE?
this.domNode:b.global,"onresize",function(){this.resize()})}},resize:function(a,e){var c=this.domNode;if(a){b.marginBox(c,a);if(a.t)c.style.top=a.t+"px";if(a.l)c.style.left=a.l+"px"}var d=e||{};b.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=b.mixin(b.marginBox(c),d);var g=b.getComputedStyle(c),h=b._getMarginExtents(c,g),j=b._getBorderExtents(c,g),d=this._borderBox={w:d.w-(h.w+j.w),h:d.h-(h.h+j.h)},h=b._getPadExtents(c,g);this._contentBox={l:b._toPixelValue(c,g.paddingLeft),t:b._toPixelValue(c,g.paddingTop),
w:d.w-h.w,h:d.h-h.h};this.layout()},layout:function(){},_setupChild:function(a){b.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a,b){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){b.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});f.layout.marginBox2contentBox=function(a,e){var c=b.getComputedStyle(a),d=b._getMarginExtents(a,
c),g=b._getPadBorderExtents(a,c);return{l:b._toPixelValue(a,c.paddingLeft),t:b._toPixelValue(a,c.paddingTop),w:e.w-(d.w+g.w),h:e.h-(d.h+g.h)}};(function(){var a=function(a,c){var d=a.resize?a.resize(c):b.marginBox(a.domNode,c);d?b.mixin(a,d):(b.mixin(a,b.marginBox(a.domNode)),b.mixin(a,c))};f.layout.layoutChildren=function(e,c,d,g,h){c=b.mixin({},c);b.addClass(e,"dijitLayoutContainer");d=b.filter(d,function(a){return a.region!="center"&&a.layoutAlign!="client"}).concat(b.filter(d,function(a){return a.region==
"center"||a.layoutAlign=="client"}));b.forEach(d,function(e){var d=e.domNode,f=e.region||e.layoutAlign,n=d.style;n.left=c.l+"px";n.top=c.t+"px";n.position="absolute";b.addClass(d,"dijitAlign"+(f.substring(0,1).toUpperCase()+f.substring(1)));d={};g&&g==e.id&&(d[e.region=="top"||e.region=="bottom"?"h":"w"]=h);f=="top"||f=="bottom"?(d.w=c.w,a(e,d),c.h-=e.h,f=="top"?c.t+=e.h:n.top=c.t+c.h+"px"):f=="left"||f=="right"?(d.h=c.h,a(e,d),c.w-=e.w,f=="left"?c.l+=e.w:n.left=c.l+c.w+"px"):(f=="client"||f=="center")&&
a(e,c)})}})();return f.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(b,f){b.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isContainer:!0,isLayoutContainer:!0,_startChildren:function(){b.forEach(this.getChildren(),function(a){a.startup();a._started=!0})},startup:function(){if(!this._started){var a=f._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;
this.inherited(arguments);this._startChildren();this._isShown()&&this._onShow();this._childOfLayoutWidget||this.connect(b.isIE?this.domNode:b.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=b.query("> *",this.containerNode).filter(function(a){return a.tagName!=="SCRIPT"}),e=a.filter(function(a){return b.hasAttr(a,"data-dojo-type")||b.hasAttr(a,"dojoType")||b.hasAttr(a,"widgetId")}),c=b.filter(e.map(f.byNode),function(a){return a&&
a.domNode&&a.resize});a.length==e.length&&c.length==1?this._singleChild=c[0]:delete this._singleChild;b.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,b){!this._wasShown&&this.open!==!1&&this._onShow();this._resizeCalled=!0;this._scheduleLayout(a,b)},_scheduleLayout:function(a,b){this._isShown()?this._layout(a,b):(this._needLayout=!0,this._changeSize=a,this._resultSize=b)},_layout:function(a,e){a&&b.marginBox(this.domNode,a);var c=this.containerNode;
if(c===this.domNode){var d=e||{};b.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=b.mixin(b.marginBox(c),d);this._contentBox=f.layout.marginBox2contentBox(c,d)}else this._contentBox=b.contentBox(c);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||b.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else b.forEach(this.getChildren(),function(a){a.resize&&
a.resize()})},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&"open"in this?this.open:this._resizeCalled;else if("open"in this)return this.open;else{var a=this.domNode,e=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!b.hasClass(a,"dijitHidden")&&e&&e.style&&e.style.display!="none"}},_onShow:function(){this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments);this._wasShown=!0}});return f.layout._ContentPaneResizeMixin});
define("dojo/string",["dojo"],function(b){b.getObject("string",!0,b);b.string.rep=function(b,a){if(a<=0||!b)return"";for(var e=[];;){a&1&&e.push(b);if(!(a>>=1))break;b+=b}return e.join("")};b.string.pad=function(f,a,e,c){e||(e="0");f=String(f);a=b.string.rep(e,Math.ceil((a-f.length)/e.length));return c?f+a:a+f};b.string.substitute=function(f,a,e,c){c=c||b.global;e=e?b.hitch(c,e):function(a){return a};return f.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(d,g,h){d=b.getObject(g,!1,a);h&&
(d=b.getObject(h,!1,c).call(c,d,g));return e(d,g).toString()})};b.string.trim=String.prototype.trim?b.trim:function(b){for(var b=b.replace(/^\s+/,""),a=b.length-1;a>=0;a--)if(/\S/.test(b.charAt(a))){b=b.substring(0,a+1);break}return b};return b.string});
define("dojo/date/stamp",["dojo"],function(b){b.getObject("date.stamp",!0,b);b.date.stamp.fromISOString=function(f,a){if(!b.date.stamp._isoRegExp)b.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var e=b.date.stamp._isoRegExp.exec(f),c=null;if(e){e.shift();e[1]&&e[1]--;e[6]&&(e[6]*=1E3);a&&(a=new Date(a),b.forEach(b.map("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds".split(","),function(b){return a["get"+
b]()}),function(a,b){e[b]=e[b]||a}));c=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);e[0]<100&&c.setFullYear(e[0]||1970);var d=0,g=e[7]&&e[7].charAt(0);g!="Z"&&(d=(e[8]||0)*60+(Number(e[9])||0),g!="-"&&(d*=-1));g&&(d-=c.getTimezoneOffset());d&&c.setTime(c.getTime()+d*6E4)}return c};b.date.stamp.toISOString=function(b,a){var e=function(a){return a<10?"0"+a:a},a=a||{},c=[],d=a.zulu?"getUTC":"get",g="";a.selector!="time"&&(g=b[d+"FullYear"](),g=["0000".substr((g+"").length)+g,
e(b[d+"Month"]()+1),e(b[d+"Date"]())].join("-"));c.push(g);if(a.selector!="date"){g=[e(b[d+"Hours"]()),e(b[d+"Minutes"]()),e(b[d+"Seconds"]())].join(":");d=b[d+"Milliseconds"]();a.milliseconds&&(g+="."+(d<100?"0":"")+e(d));if(a.zulu)g+="Z";else if(a.selector!="time"){var d=b.getTimezoneOffset(),h=Math.abs(d);g+=(d>0?"-":"+")+e(Math.floor(h/60))+":"+e(h%60)}c.push(g)}return c.join("T")};return b.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(b){b.parser=new function(){function f(a,b){switch(b){case "string":return a;case "number":return a.length?Number(a):NaN;case "boolean":return typeof a=="boolean"?a:a.toLowerCase()!="false";case "function":c.isFunction(a)&&(a=a.toString(),a=c.trim(a.substring(a.indexOf("{")+1,a.length-1)));try{return a===""||a.search(/[^\w\.]+/i)!=-1?new Function(a):c.getObject(a,!1)||new Function(a)}catch(e){return new Function}case "array":return a?a.split(/\s*,\s*/):
[];case "date":switch(a){case "":return new Date("");case "now":return new Date;default:return c.date.stamp.fromISOString(a)}case "url":return c.baseUrl+a;default:return c.fromJson(a)}}function a(a,b){for(var e in a)if(e.charAt(0)!="_"&&!(e in d)){var g=b,f=e,o;o=a[e];o=c.isString(o)?"string":typeof o=="number"?"number":typeof o=="boolean"?"boolean":c.isFunction(o)?"function":c.isArray(o)?"array":o instanceof Date?"date":o instanceof c._Url?"url":"object";g[f]=o}return b}function e(b,e){var d=g[b];
if(d){if(!e&&!d.params)d.params=a(d.cls.prototype,{})}else{var d=c.getObject(b),f=null;if(!d)return null;e||(f=a(d.prototype,{}));d={cls:d,params:f}}return d}var c=b,d={},g={};c.connect(c,"extend",function(){g={}});this._functionFromScript=function(a,b){var e="",d="",g=a.getAttribute(b+"args")||a.getAttribute("args");g&&c.forEach(g.split(/\s*,\s*/),function(a,b){e+="var "+a+" = arguments["+b+"]; "});(g=a.getAttribute("with"))&&g.length&&c.forEach(g.split(/\s*,\s*/),function(a){e+="with("+a+"){";d+=
"}"});return new Function(e+a.innerHTML+d)};this.instantiate=function(a,d,g){var l=[],d=d||{},g=g||{},n=(g.scope||c._scopeName)+"Type",o="data-"+(g.scope||c._scopeName)+"-";c.forEach(a,function(a){if(a){var h,q,r,s,u,v;a.node?(h=a.node,q=a.type,v=a.fastpath,s=(r=a.clsInfo||q&&e(q,v))&&r.cls,u=a.scripts):(h=a,u=(s=(r=(q=n in d?d[n]:h.getAttribute(n))&&e(q))&&r.cls)&&(s._noScript||s.prototype._noScript)?[]:c.query("> script[type^='dojo/']",h));if(!r)throw Error("Could not load class '"+q);var w={};
g.defaults&&c._mixin(w,g.defaults);a.inherited&&c._mixin(w,a.inherited);if(v){if((r=h.getAttribute(o+"props"))&&r.length)try{r=c.fromJson.call(g.propsThis,"{"+r+"}"),c._mixin(w,r)}catch(t){throw Error(t.toString()+" in data-dojo-props='"+r+"'");}if(r=h.getAttribute(o+"attach-point"))w.dojoAttachPoint=r;if(r=h.getAttribute(o+"attach-event"))w.dojoAttachEvent=r;b.mixin(w,d)}else{var a=h.attributes,y;for(y in r.params)if((q=y in d?{value:d[y],specified:!0}:a.getNamedItem(y))&&(q.specified||b.isIE&&y.toLowerCase()==
"value")){q=q.value;switch(y){case "class":q="className"in d?d.className:h.className;break;case "style":q="style"in d?d.style:h.style&&h.style.cssText}v=r.params[y];w[y]=typeof q=="string"?f(q,v):q}}var x=[],G=[];c.forEach(u,function(a){h.removeChild(a);var b=a.getAttribute(o+"event")||a.getAttribute("event"),e=a.getAttribute("type"),a=c.parser._functionFromScript(a,o);b?e=="dojo/connect"?x.push({event:b,func:a}):w[b]=a:G.push(a)});var A=(u=s.markupFactory||s.prototype&&s.prototype.markupFactory)?
u(w,h,s):new s(w,h);l.push(A);(s=h.getAttribute(o+"id")||h.getAttribute("jsId"))&&c.setObject(s,A);c.forEach(x,function(a){c.connect(A,a.event,null,a.func)});c.forEach(G,function(a){a.call(A)})}});d._started||c.forEach(l,function(a){!g.noStart&&a&&b.isFunction(a.startup)&&!a._started&&(!a.getParent||!a.getParent())&&a.startup()});return l};this.parse=function(a,d){function g(a,c){var h=b.clone(a.inherited);b.forEach(["dir","lang"],function(b){var c=a.node.getAttribute(b);c&&(h[b]=c)});for(var f=a.clsInfo&&
!a.clsInfo.cls.prototype._noScript?a.scripts:null,l=!a.clsInfo||!a.clsInfo.cls.prototype.stopParser||d&&d.template,m=a.node.firstChild;m;m=m.nextSibling)if(m.nodeType==1){var t,p=l&&m.getAttribute(o+"type");t=p?p:l&&m.getAttribute(n);p=p==t;t?(t={type:t,fastpath:p,clsInfo:e(t,p),node:m,scripts:[],inherited:h},c.push(t),g(t,c)):f&&m.nodeName.toLowerCase()=="script"?(t=m.getAttribute("type"))&&/^dojo\/\w/i.test(t)&&f.push(m):l&&g({node:m,inherited:h},c)}}var f;!d&&a&&a.rootNode?(d=a,f=d.rootNode):f=
a;f=f?b.byId(f):b.body();var d=d||{},n=(d.scope||c._scopeName)+"Type",o="data-"+(d.scope||c._scopeName)+"-",m={};if(d&&d.inherited)for(var p in d.inherited)d.inherited[p]&&(m[p]=d.inherited[p]);p=[];g({node:f,inherited:m},p);return this.instantiate(p,d&&d.template?{template:!0}:null,d)}};(function(){var f=function(){b.config.parseOnLoad&&b.parser.parse()};b.getObject("dijit.wai.onload")===b._loaders[0]?b._loaders.splice(1,0,f):b._loaders.unshift(f)})();return b.parser});
define("dojo/html",["dojo","dojo/parser"],function(b){b.getObject("html",!0,b);(function(){var f=0;b.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};b.html._emptyNode=b.empty;b.html._setNodeContent=function(a,e){b.empty(a);if(e)if(typeof e=="string"&&(e=b._toDom(e,a.ownerDocument)),!e.nodeType&&b.isArrayLike(e))for(var c=e.length,d=0;d<e.length;d=c==e.length?d+1:0)b.place(e[d],a,"last");else b.place(e,a,"last");return a};b.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:b._scopeName,startup:!0,constructor:function(a,e){b.mixin(this,a||{});e=this.node=b.byId(this.node||e);if(!this.id)this.id=["Setter",e?e.id||e.tagName:"",f++].join("_")},set:function(a,b){if(void 0!==a)this.content=a;b&&this._mixin(b);this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var a=this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=
b.html._setNodeContent(a,this.content)}catch(e){var c=this.onContentError(e);try{a.innerHTML=c}catch(d){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+d.message,d)}}this.node=a},empty:function(){this.parseResults&&this.parseResults.length&&(b.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);b.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(b.isString(a)&&(this.cleanContent&&(a=b.html._secureForInnerHtml(a)),
this.extractContent)){var e=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);e&&(a=e[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(a){return"Error occured setting content: "+a},_mixin:function(a){var b={},c;for(c in a)c in b||(this[c]=a[c])},_parse:function(){var a=this.node;try{var e={};b.forEach(["dir","lang","textDir"],
function(a){this[a]&&(e[a]=this[a])},this);this.parseResults=b.parser.parse({rootNode:a,noStart:!this.startup,inherited:e,scope:this.parserScope})}catch(c){this._onError("Content",c,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,e,c){a=this["on"+a+"Error"].call(this,e);c?console.error(c,e):a&&b.html._setNodeContent(this.node,a,!0)}});b.html.set=function(a,e,c){void 0==e&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),e="");return c?(new b.html._ContentSetter(b.mixin(c,
{content:e,node:a}))).set():b.html._setNodeContent(a,e,!0)}})();return b.html});define("dijit/nls/loading",{root:{loadingState:"Loading...",errorState:"Sorry, an error occurred"},zh:!0,"zh-tw":!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,hu:!0,he:!0,fr:!0,fi:!0,es:!0,el:!0,de:!0,da:!0,cs:!0,ca:!0,ar:!0});
define("dijit/layout/ContentPane","dojo,dijit,dijit/_Widget,dijit/layout/_ContentPaneResizeMixin,dojo/string,dojo/html,i18n!dijit/nls/loading".split(","),function(b,f){b.declare("dijit.layout.ContentPane",[f._Widget,f.layout._ContentPaneResizeMixin],{href:"",extractContent:!1,parseOnLoad:!0,parserScope:b._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",
isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,attributeMap:b.delegate(f._Widget.prototype.attributeMap,{title:[]}),stopParser:!0,template:!1,create:function(a,e){if((!a||!a.template)&&e&&!("href"in a)&&!("content"in a)){for(var c=b.doc.createDocumentFragment(),e=b.byId(e);e.firstChild;)c.appendChild(e.firstChild);a=b.delegate(a,{content:c})}this.inherited(arguments,[a,e])},postMixInProperties:function(){this.inherited(arguments);var a=b.i18n.getLocalization("dijit","loading",
this.lang);this.loadingMessage=b.string.substitute(this.loadingMessage,a);this.errorMessage=b.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";b.attr(this.domNode,"role")||f.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&b.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&b.isFunction(a.startup))a.startup(),
a._started=!0},this)},setHref:function(a){b.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){b.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.",
"","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&this._xhrDfd.fired==-1&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},uninitialize:function(){this._beingDestroyed&&
this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
!0);var a=this,e={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};b.isObject(this.ioArgs)&&b.mixin(e,this.ioArgs);var c=this._xhrDfd=(this.ioMethod||b.xhrGet)(e);c.addCallback(function(b){try{a._isDownloaded=!0,a._setContent(b,!1),a.onDownloadEnd()}catch(c){a._onError("Content",c)}delete a._xhrDfd;return b});c.addErrback(function(b){c.canceled||a._onError("Download",b);delete a._xhrDfd;return b});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
!0);try{this.onLoadDeferred.callback(a)}catch(b){console.error("Error "+this.widgetId+" running custom onLoad code: "+b.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(){this.isLoaded&&this._onUnloadHandler();var a=this._contentSetter;b.forEach(this.getChildren(),function(a){a.destroyRecursive&&a.destroyRecursive()});a&&(b.forEach(a.parseResults,
function(a){a.destroyRecursive&&a.domNode&&a.domNode.parentNode==b.body()&&a.destroyRecursive()}),delete a.parseResults);b.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,e){this.destroyDescendants();var c=this._contentSetter;if(!(c&&c instanceof b.html._ContentSetter))c=this._contentSetter=new b.html._ContentSetter({node:this.containerNode,_onError:b.hitch(this,this._onError),onContentError:b.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=
a}catch(b){console.error("Fatal "+this.id+" could not change content due to "+b.message,b)}})});var d=b.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang},this._contentSetterParams||{});c.set(b.isObject(a)&&a.domNode?a.domNode:a,d);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();e||(this._started&&(this._startChildren(),this._scheduleLayout()),this._onLoadHandler(a))},
_onError:function(a,b,c){this.onLoadDeferred.errback(b);a=this["on"+a+"Error"].call(this,b);c?console.error(c,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}});return f.layout.ContentPane});
define("dojo/cache",["dojo"],function(b){var f={};b.cache=function(a,e,c){if(typeof a=="string")var d=b.moduleUrl(a,e);else d=a,c=e;var d=d.toString(),g=c;c!=void 0&&!b.isString(c)&&(g="value"in c?c.value:void 0);c=c&&c.sanitize?!0:!1;if(typeof g=="string")g=f[d]=c?b.cache._sanitize(g):g;else if(g===null)delete f[d];else{if(!(d in f)){g=void 0;if(b.isFunction(require)&&b.isString(a))try{var h=(a?a.replace(/\./g,"/")+"/":"")+e,g=require("text!"+h)}catch(j){}typeof g==="undefined"&&(g=b._getText(d));
f[d]=c?b.cache._sanitize(g):g}g=f[d]}return g};b.cache._sanitize=function(a){if(a){var a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""),b=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);b&&(a=b[1])}else a="";return a};return b.cache});
define("dijit/_Templated","dojo,dijit,dijit/_Widget,dojo/string,dojo/parser,dojo/cache".split(","),function(b,f){b.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:!1,_skipNodeCache:!1,_earlyTemplatedStartup:!1,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var e=this.declaredClass,c=this;return b.string.substitute(a,this,function(a,g){g.charAt(0)=="!"&&(a=b.getObject(g.substr(1),!1,c));if(typeof a=="undefined")throw Error(e+
" template:"+g);return a==null?"":g.charAt(0)=="!"?a:a.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=f._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),e;if(b.isString(a)){if(e=b._toDom(this._stringRepl(a)),e.nodeType!=1)throw Error("Invalid template: "+a);}else e=a.cloneNode(!0);this.domNode=e;this.inherited(arguments);this._attachTemplateNodes(e);if(this.widgetsInTemplate)a=this._startupWidgets=b.parser.parse(e,{noStart:!this._earlyTemplatedStartup,
template:!0,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"}),this._supportingWidgets=f.findWidgets(e),this._attachTemplateNodes(a,function(a,b){return a[b]});this._fillContent(this.srcNodeRef)},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)},_attachTemplateNodes:function(a,e){for(var e=e||function(a,b){return a.getAttribute(b)},c=b.isArray(a)?a:a.all||a.getElementsByTagName("*"),d=b.isArray(a)?0:-1;d<c.length;d++){var g=
d==-1?a:c[d];if(!this.widgetsInTemplate||!e(g,"dojoType")&&!e(g,"data-dojo-type")){var h=e(g,"dojoAttachPoint")||e(g,"data-dojo-attach-point");if(h)for(var j=h.split(/\s*,\s*/);h=j.shift();)b.isArray(this[h])?this[h].push(g):this[h]=g,this._attachPoints.push(h);if(h=e(g,"dojoAttachEvent")||e(g,"data-dojo-attach-event"))for(var j=h.split(/\s*,\s*/),k=b.trim;h=j.shift();)if(h){var l=null;h.indexOf(":")!=-1?(l=h.split(":"),h=k(l[0]),l=k(l[1])):h=k(h);l||(l=h);this._attachEvents.push(this.connect(g,h,
l))}(h=e(g,"waiRole"))&&f.setWaiRole(g,h);(h=e(g,"waiState"))&&b.forEach(h.split(/\s*,\s*/),function(a){a.indexOf("-")!=-1&&(a=a.split("-"),f.setWaiState(g,a[0],a[1]))})}}},startup:function(){b.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){b.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];b.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});
f._Templated._templateCache={};f._Templated.getCachedTemplate=function(a,e,c){var d=f._Templated._templateCache,g=e||a,h=d[g];if(h){try{if(!h.ownerDocument||h.ownerDocument==b.doc)return h}catch(j){}b.destroy(h)}e||(e=b.cache(a,{sanitize:!0}));e=b.string.trim(e);if(c||e.match(/\$\{([^\}]+)\}/g))return d[g]=e;else{a=b._toDom(e);if(a.nodeType!=1)throw Error("Invalid template: "+e);return d[g]=a}};b.isIE&&b.addOnWindowUnload(function(){var a=f._Templated._templateCache,e;for(e in a){var c=a[e];typeof c==
"object"&&b.destroy(c);delete a[e]}});b.extend(f._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return f._Templated});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(b,f){b.declare("dijit.form._FormMixin",null,{state:"",reset:function(){b.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=!1;return b.every(b.map(this.getDescendants(),function(e){e._hasBeenBlurred=!0;var c=e.disabled||!e.validate||e.validate();!c&&!a&&(b.window.scrollIntoView(e.containerNode||e.domNode),e.focus(),a=!0);return c}),function(a){return a})},setValues:function(a){b.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var e={};b.forEach(this.getDescendants(),function(a){a.name&&(e[a.name]||(e[a.name]=[])).push(a)});for(var c in e)if(e.hasOwnProperty(c)){var d=e[c],g=b.getObject(c,!1,a);g!==void 0&&(b.isArray(g)||(g=[g]),typeof d[0].checked=="boolean"?b.forEach(d,function(a){a.set("value",b.indexOf(g,a.value)!=-1)}):d[0].multiple?d[0].set("value",g):b.forEach(d,function(a,b){a.set("value",
g[b])}))}},getValues:function(){b.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};b.forEach(this.getDescendants(),function(e){var c=e.name;if(c&&!e.disabled){var d=e.get("value");typeof e.checked=="boolean"?/Radio/.test(e.declaredClass)?d!==!1?b.setObject(c,d,a):(d=b.getObject(c,!1,a),d===void 0&&b.setObject(c,null,a)):(e=b.getObject(c,!1,a),e||(e=[],b.setObject(c,e,a)),d!==!1&&e.push(d)):
(e=b.getObject(c,!1,a),typeof e!="undefined"?b.isArray(e)?e.push(d):b.setObject(c,[e,d],a):b.setObject(c,d,a))}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=b.map(this._descendants,function(a){return a.get("state")||""});return b.indexOf(a,"Error")>=0?"Error":b.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){b.forEach(this._childConnections||[],b.hitch(this,"disconnect"));b.forEach(this._childWatches||[],
function(a){a.unwatch()})},connectChildren:function(a){var e=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(a,b){e[a]=b}:b.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var c=this._childConnections=[],d=this._childWatches=[];b.forEach(b.filter(this._descendants,function(a){return a.validate}),function(a){b.forEach(["state","disabled"],function(b){d.push(a.watch(b,function(){e.set("state",e._getState())}))})});var g=function(){e._onChangeDelayTimer&&
clearTimeout(e._onChangeDelayTimer);e._onChangeDelayTimer=setTimeout(function(){delete e._onChangeDelayTimer;e._set("value",e.get("value"))},10)};b.forEach(b.filter(this._descendants,function(a){return a.onChange}),function(a){c.push(e.connect(a,"onChange",g));d.push(a.watch("disabled",g))})},startup:function(){this.inherited(arguments);this.connectChildren(!0);this.watch("state",function(a,b,c){this.onValidStateChange(c=="")})},destroy:function(){this.disconnectChildren();this.inherited(arguments)}});
return f.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(b,f){b.declare("dijit._DialogMixin",null,{attributeMap:f._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=f._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return f._DialogMixin});
(function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],f=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,c=e&&location.protocol&&location.protocol.replace(/\:/,""),d=e&&location.hostname,g=e&&(location.port||void 0),h=[];define("text",[],function(){var j,k,l;typeof window!=="undefined"&&window.navigator&&window.document?k=function(a,b){var c=j.createXhr();c.open("GET",a,!0);c.onreadystatechange=
function(){c.readyState===4&&b(c.responseText)};c.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(l=require.nodeRequire("fs"),k=function(a,b){var c=l.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)}):typeof Packages!=="undefined"&&(k=function(a,b){var c=new java.io.File(a),e=java.lang.System.getProperty("line.separator"),c=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(c),"utf-8")),d,g,j="";try{d=new java.lang.StringBuffer;
(g=c.readLine())&&g.length()&&g.charAt(0)===65279&&(g=g.substring(1));for(d.append(g);(g=c.readLine())!==null;)d.append(e),d.append(g);j=String(d.toString())}finally{c.close()}b(j)});return j={version:"1.0.7",strip:function(b){if(b){var b=b.replace(f,""),c=b.match(a);c&&(b=c[1])}else b="";return b},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")},createXhr:function(){var a,c,
e;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(c=0;c<3;c++){e=b[c];try{a=new ActiveXObject(e)}catch(d){}if(a){b=[e];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:k,parseName:function(a){var b=!1,c=a.indexOf("."),e=a.substring(0,c),a=a.substring(c+1,a.length),c=a.indexOf("!");c!==-1&&(b=a.substring(c+1,a.length),b=b==="strip",a=a.substring(0,c));return{moduleName:e,ext:a,strip:b}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,
b,c,e){var d=j.xdRegExp.exec(a),g;if(!d)return!0;a=d[2];d=d[3];d=d.split(":");g=d[1];d=d[0];return(!a||a===b)&&(!d||d===c)&&(!g&&!d||g===e)},finishLoad:function(a,b,c,e,d){c=b?j.strip(c):c;d.isBuild&&(h[a]=c);e(c)},load:function(a,b,h,k){if(k.isBuild&&!k.inlineText)h();else{var f=j.parseName(a),l=f.moduleName+"."+f.ext,s=b.toUrl(l),u=k&&k.text&&k.text.useXhr||j.useXhr;!e||u(s,c,d,g)?j.get(s,function(b){j.finishLoad(a,f.strip,b,h,k)}):b([l],function(a){j.finishLoad(f.moduleName+"."+f.ext,f.strip,a,
h,k)})}},write:function(a,b,c){if(b in h){var e=j.jsEscape(h[b]);c.asModule(a+"!"+b,"define(function () { return '"+e+"';});\n")}},writeFile:function(a,b,c,e,d){var b=j.parseName(b),g=b.moduleName+"."+b.ext,h=c.toUrl(b.moduleName+"."+b.ext)+".js";j.load(g,c,function(){var b=function(a){return e(h,a)};b.asModule=function(a,b){return e.asModule(a,h,b)};j.write(a,g,b,d)},d)}}})})();define("text!orion/widgets/templates/OperationsDialog.html",[],function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="padding: 0.5em; min-width: 300px;">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="status" aria-live="assertive"\n\t\t\tdojoattachpoint="containerNode" style="padding: 0">\n\t\t\t<table style="width: 100%;">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><h2>Recent operations</h2></td>\n\t\t\t\t\t<td style="text-align: right;"><a dojoAttachPoint="allOperationsLink">All Operations</a></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<span dojoAttachPoint="operationsExist">\n\t\t\t\t<span class="secondaryColumn" dojoAttachPoint="myOperationsListEmpty">No operations running on this page.</span>\n\t\t\t\t<table dojoAttachPoint="myOperationsList" style="display: none;">\n\t\t\t\t</table>\n\t\t\t\t<span class="secondaryColumn" dojoAttachPoint="otherOperations"><br>Operations from other pages:</span>\n\t\t\t\t<table dojoAttachPoint="operationsList" style="display: none;">\n\t\t\t\t</table>\n\t\t\t</span>\n\t\t\t<span class="secondaryColumn" dojoAttachPoint="operationsDontExist">No operations running.</span>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("text!dijit/templates/TooltipDialog.html",[],function(){return'<div role="presentation" tabIndex="-1">\n\t<div class="dijitTooltipContainer" role="presentation">\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" role="dialog"></div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n</div>'});
define("dijit/TooltipDialog","dojo,dijit,text!dijit/templates/TooltipDialog.html,dijit/layout/ContentPane,dijit/_Templated,dijit/form/_FormMixin,dijit/_DialogMixin".split(","),function(b,f){b.declare("dijit.TooltipDialog",[f.layout.ContentPane,f._Templated,f.form._FormMixin,f._DialogMixin],{title:"",doLayout:!1,autofocus:!0,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:b.cache("dijit","templates/TooltipDialog.html"),_setTitleAttr:function(a){this.containerNode.title=
a;this._set("title",a)},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey")},orient:function(a,e,c){a="dijitTooltipAB"+(c.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(c.charAt(0)=="T"?"Below":"Above");b.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);f.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow()},
onClose:function(){this.onHide()},_onKey:function(a){var e=a.target,c=b.keys;a.charOrCode===c.TAB&&this._getFocusItems(this.containerNode);var d=this._firstFocusItem==this._lastFocusItem;a.charOrCode==c.ESCAPE?(setTimeout(b.hitch(this,"onCancel"),0),b.stopEvent(a)):e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===c.TAB?(d||f.focus(this._lastFocusItem),b.stopEvent(a)):e==this._lastFocusItem&&a.charOrCode===c.TAB&&!a.shiftKey?(d||f.focus(this._firstFocusItem),b.stopEvent(a)):a.charOrCode===c.TAB&&
a.stopPropagation()}});return f.TooltipDialog});
define("orion/widgets/OperationsDialog","i18n!orion/operations/nls/messages,require,dojo,dijit,dijit/TooltipDialog,text!orion/widgets/templates/OperationsDialog.html".split(","),function(b,f,a,e){a.declare("orion.widgets.OperationsDialog",[e.TooltipDialog],{widgetsInTemplate:!0,closable:!0,templateString:a.cache("orion","widgets/templates/OperationsDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this._operations=[];this._myOperations=[]},postCreate:function(){this.inherited(arguments);
this.allOperationsLink.href=f.toUrl("operations/list.html");this._setOperationsVisibility()},setOperations:function(a,b){this._operations=[];b=b||{};this._myOperations=[];if(a.Children)for(var e=0;e<a.Children.length;e++)b[a.Children[e].Id]?this._myOperations.push(a.Children[e]):this._operations.push(a.Children[e]);this._operations.sort(function(a,b){return parseInt(b.Modified)-parseInt(a.Modified)});this._myOperations.sort(function(a,b){return parseInt(b.Modified)-parseInt(a.Modified)});this._renderOperations()},
parseProgressResult:function(a){if(!a)return{};a=a.responseText||a;try{a=JSON.parse(a)}catch(b){}var e={Message:a.Message||a,Severity:a.Severity};if(a.DetailedMessage&&a.DetailedMessage!==e.Message)e.DetailedMessage=a.DetailedMessage;return e},_renderOperations:function(){this._renderOperationsTable(this.myOperationsList,this._myOperations);this._renderOperationsTable(this.operationsList,this._operations)},_renderOperationsTable:function(c,e){a.empty(c);for(var g=0;g<e.length;g++){var h=e[g],j=a.create("tr"),
k=a.create("td",{style:"padding-left: 5px; padding-right: 5px"},j);k.textContent=h.Name;var k=a.create("div",null,k,"only"),f=a.create("span",{className:"primaryColumn"},k,"last");f.textContent=h.Name;a.place(document.createTextNode(h.Name),f,"only");var n=a.create("span",null,k,"first");a.addClass(n,"imageSprite");f=this.parseProgressResult(h.Result);switch(f.Severity){case "Warning":a.addClass(n,"core-sprite-warning");a.attr(n,"aria-label",b["Operation resulted in a warning."]);break;case "Error":a.addClass(n,
"core-sprite-error");a.attr(n,"aria-label",b["Operation resulted in an error."]);break;default:h.Running===!0?(a.addClass(n,"core-sprite-start"),a.attr(n,"aria-label",b["Operation is running."])):h.Canceled===!0?(a.addClass(n,"core-sprite-stop"),a.attr(n,"aria-label",b["Operation is canceled."])):h.Failed===!0?(a.addClass(n,"core-sprite-error"),a.attr(n,"aria-label",b["Operation failed."])):(a.addClass(n,"core-sprite-ok"),a.attr(n,"aria-label","Operation ok."))}if(f.Message||h.Message)h=f.Message||
h.Message,f.DetailedMessage&&f.DetailedMessage!==""&&(h+=": "+f.DetailedMessage),a.create("br",null,k,"last"),a.create("span",{className:"secondaryColumn",style:"margin-left: 18px;"},k,"last").textContent=h;a.place(j,c,"last")}this._setOperationsVisibility()},_setOperationsVisibility:function(){this.operationsList.style.display=this._operations.length>0?"":"none";this.otherOperations.style.display=this._operations.length>0?"":"none";this.myOperationsList.style.display=this._myOperations.length>0?
"":"none";this.myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.operationsDontExist.style.display=this._operations.length+this._myOperations.length>0?"none":"";this.operationsExist.style.display=this._operations.length+this._myOperations.length>0?"":"none"},_onBlur:function(){this.inherited(arguments);e.popup.hide&&e.popup.hide(this);e.popup.close(this)}})});
define("orion/dialogs",[],function(){function b(b){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.dialog",this)}b.prototype={confirm:function(b,a){a(window.confirm(b))},openFiles:function(){}};b.prototype.constructor=b;return{DialogService:b}});define("text!dijit/form/templates/ValidationTextBox.html",[],function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/i18n",["require","dojo"],function(b,f){f.getObject("i18n",!0,f);f.i18n.getLocalization=f.i18n.getLocalization||function(a,e,c){var c=f.i18n.normalizeLocale(c),d=c.split("-"),g=[a,"nls",e].join(".");if(typeof f.global.require!=="undefined"){var h=b("i18n!"+[a.replace(/\./g,"/"),"nls",e].join("/"));(f._loadedModules[g]=f._loadedModules[g]||{})[d.join("_")]=h.root||h}if(g=f._loadedModules[g]){for(var j,h=d.length;h>0;h--){var k=d.slice(0,h).join("_");if(g[k]){j=g[k];break}}if(!j)j=g.ROOT;
if(j)return a=function(){},a.prototype=j,new a}throw Error("Bundle not found: "+e+" in "+a+" , locale="+c);};f.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():f.locale;a=="root"&&(a="ROOT");return a};f.i18n._requireLocalization=function(a,b,c,d){var c=f.i18n.normalizeLocale(c),g=[a,"nls",b].join("."),h="";if(d){for(var j=d.split(","),k=0;k<j.length;k++)c.indexOf(j[k])==0&&j[k].length>h.length&&(h=j[k]);h||(h="ROOT")}var j=d?h:c,l=f._loadedModules[g],k=null;if(l){if(f.config.localizationComplete&&
l._built)return;k=j.replace(/-/g,"_");k=f._loadedModules[g+"."+k]}if(!k){var l=f.provide(g),n=f._getModuleSymbols(a).concat("nls").join("/"),o;f.i18n._searchLocalePath(j,d,function(a){var c=a.replace(/-/g,"_"),j=g+"."+c,h=!1;f._loadedModules[j]?h=!0:(f.provide(j),j=[n],a!="ROOT"&&j.push(a),j.push(b),a=j.join("/")+".js",h=f._loadPath(a,null,function(a){var a=a.root||a,b=function(){};b.prototype=o;l[c]=new b;for(var e in a)l[c][e]=a[e]}));h&&l[c]?o=l[c]:l[c]=o;if(d)return!0})}d&&c!=h&&(l[c.replace(/-/g,
"_")]=l[h.replace(/-/g,"_")])};(function(){var a=f.config.extraLocale;if(a){!a instanceof Array&&(a=[a]);var b=f.i18n._requireLocalization;f.i18n._requireLocalization=function(c,d,g,h){b(c,d,g,h);if(!g)for(g=0;g<a.length;g++)b(c,d,a[g],h)}}})();f.i18n._searchLocalePath=function(a,b,c){for(var a=f.i18n.normalizeLocale(a),d=a.split("-"),a=[],g=d.length;g>0;g--)a.push(d.slice(0,g).join("-"));a.push(!1);b&&a.reverse();for(b=a.length-1;b>=0;b--)if(c(a[b]||"ROOT"))break};f.i18n._preloadLocalizations=function(a,
b){function c(c){c=f.i18n.normalizeLocale(c);f.i18n._searchLocalePath(c,!0,function(c){for(var d=0;d<b.length;d++)if(b[d]==c)return f.require(a+"_"+c),!0;return!1})}c();for(var d=f.config.extraLocale||[],g=0;g<d.length;g++)c(d[g])};return f.i18n});define("text!dijit/form/templates/TextBox.html",[],function(){return'<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dijit/_CssStateMixin",["dojo","dijit"],function(b,f){b.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);b.forEach(["onmouseenter","onmouseleave","onmousedown"],function(a){this.connect(this.domNode,a,"_cssMouseEvent")},this);b.forEach("disabled,readOnly,checked,selected,focused,state,hovering,active".split(","),function(a){this.watch(a,b.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseenter":case "mouseover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":this._set("active",!0);this._mouseDown=!0;var e=this.connect(b.body(),"onmouseup",function(){this._mouseDown=!1;this._set("active",!1);this.disconnect(e)})}},_setStateClass:function(){function a(a){e=
e.concat(b.map(e,function(b){return b+a}),"dijit"+a)}var e=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");this.checked&&a("Checked");this.state&&a(this.state);this.selected&&a("Selected");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this._focused&&a("Focused");var c=this.stateNode||this.domNode,d={};b.forEach(c.className.split(" "),function(a){d[a]=!0});"_stateClasses"in this&&b.forEach(this._stateClasses,function(a){delete d[a]});
b.forEach(e,function(a){d[a]=!0});var g=[],h;for(h in d)g.push(h);c.className=g.join(" ");this._stateClasses=e},_trackMouseState:function(a,e){function c(){var c="disabled"in j&&j.disabled||"readonly"in j&&j.readonly;b.toggleClass(a,e+"Hover",d&&!g&&!c);b.toggleClass(a,e+"Active",g&&!c);b.toggleClass(a,e+"Focused",h&&!c)}var d=!1,g=!1,h=!1,j=this,k=b.hitch(this,"connect",a);k("onmouseenter",function(){d=!0;c()});k("onmouseleave",function(){g=d=!1;c()});k("onmousedown",function(){g=!0;c()});k("onmouseup",
function(){g=!1;c()});k("onfocus",function(){h=!0;c()});k("onblur",function(){h=!1;c()});this.watch("disabled",c);this.watch("readOnly",c)}});return f._CssStateMixin});
define("dijit/form/_FormWidget","dojo,dijit,dojo/window,dijit/_Widget,dijit/_Templated,dijit/_CssStateMixin".split(","),function(b,f){b.declare("dijit.form._FormWidget",[f._Widget,f._Templated,f._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,attributeMap:b.delegate(f._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=
this.name?'name="'+this.name.replace(/'/g,"&quot;")+'"':"";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousedown","_onMouseDown")},_setDisabledAttr:function(a){this._set("disabled",a);b.attr(this.focusNode,"disabled",a);this.valueNode&&b.attr(this.valueNode,"disabled",a);f.setWaiState(this.focusNode,"disabled",a);a?(this._set("hovering",!1),this._set("active",!1),a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode",b.forEach(b.isArray(a)?
a:[a],function(a){a=this[a];b.isWebKit||f.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){b.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(a){this.scrollOnFocus&&b.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&
b.style(this.domNode,"display")!="none"},focus:function(){this.disabled||f.focus(this.focusNode)},compare:function(a,b){return typeof a=="number"&&typeof b=="number"?isNaN(a)&&isNaN(b)?0:a-b:a>b?1:a<b?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,e){if(this._lastValueReported==void 0&&(e===null||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||this.compare(a,this._lastValueReported)!=
0;if((this.intermediateChanges||e||e===void 0)&&this._pendingOnChange)if(this._lastValueReported=a,this._pendingOnChange=!1,this._onChangeActive)this._onChangeHandle&&clearTimeout(this._onChangeHandle),this._onChangeHandle=setTimeout(b.hitch(this,function(){this._onChangeHandle=null;this.onChange(a)}),0)},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(clearTimeout(this._onChangeHandle),this.onChange(this._lastValueReported));this.inherited(arguments)},
setValue:function(a){b.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){b.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&b.mouseButtons.isLeft(a)&&this.isFocusable())var e=this.connect(b.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(e)})}});b.declare("dijit.form._FormValueWidget",
f.form._FormWidget,{readOnly:!1,attributeMap:b.delegate(f.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){b.attr(this.focusNode,"readOnly",a);f.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(b.isIE<9||b.isIE&&b.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===void 0)this._lastValueReported=this._resetValue=this.value},_setValueAttr:function(a,
b){this._handleOnChange(a,b)},_handleOnChange:function(a,b){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)},_onKeyDown:function(a){if(a.keyCode==b.keys.ESCAPE&&!a.ctrlKey&&!a.altKey&&!a.metaKey){var e;if(b.isIE)a.preventDefault(),e=document.createEventObject(),e.keyCode=b.keys.ESCAPE,e.shiftKey=a.shiftKey,a.srcElement.fireEvent("onkeypress",e)}},_layoutHackIE7:function(){if(b.isIE==
7)for(var a=this.domNode,e=a.parentNode,c=a.firstChild||a,d=c.style.filter,g=this;e&&e.clientHeight==0;)(function(){var a=g.connect(e,"onscroll",function(){g.disconnect(a);c.style.filter=(new Date).getMilliseconds();setTimeout(function(){c.style.filter=d},0)})})(),e=e.parentNode}});return f.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(b,f){b.declare("dijit.form.TextBox",f.form._FormValueWidget,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",templateString:b.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:b.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:b.delegate(f.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&this.templateString.toLowerCase()=="input"||(a=="hidden"||a=="file")&&this.templateString==f.form.TextBox.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},_setPlaceHolderAttr:function(a){this._set("placeHolder",
a);if(!this._phspan)this._attachPoints.push("_phspan"),this._phspan=b.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after");this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));this._updatePlaceHolder()},_updatePlaceHolder:function(){if(this._phspan)this._phspan.style.display=this.placeHolder&&!this._focused&&!this.textbox.value?"":"none"},_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,
b,c){var d;a!==void 0&&(d=this.filter(a),typeof c!="string"&&(c=d!==null&&(typeof d!="number"||!isNaN(d))?this.filter(this.format(d,this.constraints)):""));if(c!=null&&c!=void 0&&(typeof c!="number"||!isNaN(c))&&this.textbox.value!=c)this.textbox.value=c,this._set("displayedValue",this.get("displayedValue"));this._updatePlaceHolder();this.inherited(arguments,[d,b])},displayedValue:"",getDisplayedValue:function(){b.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.",
"","2.0");return this.get("displayedValue")},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},setDisplayedValue:function(a){b.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_setDisplayedValueAttr:function(a){a===null||a===void 0?a="":typeof a!="string"&&(a=String(a));this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},
format:function(a){return a==null||a==void 0?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},_onInput:function(a){if(a&&a.type&&/key/i.test(a.type)&&a.keyCode)switch(a.keyCode){case b.keys.SHIFT:case b.keys.ALT:case b.keys.CTRL:case b.keys.TAB:return}if(this.intermediateChanges){var e=this;setTimeout(function(){e._handleOnChange(e.get("value"),!1)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){b.isIE&&setTimeout(b.hitch(this,
function(){var a=b.getComputedStyle(this.domNode);if(a&&(a=a.fontFamily)){var e=this.domNode.getElementsByTagName("INPUT");if(e)for(var c=0;c<e.length;c++)e[c].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);b.isMoz||b.isOpera?this.connect(this.textbox,"oninput","_onInput"):(this.connect(this.textbox,"onkeydown","_onInput"),this.connect(this.textbox,"onkeyup","_onInput"),this.connect(this.textbox,"onpaste","_onInput"),this.connect(this.textbox,
"oncut","_onInput"))},_blankValue:"",filter:function(a){if(a===null)return this._blankValue;if(typeof a!="string")return a;this.trim&&(a=b.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){if(!this.disabled){this._setBlurValue();this.inherited(arguments);this._selectOnClickHandle&&
this.disconnect(this._selectOnClickHandle);if(this.selectOnClick&&b.isMoz)this.textbox.selectionStart=this.textbox.selectionEnd=void 0;this._updatePlaceHolder()}},_onFocus:function(a){if(!this.disabled&&!this.readOnly){if(this.selectOnClick&&a=="mouse")this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var a;b.isIE?(a=b.doc.selection.createRange(),a=a.parentElement()==this.textbox&&a.text.length==0):a=this.textbox.selectionStart==
this.textbox.selectionEnd;a&&f.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});f.selectInputText=function(a,e,c){var d=b.global,g=b.doc,a=b.byId(a);isNaN(e)&&(e=0);isNaN(c)&&(c=a.value?a.value.length:0);f.focus(a);g.selection&&b.body().createTextRange?a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",e),a.moveEnd("character",
c-e),a.select()):d.getSelection&&a.setSelectionRange&&a.setSelectionRange(e,c)};return f.form.TextBox});define("dijit/form/nls/validate",{root:{invalidMessage:"The value entered is not valid.",missingMessage:"This value is required.",rangeMessage:"This value is out of range."},zh:!0,"zh-tw":!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,hu:!0,he:!0,fr:!0,fi:!0,es:!0,el:!0,de:!0,da:!0,cs:!0,ca:!0,ar:!0});
define("orion/explorers/navigationUtils",["dojo"],function(b){function f(e,c,d,g){!a&&e&&(d?(e.push({domNode:c,widget:d,onClick:g}),b.attr(d,"tabIndex",-1)):(e.push({domNode:c}),b.attr(c,"tabIndex",-1),b.style(c,"outline","none")))}var a=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(a,b,d,g,h){a&&(a=a.getGridNavHolder(b,!0))&&f(a,d,g,h)},generateNavGrid:f,removeNavGrid:function(a,b){if(a)for(var d=0;d<a.length;d++)if(a[d].domNode===b){a.splice(d,1);break}}}});
define("text!dijit/templates/Menu.html",[],function(){return'<table class="dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0">\n\t<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>\n</table>'});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(b,f){b.declare("dijit._KeyNavContainer",f._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,e){var c=this._keyNavCodes={},d=b.hitch(this,this.focusPrev),g=b.hitch(this,this.focusNext);b.forEach(a,function(a){c[a]=d});b.forEach(e,function(a){c[a]=g});c[b.keys.HOME]=b.hitch(this,"focusFirstChild");c[b.keys.END]=b.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){b.forEach(this.getChildren(),b.hitch(this,"_startupChild"))},addChild:function(a,b){f._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(a)},focus:function(){this.focusFirstChild()},focusFirstChild:function(){var a=this._getFirstFocusableChild();a&&this.focusChild(a)},focusLastChild:function(){var a=this._getLastFocusableChild();a&&this.focusChild(a)},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,
1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),!0)},focusChild:function(a,b){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(b?"end":"start");this._set("focusedChild",a)},_startupChild:function(a){a.set("tabIndex","-1");this.connect(a,"_onFocus",function(){a.set("tabIndex",this.tabIndex)});this.connect(a,"_onBlur",function(){a.set("tabIndex","-1")})},_onContainerFocus:function(a){a.target===
this.domNode&&(this.focusFirstChild(),b.attr(this.domNode,"tabIndex","-1"))},_onBlur:function(a){this.tabIndex&&b.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!a.ctrlKey&&!a.altKey){var e=this._keyNavCodes[a.charOrCode];e&&(e(),b.stopEvent(a))}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
b){a&&(a=this._getSiblingOfChild(a,b));for(var c=this.getChildren(),d=0;d<c.length;d++){a||(a=c[b>0?0:c.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,b)}return null}});return f._KeyNavContainer});define("text!dijit/templates/CheckedMenuItem.html",[],function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitemcheckbox" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitMenuItemIcon dijitCheckedMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t\t<span class="dijitCheckedMenuItemIconChar">&#10003;</span>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode,labelNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">&nbsp;</td>\n</tr>'});
define("text!dijit/form/templates/Button.html",[],function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdojoAttachPoint="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/DropDownButton.html",[],function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class=\'dijitReset dijitInline dijitButtonNode\'\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"\n\t\t\trole="button" aria-haspopup="true" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon"\n\t\t\t\tdojoAttachPoint="iconNode"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tdojoAttachPoint="containerNode,_popupStateNode"\n\t\t\t\tid="${id}_label"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonInner"></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/ComboButton.html",[],function(){return'<table class="dijit dijitReset dijitInline dijitLeft"\n\tcellspacing=\'0\' cellpadding=\'0\' role="presentation"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonNode" dojoAttachPoint="buttonNode" dojoAttachEvent="ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress"\n\t\t><div id="${id}_button" class="dijitReset dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><div class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode" role="presentation"></div\n\t\t\t><div class="dijitReset dijitInline dijitButtonText" id="${id}_label" dojoAttachPoint="containerNode" role="presentation"></div\n\t\t></div\n\t\t></td\n\t\t><td id="${id}_arrow" class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\n\t\t\tdojoAttachPoint="_popupStateNode,focusNode,_buttonNode"\n\t\t\tdojoAttachEvent="onkeypress:_onArrowKeyPress"\n\t\t\ttitle="${optionsTitle}"\n\t\t\trole="button" aria-haspopup="true"\n\t\t\t><div class="dijitReset dijitArrowButtonInner" role="presentation"></div\n\t\t\t><div class="dijitReset dijitArrowButtonChar" role="presentation">&#9660;</div\n\t\t></td\n\t\t><td style="display:none !important;"\n\t\t\t><input ${!nameAttrSetting} type="${type}" value="${value}" dojoAttachPoint="valueNode"\n\t\t/></td></tr></tbody\n></table>'});
define("dijit/_HasDropDown",["dojo","dijit","dijit/_Widget"],function(b,f){b.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(a){if(!this.disabled&&!this.readOnly)b.stopEvent(a),this._docHandler=this.connect(b.doc,"onmouseup","_onDropDownMouseUp"),this.toggleDropDown()},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var e=this.dropDown,c=!1;if(a&&this._opened){var d=b.position(this._buttonNode,!0);if(!(a.pageX>=d.x&&a.pageX<=d.x+d.w)||!(a.pageY>=d.y&&a.pageY<=d.y+d.h)){for(d=a.target;d&&!c;)b.hasClass(d,"dijitPopup")?c=!0:d=d.parentNode;if(c){d=a.target;if(e.onItemClick){for(var g;d&&!(g=f.byNode(d));)d=d.parentNode;if(g&&g.onClick&&g.getParent)g.getParent().onItemClick(g,a)}return}}}this._opened&&e.focus&&e.autoFocus!==!1&&window.setTimeout(b.hitch(e,"focus"),
1)},_onDropDownClick:function(a){this._stopClickEvents&&b.stopEvent(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";b.addClass(this._arrowWrapperNode||
this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,"onmousedown","_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp")},destroy:function(){this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&
!this.readOnly){var e=this.dropDown,c=a.target;if(e&&this._opened&&e.handleKey&&e.handleKey(a)===!1)b.stopEvent(a);else if(e&&this._opened&&a.charOrCode==b.keys.ESCAPE)this.closeDropDown(),b.stopEvent(a);else if(!this._opened&&(a.charOrCode==b.keys.DOWN_ARROW||(a.charOrCode==b.keys.ENTER||a.charOrCode==" ")&&((c.tagName||"").toLowerCase()!=="input"||c.type&&c.type.toLowerCase()!=="text")))this._toggleOnKeyUp=!0,b.stopEvent(a)}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(b.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(f._curFocus&&this.dropDown&&b.isDescendant(f._curFocus,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},toggleDropDown:function(){!this.disabled&&!this.readOnly&&(this._opened?this.closeDropDown():this.isLoaded()?this.openDropDown():this.loadDropDown(b.hitch(this,"openDropDown")))},openDropDown:function(){var a=
this.dropDown,e=a.domNode,c=this._aroundNode||this.domNode,d=this;if(!this._preparedNode){this._preparedNode=!0;if(e.style.width)this._explicitDDWidth=!0;if(e.style.height)this._explicitDDHeight=!0}if(this.maxHeight||this.forceWidth||this.autoWidth){var g={display:"",visibility:"hidden"};if(!this._explicitDDWidth)g.width="";if(!this._explicitDDHeight)g.height="";b.style(e,g);g=this.maxHeight;if(g==-1)var g=b.window.getBox(),h=b.position(c,!1),g=Math.floor(Math.max(h.y,g.h-(h.y+h.h)));a.startup&&!a._started&&
a.startup();f.popup.moveOffScreen(a);var h=b._getMarginSize(e),j=g&&h.h>g;b.style(e,{overflowX:"hidden",overflowY:j?"auto":"hidden"});j?(h.h=g,"w"in h&&(h.w+=16)):delete h.h;this.forceWidth?h.w=c.offsetWidth:this.autoWidth?h.w=Math.max(h.w,c.offsetWidth):delete h.w;b.isFunction(a.resize)?a.resize(h):b.marginBox(e,h)}a=f.popup.open({parent:this,popup:a,around:c,orient:f.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:["below"],this.isLeftToRight()),
onExecute:function(){d.closeDropDown(!0)},onCancel:function(){d.closeDropDown(!0)},onClose:function(){b.attr(d._popupStateNode,"popupActive",!1);b.removeClass(d._popupStateNode,"dijitHasDropDownOpen");d._opened=!1}});b.attr(this._popupStateNode,"popupActive","true");b.addClass(d._popupStateNode,"dijitHasDropDownOpen");this._opened=!0;return a},closeDropDown:function(a){if(this._opened)a&&this.focus(),f.popup.close(this.dropDown),this._opened=!1}});return f._HasDropDown});
define("dijit/form/Button","dojo,dijit,text!dijit/form/templates/Button.html,text!dijit/form/templates/DropDownButton.html,text!dijit/form/templates/ComboButton.html,dijit/form/_FormWidget,dijit/_Container,dijit/_HasDropDown".split(","),function(b,f){b.declare("dijit.form.Button",f.form._FormWidget,{label:"",showLabel:!0,iconClass:"",type:"button",baseClass:"dijitButton",templateString:b.cache("dijit.form","templates/Button.html"),attributeMap:b.delegate(f.form._FormWidget.prototype.attributeMap,
{value:"valueNode"}),_onClick:function(a){if(this.disabled)return!1;this._clicked();return this.onClick(a)},_onButtonClick:function(a){if(this._onClick(a)===!1)a.preventDefault();else if(this.type=="submit"&&!(this.valueNode||this.focusNode).form)for(var b=this.domNode;b.parentNode;b=b.parentNode){var c=f.byNode(b);if(c&&typeof c._onSubmit=="function"){c._onSubmit(a);break}}else this.valueNode&&(this.valueNode.click(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);b.setSelectable(this.focusNode,
!1)},_fillContent:function(a){a&&(!this.params||!("label"in this.params))&&this.set("label",a.innerHTML)},_setShowLabelAttr:function(a){this.containerNode&&b.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return!0},_clicked:function(){},setLabel:function(a){b.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this._set("label",a);this.containerNode.innerHTML=
a;if(this.showLabel==!1&&!this.params.title)this.titleNode.title=b.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){b.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});b.declare("dijit.form.DropDownButton",[f.form.Button,f._Container,f._HasDropDown],{baseClass:"dijitDropDownButton",templateString:b.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
b.query("*",this.srcNodeRef);f.form.DropDownButton.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=f.byNode(a);delete this.dropDownContainer}this.dropDown&&f.popup.hide(this.dropDown);this.inherited(arguments)}},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(){var a=this.dropDown;
if(a)if(this.isLoaded())this.openDropDown();else{var e=b.connect(a,"onLoad",this,function(){b.disconnect(e);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});b.declare("dijit.form.ComboButton",f.form.DropDownButton,{templateString:b.cache("dijit.form","templates/ComboButton.html"),attributeMap:b.mixin(b.clone(f.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",
cssStateNodes:{buttonNode:"dijitButtonNode",titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"])f.focus(this._popupStateNode),b.stopEvent(a)},_onArrowKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"])f.focus(this.titleNode),b.stopEvent(a)},focus:function(a){this.disabled||f.focus(a=="start"?this.titleNode:this._popupStateNode)}});
b.declare("dijit.form.ToggleButton",f.form.Button,{baseClass:"dijitToggleButton",checked:!1,attributeMap:b.mixin(b.clone(f.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,e){this._set("checked",a);b.attr(this.focusNode||this.domNode,"checked",a);f.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,e)},setChecked:function(a){b.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
a+") instead.","","2.0");this.set("checked",a)},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1)}});return f.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(b,f){return f.form.DropDownButton});define("text!dijit/templates/MenuItem.html",[],function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitem" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitIcon dijitMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">\n\t\t<div dojoAttachPoint="arrowWrapper" style="visibility: hidden">\n\t\t\t<img src="${_blankGif}" alt="" class="dijitMenuExpand"/>\n\t\t\t<span class="dijitMenuExpandA11y">+</span>\n\t\t</div>\n\t</td>\n</tr>'});
define("dijit/MenuItem","dojo,dijit,text!dijit/templates/MenuItem.html,dijit/_Widget,dijit/_Templated,dijit/_Contained,dijit/_CssStateMixin".split(","),function(b,f){b.declare("dijit.MenuItem",[f._Widget,f._Templated,f._Contained,f._CssStateMixin],{templateString:b.cache("dijit","templates/MenuItem.html"),attributeMap:b.delegate(f._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",
accelKey:"",disabled:!1,_fillContent:function(a){a&&!("label"in this.params)&&this.set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);var a=this.id+"_text";b.attr(this.containerNode,"id",a);this.accelKeyNode&&(b.attr(this.accelKeyNode,"id",this.id+"_accel"),a+=" "+this.id+"_accel");f.setWaiState(this.domNode,"labelledby",a);b.setSelectable(this.domNode,!1)},_onHover:function(){this.getParent().onItemHover(this)},_onUnhover:function(){this.getParent().onItemUnhover(this);
this._set("hovering",!1)},_onClick:function(a){this.getParent().onItemClick(this,a);b.stopEvent(a)},onClick:function(){},focus:function(){try{b.isIE==8&&this.containerNode.focus(),f.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(!0);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){b.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){b.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){b.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){f.setWaiState(this.focusNode,"disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;b.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return f.MenuItem});
define("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(b,f){b.declare("dijit.CheckedMenuItem",f.MenuItem,{templateString:b.cache("dijit","templates/CheckedMenuItem.html"),checked:!1,_setCheckedAttr:function(a){b.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);f.setWaiState(this.domNode,"checked",a);this._set("checked",a)},onChange:function(){},_onClick:function(a){this.disabled||(this.set("checked",!this.checked),this.onChange(this.checked));
this.inherited(arguments)}});return f.CheckedMenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(b,f){b.declare("dijit.PopupMenuItem",f.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=b.query("*",this.srcNodeRef);f.PopupMenuItem.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.popup=f.byNode(a)}b.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&b.style(this.arrowWrapper,"visibility","");f.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){this.popup&&(this.popup._destroyed||this.popup.destroyRecursive(),delete this.popup);this.inherited(arguments)}});return f.PopupMenuItem});define("text!dijit/templates/MenuSeparator.html",[],function(){return'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>'});
define("dijit/MenuSeparator","dojo,dijit,text!dijit/templates/MenuSeparator.html,dijit/_Widget,dijit/_Templated,dijit/_Contained".split(","),function(b,f){b.declare("dijit.MenuSeparator",[f._Widget,f._Templated,f._Contained],{templateString:b.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);b.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}});return f.MenuSeparator});
define("dijit/Menu","dojo,dijit,text!dijit/templates/Menu.html,dojo/window,dijit/_Widget,dijit/_KeyNavContainer,dijit/_Templated,dijit/MenuItem,dijit/PopupMenuItem,dijit/CheckedMenuItem,dijit/MenuSeparator".split(","),function(b,f){b.declare("dijit._MenuBase",[f._Widget,f._Templated,f._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){this._started||(b.forEach(this.getChildren(),function(a){a.startup()}),this.startupKeyNavChildren(),this.inherited(arguments))},onExecute:function(){},
onCancel:function(){},_moveToPopup:function(a){this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled?this.focusedChild._onClick(a):(a=this._getTopMenu())&&a._isMenuBar&&a.focusNext()},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var a=this.currentPopup.parentMenu;a.focusedChild&&a.focusedChild._setSelected(!1);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(!0);this._stopPendingCloseTimer(this.currentPopup)}},onItemHover:function(a){if(this.isActive&&
(this.focusChild(a),this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer))this.hover_timer=setTimeout(b.hitch(this,"_openPopup"),this.popupDelay);this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(!1);var b=a.popup;if(b)this._stopPendingCloseTimer(b),b._pendingClose_timer=setTimeout(function(){b._pendingClose_timer=null;if(b.parentMenu)b.parentMenu.currentPopup=null;f.popup.close(b)},this.popupDelay)},onItemUnhover:function(a){this.isActive&&
this._stopPopupTimer();if(this._hoveredChild==a)this._hoveredChild=null},_stopPopupTimer:function(){if(this.hover_timer)clearTimeout(this.hover_timer),this.hover_timer=null},_stopPendingCloseTimer:function(a){if(a._pendingClose_timer)clearTimeout(a._pendingClose_timer),a._pendingClose_timer=null},_stopFocusTimer:function(){if(this._focus_timer)clearTimeout(this._focus_timer),this._focus_timer=null},_getTopMenu:function(){for(var a=this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,
b){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return!1;a.popup?this._openPopup():(this.onExecute(),a.onClick(b))},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var e=a.popup;if(!e.isShowingNow){this.currentPopup&&(this._stopPendingCloseTimer(this.currentPopup),f.popup.close(this.currentPopup));e.parentMenu=this;e.from_item=a;var c=this;f.popup.open({parent:this,popup:e,around:a.domNode,orient:this._orient||(this.isLeftToRight()?
{TR:"TL",TL:"TR",BR:"BL",BL:"BR"}:{TL:"TR",TR:"TL",BL:"BR",BR:"BL"}),onCancel:function(){c.focusChild(a);c._cleanUp();a._setSelected(!0);c.focusedChild=a},onExecute:b.hitch(this,"_cleanUp")});this.currentPopup=e;e.connect(e.domNode,"onmouseenter",b.hitch(c,"_onPopupHover"));if(e.focus)e._focus_timer=setTimeout(b.hitch(e,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=!0;b.replaceClass(this.domNode,"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=
!0;this._markActive()},_markInactive:function(){this.isActive=!1;b.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=!1;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup)f._curFocus&&b.isDescendant(f._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus(),f.popup.close(this.currentPopup),this.currentPopup=null;if(this.focusedChild)this.focusedChild._setSelected(!1),
this.focusedChild._onUnhover(),this.focusedChild=null},_onItemFocus:function(a){this._hoveredChild&&this._hoveredChild!=a&&this._hoveredChild._onUnhover()},_onBlur:function(){this._cleanUp();this.inherited(arguments)},_cleanUp:function(){this._closeChild();typeof this.isShowingNow=="undefined"&&this._markInactive()}});b.declare("dijit.Menu",f._MenuBase,{constructor:function(){this._bindings=[]},templateString:b.cache("dijit","templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:!1,
leftClickToOpen:!1,refocus:!0,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(b.body()):b.forEach(this.targetNodeIds,this.bindDomNode,this);var a=b.keys,e=this.isLeftToRight();this._openSubMenuKey=e?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=e?a.LEFT_ARROW:a.RIGHT_ARROW;this.connectKeyNavHandlers([a.UP_ARROW],[a.DOWN_ARROW])},_onKeyPress:function(a){if(!a.ctrlKey&&!a.altKey)switch(a.charOrCode){case this._openSubMenuKey:this._moveToPopup(a);b.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)if(this.parentMenu._isMenuBar)this.parentMenu.focusPrev();
else this.onCancel(!1);else b.stopEvent(a)}},_iframeContentWindow:function(a){return b.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&b.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&b.doc.frames[a.name]&&b.doc.frames[a.name].document||null},bindDomNode:function(a){var a=b.byId(a),e;if(a.tagName.toLowerCase()=="iframe"){var c=a,d=this._iframeContentWindow(c);e=
b.withGlobal(d,b.body)}else e=a==b.body()?b.doc.documentElement:a;var g={node:a,iframe:c};b.attr(a,"_dijitMenu"+this.id,this._bindings.push(g));var h=b.hitch(this,function(a){return[b.connect(a,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(a){b.stopEvent(a);this._scheduleOpen(a.target,c,{x:a.pageX,y:a.pageY})}),b.connect(a,"onkeydown",this,function(a){a.shiftKey&&a.keyCode==b.keys.F10&&(b.stopEvent(a),this._scheduleOpen(a.target,c))})]});g.connects=e?h(e):[];if(c)g.onloadHandler=b.hitch(this,
function(){var a=this._iframeContentWindow(c);e=b.withGlobal(a,b.body);g.connects=h(e)}),c.addEventListener?c.addEventListener("load",g.onloadHandler,!1):c.attachEvent("onload",g.onloadHandler)},unBindDomNode:function(a){var e;try{e=b.byId(a)}catch(c){return}a="_dijitMenu"+this.id;if(e&&b.hasAttr(e,a)){var d=b.attr(e,a)-1,g=this._bindings[d];b.forEach(g.connects,b.disconnect);var h=g.iframe;h&&(h.removeEventListener?h.removeEventListener("load",g.onloadHandler,!1):h.detachEvent("onload",g.onloadHandler));
b.removeAttr(e,a);delete this._bindings[d]}},_scheduleOpen:function(a,e,c){if(!this._openTimer)this._openTimer=setTimeout(b.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:e,coords:c})}),1)},_openMyself:function(a){function e(){l.refocus&&f.focus(n);f.popup.close(l)}var c=a.target,d=a.iframe;if(a=a.coords){if(d){var c=b.position(d,!0),g=this._iframeContentWindow(d),g=b.withGlobal(g,"_docScroll",b),h=b.getComputedStyle(d),j=b._toPixelValue,k=(b.isIE&&b.isQuirks?0:j(d,
h.paddingLeft))+(b.isIE&&b.isQuirks?j(d,h.borderLeftWidth):0),d=(b.isIE&&b.isQuirks?0:j(d,h.paddingTop))+(b.isIE&&b.isQuirks?j(d,h.borderTopWidth):0);a.x+=c.x+k-g.x;a.y+=c.y+d-g.y}}else a=b.position(c,!0),a.x+=10,a.y+=10;var l=this,n=f.getFocus(this);f.popup.open({popup:this,x:a.x,y:a.y,onExecute:e,onCancel:e,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);f.popup.close(this)}},uninitialize:function(){b.forEach(this._bindings,function(a){a&&
this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return f.Menu});define("text!dijit/templates/Tooltip.html",[],function(){return'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" dojoAttachPoint="connectorNode"></div\n></div>'});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(b,f){b.declare("dijit._MasterTooltip",[f._Widget,f._Templated],{duration:f.defaultDuration,templateString:b.cache("dijit","templates/Tooltip.html"),postCreate:function(){b.body().appendChild(this.domNode);this.bgIframe=new f.BackgroundIframe(this.domNode);this.fadeIn=b.fadeIn({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onShow")});this.fadeOut=b.fadeOut({node:this.domNode,
duration:this.duration,onEnd:b.hitch(this,"_onHide")})},show:function(a,e,c,d){if(!(this.aroundNode&&this.aroundNode===e))this.domNode.width="auto",this.fadeOut.status()=="playing"?this._onDeck=arguments:(this.containerNode.innerHTML=a,f.placeOnScreenAroundElement(this.domNode,e,f.getPopupAroundAlignment(c&&c.length?c:f.Tooltip.defaultPosition,!d),b.hitch(this,"orient")),b.style(this.domNode,"opacity",0),this.fadeIn.play(),this.isShowingNow=!0,this.aroundNode=e)},orient:function(a,e,c,d,g){this.connectorNode.style.top=
"";var h=d.w-this.connectorNode.offsetWidth;a.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[e+"-"+c];this.domNode.style.width="auto";var j=b.contentBox(this.domNode),k=Math.min(Math.max(h,1),j.w),f=k<j.w;this.domNode.style.width=k+"px";if(f&&(this.containerNode.style.overflow=
"auto",f=this.containerNode.scrollWidth,this.containerNode.style.overflow="visible",f>k))f=f+b.style(this.domNode,"paddingLeft")+b.style(this.domNode,"paddingRight"),this.domNode.style.width=f+"px";c.charAt(0)=="B"&&e.charAt(0)=="B"?(a=b.marginBox(a),e=this.connectorNode.offsetHeight,a.h>d.h?(this.connectorNode.style.top=d.h-g.h/2-e/2+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(g.h/2-e/2,0),a.h-e)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top=
"",this.connectorNode.style.bottom="");return Math.max(0,j.w-h)},_onShow:function(){if(b.isIE)this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a)this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=null,this.fadeOut.play()},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck)this.show.apply(this,this._onDeck),this._onDeck=null}});f.showTooltip=function(a,b,c,d){if(!f._masterTT)f._masterTT=
new f._MasterTooltip;return f._masterTT.show(a,b,c,d)};f.hideTooltip=function(a){if(!f._masterTT)f._masterTT=new f._MasterTooltip;return f._masterTT.hide(a)};b.declare("dijit.Tooltip",f._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){b.forEach(this._connections||[],function(a){b.forEach(a,b.hitch(this,"disconnect"))},this);var e=b.isArrayLike(a)?a:a?[a]:[];this._connections=b.map(e,function(a){return(a=b.byId(a))?[this.connect(a,"onmouseenter","_onTargetMouseEnter"),
this.connect(a,"onmouseleave","_onTargetMouseLeave"),this.connect(a,"onfocus","_onTargetFocus"),this.connect(a,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=e},addTarget:function(a){a=a.id||a;b.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=b.indexOf(this._connectIds,a.id||a);a>=0&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);
b.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;b.forEach(b.isArrayLike(a)?a:[a],this.addTarget,this)},_onTargetMouseEnter:function(a){this._onHover(a)},_onTargetMouseLeave:function(a){this._onUnHover(a)},_onTargetFocus:function(a){this._focus=!0;this._onHover(a)},_onTargetBlur:function(a){this._focus=!1;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var e=a.target;this._showTimer=setTimeout(b.hitch(this,function(){this.open(e)}),
this.showDelay)}},_onUnHover:function(){this._focus||(this._showTimer&&(clearTimeout(this._showTimer),delete this._showTimer),this.close())},open:function(a){this._showTimer&&(clearTimeout(this._showTimer),delete this._showTimer);f.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){this._connectNode&&(f.hideTooltip(this._connectNode),delete this._connectNode,this.onHide());this._showTimer&&(clearTimeout(this._showTimer),
delete this._showTimer)},onShow:function(){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments)}});f.Tooltip.defaultPosition=["after","before"];return f.Tooltip});
define("dijit/form/ValidationTextBox","dojo,dijit,text!dijit/form/templates/ValidationTextBox.html,dojo/i18n,dijit/form/TextBox,dijit/Tooltip,i18n!dijit/form/nls/validate".split(","),function(b,f){b.declare("dijit.form.ValidationTextBox",f.form.TextBox,{templateString:b.cache("dijit.form","templates/ValidationTextBox.html"),baseClass:"dijitTextBox dijitValidationTextBox",required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},regExp:".*",regExpGen:function(){return this.regExp},
state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused)},validator:function(a,b){return RegExp("^(?:"+this.regExpGen(b)+")"+(this.required?"":"?")+"$").test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,b)!==void 0)},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0},isValid:function(){return this.validator(this.textbox.value,this.constraints)},_isEmpty:function(a){return(this.trim?/^\s*$/:
/^$/).test(a)},getErrorMessage:function(){return this.required&&this._isEmpty(this.textbox.value)?this.missingMessage:this.invalidMessage},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(a){var b="",c=this.disabled||this.isValid(a);if(c)this._maskValidSubsetError=!0;var d=this._isEmpty(this.textbox.value),g=!c&&a&&this._isValidSubset();this._set("state",c?"":((!this._hasBeenBlurred||a)&&d||g)&&this._maskValidSubsetError?"Incomplete":"Error");f.setWaiState(this.focusNode,
"invalid",c?"false":"true");this.state=="Error"?(this._maskValidSubsetError=a&&g,b=this.getErrorMessage(a)):this.state=="Incomplete"?(b=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):d&&(b=this.getPromptMessage(a));this.set("message",b);return c},displayMessage:function(a){f.hideTooltip(this.domNode);a&&this._focused&&f.showTooltip(a,this.domNode,this.tooltipPosition,!this.isLeftToRight())},_refreshState:function(){this.validate(this._focused);this.inherited(arguments)},
constructor:function(){this.constraints={}},_setConstraintsAttr:function(a){if(!a.locale&&this.lang)a.locale=this.lang;this._set("constraints",a);this._computePartialRE()},_computePartialRE:function(){var a=this.regExpGen(this.constraints);this.regExp=a;var b="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":b+=a;break;case ")":b+="|$)";break;default:b+="(?:"+a+"|$)"}});
try{"".search(b)}catch(c){b=this.regExp,console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+b+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$")this.invalidMessage=this.messages.invalidMessage;if(!this.invalidMessage)this.invalidMessage=this.promptMessage;if(this.missingMessage=="$_unset_$")this.missingMessage=this.messages.missingMessage;
if(!this.missingMessage)this.missingMessage=this.invalidMessage;this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);f.setWaiState(this.focusNode,"required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)}});
b.declare("dijit.form.MappedTextBox",f.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},serialize:function(a){return a.toString?a.toString():""},toString:function(){var a=this.filter(this.get("value"));return a!=null?typeof a=="string"?a:this.serialize(a,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=b.place("<input type='hidden'"+
(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});b.declare("dijit.form.RangeBoundTextBox",f.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,b){return("min"in b?this.compare(a,b.min)>=0:!0)&&("max"in b?this.compare(a,b.max)<=0:!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=this.get("value"),b=!1,c=!1;
if("min"in this.constraints)b=this.constraints.min,b=this.compare(a,typeof b=="number"&&b>=0&&a!=0?0:b),b=typeof b=="number"&&b<0;if("max"in this.constraints)c=this.constraints.max,c=this.compare(a,typeof c!="number"||c>0?c:0),c=typeof c=="number"&&c>0;return b||c},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(a){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||this.isInRange(a))},getErrorMessage:function(a){var b=
this.get("value");return b!==null&&b!==""&&b!==void 0&&(typeof b!="number"||!isNaN(b))&&!this.isInRange(a)?this.rangeMessage:this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage)this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang),this.rangeMessage=this.messages.rangeMessage},_setConstraintsAttr:function(a){this.inherited(arguments);this.focusNode&&(this.constraints.min!==void 0?f.setWaiState(this.focusNode,"valuemin",this.constraints.min):
f.removeWaiState(this.focusNode,"valuemin"),this.constraints.max!==void 0?f.setWaiState(this.focusNode,"valuemax",this.constraints.max):f.removeWaiState(this.focusNode,"valuemax"))},_setValueAttr:function(a,b){f.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return f.form.ValidationTextBox});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
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 More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More 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 from ${0}":"Exporting from ${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","Click on an item to make a selection, then use this menu to see what actions are available.":"Click on an item to make a selection, then use this menu to see what actions are available.",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:"});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(b,f){function a(a,b,c){var e=new f;a[b].apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function e(a){this._location=a}function c(){var a=new f;a.reject(b["No Matching OperationService for location:"]+this._location);return a}function d(a){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var b=a.getServiceReferences("orion.core.operation"),
c=0;c<b.length;c++){var d=a.getService(b[c]);this._services[c]=d;d=b[c].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[c]=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 e(a)}}function g(a){for(var b={Children:[]},c=0;c<a.length;c++)b.Children=b.Children.concat(a[c].Children);return b}function h(b,c,e){var d=this,g={Longpolling:!0};if(e)g.LongpollingId=
e;a(b,"getOperations",[g]).then(function(a){e&&d._currentLongpollingIds.indexOf(e)<0||(c(a,e),a.LongpollingId?(d._currentLongpollingIds.push(a.LongpollingId),h.bind(d)(b,c,a.LongpollingId)):h.bind(d)(b,c,e))},function(a){e&&d._currentLongpollingIds.indexOf(e)<0||("timeout"===a.dojoType?h.bind(d)(b,c,e):setTimeout(function(){h.bind(d)(b,c,e)},2E3))})}function j(a){for(var b=0;b<this._operationListeners.length;b++)this._operationListeners[b](a)}e.prototype={getOperation:c,getOperations:c,removeCompletedOperations:c,
removeOperation:c,cancelOperation:c};e.prototype.constructor=e;d.prototype={getOperations:function(){for(var b=[],c=0;c<this._services.length;c++)b[c]=a(this._services[c],"getOperations",[void 0]);return f.all(b).then(function(a){return g(a)})},getRunningOperations:function(){for(var b=[],c=0;c<this._services.length;c++)b[c]=a(this._services[c],"getOperations",[{RunningOnly:!0}]);return f.all(b).then(function(a){return g(a)})},getOperation:function(b){return a(this._getService(b),"getOperation",arguments)},
removeCompletedOperations:function(){for(var b=[],c=0;c<this._services.length;c++)b[c]=a(this._services[c],"removeCompletedOperations");return f.all(b)},removeOperation:function(b){return a(this._getService(b),"removeOperation",arguments)},cancelOperation:function(b){return a(this._getService(b),"cancelOperation",arguments)},addOperationChangeListener:function(a){this._operationListeners.push(a);if(this._operationListeners.length===1){if(this._services.length<1)throw b["No operations services registered."];
for(a=0;a<this._services.length;a++)h.bind(this)(this._services[a],j.bind(this))}},removeOperationChangeListener:function(a){for(var b=0;b<this._operationListeners.length;b++)if(this._operationListeners[b]===a){this._operationListeners.splice(b,1);break}if(this._operationListeners.length===0)this._currentLongpollingIds=[]},resetChangeListeners:function(){this._currentLongpollingIds=[];if(this._services.length<1)throw b["No operations services registered."];for(var a=0;a<this._services.length;a++)h.bind(this)(this._services[a],
j.bind(this))}};d.prototype.constructor=d;return{OperationsClient:d}});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Case sensitive":"Case sensitive","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",
"Not found":"Not found","Replacing all...":"Replacing all..."," matches":" matches","Replaced ":"Replaced ","Nothing replaced":"Nothing replaced","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.","Save Search":"Save Search","Save search query":"Save search query",
"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","Search Again":"Search Again","Search again":"Search again","< 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",Searches:"Searches","You can save frequently used by searches by choosing ${0} in the search toolbar.":"You can save frequently used by searches by choosing ${0} in the search toolbar."});define("orion/editor/regex",[],function(){return{escape:function(b){return b.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(b){return(b=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(b))?{pattern:b[1],flags:b[2]}:null}}});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?"});
define("dojo/regexp",["dojo"],function(b){b.getObject("regexp",!0,b);b.regexp.escapeString=function(b,a){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(b){return a&&a.indexOf(b)!=-1?b:"\\"+b})};b.regexp.buildGroupRE=function(f,a,e){if(!(f instanceof Array))return a(f);for(var c=[],d=0;d<f.length;d++)c.push(a(f[d]));return b.regexp.group(c.join("|"),e)};b.regexp.group=function(b,a){return"("+(a?"?:":"")+b+")"};return b.regexp});
define("dojo/cookie",["dojo","dojo/regexp"],function(b){b.cookie=function(f,a,e){var c=document.cookie;if(arguments.length==1){var d=c.match(RegExp("(?:^|; )"+b.regexp.escapeString(f)+"=([^;]*)"));return d?decodeURIComponent(d[1]):void 0}else{e=e||{};c=e.expires;if(typeof c=="number"){var g=new Date;g.setTime(g.getTime()+c*864E5);c=e.expires=g}if(c&&c.toUTCString)e.expires=c.toUTCString();a=encodeURIComponent(a);c=f+"="+a;for(d in e)c+="; "+d,g=e[d],g!==!0&&(c+="="+g);document.cookie=c}};b.cookie.isSupported=
function(){if(!("cookieEnabled"in navigator))this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed",navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1});return navigator.cookieEnabled};return b.cookie});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(b,f){b.declare("dijit.layout.BorderContainer",f.layout._LayoutWidget,{design:"headline",gutters:!0,liveSplitters:!0,persist:!1,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){this._started||(b.forEach(this.getChildren(),this._setupChild,
this),this.inherited(arguments))},_setupChild:function(a){var e=a.region;if(e){this.inherited(arguments);b.addClass(a.domNode,this.baseClass+"Pane");var c=this.isLeftToRight();e=="leading"&&(e=c?"left":"right");e=="trailing"&&(e=c?"right":"left");if(e!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget)c=new (b.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter"))({id:a.id+"_splitter",container:this,child:a,region:e,live:this.liveSplitters}),c.isSplitter=!0,a._splitterWidget=c,b.place(c.domNode,
a.domNode,"after"),c.startup();a.region=e}},layout:function(){this._layoutChildren()},addChild:function(a,b){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var e=a.region,c=a._splitterWidget;c&&(c.destroy(),delete a._splitterWidget);this.inherited(arguments);this._started&&this._layoutChildren();b.removeClass(a.domNode,this.baseClass+"Pane");b.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});b.style(a.domNode,e=="top"||e=="bottom"?
"width":"height","auto")},getChildren:function(){return b.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return b.filter(this.getChildren(),function(b){return b.region==a})[0]._splitterWidget},resize:function(a,e){if(!this.cs||!this.pe){var c=this.domNode;this.cs=b.getComputedStyle(c);this.pe=b._getPadExtents(c,this.cs);this.pe.r=b._toPixelValue(c,this.cs.paddingRight);this.pe.b=b._toPixelValue(c,this.cs.paddingBottom);b.style(c,"padding","0px")}this.inherited(arguments)},
_layoutChildren:function(a,e){if(this._borderBox&&this._borderBox.h){var c=b.map(this.getChildren(),function(a,b){return{pane:a,weight:[a.region=="center"?Infinity:0,a.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(a.region)?1:-1),b]}},this);c.sort(function(a,b){for(var c=a.weight,e=b.weight,d=0;d<c.length;d++)if(c[d]!=e[d])return c[d]-e[d];return 0});var d=[];b.forEach(c,function(a){a=a.pane;d.push(a);a._splitterWidget&&d.push(a._splitterWidget)});f.layout.layoutChildren(this.domNode,
{l:this.pe.l,t:this.pe.t,w:this._borderBox.w-this.pe.w,h:this._borderBox.h-this.pe.h},d,a,e)}},destroyRecursive:function(){b.forEach(this.getChildren(),function(a){var b=a._splitterWidget;b&&b.destroy();delete a._splitterWidget});this.inherited(arguments)}});b.extend(f._Widget,{region:"",layoutPriority:0,splitter:!1,minSize:0,maxSize:Infinity});b.declare("dijit.layout._Splitter",[f._Widget,f._Templated],{live:!0,templateString:'<div class="dijitSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" role="separator"><div class="dijitSplitterThumb"></div></div>',
postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=b.cookie(this._cookieName);a&&(this.child.domNode.style[this.horizontal?"height":"width"]=a)}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",e=b.marginBox(this.child.domNode)[a],c=b.filter(this.container.getChildren(),function(a){return a.region=="center"})[0],a=b.marginBox(c.domNode)[a];return Math.min(this.child.maxSize,e+a)},_startDrag:function(a){if(!this.cover)this.cover=b.doc.createElement("div"),b.addClass(this.cover,"dijitSplitterCover"),b.place(this.cover,this.child.domNode,"after");b.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);if(!(this._resize=this.live))(this.fake=this.domNode.cloneNode(!0)).removeAttribute("id"),
b.addClass(this.domNode,"dijitSplitterShadow"),b.place(this.fake,this.domNode,"after");b.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");this.fake&&b.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var e=this._factor,c=this.horizontal,d=c?"pageY":"pageX",g=a[d],h=this.domNode.style,j=b.marginBox(this.child.domNode)[c?"h":"w"],f=this._computeMaxSize(),l=this.child.minSize||20,c=this.region,n=c=="top"||c=="bottom"?
"top":"left",o=parseInt(h[n],10),m=this._resize,p=b.hitch(this.container,"_layoutChildren",this.child.id),c=b.doc;this._handlers=(this._handlers||[]).concat([b.connect(c,"onmousemove",this._drag=function(a,b){var c=a[d]-g,u=e*c+j,v=Math.max(Math.min(u,f),l);(m||b)&&p(v);h[n]=c+o+e*(v-u)+"px"}),b.connect(c,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent),b.connect(c,"onmouseup",this,"_stopDrag")]);b.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||a.type=="mouseenter";
b.toggleClass(this.domNode,"dijitSplitterHover",a);b.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&b.removeClass(this.cover,"dijitSplitterCoverActive"),this.fake&&b.destroy(this.fake),b.removeClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow"),this._drag(a),this._drag(a,!0)}finally{this._cleanupHandlers(),delete this._drag}this.container.persist&&b.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){b.forEach(this._handlers,b.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=!0;var e=this.horizontal,c=1,d=b.keys;switch(a.charOrCode){case e?d.UP_ARROW:d.LEFT_ARROW:c*=-1;case e?d.DOWN_ARROW:d.RIGHT_ARROW:break;default:return}e=b._getMarginSize(this.child.domNode)[e?"h":"w"]+this._factor*c;this.container._layoutChildren(this.child.id,Math.max(Math.min(e,this._computeMaxSize()),
this.child.minSize));b.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});b.declare("dijit.layout._Gutter",[f._Widget,f._Templated],{templateString:'<div class="dijitGutter" role="presentation"></div>',postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return f.layout.BorderContainer});
define("orion/commonHTMLFragments",["i18n!orion/nls/messages","require"],function(b,f){function a(a){if(!a)return"";var b=document.createElement("span");b.textContent=a;return b.innerHTML}function e(a){return'<div id="'+a+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+a+'pageCommandParameters" class="layoutLeft parameters"></span><span id="'+a+'pageCommandDismiss" class="layoutRight parametersDismiss"></span></div>'}var c='<header id="banner" role="banner" class="headerLayout"><div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+
f.toUrl("navigate/table.html")+'" aria-label="Orion Home"></a><nav id="primaryNav" class="layoutLeft primaryNav" role="navigation"></nav><div class="layoutRight"><div id="globalActions" class="spacingLeft layoutLeft"></div><div id="relatedLinks" class="spacingLeft layoutLeft" style="padding-top:1px;"></div><input type="text" id="search" autocomplete="off" placeholder="Search" title="Type a keyword or wild card to search in root" class="layoutLeft spacingLeft searchbox" role="search"><div id="searchOptions" class="layoutLeft" style="padding-top:1px;"></div><div id="userMenu" class="spacingLeft layoutLeft"></div></div></div><div id="titleArea" class="layoutBlock titleArea"><div class="clear" style="padding-bottom:5px;display:inline;"><span id="location" class="currentLocation"></span><span id="dirty" class="currentLocation"></span></div><div class="layoutRight pageNav"><span id="pageFavorite" tabindex="0" role="button" aria-label="Add this page to the favorites list" class="spacingLeft layoutLeft imageSprite core-sprite-favorite_sml"></span></div></div></header>',
d='<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo"><div class="footerBlock">'+a(b["Orion is in Beta. Please try it out but BEWARE your data may be lost."])+'</div><div class="footerRightBlock"><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">'+a(b.FAQ)+'</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=1.0" target="_blank">'+a(b["Report a Bug"])+'</a> | <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">'+a(b["Privacy Policy"])+
'</a> | <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">'+a(b["Terms of Use"])+'</a> | <a href="http://www.eclipse.org/legal/copyright.php" target="_blank">'+a(b["Copyright Agent"])+"</a></div></footer>",g='<ul class="layoutLeft commandList pageActions" id="pageActions"></ul><ul class="layoutLeft commandList pageActions" id="selectionTools"></ul><img class="layoutRight progressPane" src="'+f.toUrl("images/none.png")+'" id="progressPane" tabindex="0" role="progressbar" aria-label="Operations - Press spacebar to show current operations"></img><div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div><ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul><div id="notificationArea" class="layoutLeft layoutBlock slideContainer"><div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div><div class="layoutRight"><span tabindex="0" role="button" aria-label="Close notification" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div></div>'+
e("mainToolbar");return{topHTMLFragment:c,bottomHTMLFragment:d,toolbarHTMLFragment:g,slideoutHTMLFragment:e}});
define("orion/parameterCollectors","i18n!orion/nls/messages,require,dojo,dijit,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton".split(","),function(b,f,a){function e(a,b){this._activeContainer=null;this._getElementsFunction=a;this._toolbarLayoutFunction=b}e.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&a.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&a.removeClass(this._activeElements.slideContainer,"slideContainerActive");
this._activeElements.dismissArea&&a.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&a.removeClass(this._activeElements.commandNode,"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,e,g){typeof c==="string"&&(c=a.byId(c));if(this._activeElements&&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=g;var h=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!h)return!1;this._activeElements.focusNode=h;c=a.query("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(c.length===
0)c=a.create("span",{id:"closebox",role:"button",tabindex:"0"},this._activeElements.dismissArea||this._activeElements.parameterArea,"last"),a.addClass(c,"imageSprite"),a.addClass(c,"core-sprite-close"),a.addClass(c,"dismiss"),c.title=b.Close,a.connect(c,"onclick",a.hitch(this,function(){this.close()})),a.connect(c,"onkeypress",a.hitch(this,function(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&this.close()}));a.addClass(this._activeElements.slideContainer,"slideContainerActive");this._toolbarLayoutFunction(this._activeElements);
if(h)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){h.focus();h.select()},0);this._activeElements.commandNode&&a.addClass(this._activeElements.commandNode,"activeCommand");return!0}return!1},_collectAndCall:function(b,e){a.query("input",e).forEach(function(a){a.type==="checkbox"?b.parameters.setValue(a.parameterName,a.checked):a.type!=="button"&&b.parameters.setValue(a.parameterName,a.value.trim())});a.query("textArea",e).forEach(function(a){b.parameters.setValue(a.parameterName,
a.value.trim())});b.command.callback&&b.command.callback.call(b.handler,b)},collectParameters:function(b){return b.parameters?(b.domNode&&a.addClass(b.domNode,"commandMarker"),this.open(b.domNode||b.domParent,this.getFillFunction(b))):!1},getFillFunction:function(c,e){return a.hitch(this,function(g,h){var j=null,f=a.hitch(this,function(){e&&e();this.close()}),l=a.hitch(this,function(b){b.keyCode===a.keys.ENTER&&this._collectAndCall(c,g);if(b.keyCode===a.keys.ESCAPE||b.keyCode===a.keys.ENTER)f(),a.stopEvent(b)});
c.parameters.forEach(function(b){if(b.label)a.create("label",{"class":"parameterInput","for":b.name+"parameterCollector"},g,"last").textContent=b.label;var c={type:b.type,id:b.name+"parameterCollector"},e;if(b.type==="text"&&typeof b.lines==="number"&&b.lines>1)c.rows=b.lines,c.type="textarea",e=a.create("textarea",c,g,"last"),l=a.hitch(this,function(b){b.keyCode===a.keys.ESCAPE&&(f(),a.stopEvent(b))});else if(b.type==="boolean"){if(c.type="checkbox",b.value)c.checked=!0}else if(b.value)c.value=b.value;
e||(e=a.create("input",c,g,"last"));a.addClass(e,"parameterInput parameterInput"+c.type);e.setAttribute("speech","speech");e.setAttribute("x-webkit-speech","x-webkit-speech");e.parameterName=b.name;j||(j=e);a.connect(e,"onkeypress",l)});var n=h||g,o=function(a){a._collectAndCall(c,g);f()};if(c.parameters.hasOptionalParameters()){c.parameters.optionsRequested=!1;var m=a.create("span",{role:"button",tabindex:"0"},n,"last");a.place(window.document.createTextNode(b.More),m,"last");a.addClass(m,"dismiss");
a.connect(m,"onclick",a.hitch(this,function(){c.parameters.optionsRequested=!0;o(this)}));a.connect(m,"onkeypress",a.hitch(this,function(b){if(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)c.parameters.optionsRequested=!0,o(this)}))}m=a.create("span",{role:"button",tabindex:"0"},n,"last");a.place(window.document.createTextNode(b.Submit),m,"last");a.addClass(m,"dismiss");a.connect(m,"onclick",a.hitch(this,function(){o(this)}));a.connect(m,"onkeypress",a.hitch(this,function(b){(b.keyCode===a.keys.ENTER||
b.charCode===a.keys.SPACE)&&o(this)}));n=a.create("span",{id:"closebox",role:"button",tabindex:"0"},n,"last");a.addClass(n,"imageSprite");a.addClass(n,"core-sprite-close");a.addClass(n,"dismiss");n.title=b.Close;a.connect(n,"onclick",a.hitch(this,function(){f()}));a.connect(n,"onkeypress",a.hitch(this,function(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&f()}));return j})}};e.prototype.constructor=e;return{CommandParameterCollector:e}});
define("orion/breadcrumbs",["require","dojo"],function(b,f){function a(a){this._init(a)}a.prototype={_init:function(a){var b=a.container;typeof b==="string"&&(b=f.byId(b));if(!b)throw"no parent container";this._container=b;f.removeClass(b,"currentLocation");this._id=a.id||"eclipse.breadcrumbs";this._resource=a.resource||null;this._rootSegmentName=a.rootSegmentName;this._workspaceRootSegmentName=a.workspaceRootSegmentName;this._makeHref=a.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var a;
this._resource&&this._resource.Parents?(a=document.createElement("a"),this._makeHref?this._makeHref(a,""):a.href=b.toUrl("navigate/table.html")+"#"):a=document.createElement("span");f.place(document.createTextNode(this._workspaceRootSegmentName),a,"only");return a}return null},render:function(){var a=this._container,c=f.byId(this._id);c?f.empty(c):(c=document.createElement("span"),c.id=this._id,a.appendChild(c));var d;if(d=this.getNavigatorWorkspaceRootSegment())if(f.addClass(d,"breadcrumb"),c.appendChild(d),
this._resource&&this._resource.Parents)d=document.createElement("span"),f.place(document.createTextNode(" / "),d,"only"),this.path+="/",f.addClass(d,"breadcrumbSeparator"),c.appendChild(d);else{d.href="";f.removeClass(d,"breadcrumb");f.addClass(d,"currentLocation");return}a=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var g=this._resource.Parents,h=g.length;--h>=0;)d=document.createElement("a"),f.addClass(d,"breadcrumb"),a?(f.place(document.createTextNode(a),d,"only"),a=
null):f.place(document.createTextNode(g[h].Name),d,"only"),this.path+=g[h].Name,this._makeHref?this._makeHref(d,g[h].Location):d.href=b.toUrl("navigate/table.html")+"#"+g[h].ChildrenLocation,c.appendChild(d),d=document.createElement("span"),f.place(document.createTextNode(" / "),d,"only"),this.path+="/",f.addClass(d,"breadcrumbSeparator"),c.appendChild(d);d=document.createElement("span");a?(f.place(document.createTextNode(a),d,"only"),a=null):f.place(document.createTextNode(this._resource.Name),d,
"only");f.addClass(d,"currentLocation");this.path+=this._resource.Name;c.appendChild(d)}c.childNodes.length===0&&(d=document.createElement("span"),f.place(document.createTextNode(a||document.title),d,"only"),f.addClass(d,"breadcrumb"),f.addClass(d,"currentLocation"),c.appendChild(d))}};a.prototype.constructor=a;return{BreadCrumbs:a}});
define("orion/splitter",["require","dojo"],function(b,f){function a(a){this._init(a)}a.prototype={_init:function(a){function b(a){var c=a;typeof a==="string"&&(c=f.byId(a));return c}this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this._prefix="/orion/splitter/"+document.body.id;this._node=b(a.node);if(!this._node)throw"no dom node for splitter found";this._sideNode=b(a.sidePanel);if(!this._sideNode)throw"no dom node for side panel found";this._mainNode=b(a.mainPanel);if(!this._mainNode)throw"no dom node for main panel found";
f.place("<div id='splitThumb' class='splitThumb splitThumbLayout'></div>",this._node,"only");this._initializeFromStoredSettings();this._thumb=f.query("#splitThumb",this._node)[0];this._closed?(this._closed=!1,this._thumbDown()):this._adjustToSplitPosition();f.style(this._node,{visibility:"visible"});f.style(this._mainNode,{display:"block"});f.style(this._sideNode,{display:"block"});f.connect(this._node,"onmousedown",this,this._mouseDown);f.connect(window,"onmouseup",this,this._mouseUp);f.connect(window,
"onresize",this,this._resize)},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(a){this._resizeListeners.push(a)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var a=localStorage.getItem(this._prefix+"/xPosition");if(a)this._splitLeft=parseInt(a,10)},_adjustToSplitPosition:function(a){var b=f.position(this._node);this._splitWidth=b.w;if(a||!this._splitLeft)this._splitLeft=
b.x,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);f.style(this._sideNode,{width:this._splitLeft+"px",right:this._splitLeft-1+"px",display:"block"});f.style(this._node,{left:this._splitLeft+"px"});this._resize()},_resize:function(a){var a=a||0,b=f.position(this._node.parentNode);this._totalWidth=b.w;b=f.position(this._node);f.style(this._mainNode,{width:this._totalWidth-b.x-b.w+"px"});window.setTimeout(f.hitch(this,function(){this._notifyResizeListeners(this._mainNode)}),a);window.setTimeout(f.hitch(this,
function(){this._notifyResizeListeners(this._sideNode)}),a)},_notifyResizeListeners:function(a){for(var b=0;b<this._resizeListeners.length;b++)this._resizeListeners[b](a)},_thumbDown:function(){this._closed?(this._closed=!1,this._addAnimation(),f.style(this._sideNode,{width:this._splitLeft+"px"}),f.style(this._node,{left:this._splitLeft+"px"})):(this._closed=!0,this._addAnimation(),f.style(this._sideNode,{width:0}),f.style(this._node,{left:"1px"}));this._resize(this._animationDelay);this._removeAnimation();
localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null)},_removeAnimation:function(){window.setTimeout(f.hitch(this,function(){f.removeClass(this._sideNode,"sidePanelLayoutAnimation");f.removeClass(this._mainNode,"mainPanelLayoutAnimation");f.removeClass(this._node,"splitLayoutAnimation");f.removeClass(this._thumb,"splitLayoutAnimation")}),this._animationDelay)},_addAnimation:function(){f.addClass(this._sideNode,"sidePanelLayoutAnimation");f.addClass(this._mainNode,"mainPanelLayoutAnimation");
f.addClass(this._node,"splitLayoutAnimation");f.addClass(this._thumb,"splitLayoutAnimation")},_mouseDown:function(a){if(a.target===this._thumb)return this._thumbDown(a);if(!this._tracking)f.addClass(this._node,"splitTracking"),f.addClass(this._mainNode,"panelTracking"),f.addClass(this._sideNode,"panelTracking"),this._tracking=f.connect(window,"onmousemove",this,this._mouseMove)},_mouseMove:function(a){if(this._tracking)this._splitLeft=a.clientX,f.style(this._node,{left:a.clientX+"px"}),this._adjustToSplitPosition(!0),
window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())},_mouseUp:function(){if(this._tracking)f.disconnect(this._tracking),this._tracking=null,f.removeClass(this._node,"splitTracking"),f.removeClass(this._mainNode,"panelTracking"),f.removeClass(this._sideNode,"panelTracking")}};a.prototype.constructor=a;return{Splitter:a}});
define("orion/URITemplate",[],function(){function b(a){this._text=a}function f(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 a(a,b,c){for(var e=[],d=0;d<a.length;d++)typeof a[d]!=="undefined"&&
e.push(f(a[d],b));return e.join(c)}function e(a,b,c,e){for(var d=Object.keys(a),g=[],h=0;h<d.length;h++)typeof a[d[h]]!=="undefined"&&g.push(f(d[h],b)+c+f(a[d[h]],b));return g.join(e)}function c(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=g[a[0]])?a=a.substring(1):this._operator=g.NUL;for(var b=[],c=a.split(","),e=0;e<c.length;e++){var d=c[e].match(h);if(d===null)throw Error("Bad VarSpec: "+a);b.push({name:d[1],explode:!!d[2],prefix:d[3]?parseInt(d[3],
10):-1})}this._varSpecList=b}function d(a){for(var e=[],d=0,g=a.indexOf("{",d);g!==-1;){e.push(new b(a.substring(d,g)));d=a.indexOf("}",g+1);if(d===-1)throw Error("Invalid template: "+a);e.push(new c(a.substring(g+1,d)));d+=1;g=a.indexOf("{",d)}e.push(new b(a.substring(d)));this._templateComponents=e}var g={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-,"}},h=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;b.prototype={expand:function(){return encodeURI(this._text)}};c.prototype={expand:function(b){for(var c=[],d=
0;d<this._varSpecList.length;d++){var g=this._varSpecList[d],h=g.name,m=b[h],p=typeof m;if(p!=="undefined"&&m!==null){var q=c.length===0?this._operator.first:this._operator.sep;if(p==="string")this._operator.named&&(q+=f(h,"U+R"),q+=m.length===0?this._operator.ifemp:"="),g.prefix!==-1&&g.prefix<m.length&&(m=m.substring(0,g.prefix)),q+=f(m,this._operator.allow);else if(Array.isArray(m))g.explode?q+=a(m,this._operator.allow,this._operator.sep):(this._operator.named&&(q+=f(h,"U+R"),q+=m.length===0?this._operator.ifemp:
"="),q+=a(m,this._operator.allow,","));else if(p==="object")g.explode?q+=e(m,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(q+=f(h,"U+R"),q+=Object.keys(m).length===0?this._operator.ifemp:"="),q+=e(m,this._operator.allow,",",","));else throw Error("bad param type: "+h+" : "+p);c.push(q)}}return c.join("")}};d.prototype={expand:function(a){for(var b=[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));return b.join("")}};return d});
define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile","JavaScript Editor":"JavaScript Editor",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",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 Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile 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:","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin",
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}"});
define("orion/widgets/themes/ThemeClass",["i18n!orion/settings/nls/messages","require"],function(){function b(b){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=b;this.classString="."+b+"{ "}b.prototype.className=null;b.prototype.classString=void 0;b.prototype.style=void 0;b.prototype.closeString=" }\n";b.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:b}});
define("orion/widgets/themes/container/ThemeSheetWriter",["i18n!orion/settings/nls/messages","require","dojo","dijit","orion/widgets/themes/ThemeClass"],function(b,f,a,e,c){function d(){}d.prototype.navbar="#333";d.prototype.button="#777777";d.prototype.location="#EFEFEF";d.prototype.selection="FEC";d.prototype.sidepanel="#FBFBFB";d.prototype.mainpanel="white";d.prototype.navtext="#bfbfbf";d.prototype.content="#3087B3";d.prototype.search="#444";d.prototype.toolpanel="white";d.prototype.writeNavigationStyle=
function(){var a="",b=[],d=new c.ThemeClass("orionPage");d.style.backgroundColor="#fdfdfd";d.style.width="100%";d.style.height="100%";b.push(d);d=new c.ThemeClass("topRowBanner");d.style.margin="0";d.style.border="0";d.style.backgroundColor=this.navbar;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";d.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";d.style.height="28px";b.push(d);
d=new c.ThemeClass("a");d.style.textDecoration="none";d.style.color=this.content;b.push(d);d=new c.ThemeClass("navlink");d.style.display="inline-block";d.style.padding="2px";d.style.color=this.content;b.push(d);d=new c.ThemeClass("primaryNav");d.style.color=this.navtext;d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.paddingTop="6px";d.style.verticalAlign="baseline";b.push(d);d=new c.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";b.push(d);d=new c.ThemeClass("primaryNav a:hover");d.style.color="#bfbfbf";d.style.cursor="hand";d.style.color="white";d.style.fontWeight="normal";b.push(d);for(var e in b)a+=b[e].toString();return a};d.prototype.writeLocationStyle=function(){var a="",b=[],d=new c.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";b.push(d);d=new c.ThemeClass("breadcrumb");d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color=this.content;d.style.paddingTop="2px";b.push(d);d=new c.ThemeClass("a.breadcrumb:hover");d.style.textDecoration="none";d.style.borderBottom="1px dotted";d.style.color="#F58B0F";d.style.cursor="pointer";b.push(d);d=new c.ThemeClass("breadcrumbSeparator");d.style.fontSize=
"8pt";d.style.textDecoration="none";d.style.color=this.navbar;d.style.fontWeight="bold";b.push(d);d=new c.ThemeClass("currentLocation");d.style.fontWeight="bold";d.style.fontSize="8pt";d.style.color=this.navbar;d.style.textDecoration="none";d.style.textWrap="normal";d.style.lineHeight="10pt";b.push(d);d=new c.ThemeClass("a.currentLocation:hover");d.style.fontWeight="bold";d.style.fontSize="10pt";d.style.color="#666666";d.style.textDecoration="none";d.style.borderBottom="0";b.push(d);d=new c.ThemeClass("navlinkonpage");
d.style.color=this.content;b.push(d);for(var e in b)a+=b[e].toString();return a};d.prototype.writeButtonStyle=function(){var a="",b=[],d=new c.ThemeClass("commandButton");d.style.color="#222";d.style.border="1px solid #dedede";d.style.backgroundColor=this.button;d.style.textAlign="center";d.style.verticalAlign="baseline";d.style.cursor="pointer";d.style.display="inline-block";d.style.padding="6px";d.style.paddingTop="4px";d.style.borderRadius="1px";d.style.lineHeight="12px";d.style.fontSize="8pt";
d.style.userSelect="none";b.push(d);d=new c.ThemeClass("commandButton:over");d.style.backgroundColor="#e6e6e6";d.style.border="1px solid #808080";b.push(d);d=new c.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";b.push(d);d=new c.ThemeClass("commandMenuItem");
d.style.border="0";d.style.padding="0";d.style.margin="0";b.push(d);for(var e in b)a+=b[e].toString();return a};d.prototype.writeMainStyle=function(){var a="",b=[],d=new c.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";b.push(d);d=new c.ThemeClass("searchbox:focus");d.style.color="white";d.style.outline="none";b.push(d);d=new c.ThemeClass("checkedRow");d.style.cssText="background-color:"+this.selection+" !important;";b.push(d);d=new c.ThemeClass("navbar-item-selected");
d.style.background=this.selection;d.style.color=this.content;b.push(d);d=new c.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%)";d.style.overflowX="auto";d.style.minWidth="200px";d.style.paddingTop="16px";b.push(d);d=new c.ThemeClass("mainpane");
d.style.background=this.mainpanel;d.style.border=0;b.push(d);d=new c.ThemeClass("mainToolbar");d.style.background=this.toolpanel;d.style.height="31px";d.style.borderBottom="1px solid #ebebeb";b.push(d);for(var e in b)a+=b[e].toString();return a};d.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};d.prototype.getSheet=function(a){a.navbar.value?(this.navbar=a.navbar.value,
this.button=a.button.value,this.location=a.location.value,this.selection=a.selection.value,this.sidepanel=a.sidepanel.value,this.mainpanel=a.mainpanel.value,this.navtext=a.navtext.value,this.search=a.search.value,this.content=a.content.value,this.toolpanel=a.toolpanel.value):(this.navbar=a.navbar,this.button=a.button,this.location=a.location,this.selection=a.selection,this.sidepanel=a.sidepanel,this.mainpanel=a.mainpanel,this.navtext=a.navtext,this.search=a.search,this.content=a.content,this.toolpanel=
a.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:d}});
define("orion/inputCompletion/inputCompletion",[],function(){function b(b,a,e){this._inputField=b;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=a;(b=e?e.group:null)||(b=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=b+"__completion__";this._proposeFromStart=e?e.proposeFromStart:!1;this._extendedProvider=e?e.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._initUI();var c=this;this._completionUIContainer.addEventListener("mousedown",function(){c._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){c._mouseDown=!1});this._inputField.addEventListener("blur",function(){c._mouseDown?window.setTimeout(function(){c._inputField.focus()},200):c._dismiss()});this._inputField.addEventListener("keydown",function(a){c.onKeyDown(a)});this._inputField.addEventListener("input",function(){c._proposeOn(c._inputField.value)});this._inputField.addEventListener("focus",
function(){if(c._dismissed&&c._binderFunc)c._dismissing?c._dismissing=!1:c._binderFunc&&c._binderFunc(function(a){c._bind(a);c._proposeOn(c._inputField.value)})})}b.prototype.onKeyDown=function(b){if(this._dismissed)return!0;var a=b.charCode||b.keyCode;if(a===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return b.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value),b.stopPropagation(),!1}else if((a===
40||a===38)&&this._proposalList&&this._proposalList.length>0)return b.preventDefault(),this._walk(a===40),b.stopPropagation(),!1;else if(a===27)return b.preventDefault(),this._dismiss(),!1;return!0};b.prototype._bind=function(b){this._dataList=b};b.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};b.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};b.prototype._initUI=function(){this._completionUIContainer=document.getElementById(this._getUIContainerID());
if(!this._completionUIContainer)this._completionUIContainer=document.createElement("div"),this._completionUIContainer.id=this._getUIContainerID(),this._completionUIContainer.style.display="none",this._completionUIContainer.className="inputCompletionContainer",this._completionUIContainer.setAttribute("role","list"),this._completionUIContainer.setAttribute("aria-atomic","true"),this._completionUIContainer.setAttribute("aria-live","assertive"),document.body.appendChild(this._completionUIContainer);this._completionUIContainer.textContent=
"";this._completionUL=document.getElementById(this._getUIProposalListId());if(!this._completionUL)this._completionUL=document.createElement("ul"),this._completionUL.id=this._getUIProposalListId(),this._completionUL.className="inputCompletionUL";this._completionUL.textContent="";this._completionUIContainer.appendChild(this._completionUL)};b.prototype._proposeOnCategory=function(b,a){if(a.length!==0){var e=this;if(b){var c=document.createElement("li");c.className="inputCompletionLICategory";var d=document.createTextNode(b);
c.appendChild(d);this._completionUL.appendChild(c)}for(var g=0;g<a.length;g++)c=document.createElement("li"),c.onmouseover=function(a){e._selectProposal(a.currentTarget)},c.onclick=function(a){e._dismiss(a.currentTarget.completionItem.value)},c.className="inputCompletionLINormal",c.completionItem=a[g],d=document.createTextNode(a[g].value),c.appendChild(d),this._completionUL.appendChild(c),this._proposalList.push({item:a[g],domNode:c})}};b.prototype._domNode2Index=function(b){for(var a=0;a<this._proposalList.length;a++)if(this._proposalList[a].domNode===
b)return a;return-1};b.prototype._highlight=function(b,a){var e=b,c=!1;isNaN(e)||(c=!0,e=this._proposalList&&b>=0&&b<this._proposalList.length?this._proposalList[b].domNode:null);if(e)e.className=a?"inputCompletionLISelected":"inputCompletionLINormal",a&&c&&(e.offsetTop<this._completionUIContainer.scrollTop?e.scrollIntoView(!0):e.offsetTop+e.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&e.scrollIntoView(!1))};b.prototype._selectProposal=function(b){var a=
b;isNaN(a)&&(a=this._domNode2Index(b));if(a!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=a,this._highlight(this._proposalIndex,!0)};b.prototype._dismiss=function(b){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(b)this._inputField.value=b,this._dismissing=!0,this._inputField.focus();var a=this;window.setTimeout(function(){a._completionUIContainer.style.display="none"},200)}};b.prototype._show=function(){if(this._proposalList&&
this._proposalList.length>0){for(var b=0,a=0,e=this._inputField;e;)b+=e.offsetLeft,a+=e.offsetTop,e=e.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=a+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=b+"px";this._completionUIContainer.style.width=this._inputField.offsetWidth+"px";this._dismissed=this._mouseDown=!1}else this._dismissed=!0,this._proposalList=null,this._proposalIndex=-1,this._completionUIContainer.style.display=
"none"};b.prototype._walk=function(b){b=this._proposalIndex+(b?1:-1);b<-1?b=this._proposalList.length-1:b>=this._proposalList.length&&(b=-1);this._selectProposal(b)};b.prototype._proposeOnList=function(b,a,e){for(var c="",d=[],g=0;g<b.length;g++)if(b[g].type==="category")this._proposeOnCategory(c,d),c=b[g].label,d=[];else{var h=!0;if(a&&e){var j=b[g].value.toLowerCase().indexOf(a);j<0?h=!1:this._proposeFromStart&&(h=j===0)}h&&d.push(b[g])}this._proposeOnCategory(c,d)};b.prototype._proposeOn=function(b){this._completionUL.textContent=
"";var a=b?b.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,a,!0);if(this._extendedProvider&&a){var e=this;this._extendedProvider(b,function(c){if(c)for(var d=0;d<c.length;d++)e._proposeOnList(c[d].proposals,c[d].filterForMe?a:b,c[d].filterForMe);e._show()},[])}else this._show()};b.prototype.constructor=b;return{InputCompletion:b}});
define("dojo/DeferredList",["dojo"],function(b){b.DeferredList=function(f,a,e,c){var d=[];b.Deferred.call(this);var g=this;f.length===0&&!a&&this.resolve([0,[]]);var h=0;b.forEach(f,function(b,k){function l(a,b){d[k]=[a,b];h++;h===f.length&&g.resolve(d)}b.then(function(b){a?g.resolve([k,b]):l(!0,b)},function(a){e?g.reject(a):l(!1,a);if(c)return null;throw a;})})};b.DeferredList.prototype=new b.Deferred;b.DeferredList.prototype.gatherResults=function(f){f=new b.DeferredList(f,!1,!0,!1);f.addCallback(function(a){var e=
[];b.forEach(a,function(a){e.push(a[1])});return e});return f};return b.DeferredList});define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","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 if you prefer","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&#x2026;":"Populating favorites&#x2026;",Favorite:"Favorite","Searching&#x2026;":"Searching&#x2026;",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("text!dijit/templates/Dialog.html",[],function(){return'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>'});
define("dojo/dnd/common",["dojo"],function(b){b.getObject("dnd",!0,b);b.dnd.getCopyKeyState=b.isCopyKey;b.dnd._uniqueId=0;b.dnd.getUniqueId=function(){var f;do f=b._scopeName+"Unique"+ ++b.dnd._uniqueId;while(b.byId(f));return f};b.dnd._empty={};b.dnd.isFormElement=function(b){b=b.target;if(b.nodeType==3)b=b.parentNode;return" button textarea input select option ".indexOf(" "+b.tagName.toLowerCase()+" ")>=0};return b.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(b){b.getObject("dnd",!0,b);b.dnd.getViewport=b.window.getBox;b.dnd.V_TRIGGER_AUTOSCROLL=32;b.dnd.H_TRIGGER_AUTOSCROLL=32;b.dnd.V_AUTOSCROLL_VALUE=16;b.dnd.H_AUTOSCROLL_VALUE=16;b.dnd.autoScroll=function(f){var a=b.window.getBox(),e=0,c=0;if(f.clientX<b.dnd.H_TRIGGER_AUTOSCROLL)e=-b.dnd.H_AUTOSCROLL_VALUE;else if(f.clientX>a.w-b.dnd.H_TRIGGER_AUTOSCROLL)e=b.dnd.H_AUTOSCROLL_VALUE;if(f.clientY<b.dnd.V_TRIGGER_AUTOSCROLL)c=-b.dnd.V_AUTOSCROLL_VALUE;
else if(f.clientY>a.h-b.dnd.V_TRIGGER_AUTOSCROLL)c=b.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(e,c)};b.dnd._validNodes={div:1,p:1,td:1};b.dnd._validOverflow={auto:1,scroll:1};b.dnd.autoScrollNodes=function(f){for(var a=f.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in b.dnd._validNodes){var e=b.getComputedStyle(a);if(e.overflow.toLowerCase()in b.dnd._validOverflow){var c=b._getContentBox(a,e),e=b.position(a,!0),d=Math.min(b.dnd.H_TRIGGER_AUTOSCROLL,c.w/2),g=Math.min(b.dnd.V_TRIGGER_AUTOSCROLL,
c.h/2),h=f.pageX-e.x,j=f.pageY-e.y,k=e=0;if(b.isWebKit||b.isOpera)h+=b.body().scrollLeft,j+=b.body().scrollTop;h>0&&h<c.w&&(h<d?e=-d:h>c.w-d&&(e=d));j>0&&j<c.h&&(j<g?k=-g:j>c.h-g&&(k=g));c=a.scrollLeft;d=a.scrollTop;a.scrollLeft+=e;a.scrollTop+=k;if(c!=a.scrollLeft||d!=a.scrollTop)return}}try{a=a.parentNode}catch(l){a=null}}b.dnd.autoScroll(f)};return b.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(b){b.declare("dojo.dnd.Mover",null,{constructor:function(f,a,e){this.node=b.byId(f);var c=a.touches?a.touches[0]:a;this.marginBox={l:c.pageX,t:c.pageY};this.mouseButton=a.button;a=this.host=e;f=f.ownerDocument;this.events=[b.connect(f,"onmousemove",this,"onFirstMove"),b.connect(f,"ontouchmove",this,"onFirstMove"),b.connect(f,"onmousemove",this,"onMouseMove"),b.connect(f,"ontouchmove",this,"onMouseMove"),b.connect(f,
"onmouseup",this,"onMouseUp"),b.connect(f,"ontouchend",this,"onMouseUp"),b.connect(f,"ondragstart",b.stopEvent),b.connect(f.body,"onselectstart",b.stopEvent)];if(a&&a.onMoveStart)a.onMoveStart(this)},onMouseMove:function(f){b.dnd.autoScroll(f);var a=this.marginBox,e=f.touches?f.touches[0]:f;this.host.onMove(this,{l:a.l+e.pageX,t:a.t+e.pageY},f);b.stopEvent(f)},onMouseUp:function(f){(b.isWebKit&&b.isMac&&this.mouseButton==2?f.button==0:this.mouseButton==f.button)&&this.destroy();b.stopEvent(f)},onFirstMove:function(f){var a=
this.node.style,e,c=this.host;switch(a.position){case "relative":case "absolute":e=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=b.marginBox(this.node);e=b.doc.body;var d=b.getComputedStyle(e),g=b._getMarginBox(e,d),d=b._getContentBox(e,d);e=a.l-(d.l-g.l);a=a.t-(d.t-g.t)}this.marginBox.l=e-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;if(c&&c.onFirstMove)c.onFirstMove(this,f);b.disconnect(this.events.shift());b.disconnect(this.events.shift())},
destroy:function(){b.forEach(this.events,b.disconnect);var f=this.host;if(f&&f.onMoveStop)f.onMoveStop(this);this.events=this.node=this.host=null}});return b.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(b){b.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:!1,constructor:function(f,a){this.node=b.byId(f);a||(a={});this.handle=a.handle?b.byId(a.handle):null;if(!this.handle)this.handle=this.node;this.delay=a.delay>0?a.delay:0;this.skip=a.skip;this.mover=a.mover?a.mover:b.dnd.Mover;this.events=[b.connect(this.handle,"onmousedown",this,"onMouseDown"),b.connect(this.handle,"ontouchstart",this,"onMouseDown"),b.connect(this.handle,"ondragstart",
this,"onSelectStart"),b.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(f,a){return new b.dnd.Moveable(a,f)},destroy:function(){b.forEach(this.events,b.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(f){if(!this.skip||!b.dnd.isFormElement(f)){if(this.delay){this.events.push(b.connect(this.handle,"onmousemove",this,"onMouseMove"),b.connect(this.handle,"ontouchmove",this,"onMouseMove"),b.connect(this.handle,"onmouseup",this,"onMouseUp"),b.connect(this.handle,
"ontouchend",this,"onMouseUp"));var a=f.touches?f.touches[0]:f;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(f);b.stopEvent(f)}},onMouseMove:function(f){var a=f.touches?f.touches[0]:f;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(f),this.onDragDetected(f);b.stopEvent(f)},onMouseUp:function(f){for(var a=0;a<2;++a)b.disconnect(this.events.pop());b.stopEvent(f)},onSelectStart:function(f){(!this.skip||!b.dnd.isFormElement(f))&&
b.stopEvent(f)},onDragDetected:function(b){new this.mover(this.node,b,this)},onMoveStart:function(f){b.publish("/dnd/move/start",[f]);b.addClass(b.body(),"dojoMove");b.addClass(this.node,"dojoMoveItem")},onMoveStop:function(f){b.publish("/dnd/move/stop",[f]);b.removeClass(b.body(),"dojoMove");b.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(b,a){this.onMoving(b,a);var e=b.node.style;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(b,a)},onMoving:function(){},onMoved:function(){}});
return b.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(b){b.declare("dojo.dnd.move.constrainedMoveable",b.dnd.Moveable,{constraints:function(){},within:!1,markupFactory:function(f,a){return new b.dnd.move.constrainedMoveable(a,f)},constructor:function(b,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(f){var a=this.constraintBox=this.constraints.call(this,f);a.r=a.l+a.w;a.b=a.t+a.h;this.within&&(f=b._getMarginSize(f.node),a.r-=f.w,a.b-=
f.h)},onMove:function(b,a){var e=this.constraintBox,c=b.node.style;this.onMoving(b,a);a.l=a.l<e.l?e.l:e.r<a.l?e.r:a.l;a.t=a.t<e.t?e.t:e.b<a.t?e.b:a.t;c.left=a.l+"px";c.top=a.t+"px";this.onMoved(b,a)}});b.declare("dojo.dnd.move.boxConstrainedMoveable",b.dnd.move.constrainedMoveable,{box:{},markupFactory:function(f,a){return new b.dnd.move.boxConstrainedMoveable(a,f)},constructor:function(b,a){var e=a&&a.box;this.constraints=function(){return e}}});b.declare("dojo.dnd.move.parentConstrainedMoveable",
b.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(f,a){return new b.dnd.move.parentConstrainedMoveable(a,f)},constructor:function(f,a){var e=a&&a.area;this.constraints=function(){var a=this.node.parentNode,d=b.getComputedStyle(a),g=b._getMarginBox(a,d);if(e=="margin")return g;var h=b._getMarginExtents(a,d);g.l+=h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;if(e=="border")return g;h=b._getBorderExtents(a,d);g.l+=h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;if(e=="padding")return g;h=b._getPadExtents(a,d);g.l+=
h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;return g}}});b.dnd.constrainedMover=b.dnd.move.constrainedMover;b.dnd.boxConstrainedMover=b.dnd.move.boxConstrainedMover;b.dnd.parentConstrainedMover=b.dnd.move.parentConstrainedMover;return b.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(b){(function(){var f=b.dnd.Moveable.prototype.onMove;b.declare("dojo.dnd.TimedMoveable",b.dnd.Moveable,{timeout:40,constructor:function(a,b){b||(b={});if(b.timeout&&typeof b.timeout=="number"&&b.timeout>=0)this.timeout=b.timeout},markupFactory:function(a,e){return new b.dnd.TimedMoveable(e,a)},onMoveStop:function(a){a._timer&&(clearTimeout(a._timer),f.call(this,a,a._leftTop));b.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,b){a._leftTop=b;if(!a._timer){var c=this;a._timer=setTimeout(function(){a._timer=null;f.call(c,a,a._leftTop)},this.timeout)}}})})();return b.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(b){b.declare("dojo.fx.Toggler",null,{node:null,showFunc:b.fadeIn,hideFunc:b.fadeOut,showDuration:200,hideDuration:200,constructor:function(f){b.mixin(this,f);this.node=f.node;this._showArgs=b.mixin({},f);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=b.mixin({},f);this._hideArgs.node=this.node;this._hideArgs.duration=this.hideDuration;this.hideAnim=this.hideFunc(this._hideArgs);
b.connect(this.showAnim,"beforeBegin",b.hitch(this.hideAnim,"stop",!0));b.connect(this.hideAnim,"beforeBegin",b.hitch(this.showAnim,"stop",!0))},show:function(b){return this.showAnim.play(b||0)},hide:function(b){return this.hideAnim.play(b||0)}});return b.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(b){(function(){var f={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}},a=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;b.forEach(this._animations,function(a){this.duration+=a.duration;a.delay&&(this.duration+=a.delay)},this)};b.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){b.disconnect(this._onAnimateCtx);b.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate"),this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd"),this._current.play(0,!0))},play:function(a,d){if(!this._current)this._current=this._animations[this._index=0];if(!d&&this._current.status()=="playing")return this;var e=b.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),
h=b.connect(this._current,"onBegin",this,function(a){this._fire("onBegin",arguments)}),j=b.connect(this._current,"onPlay",this,function(a){this._fire("onPlay",arguments);b.disconnect(e);b.disconnect(h);b.disconnect(j)});this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&b.disconnect(this._onEndCtx);this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);
return this},pause:function(){if(this._current){var a=b.connect(this._current,"onPause",this,function(d){this._fire("onPause",arguments);b.disconnect(a)});this._current.pause()}return this},gotoPercent:function(a,d){this.pause();var e=this.duration*a;this._current=null;b.some(this._animations,function(a){if(a.duration<=e)return this._current=a,!0;e-=a.duration;return!1});this._current&&this._current.gotoPercent(e/this._current.duration,d);return this},stop:function(a){if(this._current){if(a){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var d=b.connect(this._current,"onStop",this,function(a){this._fire("onStop",arguments);b.disconnect(d)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onEndCtx&&b.disconnect(this._onEndCtx)}});b.extend(a,f);b.fx.chain=function(b){return new a(b)};
var e=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;b.forEach(a,function(a){var c=a.duration;a.delay&&(c+=a.delay);if(this.duration<c)this.duration=c;this._connects.push(b.connect(a,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new b.Animation({curve:[0,1],duration:this.duration});var d=this;b.forEach("beforeBegin,onBegin,onPlay,onAnimate,onPause,onStop,onEnd".split(","),function(a){d._connects.push(b.connect(d._pseudoAnimation,a,function(){d._fire(a,arguments)}))})};
b.extend(e,{_doAction:function(a,d){b.forEach(this._animations,function(b){b[a].apply(b,d)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,b){var e=this._pseudoAnimation;e[a].apply(e,b)},play:function(a,b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,d){var e=this.duration*
a;b.forEach(this._animations,function(a){a.gotoPercent(a.duration<e?1:e/a.duration,d)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){b.forEach(this._connects,b.disconnect)}});b.extend(e,f);b.fx.combine=function(a){return new e(a)};b.fx.wipeIn=function(a){var d=a.node=b.byId(a.node),e=d.style,h,a=b.animateProperty(b.mixin({properties:{height:{start:function(){h=
e.overflow;e.overflow="hidden";if(e.visibility=="hidden"||e.display=="none")return e.height="1px",e.display="",e.visibility="",1;else{var a=b.style(d,"height");return Math.max(a,1)}},end:function(){return d.scrollHeight}}}},a));b.connect(a,"onEnd",function(){e.height="auto";e.overflow=h});return a};b.fx.wipeOut=function(a){var d=(a.node=b.byId(a.node)).style,e,a=b.animateProperty(b.mixin({properties:{height:{end:1}}},a));b.connect(a,"beforeBegin",function(){e=d.overflow;d.overflow="hidden";d.display=
""});b.connect(a,"onEnd",function(){d.overflow=e;d.height="auto";d.display="none"});return a};b.fx.slideTo=function(a){var d=null,e=null,h=function(a){return function(){var c=b.getComputedStyle(a),h=c.position;d=h=="absolute"?a.offsetTop:parseInt(c.top)||0;e=h=="absolute"?a.offsetLeft:parseInt(c.left)||0;if(h!="absolute"&&h!="relative")c=b.position(a,!0),d=c.y,e=c.x,a.style.position="absolute",a.style.top=d+"px",a.style.left=e+"px"}}(a.node=b.byId(a.node));h();a=b.animateProperty(b.mixin({properties:{top:a.top||
0,left:a.left||0}},a));b.connect(a,"beforeBegin",a,h);return a}})();return b.fx});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(b,f){b.declare("dijit.DialogUnderlay",[f._Widget,f._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){b.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){b.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,e=this.domNode.style;e.display="none";var c=b.window.getBox();e.top=c.t+"px";e.left=c.l+"px";a.width=c.w+"px";a.height=c.h+"px";e.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new f.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return f.DialogUnderlay});
define("dijit/nls/common",{root:{buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"},zh:!0,"zh-tw":!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,hu:!0,he:!0,fr:!0,fi:!0,es:!0,el:!0,de:!0,da:!0,cs:!0,ca:!0,ar:!0});
define("dijit/Dialog","dojo,dijit,text!dijit/templates/Dialog.html,dojo/dnd/move,dojo/dnd/TimedMoveable,dojo/fx,dojo/window,dijit/_Widget,dijit/_Templated,dijit/_CssStateMixin,dijit/form/_FormMixin,dijit/_DialogMixin,dijit/DialogUnderlay,dijit/layout/ContentPane,i18n!dijit/nls/common,dijit/TooltipDialog".split(","),function(b,f){b.declare("dijit._DialogBase",[f._Templated,f.form._FormMixin,f._DialogMixin,f._CssStateMixin],{templateString:b.cache("dijit","templates/Dialog.html"),baseClass:"dijitDialog",
cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:b.delegate(f._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:!1,duration:f.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,doLayout:!1,draggable:!0,"aria-describedby":"",postMixInProperties:function(){var a=b.i18n.getLocalization("dijit","common");b.mixin(this,a);this.inherited(arguments)},postCreate:function(){b.style(this.domNode,
{display:"none",position:"absolute"});b.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();this.autofocus&&f._DialogLevelManager.isTop(this)&&(this._getFocusItems(this.domNode),f.focus(this._firstFocusItem));this.inherited(arguments)},_endDrag:function(a){if(a&&a.node&&a.node===this.domNode)this._relativePosition=b.position(a.node)},_setup:function(){var a=
this.domNode;this.titleBar&&this.draggable?(this._moveable=b.isIE==6?new b.dnd.TimedMoveable(a,{handle:this.titleBar}):new b.dnd.Moveable(a,{handle:this.titleBar,timeout:0}),this._dndListener=b.subscribe("/dnd/move/stop",this,"_endDrag")):b.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":b.map(this["class"].split(/\s/),function(a){return a+"_underlay"}).join(" ")}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
this._singleChildOriginalStyle;delete this._singleChildOriginalStyle}else b.style(this.containerNode,{width:"auto",height:"auto"});var a=b._getMarginSize(this.domNode),e=b.window.getBox();if(a.w>=e.w||a.h>=e.h){var c=Math.min(a.w,Math.floor(e.w*0.75)),a=Math.min(a.h,Math.floor(e.h*0.75));this._singleChild&&this._singleChild.resize?(this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText,this._singleChild.resize({w:c,h:a})):b.style(this.containerNode,{width:c+"px",height:a+"px",overflow:"auto",
position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!b.hasClass(b.body(),"dojoMove")){var a=this.domNode,e=b.window.getBox(),c=this._relativePosition,d=c?null:b._getBorderBox(a);b.style(a,{left:Math.floor(e.l+(c?c.x:(e.w-d.w)/2))+"px",top:Math.floor(e.t+(c?c.y:(e.h-d.h)/2))+"px"})}},_onKey:function(a){if(a.charOrCode){var e=b.keys,c=a.target;a.charOrCode===e.TAB&&this._getFocusItems(this.domNode);var d=this._firstFocusItem==this._lastFocusItem;
if(c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB)d||f.focus(this._lastFocusItem),b.stopEvent(a);else if(c==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey)d||f.focus(this._firstFocusItem),b.stopEvent(a);else{for(;c;){if(c==this.domNode||b.hasClass(c,"dijitPopup"))if(a.charOrCode==e.ESCAPE)this.onCancel();else return;c=c.parentNode}if(a.charOrCode!==e.TAB)b.stopEvent(a);else if(!b.isOpera)try{this._firstFocusItem.focus()}catch(g){}}}},show:function(){if(!this.open){this._started||
this.startup();if(!this._alreadyInitialized)this._setup(),this._alreadyInitialized=!0;this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._modalconnects.push(b.connect(window,"onscroll",this,"layout"));this._modalconnects.push(b.connect(window,"onresize",this,function(){var a=b.window.getBox();if(!this._oldViewport||a.h!=this._oldViewport.h||a.w!=this._oldViewport.w)this.layout(),this._oldViewport=a}));this._modalconnects.push(b.connect(this.domNode,"onkeypress",this,"_onKey"));b.style(this.domNode,
{opacity:0,display:""});this._set("open",!0);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=b.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:b.hitch(this,function(){f._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:b.hitch(this,function(){this.autofocus&&f._DialogLevelManager.isTop(this)&&(this._getFocusItems(this.domNode),f.focus(this._firstFocusItem));this._fadeInDeferred.callback(!0);
delete this._fadeInDeferred})}).play();return this._fadeInDeferred}},hide:function(){if(this._alreadyInitialized){this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=b.fadeOut({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,function(){this.domNode.style.display="none";f._DialogLevelManager.hide(this);this.onHide();this._fadeOutDeferred.callback(!0);delete this._fadeOutDeferred})}).play();
if(this._scrollConnected)this._scrollConnected=!1;b.forEach(this._modalconnects,b.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",!1);return this._fadeOutDeferred}},layout:function(){this.domNode.style.display!="none"&&(f._underlay&&f._underlay.layout(),this._position())},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();this._dndListener&&
b.unsubscribe(this._dndListener);b.forEach(this._modalconnects,b.disconnect);f._DialogLevelManager.hide(this);this.inherited(arguments)}});b.declare("dijit.Dialog",[f.layout.ContentPane,f._DialogBase],{});f._DialogLevelManager={show:function(a,e){var c=f._dialogStack;c[c.length-1].focus=f.getFocus(a);var d=f._underlay;!d||d._destroyed?d=f._underlay=new f.DialogUnderlay(e):d.set(a.underlayAttrs);var g=c[c.length-1].dialog?c[c.length-1].zIndex+2:950;c.length==1&&d.show();b.style(f._underlay.domNode,
"zIndex",g-1);b.style(a.domNode,"zIndex",g);c.push({dialog:a,underlayAttrs:e,zIndex:g})},hide:function(a){var e=f._dialogStack;if(e[e.length-1].dialog==a){e.pop();var c=e[e.length-1];e.length==1?f._underlay._destroyed||f._underlay.hide():(b.style(f._underlay.domNode,"zIndex",c.zIndex-1),f._underlay.set(c.underlayAttrs));if(a.refocus){e=c.focus;if(!e||c.dialog&&!b.isDescendant(e.node,c.dialog.domNode))c.dialog._getFocusItems(c.dialog.domNode),e=c.dialog._firstFocusItem;try{f.focus(e)}catch(d){}}}else c=
b.indexOf(b.map(e,function(a){return a.dialog}),a),c!=-1&&e.splice(c,1)},isTop:function(a){var b=f._dialogStack;return b[b.length-1].dialog==a}};f._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return f.Dialog});
define("orion/widgets/_OrionDialogMixin",["i18n!orion/widgets/nls/messages","dojo","dijit"],function(b,f,a){return f.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||b["Information Needed"];this.buttonCancel=b.Cancel},postCreate:function(){this.inherited(arguments);f.connect(this,"onKeyPress",f.hitch(this,function(a){a.keyCode===f.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(f.hitch(this,
function(){if(f.isDescendant(a._curFocus,this.domNode))a._curFocus=null;if(f.isDescendant(a._prevFocus,this.domNode))a._prevFocus=null;this.destroyRecursive()}),this.duration)}})});define("text!orion/widgets/templates/OpenResourceDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" title="${title}" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<div style="display:table" role="search">\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="findfileSearchBox" style="padding-right:10">${selectFile}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<input id="findfileSearchBox" type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="resourceName" \n\t\t\t\t\t\tplaceHolder="${searchPlaceHolder}"\n\t\t\t\t\t\tintermediateChanges="true"  style="width:32em;">\n\t\t\t\t</div>\n\t\t\t\t<div style="display:table-cell; padding:0" id="crawlingProgress">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="statusbar" style="display:table-cell;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/UserMenuDropDown",["require","dojo","dijit","dijit/form/DropDownButton"],function(b,f,a){f.declare("orion.widgets.UserMenuDropDown",[a.form.DropDownButton],{templateString:'<span class="dijit dijitReset dijitInline" style="padding-top: 3px;"><span class="primaryNav" dojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"><span class="dijitReset dijitStretch dijitButtonContents" dojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"  role="button" aria-haspopup="true" aria-labelledby="${id}_label"><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span><span class="dijitReset dijitInline dijitButtonText" dojoAttachPoint="containerNode,_popupStateNode" id="${id}_label" style="padding-right:3px"></span><span class="dijitReset dijitInline dijitArrowButtonInner"></span><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span></span></span><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" dojoAttachPoint="valueNode"/></span>'})});
define("orion/treetable",["i18n!orion/nls/messages","dojo"],function(b,f){function a(a){this._init(a)}a.prototype={_init:function(a){var c=a.parent,d=this;typeof c==="string"&&(c=f.byId(c));if(!c)throw b["no parent"];if(!a.model)throw b["no tree model"];if(!a.renderer)throw b["no renderer"];this._parent=c;this._treeModel=a.model;this._renderer=a.renderer;this._showRoot=a.showRoot===void 0?!1:a.showRoot;this._indent=a.indent===void 0?16:a.indent;this._onCollapse=a.onCollapse;this._labelColumnIndex=
a.labelColumnIndex===void 0?0:a.labelColumnIndex;this._id=a.id===void 0?"treetable":a.id;this._tableStyle=a.tableStyle;this._tableElement=a.tableElement||"table";this._tableBodyElement=a.tableBodyElement||"tbody";this._tableRowElement=a.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(a){d._showRoot?(a._depth=0,d._generate([a],0)):d._treeModel.getChildren(a,function(a){d._generate(a,0)})})},_generate:function(a,b){f.empty(this._parent);var d=document.createElement(this._tableElement);
d.id=this._id;this._tableStyle&&f.addClass(d,this._tableStyle);this._renderer.initTable(d,this);var g=document.createElement(this._tableBodyElement);g.id=this._id+"tbody";this._generateChildren(a,b,g,"last");d.appendChild(g);this._parent.appendChild(d);this._rowsChanged()},_generateChildren:function(a,b,d,g){for(var h=0;h<a.length;h++){var j=document.createElement(this._tableRowElement);j.id=this._treeModel.getId(a[h]);j._depth=b;j._item=a[h];this._renderer.render(a[h],j);f.style(j.childNodes[this._labelColumnIndex],
"paddingLeft",this._indent*b+"px");f.place(j,d,g);g==="after"&&(d=j)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(a,c,d){var g=this._treeModel.getId(a),h;if(g===this._id)this._removeChildRows(g),this._generateChildren(c,0,f.byId(g+"tbody"),"last"),this._rowsChanged();else{var j=f.byId(g);j?(j._item=a,j&&(d||j._expanded)?(j._expanded=!0,this._removeChildRows(g),this._renderer.updateExpandVisuals(j,
!0),c?(this._generateChildren(c,j._depth+1,j,"after"),this._rowsChanged()):(h=this,c=this._treeModel.getChildren(j._item,function(a){h._generateChildren(a,j._depth+1,j,"after");h._rowsChanged()}))):this._renderer.updateExpandVisuals(j,!1)):console.log(b["could not find table row "]+g)}},getItem:function(a){if(typeof a==="string"){var b=f.byId(a);if(b)return b._item}return a._item?a._item:a},toggle:function(a){var b=f.byId(a);b&&(b._expanded?(this.collapse(a),this._renderer.updateExpandVisuals(b,!1)):
(this.expand(a),this._renderer.updateExpandVisuals(b,!0)))},isExpanded:function(a){return(a=f.byId(a))?a._expanded:!1},expand:function(a,b,d){var a=typeof a==="string"?a:this._treeModel.getId(a),g=f.byId(a);if(g&&!g._expanded){g._expanded=!0;var h=this;this._renderer.updateExpandVisuals(g,!0);this._treeModel.getChildren(g._item,function(a){h._generateChildren(a,g._depth+1,g,"after");h._rowsChanged();b&&b.apply(h,d)})}},_removeChildRows:function(a){var b=a===this._id,d=!1,g=-1,h=[];f.query(".treeTableRow",
this._parent).forEach(function(j){if(!d)if(b)j._depth>g?h.push(j):d=!0;else if(j.id===a)b=!0,g=j._depth});for(var j=0;j<h.length;j++){var k=h[j];k.parentNode.removeChild(k)}},collapse:function(a){var a=typeof a==="string"?a:this._treeModel.getId(a),b=f.byId(a);if(b){if(!b._expanded)return;b._expanded=!1;this._renderer.updateExpandVisuals(b,!1);this._removeChildRows(a);this._rowsChanged()}this._onCollapse&&this._onCollapse(b._item)}};a.prototype.constructor=a;return{TableTree:a}});
define("orion/treeModelIterator",[],function(){var b={};b.TreeModelIterator=function(){function b(a,e){this.firstLevelChildren=a;this.reset();this._init(e)}b.prototype={_init:function(a){if(a)this.isExpanded=a.isExpanded,this.isExpandable=a.isExpandable,this.forceExpandFunc=a.forceExpandFunc},topLevel:function(a){return a.parent?a.parent===this.root:!0},_expanded:function(a){if(!a)return!0;var b=a.children&&a.children.length>0;this.isExpanded&&b&&(b=this.isExpanded(a));return b},_expandable:function(a){return!a?
!0:this.isExpandable?this.isExpandable(a):!1},_diveIn:function(a){return this._expanded(a)?(this.setCursor(a.children[0]),this.cursor()):null},_drillToLast:function(a){return this._expanded(a)?this._drillToLast(a.children[a.children.length-1]):a},_forward:function(a){var b=this._diveIn(this._cursor);if(!b){if(a&&this._expandable(this._cursor)&&this.forceExpandFunc){var c=this;return this.forceExpandFunc(this._cursor,"first",function(a){mdoel&&c.setCursor(a)})}(b=this._findSibling(this._cursor,!0))&&
this.setCursor(b)}return b},_backward:function(a){var b=this._findSibling(this._cursor,!1);b&&b!==this._cursor.parent&&(b=this._drillToLast(b));if(a&&b&&this._expandable(b)&&this.forceExpandFunc&&b!==this._cursor.parent)return this.forceExpandFunc(b,"last",function(a){mdoel&&that.setCursor(a)});b&&this.setCursor(b);return b},_findSibling:function(a,b){for(var c=this.topLevel(a),d=c?this.firstLevelChildren:a.parent.children,g=0;g<d.length;g++)if(d[g]===a)return g===0&&!b?c?null:a.parent:g===d.length-
1&&b?c?null:this._findSibling(a.parent,b):b?d[g+1]:d[g-1];return null},_inParentChain:function(a,b){for(var c=a.parent;c;){if(c===b)return!0;c=c.parent}return!1},_getTopLevelParent:function(a){if(this.topLevel(a))return a;for(a=a.parent;a;){if(this.topLevel(a))return a;a=a.parent}return null},_onCollapse:function(a){return this._expanded(a.parent)?a:this._onCollapse(a.parent)},_scan:function(a,b,c){this.setCursor(b);var d=[];for(d.push(b);;){if(this.iterate(a))d.push(this.cursor());else break;if(c===
this.cursor())return d}return null},setCursor:function(a){this._prevCursor=this._cursor;this._cursor=a},setTree:function(a){this.firstLevelChildren=a;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(a,b){var c=this.cursor(),d=this._scan(!0,a,b);d||(d=this._scan(!1,a,b));this.setCursor(c);return d},iterate:function(a,b){return a?this._forward(b):this._backward(b)},iterateOnTop:function(a,b){var c=this._findSibling(this._getTopLevelParent(this.cursor()),
a);c?this.setCursor(c):b&&this.firstLevelChildren.length>0&&this.setCursor(a?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(a){return this._inParentChain(this._cursor,a)?(this.setCursor(a),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 b}();return b});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","dojo","orion/treeModelIterator"],function(b,f,a){var b={},e=navigator.userAgent.indexOf("iPad")!==-1,c=window.navigator.platform.indexOf("Mac")!==-1;b.ExplorerNavHandler=function(){function b(c,d,e){this.explorer=c;this.model=this.explorer.model;this._navDict=d;this._listeners=[];this._selections=[];this._currentColumn=0;var k=this._getEventListeningDiv();f.attr(k,"tabIndex",0);f.addClass(k,"selectionModelContainer");this._modelIterator=
new a.TreeModelIterator([],{isExpanded:f.hitch(this,function(a){return this.isExpanded(a)}),isExpandable:this.explorer.renderer.isExpandable?f.hitch(this,function(a){return this.explorer.renderer.isExpandable(a)}):f.hitch(this,function(a){return this.isExpandable(a)}),forceExpandFunc:this.explorer.forceExpandFunc?f.hitch(this,function(a,b,c){return this.explorer.forceExpandFunc(a,b,c)}):void 0});this._init(e);(!e||e.setFocus!==!1)&&k.focus();this._listeners.push(f.connect(k,"onkeydown",f.hitch(this,
function(a){if(a.target){if(a.target!==k)return!0}else if(a.srcElement&&a.srcElement!==k)return!0;if(this.explorer.preventDefaultFunc&&this.explorer.preventDefaultFunc(a,this._modelIterator.cursor()))return!0;if(a.keyCode===f.keys.DOWN_ARROW)return this.onDownArrow(a);else if(a.keyCode===f.keys.UP_ARROW)return this.onUpArrow(a);else if(a.keyCode===f.keys.RIGHT_ARROW)return this.onRightArrow(a);else if(a.keyCode===f.keys.LEFT_ARROW)return this.onLeftArrow(a);else if(a.keyCode===f.keys.SPACE)return this.onSpace(a);
else if(a.keyCode===f.keys.ENTER)return this.onEnter(a)})));c=f.connect(k,"onblur",f.hitch(this,function(){if(this.explorer.onFocus)this.explorer.onFocus(!1);else this.toggleCursor(null,!1)}));d=f.connect(k,"onfocus",f.hitch(this,function(){if(this.explorer.onFocus)this.explorer.onFocus(!0);else this.toggleCursor(null,!0)}));this._listeners.push(c);this._listeners.push(d)}b.prototype={_init:function(a){this._linearGridMove=!1;if(a)this._selectionPolicy=a.selectionPolicy,this.preventDefaultFunc=a.preventDefaultFunc,
this.postDefaultFunc=a.postDefaultFunc},_ctrlKeyOn:function(a){return c?a.metaKey:a.ctrlKey},removeListeners:function(){if(this._listeners)for(var a=0;a<this._listeners.length;a++)f.disconnect(this._listeners[a])},focus:function(){var a=this._getEventListeningDiv();a&&a.focus()},_getEventListeningDiv:function(a){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(a):f.byId(this.explorer._parentId)},isExpandable:function(a){return!a?
!1:f.byId(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)))?!0:!1},isExpanded:function(a){return!a?!1:this.explorer.myTree.isExpanded(this.model.getId(a))},refreshSelection:function(a){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(c){b._clearSelection();for(var d=0;d<c.length;d++)b._selections.push(c[d]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,a)})},refreshModel:function(a,b,c,d){this._currentColumn=0;this.topIterationNodes=[];
this.model=b;this._navDict=a;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(c)this.topIterationNodes=c;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(a){for(var b=0;b<this._selections.length;b++)if(a===this._selections[b])return b;return-1},_clearSelection:function(a){if(a)for(a=
0;a<this._selections.length;a++)this._checkRow(this._selections[a],!0);this._selections=[]},setSelection:function(a,b){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(a,!0);else if(this._isRowSelectable(a)){if(!b||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(a,!1),this._selections.push(a),this._lastSelection=a;else{var c=this._inSelection(a);c>=0?(this._checkRow(a,!0),this._selections.splice(c,1)):(this._checkRow(a,
!1),this._selections.push(a),this._lastSelection=a)}this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(a,b){a||(a=this.currentModel());var c=this._getGridChildren(a);if(c&&c.length>1||b===0&&c){b!==0&&this.toggleCursor(a,!1);var d=this._currentColumn,e=!0;d+=b;d<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?a=this.currentModel():e=!1),d=e?c.length-1:this._currentColumn):d>=c.length&&(this._linearGridMove&&
b!==0&&(this._modelIterator.iterate(!0)?a=this.currentModel():e=!1),d=e?0:this._currentColumn);this._currentColumn=d;b!==0&&this.toggleCursor(a,!0);return!0}return!1},_getGridChildren:function(a){return this._navDict?this._navDict.getGridNavHolder(a):null},getCurrentGrid:function(a){a||(a=this.currentModel());return(a=this._getGridChildren(a))&&a.length>0?a[this._currentColumn]:null},toggleCursor:function(a,b){var c=this.getRowDiv(a),d=this.getCurrentGrid(a);d?(c&&f.toggleClass(c,"treeIterationCursorRow",
b),d.domNode&&f.toggleClass(d.domNode,"treeIterationCursor",b)):c&&f.toggleClass(c,"treeIterationCursorRow_Dotted",b)},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(a,b,c,d){var c=c===void 0?!1:c,e,f;if(a||b){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=a;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(e!==f||b)if(this.toggleCursor(e,!1),!b||f)if(this.moveColumn(null,0),this.toggleCursor(f,
!0),(a=this.getRowDiv())&&!d&&!this._visible(a)&&a.scrollIntoView(!c),this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,f)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var a=[],b=0;b<this._selections.length;b++)a.push(this.model.getId(this._selections[b]));return a},getRowDiv:function(a){a=a?a:this._modelIterator.cursor();if(!a)return null;var a=this.model.getId(a),b=this._navDict.getValue(a);return b&&b.rowDomNode?b.rowDomNode:f.byId(a)},iterate:function(a,
b,c){this.topIterationNodes.length!==0&&this._modelIterator.iterate(a,b)&&(this.cursorOn(null,!1,a),c&&this.setSelection(this.currentModel(),!0))},_checkRow:function(a,b){if(this.explorer.renderer._useCheckboxSelection){var c=this.getRowDiv(a);if(c){var d=f.byId(this.explorer.renderer.getCheckBoxId(c.id)),e=b?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(c,d,e,!0)}}else this._select(a,b)},_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(a){return f.byId(a)&&(mBox=f.marginBox(a))?mBox.h:0},_visible:function(a){if(a.offsetWidth===0||a.offsetHeight===0)return!1;var b=0;b+=this._getToolBarHeight("staticBanner");b+=this._getToolBarHeight("titleArea");b+=this._getToolBarHeight("pageToolbar");var c=this._getEventListeningDiv(!0).getClientRects()[0],d=this._vpHeight();this._vpWidth();for(var b=c.top>
b?c.top:b,c=c.bottom<d?c.bottom:d,a=a.getClientRects(),d=0,e=a.length;d<e;d++){var f=a[d];if(f.top>=b&&f.top<=c&&f.bottom>=b&&f.bottom<=c)return!0}return!1},_select:function(a){a||(a=this._modelIterator.cursor());var b=this.getRowDiv(a);b&&f.toggleClass(b,"checkedRow",this._inSelection(a)<0)},_onModelGrid:function(a,b){var c=this._getGridChildren(a);if(c)for(var d=0;d<c.length;d++)if(b.target===c[d].domNode)return!0;return!1},onClick:function(a,b){var c=f.byId(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)));
if(b.target!==c&&!this._onModelGrid(a,b))if(this.cursorOn(a,!0,!1,!0),e)this.setSelection(a,!0);else if(this._ctrlKeyOn(b))this.setSelection(a,!0);else if(b.shiftKey&&this._lastSelection){if(c=this._modelIterator.scan(this._lastSelection,a)){this._clearSelection(!0);for(var d=0;d<c.length;d++)this.setSelection(c[d],!0)}}else this.setSelection(a,!1)},onCollapse:function(a){this._modelIterator.collapse(a)&&this.cursorOn()},onUpArrow:function(a){this.iterate(!1,!1,a.shiftKey);!this._ctrlKeyOn(a)&&!a.shiftKey&&
this.setSelection(this.currentModel(),!1);a.preventDefault();return!1},onDownArrow:function(a){this.iterate(!0,!1,a.shiftKey);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1);a.preventDefault();return!1},_shouldMoveColumn:function(a){var b=this.currentModel(),c=this._getGridChildren(b);return c&&c.length>1?this.isExpandable(b)?this._ctrlKeyOn(a):!0:!1},onLeftArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,-1),a.preventDefault(),!0;var b=this._modelIterator.cursor();
if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),a.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),this.setSelection(b.parent,!1))},onRightArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,1),a.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),
a.preventDefault(),!1},_isRowSelectable:function(a){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(a):!0},onSpace:function(a){this.setSelection(this.currentModel(),!0);a.preventDefault()},onEnter:function(a){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();else typeof b.widget.focus==="function"&&b.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(a),
!1,!1,!1,0,null);b.domNode.dispatchEvent(c)}else if(this.explorer.renderer.getRowActionElement&&(b=this._modelIterator.cursor()))if(b=this.explorer.renderer.getRowActionElement(this.model.getId(b)),b.href)this._ctrlKeyOn(a)?window.open(b.href):window.location.href=b.href}};return b}();b.ExplorerNavDict=function(){function a(b){this._dict={};this._model=b}a.prototype={addRow:function(a,b){this._dict[this._model.getId(a)]={model:a,rowDomNode:b}},getValue:function(a){return this._dict[a]},getGridNavHolder:function(a,
b){if(!a)return null;var c=this._model.getId(a);if(this._dict[c]){if(!this._dict[c].gridChildren&&b)this._dict[c].gridChildren=[];return this._dict[c].gridChildren}return null},initGridNavHolder:function(a){if(!a)return null;a=this._model.getId(a);if(this._dict[a])this._dict[a].gridChildren=null}};return a}();return b});
define("orion/problems",["orion/EventTarget"],function(b){function f(a){this._serviceRegistry=a;b.attach(this);this._serviceRegistration=a.registerService("orion.core.marker",this)}f.prototype={_setProblems:function(a){this.problems=a;this.dispatchEvent({type:"problemsChanged",problems:a})}};f.prototype.constructor=f;return{ProblemService:f}});
(function(b,f){typeof define==="function"&&define.amd?define("orion/editor/Deferred",[],f):typeof exports==="object"?module.exports=f():(b.orion=b.orion||{},b.orion.Deferred=f())})(this,function(){function b(a){if(h)e?(c.next={fn:a,next:null},c=c.next):c=e={fn:a,next:null};else{h=!0;do{for(;a;){a();if(d)e?c.next=d:e=d,c=g;e?(d=e.next,g=c,a=e.fn,e=c=null):a=null}h=!1}while(h)}}function f(a){return function(){a.apply(null,arguments)}}function a(c){function d(){for(;m;){var a=m;m=m.next;var b=a.deferred,
c=r.isResolved()?"resolve":"reject";if(a[c])try{var e=a[c](g);e&&typeof e.then==="function"?(a.cancel=e.cancel,e.then(f(b.resolve),f(b.reject),b.progress)):b.resolve(e)}catch(h){b.reject(h)}else b[c](g)}m=p=null}function e(a){if(h){if(a)throw Error("already "+h);return!0}return!1}var g,h,m,p,q=!1,r=this;this.reject=function(a,c){e(c)||(h="rejected",g=a,m&&b(d));return r.promise};this.resolve=function(a,c){e(c)||(h="resolved",g=a,m&&b(d));return r.promise};this.progress=function(a,b){if(!e(b))for(var c=
m;c;)c.progress&&c.progress(a),c=c.next;return r.promise};this.cancel=function(a,g){if(!e(g))return q=!0,c&&(a=c(a)||a),a=a||Error("canceled"),b(r.reject.bind(r,a)),a;for(var h=m;h;){if(h.canceling)return delete h.canceling,d(),h.cancel&&h.cancel(a);h=h.next}};this.then=function(c,e,g){var j={resolve:c,reject:e,progress:g,cancel:this.cancel,deferred:new a(function(a){j.canceling=!0;return j.cancel&&j.cancel(a)})};m?p.next=j:m=j;p=j;h&&b(d);return j.deferred.promise};this.isResolved=function(){return h===
"resolved"};this.isRejected=function(){return h==="rejected"};this.isFulfilled=function(){return!!h};this.isCanceled=function(){return q};this.promise={then:this.then,cancel:this.cancel,isResolved:this.isResolved,isRejected:this.isRejected,isFulfilled:this.isFulfilled,isCanceled:this.isCanceled};this.notify=this.progress;this.state=function(){return h||"pending"};this.promise.state=this.state}var e,c,d,g,h=!1;a.all=function(b,c){function d(a,b){f.isFulfilled()||(h[a]=b,--g===0&&f.resolve(h))}function e(a,
b){if(!f.isFulfilled()){if(c)try{d(a,c(b));return}catch(g){b=g}f.reject(b)}}var g=b.length,h=[],f=new a(function(a){b.forEach(function(b){b.cancel&&b.cancel(a)})});g===0?f.resolve(h):b.forEach(function(a,b){a.then(d.bind(null,b),e.bind(null,b))});return f.promise};a.when=function(b,c,d,e){var g;if(!(b&&typeof b.then==="function"))g=new a,g.resolve(b),b=g.promise;return b.then(c,d,e)};return a});
define("orion/textview/i18n",{load:function(b,f,a){f.specified&&f.specified("orion/bootstrap")?f(["orion/i18n!"+b],function(b){a(b)}):a({})}});
define("orion/editor/nls/messages",["orion/textview/i18n!orion/editor/nls/messages"],function(b){var f={root:{Comment:"Comment","Flat outline":"Flat outline",incrementalFind:"Incremental find: ${0}",incrementalFindNotFound:"Incremental find: ${0} (not found)",find:"Find...",undo:"Undo",redo:"Redo",cancelMode:"Cancel Current Mode",findNext:"Find Next Occurrence",findPrevious:"Find Previous Occurrence",incrementalFindKey:"Incremental Find",indentLines:"Indent Lines",unindentLines:"Unindent Lines",moveLinesUp:"Move Lines Up",
moveLinesDown:"Move Lines Down",copyLinesUp:"Copy Lines Up",copyLinesDown:"Copy Lines Down",deleteLines:"Delete Lines",gotoLine:"Goto Line...",gotoLinePrompty:"Goto Line:",nextAnnotation:"Next Annotation",prevAnnotation:"Previous Annotation",expand:"Expand",collapse:"Collapse",expandAll:"Expand All",collapseAll:"Collapse All",lastEdit:"Last Edit Location",toggleLineComment:"Toggle Line Comment",addBlockComment:"Add Block Comment",removeBlockComment:"Remove Block Comment",linkedModeEntered:"Linked Mode entered",
linkedModeExited:"Linked Mode exited",syntaxError:"Syntax Error",contentAssist:"Content Assist",lineColumn:"Line ${0} : Col ${1}"}};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/editor/nls/root/messages",{Comment:"Comment","Flat outline":"Flat outline",incrementalFind:"Incremental find: ${0}",incrementalFindNotFound:"Incremental find: ${0} (not found)",find:"Find...",undo:"Undo",redo:"Redo",cancelMode:"Cancel Current Mode",findNext:"Find Next Occurrence",findPrevious:"Find Previous Occurrence",incrementalFindKey:"Incremental Find",indentLines:"Indent Lines",unindentLines:"Unindent Lines",moveLinesUp:"Move Lines Up",moveLinesDown:"Move Lines Down",copyLinesUp:"Copy Lines Up",
copyLinesDown:"Copy Lines Down",deleteLines:"Delete Lines",gotoLine:"Goto Line...",gotoLinePrompty:"Goto Line:",nextAnnotation:"Next Annotation",prevAnnotation:"Previous Annotation",expand:"Expand",collapse:"Collapse",expandAll:"Expand All",collapseAll:"Collapse All",lastEdit:"Last Edit Location",toggleLineComment:"Toggle Line Comment",addBlockComment:"Add Block Comment",removeBlockComment:"Remove Block Comment",linkedModeEntered:"Linked Mode entered",linkedModeExited:"Linked Mode exited",syntaxError:"Syntax Error",
contentAssist:"Content Assist",lineColumn:"Line ${0} : Col ${1}"});
define("orion/textview/undoStack",[],function(){function b(a,b,d){this.offset=a;this.text=b;this.previousText=d}function f(){this.changes=[]}function a(a,b){this.view=a;this.size=b!==void 0?b:100;this.reset();var d=a.getModel();d.getBaseModel&&(d=d.getBaseModel());this.model=d;var g=this;this._listener={onChanging:function(a){g._onChanging(a)},onDestroy:function(a){g._onDestroy(a)}};d.addEventListener("Changing",this._listener.onChanging);a.addEventListener("Destroy",this._listener.onDestroy)}b.prototype=
{undo:function(a,b){this._doUndoRedo(this.offset,this.previousText,this.text,a,b)},redo:function(a,b){this._doUndoRedo(this.offset,this.text,this.previousText,a,b)},_doUndoRedo:function(a,b,d,g,h){var j=g.getModel();if(j.mapOffset&&g.annotationModel){var f=j.mapOffset(a,!0);if(f<0)for(var l=g.annotationModel.getAnnotations(a,a+1);l.hasNext();){var n=l.next();if(n.type==="orion.annotation.folding"){n.expand();f=j.mapOffset(a,!0);break}}if(f<0)return;a=f}g.setText(b,a,a+d.length);h&&g.setSelection(a,
a+b.length)}};f.prototype={add:function(a){this.changes.push(a)},end:function(a){this.endSelection=a.getSelection();this.endCaret=a.getCaretOffset()},undo:function(a,b){for(var d=this.changes.length-1;d>=0;d--)this.changes[d].undo(a,!1);if(b){var d=this.startSelection.start,g=this.startSelection.end;a.setSelection(this.startCaret?d:g,this.startCaret?g:d)}},redo:function(a,b){for(var d=0;d<this.changes.length;d++)this.changes[d].redo(a,!1);if(b){var d=this.endSelection.start,g=this.endSelection.end;
a.setSelection(this.endCaret?d:g,this.endCaret?g:d)}},start:function(a){this.startSelection=a.getSelection();this.startCaret=a.getCaretOffset()}};a.prototype={add:function(a){this.compoundChange?this.compoundChange.add(a):(this.stack.splice(this.index,this.stack.length-this.index,a),this.index++,this.stack.length>this.size&&(this.stack.shift(),this.index--,this.cleanIndex--))},markClean:function(){this.endCompoundChange();this._commitUndo();this.cleanIndex=this.index},isClean:function(){return this.cleanIndex===
this.getSize().undo},canUndo:function(){return this.getSize().undo>0},canRedo:function(){return this.getSize().redo>0},endCompoundChange:function(){this.compoundChange&&this.compoundChange.end(this.view);this.compoundChange=void 0},getSize:function(){var a=this.index,b=this.stack.length;this._undoStart!==void 0&&a++;return{undo:a,redo:b-a}},undo:function(){this._commitUndo();if(this.index<=0)return!1;var a=this.stack[--this.index];this._ignoreUndo=!0;a.undo(this.view,!0);this._ignoreUndo=!1;return!0},
redo:function(){this._commitUndo();if(this.index>=this.stack.length)return!1;var a=this.stack[this.index++];this._ignoreUndo=!0;a.redo(this.view,!0);this._ignoreUndo=!1;return!0},reset:function(){this.index=this.cleanIndex=0;this.stack=[];this._undoStart=void 0;this._undoText="";this._undoType=0;this._ignoreUndo=!1;this._compoundChange=void 0},startCompoundChange:function(){this._commitUndo();var a=new f;this.add(a);this.compoundChange=a;this.compoundChange.start(this.view)},_commitUndo:function(){if(this._undoStart!==
void 0)this._undoType===-1?this.add(new b(this._undoStart,"",this._undoText)):this.add(new b(this._undoStart,this._undoText,"")),this._undoStart=void 0,this._undoText="",this._undoType=0},_onDestroy:function(){this.model.removeEventListener("Changing",this._listener.onChanging);this.view.removeEventListener("Destroy",this._listener.onDestroy)},_onChanging:function(a){var c=a.text,d=a.start,g=a.removedCharCount,a=a.addedCharCount;if(!this._ignoreUndo){this._undoStart!==void 0&&!(a===1&&g===0&&this._undoType===
1&&d===this._undoStart+this._undoText.length||a===0&&g===1&&this._undoType===-1&&(d+1===this._undoStart||d===this._undoStart))&&this._commitUndo();if(!this.compoundChange)if(a===1&&g===0){if(this._undoStart===void 0)this._undoStart=d;this._undoText+=c;this._undoType=1;return}else if(a===0&&g===1){c=this._undoText.length>0&&this._undoStart===d;this._undoStart=d;this._undoType=-1;c?this._undoText+=this.model.getText(d,d+g):this._undoText=this.model.getText(d,d+g)+this._undoText;return}this.add(new b(d,
c,this.model.getText(d,d+g)))}}};return{UndoStack:a}});
define("orion/textview/nls/messages",["orion/textview/i18n!orion/textview/nls/messages"],function(b){var f={root:{multipleAnnotations:"Multiple annotations:",line:"Line: ${0}",breakpoint:"Breakpoint",bookmark:"Bookmark",task:"Task",error:"Error",warning:"Warning",matchingSearch:"Matching Search",currentSearch:"Current Search",currentLine:"Current Line",matchingBracket:"Matching Bracket",currentBracket:"Current Bracket"}};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});
return f});define("orion/textview/nls/root/messages",{multipleAnnotations:"Multiple annotations:",line:"Line: ${0}",breakpoint:"Breakpoint",bookmark:"Bookmark",task:"Task",error:"Error",warning:"Warning",matchingSearch:"Matching Search",currentSearch:"Current Search",currentLine:"Current Line",matchingBracket:"Matching Bracket",currentBracket:"Current Bracket"});
define("orion/textview/annotations",["i18n!orion/textview/nls/messages","orion/textview/eventTarget"],function(b,f){function a(a,b,c){this.start=a;this.end=b;this._projectionModel=c;this.html=this._expandedHTML;this.style=this._expandedStyle;this.expanded=!0}function e(){}function c(a,c){var d=a.lastIndexOf("."),d=a.substring(d+1),g={title:b[d],style:{styleClass:"annotation "+d},html:"<div class='annotationHTML "+d+"'></div>",overviewStyle:{styleClass:"annotationOverview "+d}};c?g.lineStyle={styleClass:"annotationLine "+
d}:g.rangeStyle={styleClass:"annotationRange "+d};e.registerType(a,g)}function d(){}function g(a){this._annotations=[];var b=this;this._listener={onChanged:function(a){b._onChanged(a)}};this.setTextModel(a)}function h(a,b){this._view=a;this._annotationModel=b;var c=this;this._listener={onDestroy:function(a){c._onDestroy(a)},onLineStyle:function(a){c._onLineStyle(a)},onChanged:function(a){c._onAnnotationModelChanged(a)}};a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("postLineStyle",
this._listener.onLineStyle);b.addEventListener("Changed",this._listener.onChanged)}a.prototype={_expandedHTML:"<div class='annotationHTML expanded'></div>",_expandedStyle:{styleClass:"annotation expanded"},_collapsedHTML:"<div class='annotationHTML collapsed'></div>",_collapsedStyle:{styleClass:"annotation collapsed"},collapse:function(){if(this.expanded){this.expanded=!1;this.html=this._collapsedHTML;this.style=this._collapsedStyle;var a=this._projectionModel,b=a.getBaseModel();this._projection=
{start:b.getLineStart(b.getLineAtOffset(this.start)+1),end:b.getLineEnd(b.getLineAtOffset(this.end),!0)};a.addProjection(this._projection)}},expand:function(){if(!this.expanded)this.expanded=!0,this.html=this._expandedHTML,this.style=this._expandedStyle,this._projectionModel.removeProjection(this._projection)}};e.ANNOTATION_ERROR="orion.annotation.error";e.ANNOTATION_WARNING="orion.annotation.warning";e.ANNOTATION_TASK="orion.annotation.task";e.ANNOTATION_BREAKPOINT="orion.annotation.breakpoint";
e.ANNOTATION_BOOKMARK="orion.annotation.bookmark";e.ANNOTATION_FOLDING="orion.annotation.folding";e.ANNOTATION_CURRENT_BRACKET="orion.annotation.currentBracket";e.ANNOTATION_MATCHING_BRACKET="orion.annotation.matchingBracket";e.ANNOTATION_CURRENT_LINE="orion.annotation.currentLine";e.ANNOTATION_CURRENT_SEARCH="orion.annotation.currentSearch";e.ANNOTATION_MATCHING_SEARCH="orion.annotation.matchingSearch";var j={};e.registerType=function(a,b){var c=b;if(typeof c!=="function")c=function(a,b,c){this.start=
a;this.end=b;if(c)this.title=c},c.prototype=b;c.prototype.type=a;j[a]=c;return a};e.createAnnotation=function(a,b,c,d){return new (this.getType(a))(b,c,d)};e.getType=function(a){return j[a]};c(e.ANNOTATION_ERROR);c(e.ANNOTATION_WARNING);c(e.ANNOTATION_TASK);c(e.ANNOTATION_BREAKPOINT);c(e.ANNOTATION_BOOKMARK);c(e.ANNOTATION_CURRENT_BRACKET);c(e.ANNOTATION_MATCHING_BRACKET);c(e.ANNOTATION_CURRENT_SEARCH);c(e.ANNOTATION_MATCHING_SEARCH);c(e.ANNOTATION_CURRENT_LINE,!0);e.registerType(e.ANNOTATION_FOLDING,
a);d.addMixin=function(a){var b=d.prototype,c;for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};d.prototype={addAnnotationType:function(a){if(!this._annotationTypes)this._annotationTypes=[];this._annotationTypes.push(a)},getAnnotationTypePriority:function(a){if(this._annotationTypes)for(var b=0;b<this._annotationTypes.length;b++)if(this._annotationTypes[b]===a)return b+1;return 0},getAnnotationsByType:function(a,b,c){a=a.getAnnotations(b,c);for(c=[];a.hasNext();)b=a.next(),this.getAnnotationTypePriority(b.type)!==
0&&c.push(b);var d=this;c.sort(function(a,b){return d.getAnnotationTypePriority(a.type)-d.getAnnotationTypePriority(b.type)});return c},isAnnotationTypeVisible:function(a){return this.getAnnotationTypePriority(a)!==0},removeAnnotationType:function(a){if(this._annotationTypes)for(var b=0;b<this._annotationTypes.length;b++)if(this._annotationTypes[b]===a){this._annotationTypes.splice(b,1);break}}};g.prototype={addAnnotation:function(a){if(a){var b=this._annotations,c=this._binarySearch(b,a.start);b.splice(c,
0,a);this.onChanged({type:"Changed",added:[a],removed:[],changed:[]})}},getTextModel:function(){return this._model},getAnnotations:function(a,b){var c=this._annotations,d,e=0,g=function(){for(;e<c.length;){var d=c[e++];if(a===d.start||(a>d.start?a<d.end:d.start<b))return d;if(d.start>=b)break}return null};d=g();return{next:function(){var a=d;a&&(d=g());return a},hasNext:function(){return d!==null}}},modifyAnnotation:function(a){if(a&&!(this._getAnnotationIndex(a)<0))this.onChanged({type:"Changed",
added:[],removed:[],changed:[a]})},onChanged:function(a){return this.dispatchEvent(a)},removeAnnotations:function(a){var b=this._annotations,c,d;if(a){c=[];for(d=b.length-1;d>=0;d--){var e=b[d];e.type===a&&b.splice(d,1);c.splice(0,0,e)}}else c=b;this.onChanged({type:"Changed",removed:c,added:[],changed:[]})},removeAnnotation:function(a){if(a&&(a=this._getAnnotationIndex(a),!(a<0)))this.onChanged({type:"Changed",removed:this._annotations.splice(a,1),added:[],changed:[]})},replaceAnnotations:function(a,
b){var c=this._annotations,d,e,g,h=[];if(a)for(d=a.length-1;d>=0;d--)g=a[d],e=this._getAnnotationIndex(g),e<0||(c.splice(e,1),h.splice(0,0,g));b||(b=[]);for(d=0;d<b.length;d++)g=b[d],e=this._binarySearch(c,g.start),c.splice(e,0,g);this.onChanged({type:"Changed",removed:h,added:b,changed:[]})},setTextModel:function(a){this._model&&this._model.removeEventListener("Changed",this._listener.onChanged);(this._model=a)&&this._model.addEventListener("Changed",this._listener.onChanged)},_binarySearch:function(a,
b){for(var c=a.length,d=-1,e;c-d>1;)e=Math.floor((c+d)/2),b<=a[e].start?c=e:d=e;return c},_getAnnotationIndex:function(a){for(var b=this._annotations,c=this._binarySearch(b,a.start);c<b.length&&b[c].start===a.start;){if(b[c]===a)return c;c++}return-1},_onChanged:function(a){var b=a.start,c=a.removedCharCount,d=this._annotations,e=b+c;if(0<d.length){for(var g={type:"Changed",added:[],removed:[],changed:[],textModelChangedEvent:a},a=a.addedCharCount-c,c=0;c<d.length;c++){var h=d[c];h.start>=e?(h.start+=
a,h.end+=a,g.changed.push(h)):h.end<=b||(h.start<b&&e<h.end?(h.end+=a,g.changed.push(h)):(d.splice(c,1),g.removed.push(h),c--))}if(g.added.length>0||g.removed.length>0||g.changed.length>0)this.onChanged(g)}}};f.EventTarget.addMixin(g.prototype);h.prototype={destroy:function(){var a=this._view;if(a)a.removeEventListener("Destroy",this._listener.onDestroy),a.removeEventListener("LineStyle",this._listener.onLineStyle),this.view=null;(a=this._annotationModel)&&a.removeEventListener("Changed",this._listener.onChanged)},
_mergeStyle:function(a,b){if(b){a||(a={});a.styleClass&&b.styleClass&&a.styleClass!==b.styleClass?a.styleClass+=" "+b.styleClass:a.styleClass=b.styleClass;var c;if(b.style){if(!a.style)a.style={};for(c in b.style)a.style[c]||(a.style[c]=b.style[c])}if(b.attributes){if(!a.attributes)a.attributes={};for(c in b.attributes)a.attributes[c]||(a.attributes[c]=b.attributes[c])}}return a},_mergeStyleRanges:function(a,b){a||(a=[]);var c,d;for(d=0;d<a.length&&b;d++){var e=a[d];if(b.end<=e.start)break;if(!(b.start>=
e.end)){c=this._mergeStyle({},e.style);c=this._mergeStyle(c,b.style);var g=[];g.push(d,1);b.start<e.start&&g.push({start:b.start,end:e.start,style:b.style});b.start>e.start&&g.push({start:e.start,end:b.start,style:e.style});g.push({start:Math.max(e.start,b.start),end:Math.min(e.end,b.end),style:c});b.end<e.end&&g.push({start:b.end,end:e.end,style:e.style});b=b.end>e.end?{start:e.end,end:b.end,style:b.style}:null;Array.prototype.splice.apply(a,g)}}b&&(c=this._mergeStyle({},b.style),a.splice(d,0,{start:b.start,
end:b.end,style:c}));return a},_onAnnotationModelChanged:function(a){function b(a){for(var g=0;g<a.length;g++)if(d.isAnnotationTypeVisible(a[g].type)){var h=a[g].start,j=a[g].end;e.getBaseModel&&(h=e.mapOffset(h,!0),j=e.mapOffset(j,!0));h!==-1&&j!==-1&&c.redrawRange(h,j)}}if(!a.textModelChangedEvent){var c=this._view;if(c){var d=this,e=c.getModel();b(a.added);b(a.removed);b(a.changed)}}},_onDestroy:function(){this.destroy()},_onLineStyle:function(a){var b=this._annotationModel,c=a.textView.getModel(),
d=b.getTextModel(),e=a.lineStart,g=a.lineStart+a.lineText.length;d!==c&&(e=c.mapOffset(e),g=c.mapOffset(g));for(b=b.getAnnotations(e,g);b.hasNext();)if(e=b.next(),this.isAnnotationTypeVisible(e.type)){if(e.rangeStyle){var g=e.start,h=e.end;d!==c&&(g=c.mapOffset(g,!0),h=c.mapOffset(h,!0));a.ranges=this._mergeStyleRanges(a.ranges,{start:g,end:h,style:e.rangeStyle})}if(e.lineStyle)a.style=this._mergeStyle({},a.style),a.style=this._mergeStyle(a.style,e.lineStyle)}}};d.addMixin(h.prototype);return{FoldingAnnotation:a,
AnnotationType:e,AnnotationTypeList:d,AnnotationModel:g,AnnotationStyler:h}});
define("orion/textview/textDND",[],function(){function b(b,a){this._view=b;this._undoStack=a;this._dragSelection=null;this._dropOffset=-1;this._dropText=null;var e=this;this._listener={onDragStart:function(a){e._onDragStart(a)},onDragEnd:function(a){e._onDragEnd(a)},onDragEnter:function(a){e._onDragEnter(a)},onDragOver:function(a){e._onDragOver(a)},onDrop:function(a){e._onDrop(a)},onDestroy:function(a){e._onDestroy(a)}};b.addEventListener("DragStart",this._listener.onDragStart);b.addEventListener("DragEnd",
this._listener.onDragEnd);b.addEventListener("DragEnter",this._listener.onDragEnter);b.addEventListener("DragOver",this._listener.onDragOver);b.addEventListener("Drop",this._listener.onDrop);b.addEventListener("Destroy",this._listener.onDestroy)}b.prototype={destroy:function(){var b=this._view;if(b)b.removeEventListener("DragStart",this._listener.onDragStart),b.removeEventListener("DragEnd",this._listener.onDragEnd),b.removeEventListener("DragEnter",this._listener.onDragEnter),b.removeEventListener("DragOver",
this._listener.onDragOver),b.removeEventListener("Drop",this._listener.onDrop),b.removeEventListener("Destroy",this._listener.onDestroy),this._view=null},_onDestroy:function(){this.destroy()},_onDragStart:function(b){var a=this._view,e=a.getSelection(),a=a.getModel();if(a.getBaseModel)e.start=a.mapOffset(e.start),e.end=a.mapOffset(e.end),a=a.getBaseModel();if(a=a.getText(e.start,e.end))this._dragSelection=e,b.event.dataTransfer.effectAllowed="copyMove",b.event.dataTransfer.setData("Text",a)},_onDragEnd:function(b){var a=
this._view;if(this._dragSelection){this._undoStack&&this._undoStack.startCompoundChange();(b=b.event.dataTransfer.dropEffect==="move")&&a.setText("",this._dragSelection.start,this._dragSelection.end);if(this._dropText){var e=this._dropText,c=this._dropOffset;if(b)if(c>=this._dragSelection.end)c-=this._dragSelection.end-this._dragSelection.start;else if(c>=this._dragSelection.start)c=this._dragSelection.start;a.setText(e,c,c);a.setSelection(c,c+e.length);this._dropText=null;this._dropOffset=-1}this._undoStack&&
this._undoStack.endCompoundChange()}this._dragSelection=null},_onDragEnter:function(b){this._onDragOver(b)},_onDragOver:function(b){var a=b.event.dataTransfer.types;if(a){var e=!this._view.getOptions("readonly");e&&(e=a.contains?a.contains("text/plain"):a.indexOf("text/plain")!==-1);if(!e)b.event.dataTransfer.dropEffect="none"}},_onDrop:function(b){var a=this._view,e=b.event.dataTransfer.getData("Text");if(e)b=a.getOffsetAtLocation(b.x,b.y),this._dragSelection?(this._dropOffset=b,this._dropText=e):
(a.setText(e,b,b),a.setSelection(b,b+e.length))}};return{TextDND:b}});define("orion/textview/i18nUtil",[],function(){return{formatMessage:function(b){var f=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(a,b){return f[(b<<0)+1]})}}});
define("orion/syntaxchecker",["dojo"],function(b){return{SyntaxChecker:function(){function f(a,b){this.registry=a;this.editor=b}f.prototype={checkSyntax:function(a,e,c,d){function g(a,c){function d(a,b,c){a=b.getProperty("contentType");return g.isSomeExtensionOf(c,a).then(function(a){return a?b:null})}for(var g=a.getService("orion.core.contenttypes"),h=a.getServiceReferences("orion.edit.validator"),f=[],p=0;p<h.length;p++){var q=h[p],r=q.getProperty("pattern");q.getProperty("contentType")?f.push(d(a,
q,c)):r&&RegExp(r).test(e)&&(r=new b.Deferred,r.callback(q),f.push(r))}return(new b.DeferredList(f)).then(function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c][1];d!==null&&b.push(d)}return b})}if(a&&!c){var h=this;g(this.registry,a).then(function(a){for(var c=function(a){return a.problems||a.errors},g=[],f=0;f<a.length;f++)g.push(h.registry.getService(a[f]).checkSyntax(e,d).then(c));(new b.DeferredList(g)).then(function(a){var b=[];for(f=0;f<a.length;f++){var c=a[f]&&a[f][1];c&&(h._fixup(c),b=
b.concat(c))}h.registry.getService("orion.core.marker")._setProblems(b)})})}},_fixup:function(a){for(var b=this.editor.getModel(),c=0;c<a.length;c++){var d=a[c];d.description=d.description||d.reason;d.severity=d.severity||"error";d.start=typeof d.start==="number"?d.start:d.character;d.end=typeof d.end==="number"?d.end:d.start+1;var g=b.getLine(d.line-1,!1).length;d.start=Math.max(1,d.start);d.start=Math.min(d.start,g);d.end=Math.min(d.end,g);d.end=Math.max(d.start,d.end)}}};return f}()}});
define("orion/textview/textModel",["orion/textview/eventTarget"],function(b){function f(a,b){this._lastLineIndex=-1;this._text=[""];this._lineOffsets=[0];this.setText(a);this.setLineDelimiter(b)}var a=window.navigator.platform.indexOf("Win")!==-1;f.prototype={find:function(a){if(this._text.length>1)this._text=[this._text.join("")];var b=a.string,d=b;!a.regex&&b&&(d=b.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"));var g=null,h;if(d){var b=a.reverse,j=a.wrap,f=a.wholeWord,l=a.caseInsensitive,n=a.start||
0,o=a.end,a=a.end!==void 0,m="";m.indexOf("g")===-1&&(m+="g");l&&m.indexOf("i")===-1&&(m+="i");f&&(d="\\b"+d+"\\b");var p=this._text[0],q,r,s=0;a&&(p=p.substring(n,o),s=n);var u=RegExp(d,m);if(b)h=function(){var a=null;for(u.lastIndex=0;;){r=u.lastIndex;q=u.exec(p);if(r===u.lastIndex)return null;if(q){if(!(q.index<n)){if(!j||a)break;n=p.length}a={start:q.index+s,end:u.lastIndex+s}}else break}if(a)n=a.start;return a};else{if(!a)u.lastIndex=n;h=function(){for(;;){r=u.lastIndex;q=u.exec(p);if(r===u.lastIndex)break;
if(q)return{start:q.index+s,end:u.lastIndex+s};if(!(r!==0&&j))break}return null}}g=h()}return{next:function(){var a=g;a&&(g=h());return a},hasNext:function(){return g!==null}}},getCharCount:function(){for(var a=0,b=0;b<this._text.length;b++)a+=this._text[b].length;return a},getLine:function(a,b){var d=this.getLineCount();if(!(0<=a&&a<d))return null;var g=this._lineOffsets[a];if(a+1<d){d=this.getText(g,this._lineOffsets[a+1]);if(b)return d;for(var g=d.length,h;(h=d.charCodeAt(g-1))===10||h===13;)g--;
return d.substring(0,g)}else return this.getText(g)},getLineAtOffset:function(a){var b=this.getCharCount();if(!(0<=a&&a<=b))return-1;var d=this.getLineCount();if(a===b)return d-1;var g,h,j=this._lastLineIndex;if(0<=j&&j<d&&(g=this._lineOffsets[j],h=j+1<d?this._lineOffsets[j+1]:b,g<=a&&a<h))return j;for(var f=d,l=-1;f-l>1;)if(j=Math.floor((f+l)/2),g=this._lineOffsets[j],h=j+1<d?this._lineOffsets[j+1]:b,a<=g)f=j;else if(a<h){f=j;break}else l=j;return this._lastLineIndex=f},getLineCount:function(){return this._lineOffsets.length},
getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(a,b){var d=this.getLineCount();if(!(0<=a&&a<d))return-1;if(a+1<d){d=this._lineOffsets[a+1];if(b)return d;for(var g=this.getText(Math.max(this._lineOffsets[a],d-2),d),h=g.length,j;(j=g.charCodeAt(h-1))===10||j===13;)h--;return d-(g.length-h)}else return this.getCharCount()},getLineStart:function(a){return!(0<=a&&a<this.getLineCount())?-1:this._lineOffsets[a]},getText:function(a,b){a===void 0&&(a=0);b===void 0&&(b=this.getCharCount());
if(a===b)return"";for(var d=0,g=0,h;g<this._text.length;){h=this._text[g].length;if(a<=d+h)break;d+=h;g++}for(var j=d,f=g;g<this._text.length;){h=this._text[g].length;if(b<=d+h)break;d+=h;g++}if(f===g)return this._text[f].substring(a-j,b-d);j=this._text[f].substring(a-j);d=this._text[g].substring(0,b-d);return j+this._text.slice(f+1,g).join("")+d},onChanging:function(a){return this.dispatchEvent(a)},onChanged:function(a){return this.dispatchEvent(a)},setLineDelimiter:function(b,c){b==="auto"&&(b=
void 0,this.getLineCount()>1&&(b=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0))));this._lineDelimiter=b?b:a?"\r\n":"\n";if(c){var d=this.getLineCount();if(d>1){for(var g=Array(d),h=0;h<d;h++)g[h]=this.getLine(h);this.setText(g.join(this._lineDelimiter))}}},setText:function(a,b,d){a===void 0&&(a="");b===void 0&&(b=0);d===void 0&&(d=this.getCharCount());if(!(b===d&&a==="")){for(var g=this.getLineAtOffset(b),h=this.getLineAtOffset(d),j=b,f=d-b,l=h-g,n=a.length,o=0,m=this.getLineCount(),p=0,q=
0,r=0,s=[];;){p!==-1&&p<=r&&(p=a.indexOf("\r",r));q!==-1&&q<=r&&(q=a.indexOf("\n",r));if(q===-1&&p===-1)break;r=p!==-1&&q!==-1?p+1===q?q+1:(p<q?p:q)+1:p!==-1?p+1:q+1;s.push(b+r);o++}this.onChanging({type:"Changing",text:a,start:j,removedCharCount:f,addedCharCount:n,removedLineCount:l,addedLineCount:o});s.length===0&&(p=this.getLineStart(g),h=h+1<m?this.getLineStart(h+1):this.getCharCount(),b!==p&&(a=this.getText(p,b)+a,b=p),d!==h&&(a+=this.getText(d,h),d=h));h=n-f;for(p=g+l+1;p<m;p++)this._lineOffsets[p]+=
h;g=[g+1,l].concat(s);Array.prototype.splice.apply(this._lineOffsets,g);for(h=s=0;h<this._text.length;){p=this._text[h].length;if(b<=s+p)break;s+=p;h++}m=s;for(g=h;h<this._text.length;){p=this._text[h].length;if(d<=s+p)break;s+=p;h++}p=this._text[h];b=this._text[g].substring(0,b-m);d=p.substring(d-s);g=[g,h-g+1];b&&g.push(b);a&&g.push(a);d&&g.push(d);Array.prototype.splice.apply(this._text,g);if(this._text.length===0)this._text=[""];this.onChanged({type:"Changed",start:j,removedCharCount:f,addedCharCount:n,
removedLineCount:l,addedLineCount:o})}}};b.EventTarget.addMixin(f.prototype);return{TextModel:f}});
define("orion/textview/projectionTextModel",["orion/textview/textModel","orion/textview/eventTarget"],function(b,f){function a(a){this._model=a;this._projections=[]}a.prototype={addProjection:function(a){if(a){var c=this._model,d=this._projections;a._lineIndex=c.getLineAtOffset(a.start);a._lineCount=c.getLineAtOffset(a.end)-a._lineIndex;var g=a.text;g||(g="");a._model=typeof g==="string"?new b.TextModel(g,c.getLineDelimiter()):g;var c=this.mapOffset(a.start,!0),g=a.end-a.start,h=a._lineCount,j=a._model.getCharCount(),
f=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:a._model.getText(),start:c,removedCharCount:g,addedCharCount:j,removedLineCount:h,addedLineCount:f});var l=this._binarySearch(d,a.start);d.splice(l,0,a);this.onChanged({type:"Changed",start:c,removedCharCount:g,addedCharCount:j,removedLineCount:h,addedLineCount:f})}},getProjections:function(){return this._projections.slice(0)},getBaseModel:function(){return this._model},mapOffset:function(a,b){var d=this._projections,g=0,h,j;if(b){for(h=
0;h<d.length;h++){j=d[h];if(j.start>a)break;if(j.end>a)return-1;g+=j._model.getCharCount()-(j.end-j.start)}return a+g}for(h=0;h<d.length;h++){j=d[h];if(j.start>a-g)break;var f=j._model.getCharCount();if(j.start+f>a-g)return-1;g+=f-(j.end-j.start)}return a-g},removeProjection:function(a){var b,d=0;for(b=0;b<this._projections.length;b++){var g=this._projections[b];if(g===a){a=g;break}d+=g._model.getCharCount()-(g.end-g.start)}if(b<this._projections.length){var g=this._model,d=a.start+d,h=a.end-a.start,
j=a._lineCount,f=a._model.getCharCount(),l=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:g.getText(a.start,a.end),start:d,removedCharCount:f,addedCharCount:h,removedLineCount:l,addedLineCount:j});this._projections.splice(b,1);this.onChanged({type:"Changed",start:d,removedCharCount:f,addedCharCount:h,removedLineCount:l,addedLineCount:j})}},_binarySearch:function(a,b){for(var d=a.length,g=-1,h;d-g>1;)h=Math.floor((d+g)/2),b<=a[h].start?d=h:g=h;return d},getCharCount:function(){for(var a=
this._model.getCharCount(),b=this._projections,d=0;d<b.length;d++){var g=b[d];a+=g._model.getCharCount()-(g.end-g.start)}return a},getLine:function(a,b){if(a<0)return null;var d=this._model,g=this._projections,h=0,j=[],f=0,l,n,o;for(l=0;l<g.length;l++){o=g[l];if(o._lineIndex>=a-h)break;n=o._model.getLineCount()-1;if(o._lineIndex+n>=a-h)if(f=a-(o._lineIndex+h),f<n)return o._model.getLine(f,b);else j.push(o._model.getLine(n));f=o.end;h+=n-o._lineCount}for(f=Math.max(f,d.getLineStart(a-h));l<g.length;l++){o=
g[l];if(o._lineIndex>a-h)break;j.push(d.getText(f,o.start));n=o._model.getLineCount()-1;if(o._lineIndex+n>a-h)return j.push(o._model.getLine(0,b)),j.join("");j.push(o._model.getText());f=o.end;h+=n-o._lineCount}g=d.getLineEnd(a-h,b);f<g&&j.push(d.getText(f,g));return j.join("")},getLineAtOffset:function(a){for(var b=this._model,d=this._projections,g=0,h=0,j=0;j<d.length;j++){var f=d[j];if(f.start>a-g)break;var l=f._model.getCharCount();if(f.start+l>a-g){d=a-(f.start+g);h+=f._model.getLineAtOffset(d);
g+=d;break}h+=f._model.getLineCount()-1-f._lineCount;g+=l-(f.end-f.start)}return b.getLineAtOffset(a-g)+h},getLineCount:function(){for(var a=this._projections,b=this._model.getLineCount(),d=0;d<a.length;d++){var g=a[d];b+=g._model.getLineCount()-1-g._lineCount}return b},getLineDelimiter:function(){return this._model.getLineDelimiter()},getLineEnd:function(a,b){if(a<0)return-1;for(var d=this._model,g=this._projections,h=0,j=0,f=0;f<g.length;f++){var l=g[f];if(l._lineIndex>a-h)break;var n=l._model.getLineCount()-
1;if(l._lineIndex+n>a-h)return l._model.getLineEnd(a-(l._lineIndex+h),b)+l.start+j;j+=l._model.getCharCount()-(l.end-l.start);h+=n-l._lineCount}return d.getLineEnd(a-h,b)+j},getLineStart:function(a){if(a<0)return-1;for(var b=this._model,d=this._projections,g=0,h=0,j=0;j<d.length;j++){var f=d[j];if(f._lineIndex>=a-g)break;var l=f._model.getLineCount()-1;if(f._lineIndex+l>=a-g)return f._model.getLineStart(a-(f._lineIndex+g))+f.start+h;h+=f._model.getCharCount()-(f.end-f.start);g+=l-f._lineCount}return b.getLineStart(a-
g)+h},getText:function(a,b){a===void 0&&(a=0);var d=this._model,g=this._projections,h=0,j=[],f,l,n;for(f=0;f<g.length;f++){l=g[f];if(l.start>a-h)break;n=l._model.getCharCount();if(l.start+n>a-h)if(b!==void 0&&l.start+n>b-h)return l._model.getText(a-(l.start+h),b-(l.start+h));else j.push(l._model.getText(a-(l.start+h))),a=l.end+h+n-(l.end-l.start);h+=n-(l.end-l.start)}var o=a-h;if(b!==void 0){for(;f<g.length;f++){l=g[f];if(l.start>b-h)break;j.push(d.getText(o,l.start));n=l._model.getCharCount();if(l.start+
n>b-h)return j.push(l._model.getText(0,b-(l.start+h))),j.join("");j.push(l._model.getText());o=l.end;h+=n-(l.end-l.start)}j.push(d.getText(o,b-h))}else{for(;f<g.length;f++)l=g[f],j.push(d.getText(o,l.start)),j.push(l._model.getText()),o=l.end;j.push(d.getText(o))}return j.join("")},_onChanging:function(a,b,d,g,h,j){for(var f=this._model,l=this._projections,n,o=0,m,p=b+d;n<l.length;n++){d=l[n];if(d.start>b)break;o+=d._model.getCharCount()-(d.end-d.start)}b+=o;for(var q=n;n<l.length;n++){d=l[n];if(d.start>
p)break;o+=d._model.getCharCount()-(d.end-d.start);m+=d._model.getLineCount()-1-d._lineCount}d=p+o;o=n;this.onChanging(b,d-b,g,h+m,j);l.splice(l,o-q);for(a=a.length-(d-b);n<l.length;n++)d=l[n],d.start+=a,d.end+=a,d._lineIndex=f.getLineAtOffset(d.start)},onChanging:function(a){return this.dispatchEvent(a)},onChanged:function(a){return this.dispatchEvent(a)},setLineDelimiter:function(a){this._model.setLineDelimiter(a)},setText:function(a,b,d){a===void 0&&(a="");b===void 0&&(b=0);var g=b,h=d,j=this._model,
f=this._projections,l=0,n=0,o,m,p,q,r,s=0;for(o=0;o<f.length;o++){m=f[o];if(m.start>b-l)break;p=m._model.getCharCount();if(m.start+p>b-l)if(d!==void 0&&m.start+p>d-l){m._model.setText(a,b-(m.start+l),d-(m.start+l));return}else s=m._model.getLineCount()-1-m._model.getLineAtOffset(b-(m.start+l)),q={projection:m,start:b-(m.start+l)},b=m.end+l+p-(m.end-m.start);n+=m._model.getLineCount()-1-m._lineCount;l+=p-(m.end-m.start)}b-=l;var u=o,s=j.getLineAtOffset(b)+n-s;if(d!==void 0)for(;o<f.length;o++){m=f[o];
if(m.start>d-l)break;p=m._model.getCharCount();if(m.start+p>d-l){n+=m._model.getLineAtOffset(d-(m.start+l));p=d-(m.start+l);d=m.end+l;r={projection:m,end:p};break}n+=m._model.getLineCount()-1-m._lineCount;l+=p-(m.end-m.start)}else{for(;o<f.length;o++)m=f[o],n+=m._model.getLineCount()-1-m._lineCount,l+=m._model.getCharCount()-(m.end-m.start);d=h=j.getCharCount()+l}d-=l;m=j.getLineAtOffset(d)+n;h-=g;for(var n=m-s,s=a.length,v=p=m=l=0;;){m!==-1&&m<=v&&(m=a.indexOf("\r",v));p!==-1&&p<=v&&(p=a.indexOf("\n",
v));if(p===-1&&m===-1)break;v=m!==-1&&p!==-1?m+1===p?p+1:(m<p?m:p)+1:m!==-1?m+1:p+1;l++}this.onChanging({type:"Changing",text:a,start:g,removedCharCount:h,addedCharCount:s,removedLineCount:n,addedLineCount:l});j.setText(a,b,d);if(q)m=q.projection,m._model.setText("",q.start);if(r)m=r.projection,m._model.setText("",0,r.end),m.start=m.end,m._lineCount=0;f.splice(u,o-u);for(a=a.length-(d-b);o<f.length;o++)m=f[o],m.start+=a,m.end+=a,m._lineIndex=j.getLineAtOffset(m.start);this.onChanged({type:"Changed",
start:g,removedCharCount:h,addedCharCount:s,removedLineCount:n,addedLineCount:l})}};f.EventTarget.addMixin(a.prototype);return{ProjectionTextModel:a}});
define("orion/textview/keyBinding",[],function(){function b(a,b,c,d,g){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=c!==void 0&&c!==null?c:!1;this.mod3=d!==void 0&&d!==null?d:!1;this.mod4=g!==void 0&&g!==null?g:!1}var f=window.navigator.platform.indexOf("Mac")!==-1;b.prototype={match:function(a){return this.keyCode===a.keyCode?this.mod1!==(f?a.metaKey:a.ctrlKey)?!1:this.mod2!==a.shiftKey?!1:this.mod3!==a.altKey?!1:f&&this.mod4!==a.ctrlKey?
!1:!0:!1},equals:function(a){return!a?!1:this.keyCode!==a.keyCode?!1:this.mod1!==a.mod1?!1:this.mod2!==a.mod2?!1:this.mod3!==a.mod3?!1:this.mod4!==a.mod4?!1:!0}};return{KeyBinding:b}});
define("orion/editor/contentAssist",["i18n!orion/editor/nls/messages","orion/textview/keyBinding","orion/textview/eventTarget","orion/editor/Deferred"],function(b,f,a,e){var c,d,g;function h(a){this.textView=a;this.state=c;this.providers=[];var e=this;this.contentAssistListener={onModelChanging:function(a){e.isDeactivatingChange(a)?e.setState(c):e.state===d&&e.setState(g)},onScroll:function(){e.setState(c)},onSelection:function(){var a=e.state;if(a===d||a===g)e.computeProposals(),e.setState(g)}};
var h=navigator.platform.indexOf("Mac")!==-1;a.setKeyBinding(h?new f.KeyBinding(" ",!1,!1,!1,!0):new f.KeyBinding(" ",!0),"contentAssist");a.setAction("contentAssist",function(){e.activate();return!0},{name:b.contentAssist})}function j(a,b){this.contentAssist=a;this.widget=b;this.proposals=[];var c=this;this.contentAssist.addEventListener("ProposalsComputed",function(a){c.proposals=a.data.proposals;c.selectedIndex=c.proposals.length?0:-1})}function k(a,b){this.contentAssist=a;this.parentNode=typeof b===
"string"?document.getElementById(b):b;this.textView=this.contentAssist.getTextView();this.isShowing=this.textViewListenerAdded=!1;var c=this;if(!this.parentNode){this.parentNode=document.createElement("div");this.parentNode.className="contentassist";var d=document.getElementsByTagName("body")[0];if(d)d.appendChild(this.parentNode);else throw Error("parentNode is required");}this.textViewListener={onMouseDown:function(a){a.event.target.parentElement!==c.parentNode&&c.contentAssist.deactivate()}};this.contentAssist.addEventListener("ProposalsComputed",
function(a){c.setProposals(a.data.proposals);c.show();if(!c.textViewListenerAdded)c.textView.addEventListener("MouseDown",c.textViewListener.onMouseDown),c.textViewListenerAdded=!0});this.contentAssist.addEventListener("Deactivating",function(){c.setProposals([]);c.hide();if(c.textViewListenerAdded)c.textView.removeEventListener("MouseDown",c.textViewListener.onMouseDown),c.textViewListenerAdded=!1;c.textViewListenerAdded=!1});this.scrollListener=function(){c.isShowing&&c.position()};document.addEventListener("scroll",
this.scrollListener)}c=1;d=2;g=3;var l={selected:" selected",hr:"proposal-hr",emphasis:"proposal-emphasis",noemphasis:"proposal-noemphasis",dfault:"proposal-default"};h.prototype={apply:function(a){if(!a)return!1;var b=this.textView.getCaretOffset(),d={proposal:a,start:b,end:b};this.setState(c);this.textView.setText(a.proposal||a,b,b);this.dispatchEvent({type:"ProposalApplied",data:d});return!0},activate:function(){this.state===c&&this.setState(d)},deactivate:function(){this.setState(c)},getTextView:function(){return this.textView},
isActive:function(){return this.state===d||this.state===g},isDeactivatingChange:function(a){var b=a.removedCharCount>0&&a.addedCharCount===0,c=this.textView,c=a.start+1<=c.getModel().getCharCount()&&/^\s*$/.test(c.getText(a.start,a.start+1));return a.removedLineCount>0||a.addedLineCount>0||b&&c},setState:function(a){var b;a===d?b="Activating":a===c&&(b="Deactivating");b&&this.dispatchEvent({type:b});this.state=a;this.onStateChange(a)},onStateChange:function(a){if(a===c){if(this.listenerAdded)this.textView.removeEventListener("ModelChanging",
this.contentAssistListener.onModelChanging),this.textView.removeEventListener("Scroll",this.contentAssistListener.onScroll),this.textView.removeEventListener("Selection",this.contentAssistListener.onSelection),this.listenerAdded=!1}else if(a===d){if(!this.listenerAdded)this.textView.addEventListener("ModelChanging",this.contentAssistListener.onModelChanging),this.textView.addEventListener("Scroll",this.contentAssistListener.onScroll),this.textView.addEventListener("Selection",this.contentAssistListener.onSelection),
this.listenerAdded=!0;this.computeProposals()}},computeProposals:function(){var a=this;this._computeProposals(this.textView.getCaretOffset()).then(function(b){a.dispatchEvent({type:"ProposalsComputed",data:{proposals:b}})})},getPrefixStart:function(a){for(;a>0&&/[A-Za-z0-9_]/.test(this.textView.getText(a-1,a));)a--;return a},handleError:function(a){typeof console!=="undefined"&&(console.log("Error retrieving content assist proposals"),console.log(a))},_computeProposals:function(a){var b=this.providers,
c=this.textView,d=c.getModel(),g=c.getText(),h={line:d.getLine(d.getLineAtOffset(a)),prefix:c.getText(this.getPrefixStart(a),a),selection:c.getSelection()},j=this,b=b.map(function(b){var c=b.computeProposals||b.getProposals,d;try{typeof c==="function"&&(d=c.apply(b,[g,a,h]))}catch(f){j.handleError(f)}return e.when(d)});return e.all(b,this.handleError).then(function(a){return a.reduce(function(a,b){return b instanceof Array?a.concat(b):a},[])})},setProviders:function(a){this.providers=a.slice(0)}};
a.EventTarget.addMixin(h.prototype);j.prototype={cancel:function(){this.getContentAssist().deactivate()},getContentAssist:function(){return this.contentAssist},isActive:function(){return this.getContentAssist().isActive()},lineUp:function(){for(var a=this.selectedIndex===0?this.proposals.length-1:this.selectedIndex-1;this.proposals[a].unselectable&&a>0;)a--;this.selectedIndex=a;this.widget&&this.widget.setSelectedIndex(this.selectedIndex);return!0},lineDown:function(){for(var a=this.selectedIndex===
this.proposals.length-1?0:this.selectedIndex+1;this.proposals[a].unselectable&&a<this.proposals.length-1;)a++;this.selectedIndex=a;this.widget&&this.widget.setSelectedIndex(this.selectedIndex);return!0},enter:function(){return this.contentAssist.apply(this.proposals[this.selectedIndex]||null)},tab:function(){return this.widget?(this.widget.createAccessible(this),this.widget.parentNode.focus(),!0):!1}};k.prototype={onClick:function(a){this.contentAssist.apply(this.getProposal(a.target));this.textView.focus()},
createDiv:function(a,b,c,d){var e=document.createElement("div");e.id="contentoption"+d;e.setAttribute("role","option");a.style==="hr"?a=document.createElement("hr"):(e.className=this.calculateClasses(a.style,b),a=document.createTextNode(this.getDisplayString(a)),b&&this.parentNode.setAttribute("aria-activedescendant",e.id));e.appendChild(a,e);c.appendChild(e)},createAccessible:function(a){this._isAccessible||this.parentNode.addEventListener("keydown",function(b){b.preventDefault();if(b.keyCode===
27)return a.cancel();else if(b.keyCode===38)return a.lineUp();else if(b.keyCode===40)return a.lineDown();else if(b.keyCode===13)return a.enter();return!1});this._isAccessible=!0},calculateClasses:function(a,b){var c=l[a];if(!c)c=l.dfault;return b?c+l.selected:c},getDisplayString:function(a){return typeof a==="string"?a:a.description&&typeof a.description==="string"?a.description:a.proposal},getProposal:function(a){for(var b=0,c=this.parentNode.firstChild;c!==null;c=c.nextSibling){if(c===a)return this.proposals[b]||
null;b++}return null},setSelectedIndex:function(a){this.selectedIndex=a;this.selectNode(this.parentNode.childNodes[this.selectedIndex])},selectNode:function(a){for(var b=this.parentNode.childNodes,c=0;c<b.length;c++){var d=b[c],e=d.className.indexOf(l.selected);if(e>=0)d.className=d.className.substring(0,e)+d.className.substring(e+l.selected.length);d===a&&(d.className+=l.selected,this.parentNode.setAttribute("aria-activedescendant",d.id),d.focus(),d.offsetTop<this.parentNode.scrollTop?d.scrollIntoView(!0):
d.offsetTop+d.offsetHeight>this.parentNode.scrollTop+this.parentNode.clientHeight&&d.scrollIntoView(!1))}},setProposals:function(a){this.proposals=a},show:function(){if(this.proposals.length===0)this.hide();else{this.parentNode.innerHTML="";for(var a=0;a<this.proposals.length;a++)this.createDiv(this.proposals[a],a===0,this.parentNode,a);this.position();this.parentNode.onclick=this.onClick.bind(this);this.isShowing=!0}},hide:function(){document.activeElement===this.parentNode&&this.textView.focus();
this.parentNode.style.display="none";this.parentNode.onclick=null;this.isShowing=!1},position:function(){var a=this.textView.getLocationAtOffset(this.textView.getCaretOffset());a.y+=this.textView.getLineHeight();this.textView.convert(a,"document","page");this.parentNode.style.position="fixed";this.parentNode.style.left=a.x+"px";this.parentNode.style.top=a.y+"px";this.parentNode.style.display="block";this.parentNode.scrollTop=0;var b=document.documentElement.clientWidth;if(a.y+this.parentNode.offsetHeight>
document.documentElement.clientHeight)this.parentNode.style.top=a.y-this.parentNode.offsetHeight-this.textView.getLineHeight()+"px";if(a.x+this.parentNode.offsetWidth>b)this.parentNode.style.left=b-this.parentNode.offsetWidth+"px"}};return{ContentAssist:h,ContentAssistMode:j,ContentAssistWidget:k}});
define("orion/textview/textView",["orion/textview/textModel","orion/textview/keyBinding","orion/textview/eventTarget"],function(b,f,a){function e(a,b,c,d){typeof a.addEventListener==="function"?a.addEventListener(b,c,d===!0):a.attachEvent("on"+b,c)}function c(a,b,c){if(c){b.className="";for(var c=b.attributes,d=c.length;d-- >0;)c[d].specified&&b.removeAttributeNode(c[d])}if(a){if(a.styleClass)b.className=a.styleClass;if(c=a.style)for(var e in c)c.hasOwnProperty(e)&&(b.style[e]=c[e]);if(a=a.attributes)for(var g in a)a.hasOwnProperty(g)&&
b.setAttribute(g,a[g])}}function d(a){return a instanceof Array?a.slice(0):a}function g(a,b){if(a===b)return!0;if(a&&!b||!a&&b)return!1;if(a&&a.constructor===String||b&&b.constructor===String)return!1;if(a instanceof Array||b instanceof Array){if(!(a instanceof Array&&b instanceof Array))return!1;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}if(!(a instanceof Object)||!(b instanceof Object))return!1;for(c in a)if(a.hasOwnProperty(c)){if(!b.hasOwnProperty(c))return!1;
if(!g(a[c],b[c]))return!1}for(c in b)if(!a.hasOwnProperty(c))return!1;return!0}function h(a,b,c){for(var d=0,e=0,g=0,h=a.length;g<h;){d!==-1&&d<=g&&(d=a.indexOf("\r",g));e!==-1&&e<=g&&(e=a.indexOf("\n",g));var j=g,f;if(e===-1&&d===-1){b(a.substring(g));break}d!==-1&&e!==-1?d+1===e?(f=d,g=e+1):(f=d<e?d:e,g=(d<e?d:e)+1):d!==-1?(f=d,g=d+1):(f=e,g=e+1);b(a.substring(j,f));c()}}function j(a){var b,c,d,e;if(window.getComputedStyle)a=window.getComputedStyle(a,null),b=a.getPropertyValue("padding-left"),c=
a.getPropertyValue("padding-top"),d=a.getPropertyValue("padding-right"),e=a.getPropertyValue("padding-bottom");else if(a.currentStyle)b=a.currentStyle.paddingLeft,c=a.currentStyle.paddingTop,d=a.currentStyle.paddingRight,e=a.currentStyle.paddingBottom;return{left:parseInt(b,10)||0,top:parseInt(c,10)||0,right:parseInt(d,10)||0,bottom:parseInt(e,10)||0}}function k(a){var b,c,d,e,g=a._trim;if(!g){g=j(a);if(window.getComputedStyle)e=window.getComputedStyle(a,null),b=e.getPropertyValue("border-left-width"),
c=e.getPropertyValue("border-top-width"),d=e.getPropertyValue("border-right-width"),e=e.getPropertyValue("border-bottom-width");else if(a.currentStyle)b=a.currentStyle.borderLeftWidth,c=a.currentStyle.borderTopWidth,d=a.currentStyle.borderRightWidth,e=a.currentStyle.borderBottomWidth;b=parseInt(b,10)||0;c=parseInt(c,10)||0;d=parseInt(d,10)||0;e=parseInt(e,10)||0;g.left+=b;g.top+=c;g.right+=d;g.bottom+=e;a._trim=g}return g}function l(a,b,c){this.start=a;this.end=b;this.caret=c}function n(a){this.left=
a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom}function o(a,b,c){this.view=a;this.lineIndex=b;this._lineDiv=c}function m(a){this._init(a)}var p=navigator.userAgent,q;document.selection&&window.ActiveXObject&&/MSIE/.test(p)&&(q=document.documentMode?document.documentMode:7);var r=parseFloat(p.split("Firefox/")[1]||p.split("Minefield/")[1])||void 0,s=p.indexOf("Opera")!==-1,u=p.indexOf("Chrome")!==-1,v=p.indexOf("Safari")!==-1&&!u,w=p.indexOf("WebKit")!==-1,t=p.indexOf("Android")!==-1,
y=p.indexOf("iPad")!==-1,x=navigator.platform.indexOf("Mac")!==-1,G=navigator.platform.indexOf("Win")!==-1,A=navigator.platform.indexOf("Linux")!==-1,B=typeof window.document.documentElement.addEventListener==="function",z=(!q||q>=9)&&typeof window.document.createRange().getBoundingClientRect==="function",J=G?"\r\n":"\n";l.prototype={clone:function(){return new l(this.start,this.end,this.caret)},collapse:function(){this.caret?this.end=this.start:this.start=this.end},extend:function(a){this.caret?
this.start=a:this.end=a;if(this.start>this.end)a=this.start,this.start=this.end,this.end=a,this.caret=!this.caret},setCaret:function(a){this.end=this.start=a;this.caret=!1},getCaret:function(){return this.caret?this.start:this.end},toString:function(){return"start="+this.start+" end="+this.end+(this.caret?" caret is at start":" caret is at end")},isEmpty:function(){return this.start===this.end},equals:function(a){return this.caret===a.caret&&this.start===a.start&&this.end===a.end}};n.prototype={toString:function(){return"{l="+
this.left+", t="+this.top+", r="+this.right+", b="+this.bottom+"}"}};o.prototype={create:function(a,b){if(!this._lineDiv){var c=this._lineDiv=this._createLine(a,b,this.lineIndex);c._line=this;return c}},_createLine:function(a,b,d){var e=this.view,h=e._model,j=h.getLine(d),f=h.getLineStart(d),k={type:"LineStyle",textView:e,lineIndex:d,lineText:j,lineStart:f};e.onLineStyle(k);h=b||document.createElement("DIV");if(!b||!g(b.viewStyle,k.style)){c(k.style,h,b);if(b)b._trim=null;h.viewStyle=k.style;h.setAttribute("role",
"presentation")}h.lineIndex=d;d=[];this._createRanges(k.ranges,j,0,j.length,f,{tabOffset:0,ranges:d});j=" ";!e._fullSelection&&q<9&&(j="\ufeff");w&&(j="\u200c");d.push({text:j,style:e._metrics.largestFontStyle,ignoreChars:1});var l,t,n,o,m,j=e=0,y,p;if(b){if(t=b.modelChangedEvent)t.removedLineCount===0&&t.addedLineCount===0?(p=t.start-f,y=t.addedCharCount-t.removedCharCount):p=-1,b.modelChangedEvent=void 0;t=b.firstChild}for(f=0;f<d.length;f++){l=d[f];o=l.text;e+=o.length;k=l.style;if(t)if(m=t.firstChild.data,
n=t.viewStyle,m===o&&g(k,n)){j+=m.length;t._rectsCache=void 0;l=t=t.nextSibling;continue}else for(;t;){if(p!==-1){n=e;n>=p&&(n-=y);m=(m=t.firstChild.data)?m.length:0;if(j+m>n)break;j+=m}n=t.nextSibling;h.removeChild(t);t=n}l=this._createSpan(h,document,o,k,l.ignoreChars);t?h.insertBefore(l,t):h.appendChild(l);if(b)b.lineWidth=void 0}if(b)for(a=l?l.nextSibling:null;a;)n=a.nextSibling,b.removeChild(a),a=n;else a.appendChild(h);return h},_createRanges:function(a,b,c,d,e,h){if(!(c>=d)){if(a)for(var j=
0;j<a.length;j++){var f=a[j];if(!(f.end<=e+c)){var k=Math.max(e+c,f.start)-e;if(k>=d)break;var l=Math.min(e+d,f.end)-e;if(k<l){k=Math.max(c,k);l=Math.min(d,l);for(c<k&&this._createRange(b,c,k,null,h);j+1<a.length&&a[j+1].start-e===l&&g(f.style,a[j+1].style);)f=a[j+1],l=Math.min(e+d,f.end)-e,j++;this._createRange(b,k,l,f.style,h);c=l}}}c<d&&this._createRange(b,c,d,null,h)}},_createRange:function(a,b,c,d,e){if(!(b>=c)){var g=this.view._customTabSize;if(g&&g!==8)for(var h=a.indexOf("\t",b);h!==-1&&h<
c;){b<h&&(b={text:a.substring(b,h),style:d},e.ranges.push(b),e.tabOffset+=b.text.length);b=g-e.tabOffset%g;if(b>0){for(var j="\u00a0",f=1;f<b;f++)j+=" ";b={text:j,style:d,ignoreChars:b-1};e.ranges.push(b);e.tabOffset+=b.text.length}b=h+1;h=a.indexOf("\t",b)}b<c&&(b={text:a.substring(b,c),style:d},e.ranges.push(b),e.tabOffset+=b.text.length)}},_createSpan:function(a,b,d,g,h){var j=g&&g.tagName==="A";if(j)a.hasLink=!0;a=j&&this.view._linksVisible?"A":"SPAN";j=b.createElement(a);j.appendChild(b.createTextNode(d));
c(g,j);if(a==="A"){var f=this.view;e(j,"click",function(a){return f._handleLinkClick(a)},!1)}j.viewStyle=g;if(h)j.ignoreChars=h;return j},_ensureCreated:function(){return this._lineDiv?this._lineDiv:this._createdDiv=this.create(this.view._clientDiv,null)},getBoundingClientRect:function(a,b){var c=this._ensureCreated(),d=this.view;if(a===void 0)return this._getLineBoundingClientRect(c,!0);var e=d._model,g=this.lineIndex,h=null;if(a<e.getLineEnd(g)){e=e.getLineStart(g);for(c=c.firstChild;c;){var g=
c.firstChild,j=g.length;c.ignoreChars&&(j-=c.ignoreChars);if(e+j>a){h=a-e;if(z)e=document.createRange(),e.setStart(g,h),e.setEnd(g,h+1),h=new n(e.getBoundingClientRect());else if(q)e=document.body.createTextRange(),e.moveToElementText(c),e.collapse(),e.moveEnd("character",h+1),e.moveStart("character",h),h=new n(e.getBoundingClientRect());else{var f=g.data;c.removeChild(g);c.appendChild(document.createTextNode(f.substring(0,h)));var k=document.createElement("SPAN");k.appendChild(document.createTextNode(f.substring(h,
h+1)));c.appendChild(k);c.appendChild(document.createTextNode(f.substring(h+1)));h=new n(k.getBoundingClientRect());c.innerHTML="";c.appendChild(g);this._createdDiv||(c=d._getSelection(),(e<=c.start&&c.start<e+j||e<=c.end&&c.end<e+j)&&d._updateDOMSelection())}q&&(e=window.screen.logicalXDPI/window.screen.deviceXDPI,c=window.screen.logicalYDPI/window.screen.deviceYDPI,h.left*=e,h.right*=e,h.top*=c,h.bottom*=c);break}e+=j;c=c.nextSibling}}e=this.getBoundingClientRect();if(!h)d._wrapMode?(d=this.getClientRects(),
h=d[d.length-1],h.left=h.right,h.left+=e.left,h.top+=e.top,h.right+=e.left,h.bottom+=e.top):(h=new n(e),h.left=h.right);if(b||b===void 0)h.left-=e.left,h.top-=e.top,h.right-=e.left,h.bottom-=e.top;return h},_getClientRects:function(a,b){var c,d,e,g;if(!a._rectsCache){c=a.getClientRects();d=Array(c.length);for(g=0;g<c.length;g++)e=d[g]=new n(c[g]),e.left-=b.left,e.top-=b.top,e.right-=b.left,e.bottom-=b.top;a._rectsCache=d}c=a._rectsCache;d=[c.length];for(g=0;g<c.length;g++)d[g]=new n(c[g]);return d},
getClientRects:function(a){if(!this.view._wrapMode)return[this.getBoundingClientRect()];for(var b=this._ensureCreated(),c=[],d=b.firstChild,e,g=b.getBoundingClientRect();d;){for(var h=this._getClientRects(d,g),b=0;b<h.length;b++){var j=h[b],f;if(j.top!==j.bottom){var k=j.top+(j.bottom-j.top)/2;for(f=0;f<c.length;f++)if(e=c[f],e.top<=k&&k<e.bottom)break;if(f===c.length)c.push(j);else{if(j.left<e.left)e.left=j.left;if(j.top<e.top)e.top=j.top;if(j.right>e.right)e.right=j.right;if(j.bottom>e.bottom)e.bottom=
j.bottom}}}d=d.nextSibling}return a!==void 0?c[a]:c},_getLineBoundingClientRect:function(a,b){var c=new n(a.getBoundingClientRect());if(!this.view._wrapMode){c.right=c.left;for(var d=a.lastChild;d&&d.ignoreChars===d.firstChild.length;)d=d.previousSibling;if(d)d=d.getBoundingClientRect(),c.right=d.right+k(a).right}b&&(d=k(a),c.left+=d.left,c.right-=d.right);return c},getLineCount:function(){return!this.view._wrapMode?1:this.getClientRects().length},getLineIndex:function(a){if(!this.view._wrapMode)return 0;
for(var b=this.getClientRects(),a=this.getBoundingClientRect(a),a=a.top+(a.bottom-a.top)/2,c=0;c<b.length;c++)if(b[c].top<=a&&a<b[c].bottom)return c;return b.length-1},getLineStart:function(a){if(!this.view._wrapMode||a===0)return this.view._model.getLineStart(a);var b=this.getClientRects();return this.getOffset(b[a].left+1,b[a].top+1)},getOffset:function(a,b){var c=this.view,d=c._model,e=this.lineIndex,g=d.getLineStart(e),d=d.getLineEnd(e);if(g===d)return g;var h=this._ensureCreated(),e=this.getBoundingClientRect(),
j,f;if(c._wrapMode){j=this.getClientRects();if(b<j[0].top)b=j[0].top;for(var k=0;k<j.length;k++)if(f=j[k],f.top<=b&&b<f.bottom)break;if(a<f.left)a=f.left;a>f.right&&(a=f.right-1)}else a<0&&(a=0),a>e.right-e.left&&(a=e.right-e.left);var l=q?window.screen.logicalXDPI/window.screen.deviceXDPI:1,t=q?window.screen.logicalYDPI/window.screen.deviceYDPI:1,k=g,n=h.firstChild;a:for(;n;){var o=n.firstChild,h=o.length;n.ignoreChars&&(h-=n.ignoreChars);var m,y,p;j=this._getClientRects(n,e);for(var x=0;x<j.length;x++)if(f=
j[x],f.left<=a&&a<f.right&&(!c._wrapMode||f.top<=b&&b<f.bottom)){if(q||z){for(var x=z?document.createRange():document.body.createTextRange(),s=h,w=-1;s-w>1;){var A=Math.floor((s+w)/2);f=w+1;j=A===h-1&&n.ignoreChars?o.length:A+1;z?(x.setStart(o,f),x.setEnd(o,j)):(x.moveToElementText(n),x.move("character",f),x.moveEnd("character",j-f));j=x.getClientRects();for(var v=!1,G=0;G<j.length;G++)if(f=j[G],m=f.left*l-e.left,p=f.right*l-e.left,y=f.top*t-e.top,f=f.bottom*t-e.top,m<=a&&a<p&&(!c._wrapMode||y<=b&&
b<f)){v=!0;break}v?s=A:w=A}k+=s;f=s;j=s===h-1&&n.ignoreChars?o.length:Math.min(s+1,o.length);z?(x.setStart(o,f),x.setEnd(o,j)):(x.moveToElementText(n),x.move("character",f),x.moveEnd("character",j-f));f=x.getClientRects()[0];m=f.left*l-e.left;p=f.right*l-e.left;a>m+(p-m)/2&&k++}else{f=[];for(l=0;l<h;l++)f.push("<span>"),l===h-1?f.push(o.data.substring(l)):f.push(o.data.substring(l,l+1)),f.push("</span>");n.innerHTML=f.join("");for(l=n.firstChild;l;){f=l.getBoundingClientRect();m=f.left-e.left;p=f.right-
e.left;if(m<=a&&a<p){a>m+(p-m)/2&&k++;break}k++;l=l.nextSibling}if(!this._createdDiv)n.innerHTML="",n.appendChild(o),e=c._getSelection(),(k<=e.start&&e.start<k+h||k<=e.end&&e.end<k+h)&&c._updateDOMSelection()}break a}k+=h;n=n.nextSibling}return Math.min(d,Math.max(g,k))},getNextOffset:function(a,b,c){return b==="line"?(b=this.view._model,a=b.getLineAtOffset(a),c>0?b.getLineEnd(a):b.getLineStart(a)):b==="wordend"?this._getNextOffset_W3C(a,b,c):q?this._getNextOffset_IE(a,b,c):this._getNextOffset_W3C(a,
b,c)},_getNextOffset_W3C:function(a,b,c){function d(a){return 33<=a&&a<=47||58<=a&&a<=64||91<=a&&a<=94||a===96||123<=a&&a<=126}if(b==="word"||b==="wordend"){var e=this.view._model,g=e.getLineAtOffset(a),h=e.getLine(g),j=e.getLineStart(g),g=e.getLineEnd(g),e=h.length;a-=j;var f,k;if(c>0){if(a===e)return g;f=h.charCodeAt(a);k=d(f);c=!k&&!(f===32||f===9);for(a++;a<e;){f=h.charCodeAt(a);g=d(f);if(b==="wordend"){if(!g&&k)break}else if(g&&!k)break;f=!g&&!(f===32||f===9);if(b==="wordend"){if(!f&&c)break}else if(f&&
!c)break;c=f;k=g;a++}}else{if(a===0)return j;a--;f=h.charCodeAt(a);k=d(f);for(c=!k&&!(f===32||f===9);0<a;){f=h.charCodeAt(a-1);g=d(f);if(b==="wordend"){if(g&&!k)break}else if(!g&&k)break;f=!g&&!(f===32||f===9);if(b==="wordend"){if(f&&!c)break}else if(!f&&c)break;c=f;k=g;a--}}return j+a}return a+c},_getNextOffset_IE:function(a,b,c){var d=this._ensureCreated(),e=this.view._model,g=this.lineIndex,h=0,j;j=e.getLineStart(g);if(a===e.getLineEnd(g))h=document.body.createTextRange(),h.moveToElementText(d.lastChild),
j=h.text.length,h.moveEnd(b,c),h=a+h.text.length-j;else if(a===j&&c<0)h=j;else for(d=d.firstChild;d;){e=d.firstChild.length;d.ignoreChars&&(e-=d.ignoreChars);if(j+e>a){h=document.body.createTextRange();a===j&&c<0?h.moveToElementText(d.previousSibling):(h.moveToElementText(d),h.collapse(),h.moveEnd("character",a-j));j=h.text.length;h.moveEnd(b,c);h=a+h.text.length-j;break}j=e+j;d=d.nextSibling}return h},destroy:function(){var a=this._createdDiv;if(a)a.parentNode.removeChild(a),this._createdDiv=null}};
m.prototype={addRuler:function(a,b){a.setView(this);var c=this._rulers;if(b!==void 0){var d,e;for(d=0,e=0;d<c.length&&e<b;d++)a.getLocation()===c[d].getLocation()&&e++;c.splice(e,0,a);b=e}else c.push(a);this._createRuler(a,b);this._update()},computeSize:function(){var a=0,b=0,c=this._model,d=this._clientDiv;if(!d)return{width:a,height:b};var e=d.style.width;if(w)d.style.width="0x7fffffffpx";for(var c=c.getLineCount(),g=0;g<c;g++){var h=this._getLine(g),j=h.getBoundingClientRect(),a=Math.max(a,j.right-
j.left);b+=j.bottom-j.top;h.destroy()}if(w)d.style.width=e;d=this._getViewPadding();a+=d.right+d.left;b+=d.bottom+d.top;return{width:a,height:b}},convert:function(a,b,c){if(this._clientDiv){var d=this._getScroll(),e=this._getViewPadding(),g=this._viewDiv.getBoundingClientRect();b==="document"&&(a.x!==void 0&&(a.x+=-d.x+g.left+e.left),a.y!==void 0&&(a.y+=-d.y+g.top+e.top));c==="document"&&(a.x!==void 0&&(a.x+=d.x-g.left-e.left),a.y!==void 0&&(a.y+=d.y-g.top-e.top));return a}},destroy:function(){for(var a=
0;a<this._rulers.length;a++)this._rulers[a].setView(null);this.rulers=null;this._destroyView();this.onDestroy({type:"Destroy"});this._actions=this._keyBindings=this._doubleClickSelection=this._selection=this._model=this._parent=null},focus:function(){this._clientDiv&&(this._updateDOMSelection(),s&&this._clientDiv.blur(),this._clientDiv.focus(),this._updateDOMSelection())},hasFocus:function(){return this._hasFocus},getActionDescription:function(a){if(a=this._actions[a])return a.actionDescription},
getActions:function(a){var b=[],c=this._actions,d;for(d in c)c.hasOwnProperty(d)&&(a||!c[d].defaultHandler)&&b.push(d);return b},getBottomIndex:function(a){return!this._clientDiv?0:this._getBottomIndex(a)},getBottomPixel:function(){return!this._clientDiv?0:this._getScroll().y+this._getClientHeight()},getCaretOffset:function(){return this._getSelection().getCaret()},getClientArea:function(){if(!this._clientDiv)return{x:0,y:0,width:0,height:0};var a=this._getScroll();return{x:a.x,y:a.y,width:this._getClientWidth(),
height:this._getClientHeight()}},getHorizontalPixel:function(){return!this._clientDiv?0:this._getScroll().x},getKeyBindings:function(a){for(var b=[],c=this._keyBindings,d=0;d<c.length;d++)c[d].actionID===a&&b.push(c[d].keyBinding);return b},getLineHeight:function(a){return!this._clientDiv?0:this._getLineHeight(a)},getLineIndex:function(a){return!this._clientDiv?0:this._getLineIndex(a)},getLinePixel:function(a){return!this._clientDiv?0:this._getLinePixel(a)},getLocationAtOffset:function(a){if(!this._clientDiv)return{x:0,
y:0};var b=this._model,a=Math.min(Math.max(0,a),b.getCharCount()),b=b.getLineAtOffset(a),c=this._getLine(b),a=c.getBoundingClientRect(a);c.destroy();c=a.left;b=this._getLinePixel(b)+a.top;return{x:c,y:b}},getOptions:function(){var a;if(arguments.length===0)a=this._defaultOptions();else if(arguments.length===1){if(a=arguments[0],typeof a==="string")return d(this["_"+a])}else{a={};for(var b in arguments)arguments.hasOwnProperty(b)&&(a[arguments[b]]=void 0)}for(var c in a)a.hasOwnProperty(c)&&(a[c]=
d(this["_"+c]));return a},getModel:function(){return this._model},getOffsetAtLocation:function(a,b){if(!this._clientDiv)return 0;var c=this._getLineIndex(b),d=this._getLine(c),c=d.getOffset(a,b-this._getLinePixel(c));d.destroy();return c},getRulers:function(){return this._rulers.slice(0)},getSelection:function(){var a=this._getSelection();return{start:a.start,end:a.end}},getText:function(a,b){return this._model.getText(a,b)},getTopIndex:function(a){return!this._clientDiv?0:this._getTopIndex(a)},getTopPixel:function(){return!this._clientDiv?
0:this._getScroll().y},invokeAction:function(a,b){if(this._clientDiv){var c=this._actions[a];if(c){if(!b&&c.handler&&c.handler())return;if(c.defaultHandler)return c.defaultHandler()}return!1}},isDestroyed:function(){return!this._clientDiv},onContextMenu:function(a){return this.dispatchEvent(a)},onDragStart:function(a){return this.dispatchEvent(a)},onDrag:function(a){return this.dispatchEvent(a)},onDragEnd:function(a){return this.dispatchEvent(a)},onDragEnter:function(a){return this.dispatchEvent(a)},
onDragOver:function(a){return this.dispatchEvent(a)},onDragLeave:function(a){return this.dispatchEvent(a)},onDrop:function(a){return this.dispatchEvent(a)},onDestroy:function(a){return this.dispatchEvent(a)},onLineStyle:function(a){return this.dispatchEvent(a)},onModelChanged:function(a){return this.dispatchEvent(a)},onModelChanging:function(a){return this.dispatchEvent(a)},onModify:function(a){return this.dispatchEvent(a)},onMouseDown:function(a){return this.dispatchEvent(a)},onMouseUp:function(a){return this.dispatchEvent(a)},
onMouseMove:function(a){return this.dispatchEvent(a)},onMouseOver:function(a){return this.dispatchEvent(a)},onMouseOut:function(a){return this.dispatchEvent(a)},onSelection:function(a){return this.dispatchEvent(a)},onScroll:function(a){return this.dispatchEvent(a)},onVerify:function(a){return this.dispatchEvent(a)},onFocus:function(a){return this.dispatchEvent(a)},onBlur:function(a){return this.dispatchEvent(a)},redraw:function(){if(!(this._redrawCount>0)){var a=this._model.getLineCount();this.redrawRulers(0,
a);this.redrawLines(0,a)}},redrawRulers:function(a,b){if(!(this._redrawCount>0))for(var c=this.getRulers(),d=0;d<c.length;d++)this.redrawLines(a,b,c[d])},redrawLines:function(a,b,c){if(!(this._redrawCount>0)&&(a===void 0&&(a=0),b===void 0&&(b=this._model.getLineCount()),a!==b)){var d=this._clientDiv;if(d){if(c)for(var e=(c.getLocation()==="left"?this._leftDiv:this._rightDiv).firstChild.rows[0].cells,g=0;g<e.length;g++)if(e[g].firstChild._ruler===c){d=e[g].firstChild;break}c?d.rulerChanged=!0:this._lineHeight&&
this._resetLineHeight(a,b);if(!c||c.getOverview()==="page")for(d=d.firstChild;d;){e=d.lineIndex;if(a<=e&&e<b)d.lineChanged=!0;d=d.nextSibling}if(!c&&!this._wrapMode&&a<=this._maxLineIndex&&this._maxLineIndex<b)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._queueUpdate()}}},redrawRange:function(a,b){if(!(this._redrawCount>0)){var c=this._model;a===void 0&&(a=0);b===void 0&&(b=c.getCharCount());var d=c.getLineAtOffset(a),c=c.getLineAtOffset(Math.max(a,b-
1))+1;this.redrawLines(d,c)}},removeRuler:function(a){for(var b=this._rulers,c=0;c<b.length;c++)if(b[c]===a){b.splice(c,1);a.setView(null);this._destroyRuler(a);this._update();break}},resize:function(){this._clientDiv&&this._handleResize(null)},setAction:function(a,b,c){if(a){var d=this._actions,e=d[a];e||(e=d[a]={});e.handler=b;e.actionDescription=c}},setKeyBinding:function(a,b){for(var c=this._keyBindings,d=0;d<c.length;d++){var e=c[d];if(e.keyBinding.equals(a)){b?e.actionID=b:e.predefined?e.actionID=
null:c.splice(d,1);return}}b&&c.push({keyBinding:a,actionID:b})},setCaretOffset:function(a,b){var c=this._model.getCharCount(),a=Math.max(0,Math.min(a,c));this._setSelection(new l(a,a,!1),b===void 0||b)},setHorizontalPixel:function(a){this._clientDiv&&(a=Math.max(0,a),this._scrollView(a-this._getScroll().x,0))},setRedraw:function(a){a?--this._redrawCount===0&&this.redraw():this._redrawCount++},setModel:function(a){if(a&&a!==this._model){this._model.removeEventListener("preChanging",this._modelListener.onChanging);
this._model.removeEventListener("postChanged",this._modelListener.onChanged);var b=this._model.getLineCount(),c=this._model.getCharCount(),d=a.getLineCount(),e=a.getCharCount(),g={type:"ModelChanging",text:a.getText(),start:0,removedCharCount:c,addedCharCount:e,removedLineCount:b,addedLineCount:d};this.onModelChanging(g);this._model=a;g={type:"ModelChanged",start:0,removedCharCount:c,addedCharCount:e,removedLineCount:b,addedLineCount:d};this.onModelChanged(g);this._model.addEventListener("preChanging",
this._modelListener.onChanging);this._model.addEventListener("postChanged",this._modelListener.onChanged);this._reset();this._update()}},setOptions:function(a){var b=this._defaultOptions(),c;for(c in a)if(a.hasOwnProperty(c)){var e=a[c];if(!g(this["_"+c],e)){var h=b[c]?b[c].update:null;h?h.call(this,e):this["_"+c]=d(e)}}},setSelection:function(a,b,c){var d=a>b;if(d)var e=a,a=b,b=e;e=this._model.getCharCount();a=Math.max(0,Math.min(a,e));b=Math.max(0,Math.min(b,e));this._setSelection(new l(a,b,d),
c===void 0||c)},setText:function(a,b,c){var d=b===void 0&&c===void 0;b===void 0&&(b=0);c===void 0&&(c=this._model.getCharCount());this._modifyContent({text:a,start:b,end:c,_code:!0},!d);if(d)this._columnX=-1,this._setSelection(new l(0,0,!1),!0),r&&this._fixCaret()},setTopIndex:function(a){this._clientDiv&&this._scrollView(0,this._getLinePixel(Math.max(0,a))-this._getScroll().y)},setTopPixel:function(a){this._clientDiv&&this._scrollView(0,Math.max(0,a)-this._getScroll().y)},showSelection:function(){return this._showCaret(!0)},
update:function(a,b){this._clientDiv&&(a&&this._updateStyle(),b===void 0||b?this._update():this._queueUpdate())},_handleRootMouseDown:function(a){if(!a)a=window.event;if(r&&a.which===1)this._clientDiv.contentEditable=!1,this._ignoreBlur=(this._overlayDiv||this._clientDiv).draggable=!0;var b=this._overlayDiv||this._clientDiv;if(q<9)b=this._viewDiv;for(var c=a.target?a.target:a.srcElement;c;){if(b===c)return;c=c.parentNode}a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
if(!B){var d=this;setTimeout(function(){d._clientDiv.focus()},0)}},_handleRootMouseUp:function(a){if(!a)a=window.event;if(r&&a.which===1)this._clientDiv.contentEditable=!0,(this._overlayDiv||this._clientDiv).draggable=!1,this._fixCaret(),this._ignoreBlur=!1},_handleBlur:function(){if(!this._ignoreBlur){this._hasFocus=!1;if(q<9&&!this._getSelection().isEmpty()){var a=document.createElement("DIV"),b=this._rootDiv;b.appendChild(a);b.removeChild(a)}if(this._selDiv1)if(this._selDiv1.style.background="lightgray",
this._selDiv2.style.background="lightgray",this._selDiv3.style.background="lightgray",window.getSelection){b=window.getSelection();for(a=b.anchorNode;a;){if(a===this._clientDiv){b.rangeCount>0&&b.removeAllRanges();break}a=a.parentNode}}else if(document.selection){this._ignoreSelect=!1;for(a=document.selection.createRange().parentElement();a;){if(a===this._clientDiv){document.selection.empty();break}a=a.parentNode}this._ignoreSelect=!0}if(!this._ignoreFocus)this.onBlur({type:"Blur"})}},_handleContextMenu:function(a){if(!a)a=
window.event;q&&this._lastMouseButton===3&&this._updateDOMSelection();var b=!1;if(this.isListening("ContextMenu"))b=this._createMouseEvent("ContextMenu",a),b.screenX=a.screenX,b.screenY=a.screenY,this.onContextMenu(b),b=b.defaultPrevented;if(b)return a.preventDefault&&a.preventDefault(),!1},_handleCopy:function(a){if(!this._ignoreCopy){if(!a)a=window.event;if(this._doCopy(a))return a.preventDefault&&a.preventDefault(),!1}},_handleCut:function(a){if(!a)a=window.event;if(this._doCut(a))return a.preventDefault&&
a.preventDefault(),!1},_handleDataModified:function(){this._startIME()},_handleDblclick:function(a){if(!a)a=window.event;this._lastMouseTime=a.timeStamp?a.timeStamp:(new Date).getTime();if(this._clickCount!==2)this._clickCount=2,this._handleMouse(a)},_handleDragStart:function(a){if(!a)a=window.event;if(r){var b=this;setTimeout(function(){b._clientDiv.contentEditable=!0;b._clientDiv.draggable=!1;b._ignoreBlur=!1},0)}if(this.isListening("DragStart")&&this._dragOffset!==-1)this._isMouseDown=!1,this.onDragStart(this._createMouseEvent("DragStart",
a)),this._dragOffset=-1;else return a.preventDefault&&a.preventDefault(),!1},_handleDrag:function(a){if(!a)a=window.event;if(this.isListening("Drag"))this.onDrag(this._createMouseEvent("Drag",a))},_handleDragEnd:function(a){if(!a)a=window.event;this._dropTarget=!1;this._dragOffset=-1;if(this.isListening("DragEnd"))this.onDragEnd(this._createMouseEvent("DragEnd",a));r&&(this._fixCaret(),a.dataTransfer.dropEffect==="none"&&!a.dataTransfer.mozUserCancelled&&this._fixCaret())},_handleDragEnter:function(a){if(!a)a=
window.event;var b=!0;this._dropTarget=!0;this.isListening("DragEnter")&&(b=!1,this.onDragEnter(this._createMouseEvent("DragEnter",a)));if(w||b)return a.preventDefault&&a.preventDefault(),!1},_handleDragOver:function(a){if(!a)a=window.event;var b=!0;this.isListening("DragOver")&&(b=!1,this.onDragOver(this._createMouseEvent("DragOver",a)));if(w||b){if(b)a.dataTransfer.dropEffect="none";a.preventDefault&&a.preventDefault();return!1}},_handleDragLeave:function(a){if(!a)a=window.event;this._dropTarget=
!1;if(this.isListening("DragLeave"))this.onDragLeave(this._createMouseEvent("DragLeave",a))},_handleDrop:function(a){if(!a)a=window.event;this._dropTarget=!1;if(this.isListening("Drop"))this.onDrop(this._createMouseEvent("Drop",a));a.preventDefault&&a.preventDefault();return!1},_handleFocus:function(){this._hasFocus=!0;y&&this._lastTouchOffset!==void 0?(this.setCaretOffset(this._lastTouchOffset,!0),this._lastTouchOffset=void 0):this._updateDOMSelection();if(this._selDiv1){var a=this._highlightRGB;
this._selDiv1.style.background=a;this._selDiv2.style.background=a;this._selDiv3.style.background=a}if(!this._ignoreFocus)this.onFocus({type:"Focus"})},_handleKeyDown:function(a){if(!a)a=window.event;var b=!1;switch(a.keyCode){case 16:case 17:case 18:case 91:b=!0;break;default:this._setLinksVisible(!1)}if(a.keyCode===229){if(this._readonly)return a.preventDefault&&a.preventDefault(),!1;b=!0;v&&x&&a.ctrlKey&&(b=!1);b&&this._startIME()}else b||this._commitIME();if((x||A)&&r<4||s)return this._keyDownEvent=
a,!0;if(this._doAction(a))return a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=!0,a.returnValue=!1,a.keyCode=0),!1},_handleKeyPress:function(a){if(!a)a=window.event;if(x&&w&&(63232<=a.keyCode&&a.keyCode<=63487||a.keyCode===13||a.keyCode===8))return a.preventDefault&&a.preventDefault(),!1;if(((x||A)&&r<4||s)&&this._doAction(this._keyDownEvent))return a.preventDefault&&a.preventDefault(),!1;var b=x?a.metaKey:a.ctrlKey;if(a.charCode!==void 0&&b)switch(a.charCode){case 99:case 118:case 120:return!0}b=
!1;if(x){if(a.ctrlKey||a.metaKey)b=!0}else if(r){if(a.ctrlKey||a.altKey)b=!0}else a.ctrlKey^a.altKey&&(b=!0);if(!b&&(b=s?a.which:a.charCode!==void 0?a.charCode:a.keyCode,b>31))return this._doContent(String.fromCharCode(b)),a.preventDefault&&a.preventDefault(),!1},_handleKeyUp:function(a){if(!a)a=window.event;(x?a.metaKey:a.ctrlKey)||this._setLinksVisible(!1);a.keyCode===13&&this._commitIME()},_handleLinkClick:function(a){if(!a)a=window.event;if(!(x?a.metaKey:a.ctrlKey))return a.preventDefault&&a.preventDefault(),
!1},_handleMouse:function(a){var b=!0,c=window;if(q||r&&!this._overlayDiv)c=this._clientDiv;if(this._overlayDiv){if(this._hasFocus)this._ignoreFocus=!0;var d=this;setTimeout(function(){d.focus();d._ignoreFocus=!1},0)}this._clickCount===1?(b=this._setSelectionTo(a.clientX,a.clientY,a.shiftKey,!s&&this._hasFocus&&this.isListening("DragStart")))&&this._setGrab(c):(B&&this._setGrab(c),this._doubleClickSelection=null,this._setSelectionTo(a.clientX,a.clientY,a.shiftKey),this._doubleClickSelection=this._getSelection());
return b},_handleMouseDown:function(a){if(!a)a=window.event;if(this._linksVisible)if((a.target||a.srcElement).tagName!=="A")this._setLinksVisible(!1);else return;this._commitIME();var b=a.which;b||(a.button===4&&(b=2),a.button===2&&(b=3),a.button===1&&(b=1));var c=b!==2&&a.timeStamp?a.timeStamp:(new Date).getTime(),d=c-this._lastMouseTime,e=Math.abs(this._lastMouseX-a.clientX),g=Math.abs(this._lastMouseY-a.clientY),h=this._lastMouseButton===b;this._lastMouseX=a.clientX;this._lastMouseY=a.clientY;
this._lastMouseTime=c;this._lastMouseButton=b;if(b===1)this._isMouseDown=!0,h&&d<=this._clickTime&&e<=this._clickDist&&g<=this._clickDist?this._clickCount++:this._clickCount=1;if(this.isListening("MouseDown")&&(c=this._createMouseEvent("MouseDown",a),this.onMouseDown(c),c.defaultPrevented)){a.preventDefault();return}if(b===1&&this._handleMouse(a)&&(q>=9||s||u||v||r&&!this._overlayDiv))this._hasFocus||this.focus(),a.preventDefault();r&&this._lastMouseButton===3&&this._updateDOMSelection()},_handleMouseOver:function(a){if(!a)a=
window.event;if(this.isListening("MouseOver"))this.onMouseOver(this._createMouseEvent("MouseOver",a))},_handleMouseOut:function(a){if(!a)a=window.event;if(this.isListening("MouseOut"))this.onMouseOut(this._createMouseEvent("MouseOut",a))},_handleMouseMove:function(a){if(!a)a=window.event;var b=this._isClientDiv(a);if(this.isListening("MouseMove")&&b)this.onMouseMove(this._createMouseEvent("MouseMove",a));if(!this._dropTarget){var c=this._linksVisible||this._lastMouseMoveX!==a.clientX||this._lastMouseMoveY!==
a.clientY;this._lastMouseMoveX=a.clientX;this._lastMouseMoveY=a.clientY;this._setLinksVisible(c&&!this._isMouseDown&&(x?a.metaKey:a.ctrlKey));if(!B){if(a.button===0)return this._setGrab(null),!0;if(!this._isMouseDown&&a.button===1&&(this._clickCount&1)!==0&&b)return this._clickCount=2,this._handleMouse(a,this._clickCount)}if(this._isMouseDown&&this._dragOffset===-1){var b=a.clientX,a=a.clientY,d=this._getViewPadding(),e=this._viewDiv.getBoundingClientRect(),g=this._getClientWidth(),h=this._getClientHeight(),
c=e.left+d.left,j=e.top+d.top,g=e.left+d.left+g,d=e.top+d.top+h,e=this._model,h=e.getLineAtOffset(this._getSelection().getCaret());a<j&&h!==0?this._doAutoScroll("up",b,a-j):a>d&&h!==e.getLineCount()-1?this._doAutoScroll("down",b,a-d):b<c&&!this._wrapMode?this._doAutoScroll("left",b-c,a):b>g&&!this._wrapMode?this._doAutoScroll("right",b-g,a):(this._endAutoScroll(),this._setSelectionTo(b,a,!0))}}},_isClientDiv:function(a){for(var b=this._overlayDiv||this._clientDiv,a=a.target?a.target:a.srcElement;a;){if(b===
a)return!0;a=a.parentNode}return!1},_createMouseEvent:function(a,b){var c=this.convert({x:b.clientX,y:b.clientY},"page","document");return{type:a,event:b,clickCount:this._clickCount,x:c.x,y:c.y,preventDefault:function(){this.defaultPrevented=!0}}},_handleMouseUp:function(a){if(!a)a=window.event;var b=a.which?a.button===0:a.button===1;if(this.isListening("MouseUp")&&(this._isClientDiv(a)||b&&this._isMouseDown))this.onMouseUp(this._createMouseEvent("MouseUp",a));if(!this._linksVisible&&b&&this._isMouseDown){if(this._dragOffset!==
-1)b=this._getSelection(),b.extend(this._dragOffset),b.collapse(),this._setSelection(b,!0,!0),this._dragOffset=-1;this._isMouseDown=!1;this._endAutoScroll();B&&this._setGrab(null);r&&a.preventDefault()}},_handleMouseWheel:function(a){if(!a)a=window.event;var b=this._getLineHeight(),c=0,d=0;q||s?d=-a.wheelDelta/40*b:r?(b=x?a.detail*3:Math.max(-256,Math.min(256,a.detail))*b,a.axis===a.HORIZONTAL_AXIS?c=b:d=b):x?(d=c=40,a.wheelDeltaX%120!==0&&(c=1),a.wheelDeltaY%120!==0&&(d=1),c=-a.wheelDeltaX/c,-1<
c&&c<0&&(c=-1),0<c&&c<1&&(c=1),d=-a.wheelDeltaY/d,-1<d&&d<0&&(d=-1),0<d&&d<1&&(d=1)):(c=-a.wheelDeltaX,d=-a.wheelDeltaY/120*8*b);if(v){for(b=a.target;b&&b.lineIndex===void 0;)b=b.parentNode;this._mouseWheelLine=b}b=this._getScroll();this._scrollView(c,d);c=this._getScroll();if(b.x!==c.x||b.y!==c.y)return a.preventDefault&&a.preventDefault(),!1},_handlePaste:function(a){if(!this._ignorePaste){if(!a)a=window.event;if(this._doPaste(a)){if(q){var b=this;this._ignoreFocus=!0;setTimeout(function(){b._updateDOMSelection();
this._ignoreFocus=!1},0)}a.preventDefault&&a.preventDefault();return!1}}},_handleResize:function(){var a=this._parent.clientWidth,b=this._parent.clientHeight;if(this._parentWidth!==a||this._parentHeight!==b)this._parentWidth!==a&&this._resetLineHeight(),this._parentWidth=a,this._parentHeight=b,q<9?this._queueUpdate():this._update()},_handleRulerEvent:function(a){if(!a)a=window.event;for(var b=a.target?a.target:a.srcElement,c=b.lineIndex;b&&!b._ruler;){if(c===void 0&&b.lineIndex!==void 0)c=b.lineIndex;
b=b.parentNode}b=b?b._ruler:null;if(c===void 0&&b&&b.getOverview()==="document"){var c=this._getClientHeight(),d=this._model.getLineCount(),e=this._getViewPadding(),g=this._viewDiv.getBoundingClientRect(),c=Math.floor((a.clientY-g.top-this._metrics.scrollWidth)*d/(c+e.top+e.bottom-2*this._metrics.scrollWidth));0<=c&&c<d||(c=void 0)}if(b)switch(a.type){case "click":if(b.onClick)b.onClick(c,a);break;case "dblclick":if(b.onDblClick)b.onDblClick(c,a);break;case "mousemove":if(b.onMouseMove)b.onMouseMove(c,
a);break;case "mouseover":if(b.onMouseOver)b.onMouseOver(c,a);break;case "mouseout":if(b.onMouseOut)b.onMouseOut(c,a)}},_handleScroll:function(){var a=this._getScroll(),b=this._hScroll,c=this._vScroll;if(b!==a.x||c!==a.y)this._hScroll=a.x,this._vScroll=a.y,this._commitIME(),this._update(c===a.y),this.onScroll({type:"Scroll",oldValue:{x:b,y:c},newValue:a})},_handleSelectStart:function(a){if(!a)a=window.event;if(this._ignoreSelect)return a&&a.preventDefault&&a.preventDefault(),!1},_getModelOffset:function(a,
b){if(a){var c;c=a.tagName==="DIV"?a:a.parentNode.parentNode;var d=0,e=c.lineIndex;if(a.tagName!=="DIV")for(c=c.firstChild;c;){var g=c.firstChild;if(g===a){c.ignoreChars&&(d-=c.ignoreChars);d+=b;break}c.ignoreChars&&(d-=c.ignoreChars);d+=g.data.length;c=c.nextSibling}return Math.max(0,d)+this._model.getLineStart(e)}},_handleSelectionChange:function(){if(!t){var a=window.getSelection(),b=this._getModelOffset(a.anchorNode,a.anchorOffset),a=this._getModelOffset(a.focusNode,a.focusOffset);b===void 0||
a===void 0||this._setSelection(new l(b,a),!1,!1)}},_handleTextInput:function(a){if(!a)a=window.event;this._doContent(a.data);a.preventDefault()},_handleTouchStart:function(a){if(this._touchScrollTimer)this._vScrollDiv.style.display="none",this._hScrollDiv.style.display="none",clearInterval(this._touchScrollTimer),this._touchScrollTimer=null;var b=a.touches;if(b.length===1){var b=b[0],c=b.clientX,d=b.clientY;this._touchStartX=c;this._touchStartY=d;if(t&&(d<b.pageY-window.pageYOffset||c<b.pageX-window.pageXOffset))c=
b.pageX-window.pageXOffset,d=b.pageY-window.pageYOffset;b=this.convert({x:c,y:d},"page","document");this._lastTouchOffset=this.getOffsetAtLocation(b.x,b.y);this._touchStartTime=a.timeStamp;this._touching=!0;t&&this.setSelection(this._lastTouchOffset,this._lastTouchOffset)}},_handleTouchMove:function(a){var b=a.touches;if(b.length===1){b=b[0];this._touchCurrentX=b.clientX;this._touchCurrentY=b.clientY;if(!this._touchScrollTimer&&a.timeStamp-this._touchStartTime<200){this._vScrollDiv.style.display=
"block";if(!this._wrapMode)this._hScrollDiv.style.display="block";var c=this;this._touchScrollTimer=setInterval(function(){var a=0,b=0;if(c._touching)a=c._touchStartX-c._touchCurrentX,b=c._touchStartY-c._touchCurrentY,c._touchSpeedX=a/10,c._touchSpeedY=b/10,c._touchStartX=c._touchCurrentX,c._touchStartY=c._touchCurrentY;else if(Math.abs(c._touchSpeedX)<0.1&&Math.abs(c._touchSpeedY)<0.1){c._vScrollDiv.style.display="none";c._hScrollDiv.style.display="none";clearInterval(c._touchScrollTimer);c._touchScrollTimer=
null;return}else a=c._touchSpeedX*10,b=c._touchSpeedY*10,c._touchSpeedX*=0.95,c._touchSpeedY*=0.95;c._scrollView(a,b)},10)}this._touchScrollTimer&&a.preventDefault()}},_handleTouchEnd:function(a){if(a.touches.length===0)this._touching=!1},_doAction:function(a){for(var b=this._keyBindings,c=0;c<b.length;c++){var d=b[c];if(d.keyBinding.match(a)){if(d.actionID&&(a=this._actions[d.actionID]))if(a.handler){if(!a.handler())return a.defaultHandler?typeof a.defaultHandler()==="boolean":!1}else if(a.defaultHandler)return typeof a.defaultHandler()===
"boolean";return!0}}return!1},_doBackspace:function(a){var b=this._getSelection();if(b.isEmpty()){var c=this._model,d=b.getCaret(),e=c.getLineAtOffset(d),g=c.getLineStart(e);if(d===g)e>0&&b.extend(c.getLineEnd(e-1));else{var h=!1;this._expandTab&&a.unit==="character"&&(d-g)%this._tabSize===0&&(h=!/[^ ]/.test(c.getText(g,d)));h?b.extend(d-this._tabSize):(c=this._getLine(e),b.extend(c.getNextOffset(d,a.unit,-1)),c.destroy())}}this._modifyContent({text:"",start:b.start,end:b.end},!0);return!0},_doContent:function(a){var b=
this._getSelection();this._modifyContent({text:a,start:b.start,end:b.end,_ignoreDOMSelection:!0},!0)},_doCopy:function(a){var b=this._getSelection();return!b.isEmpty()?this._setClipboardText(this._getBaseText(b.start,b.end),a):!0},_doCursorNext:function(a){if(!a.select&&this._clearSelection("next"))return!0;var b=this._model,c=this._getSelection(),d=c.getCaret(),e=b.getLineAtOffset(d);d===b.getLineEnd(e)?e+1<b.getLineCount()&&c.extend(b.getLineStart(e+1)):(b=this._getLine(e),c.extend(b.getNextOffset(d,
a.unit,1)),b.destroy());a.select||c.collapse();this._setSelection(c,!0);return!0},_doCursorPrevious:function(a){if(!a.select&&this._clearSelection("previous"))return!0;var b=this._model,c=this._getSelection(),d=c.getCaret(),e=b.getLineAtOffset(d);d===b.getLineStart(e)?e>0&&c.extend(b.getLineEnd(e-1)):(b=this._getLine(e),c.extend(b.getNextOffset(d,a.unit,-1)),b.destroy());a.select||c.collapse();this._setSelection(c,!0);return!0},_doCut:function(a){var b=this._getSelection();return!b.isEmpty()?(b=this._getBaseText(b.start,
b.end),this._doContent(""),this._setClipboardText(b,a)):!0},_doDelete:function(a){var b=this._getSelection();if(b.isEmpty()){var c=this._model,d=b.getCaret(),e=c.getLineAtOffset(d);d===c.getLineEnd(e)?e+1<c.getLineCount()&&b.extend(c.getLineStart(e+1)):(c=this._getLine(e),b.extend(c.getNextOffset(d,a.unit,1)),c.destroy())}this._modifyContent({text:"",start:b.start,end:b.end},!0);return!0},_doEnd:function(a){var b=this._getSelection(),c=this._model;if(a.ctrl)b.extend(c.getCharCount());else{var d=b.getCaret(),
e=c.getLineAtOffset(d);if(this._wrapMode){var g=this._getLine(e),d=g.getLineIndex(d),d=d===g.getLineCount()-1?c.getLineEnd(e):g.getLineStart(d+1)-1;g.destroy()}else d=c.getLineEnd(e);b.extend(d)}a.select||b.collapse();this._setSelection(b,!0);return!0},_doEnter:function(a){var b=this._model,c=this._getSelection();this._doContent(b.getLineDelimiter());if(a&&a.noCursor)c.end=c.start,this._setSelection(c);return!0},_doHome:function(a){var b=this._getSelection(),c=this._model;if(a.ctrl)b.extend(0);else{var d=
b.getCaret(),e=c.getLineAtOffset(d);this._wrapMode?(c=this._getLine(e),d=c.getLineIndex(d),d=c.getLineStart(d),c.destroy()):d=c.getLineStart(e);b.extend(d)}a.select||b.collapse();this._setSelection(b,!0);return!0},_doLineDown:function(a){var b=this._model,c=this._getSelection(),d=c.getCaret(),e=b.getLineAtOffset(d),g=this._getLine(e),h=this._columnX,j=1,f=!1;if(h===-1||a.wholeLine||a.select&&q)h=a.wholeLine?b.getLineEnd(e+1):d,h=g.getBoundingClientRect(h).left;(d=g.getLineIndex(d))<g.getLineCount()-
1?j=g.getClientRects(d+1).top+1:(f=e===b.getLineCount()-1,e++);f?a.select&&(c.extend(b.getCharCount()),this._setSelection(c,!0,!0)):(g.lineIndex!==e&&(g.destroy(),g=this._getLine(e)),c.extend(g.getOffset(h,j)),a.select||c.collapse(),this._setSelection(c,!0,!0));this._columnX=h;g.destroy();return!0},_doLineUp:function(a){var b=this._model,c=this._getSelection(),d=c.getCaret(),e=b.getLineAtOffset(d),g=this._getLine(e),h=this._columnX,j=!1,f;if(h===-1||a.wholeLine||a.select&&q)h=a.wholeLine?b.getLineStart(e-
1):d,h=g.getBoundingClientRect(h).left;(d=g.getLineIndex(d))>0?f=g.getClientRects(d-1).top+1:(j=e===0,j||(e--,f=this._getLineHeight(e)-1));j?a.select&&(c.extend(0),this._setSelection(c,!0,!0)):(g.lineIndex!==e&&(g.destroy(),g=this._getLine(e)),c.extend(g.getOffset(h,f)),a.select||c.collapse(),this._setSelection(c,!0,!0));this._columnX=h;g.destroy();return!0},_doPageDown:function(a){var b=this._model,c=this._getSelection(),d=c.getCaret(),e=b.getLineAtOffset(d),g=b.getLineCount(),h=this._getScroll(),
j=this._getClientHeight(),f;if(this._lineHeight){b=this._columnX;h=this._getBoundsAtOffset(d);if(b===-1||a.select&&q)b=h.left;d=this._getLineIndex(h.top+j);f=this._getLine(d);e=this._getLinePixel(d);d=f.getOffset(b,h.top+j-e);j=f.getBoundingClientRect(d);f.destroy();c.extend(d);a.select||c.collapse();this._setSelection(c,!0,!0,j.top+e-h.top);this._columnX=b;return!0}if(e<g-1){var k=this._getLineHeight(),l=Math.min(g-e-1,Math.floor(j/k)),l=Math.max(1,l),b=this._columnX;if(b===-1||a.select&&q)f=this._getLine(e),
b=f.getBoundingClientRect(d).left,f.destroy();f=this._getLine(e+l);c.extend(f.getOffset(b,0));f.destroy();a.select||c.collapse();a=g*k;d=h.y+l*k;d+j>a&&(d=a-j);this._setSelection(c,!0,!0,d-h.y);this._columnX=b}return!0},_doPageUp:function(a){var b=this._model,c=this._getSelection(),d=c.getCaret(),e=b.getLineAtOffset(d),g=this._getScroll(),h=this._getClientHeight(),j;if(this._lineHeight){b=this._columnX;g=this._getBoundsAtOffset(d);if(b===-1||a.select&&q)b=g.left;d=this._getLineIndex(g.bottom-h);j=
this._getLine(d);e=this._getLinePixel(d);d=j.getOffset(b,g.bottom-h-e);h=j.getBoundingClientRect(d);j.destroy();c.extend(d);a.select||c.collapse();this._setSelection(c,!0,!0,h.top+e-g.top);this._columnX=b;return!0}if(e>0){var f=this._getLineHeight(),h=Math.max(1,Math.min(e,Math.floor(h/f))),b=this._columnX;if(b===-1||a.select&&q)j=this._getLine(e),b=j.getBoundingClientRect(d).left,j.destroy();j=this._getLine(e-h);c.extend(j.getOffset(b,this._getLineHeight(e-h)-1));j.destroy();a.select||c.collapse();
a=Math.max(0,g.y-h*f);this._setSelection(c,!0,!0,a-g.y);this._columnX=b}return!0},_doPaste:function(a){var b=this;return this._getClipboardText(a,function(a){a&&(A&&b._lastMouseButton===2&&(new Date).getTime()-b._lastMouseTime<=b._clickTime&&b._setSelectionTo(b._lastMouseX,b._lastMouseY),b._doContent(a))})!==null},_doScroll:function(a){var b=a.type,c=this._model,d=c.getLineCount(),a=this._getClientHeight(),e=this._getLineHeight();d*=e;var g=this._getScroll().y,h;switch(b){case "textStart":h=0;break;
case "textEnd":h=d-a;break;case "pageDown":h=g+a;break;case "pageUp":h=g-a;break;case "centerLine":b=this._getSelection(),h=c.getLineAtOffset(b.start),c=(c.getLineAtOffset(b.end)-h+1)*e,h=h*e-a/2+c/2}h!==void 0&&(h=Math.min(Math.max(0,h),d-a),this._scrollView(0,h-g));return!0},_doSelectAll:function(){var a=this._model,b=this._getSelection();b.setCaret(0);b.extend(a.getCharCount());this._setSelection(b,!1);return!0},_doTab:function(){if(this._tabMode&&!this._readonly){var a="\t";if(this._expandTab)var b=
this._model,a=this._getSelection().getCaret(),c=b.getLineAtOffset(a),b=b.getLineStart(c),a=Array(this._tabSize-(a-b)%this._tabSize+1).join(" ");this._doContent(a);return!0}},_doShiftTab:function(){return!this._tabMode||this._readonly?void 0:!0},_doTabMode:function(){this._tabMode=!this._tabMode;return!0},_doWrapMode:function(){this.setOptions({wrapMode:!this.getOptions("wrapMode")});return!0},_autoScroll:function(){var a=this._getSelection(),b=this.convert({x:this._autoScrollX,y:this._autoScrollY},
"page","document"),c=a.getCaret(),d=this._model.getLineAtOffset(c),e;if(this._autoScrollDir==="up"||this._autoScrollDir==="down")c=this._autoScrollY/this._getLineHeight(),c=c<0?Math.floor(c):Math.ceil(c),e=d,e=Math.max(0,Math.min(this._model.getLineCount()-1,e+c));else if(this._autoScrollDir==="left"||this._autoScrollDir==="right")e=this._getLineIndex(b.y),d=this._getLine(d),b.x+=d.getBoundingClientRect(c,!1).left,d.destroy();d=this._getLine(e);a.extend(d.getOffset(b.x,b.y-this._getLinePixel(e)));
d.destroy();this._setSelection(a,!0)},_autoScrollTimer:function(){this._autoScroll();var a=this;this._autoScrollTimerID=setTimeout(function(){a._autoScrollTimer()},this._AUTO_SCROLL_RATE)},_calculateLineHeightTimer:function(a){if(this._lineHeight&&!this._calculateLHTimer){var b=this._model.getLineCount(),c=0;if(a){for(var a=0,d=(new Date).getTime(),e=0;c<b;)if(this._lineHeight[c]||(a++,e||(e=c),this._lineHeight[c]=this._calculateLineHeight(c)),c++,(new Date).getTime()-d>100)break;this.redrawRulers(0,
b);this._queueUpdate()}if(c!==b){var g=this;this._calculateLHTimer=setTimeout(function(){g._calculateLHTimer=null;g._calculateLineHeightTimer(!0)},0)}else if(this._calculateLHTimer)clearTimeout(this._calculateLHTimer),this._calculateLHTimer=void 0}},_calculateLineHeight:function(a){var a=this._getLine(a),b=a.getBoundingClientRect();a.destroy();return Math.max(1,Math.ceil(b.bottom-b.top))},_calculateMetrics:function(){var a=this._clientDiv,b=document.createElement("DIV");b.style.lineHeight="normal";
var d={type:"LineStyle",textView:this,0:0,lineText:this._model.getLine(0),lineStart:0};this.onLineStyle(d);c(d.style,b);b.style.position="fixed";b.style.left="-1000px";var e=document.createElement("SPAN");e.appendChild(document.createTextNode(" "));b.appendChild(e);var g=document.createElement("SPAN");g.style.fontStyle="italic";g.appendChild(document.createTextNode(" "));b.appendChild(g);var h=document.createElement("SPAN");h.style.fontWeight="bold";h.appendChild(document.createTextNode(" "));b.appendChild(h);
d=document.createElement("SPAN");d.style.fontWeight="bold";d.style.fontStyle="italic";d.appendChild(document.createTextNode(" "));b.appendChild(d);a.appendChild(b);var f=b.getBoundingClientRect(),e=e.getBoundingClientRect(),g=g.getBoundingClientRect(),h=h.getBoundingClientRect(),d=d.getBoundingClientRect(),e=e.bottom-e.top,g=g.bottom-g.top,h=h.bottom-h.top,l=d.bottom-d.top,t=0,d=f.bottom-f.top<=0,f=Math.max(1,f.bottom-f.top);g>e&&(t=1);h>g&&(t=2);l>h&&(t=3);var n;if(t!==0){n={style:{}};if((t&1)!==
0)n.style.fontStyle="italic";if((t&2)!==0)n.style.fontWeight="bold"}e=k(b);a.removeChild(b);g=j(this._viewDiv);b=document.createElement("DIV");b.style.position="fixed";b.style.left="-1000px";b.style.paddingLeft=g.left+"px";b.style.paddingTop=g.top+"px";b.style.paddingRight=g.right+"px";b.style.paddingBottom=g.bottom+"px";b.style.width="100px";b.style.height="100px";l=document.createElement("DIV");l.style.width="100%";l.style.height="100%";b.appendChild(l);a.appendChild(b);g=b.getBoundingClientRect();
h=l.getBoundingClientRect();b.style.overflow="hidden";l.style.height="200px";l=b.clientWidth;b.style.overflow="scroll";t=b.clientWidth;a.removeChild(b);g={left:h.left-g.left,top:h.top-g.top,right:g.right-h.right,bottom:g.bottom-h.bottom};return{lineHeight:f,largestFontStyle:n,lineTrim:e,viewPadding:g,scrollWidth:l-t,invalid:d}},_clearSelection:function(a){var b=this._getSelection();if(b.isEmpty())return!1;a==="next"?b.start=b.end:b.end=b.start;this._setSelection(b,!0);return!0},_commitIME:function(){if(this._imeOffset!==
-1){this._scrollDiv.focus();this._clientDiv.focus();var a=this._model,b=a.getLineAtOffset(this._imeOffset),c=a.getLineStart(b),d=this._getDOMText(b),a=a.getLine(b),c=this._imeOffset-c,a=c+d.length-a.length;c!==a&&this._doContent(d.substring(c,a));this._imeOffset=-1}},_createActions:function(){var a=f.KeyBinding,b=this._keyBindings=[];b.push({actionID:"lineUp",keyBinding:new a(38),predefined:!0});b.push({actionID:"lineDown",keyBinding:new a(40),predefined:!0});b.push({actionID:"charPrevious",keyBinding:new a(37),
predefined:!0});b.push({actionID:"charNext",keyBinding:new a(39),predefined:!0});x?(b.push({actionID:"scrollPageUp",keyBinding:new a(33),predefined:!0}),b.push({actionID:"scrollPageDown",keyBinding:new a(34),predefined:!0}),b.push({actionID:"pageUp",keyBinding:new a(33,null,null,!0),predefined:!0}),b.push({actionID:"pageDown",keyBinding:new a(34,null,null,!0),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(37,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(39,!0),predefined:!0}),
b.push({actionID:"wordPrevious",keyBinding:new a(37,null,null,!0),predefined:!0}),b.push({actionID:"wordNext",keyBinding:new a(39,null,null,!0),predefined:!0}),b.push({actionID:"scrollTextStart",keyBinding:new a(36),predefined:!0}),b.push({actionID:"scrollTextEnd",keyBinding:new a(35),predefined:!0}),b.push({actionID:"textStart",keyBinding:new a(38,!0),predefined:!0}),b.push({actionID:"textEnd",keyBinding:new a(40,!0),predefined:!0}),b.push({actionID:"scrollPageUp",keyBinding:new a(38,null,null,null,
!0),predefined:!0}),b.push({actionID:"scrollPageDown",keyBinding:new a(40,null,null,null,!0),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(37,null,null,null,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(39,null,null,null,!0),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(38,null,null,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(40,null,null,!0),predefined:!0})):(b.push({actionID:"pageUp",keyBinding:new a(33),predefined:!0}),b.push({actionID:"pageDown",
keyBinding:new a(34),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(36),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(35),predefined:!0}),b.push({actionID:"wordPrevious",keyBinding:new a(37,!0),predefined:!0}),b.push({actionID:"wordNext",keyBinding:new a(39,!0),predefined:!0}),b.push({actionID:"textStart",keyBinding:new a(36,!0),predefined:!0}),b.push({actionID:"textEnd",keyBinding:new a(35,!0),predefined:!0}));r&&A&&(b.push({actionID:"lineUp",keyBinding:new a(38,!0),
predefined:!0}),b.push({actionID:"lineDown",keyBinding:new a(40,!0),predefined:!0}));b.push({actionID:"selectLineUp",keyBinding:new a(38,null,!0),predefined:!0});b.push({actionID:"selectLineDown",keyBinding:new a(40,null,!0),predefined:!0});b.push({actionID:"selectCharPrevious",keyBinding:new a(37,null,!0),predefined:!0});b.push({actionID:"selectCharNext",keyBinding:new a(39,null,!0),predefined:!0});b.push({actionID:"selectPageUp",keyBinding:new a(33,null,!0),predefined:!0});b.push({actionID:"selectPageDown",
keyBinding:new a(34,null,!0),predefined:!0});x?(b.push({actionID:"selectLineStart",keyBinding:new a(37,!0,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(39,!0,!0),predefined:!0}),b.push({actionID:"selectWordPrevious",keyBinding:new a(37,null,!0,!0),predefined:!0}),b.push({actionID:"selectWordNext",keyBinding:new a(39,null,!0,!0),predefined:!0}),b.push({actionID:"selectTextStart",keyBinding:new a(36,null,!0),predefined:!0}),b.push({actionID:"selectTextEnd",keyBinding:new a(35,
null,!0),predefined:!0}),b.push({actionID:"selectTextStart",keyBinding:new a(38,!0,!0),predefined:!0}),b.push({actionID:"selectTextEnd",keyBinding:new a(40,!0,!0),predefined:!0}),b.push({actionID:"selectLineStart",keyBinding:new a(37,null,!0,null,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(39,null,!0,null,!0),predefined:!0}),b.push({actionID:"selectLineStart",keyBinding:new a(38,null,!0,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(40,null,!0,!0),
predefined:!0})):(A&&(b.push({actionID:"selectWholeLineUp",keyBinding:new a(38,!0,!0),predefined:!0}),b.push({actionID:"selectWholeLineDown",keyBinding:new a(40,!0,!0),predefined:!0})),b.push({actionID:"selectLineStart",keyBinding:new a(36,null,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(35,null,!0),predefined:!0}),b.push({actionID:"selectWordPrevious",keyBinding:new a(37,!0,!0),predefined:!0}),b.push({actionID:"selectWordNext",keyBinding:new a(39,!0,!0),predefined:!0}),
b.push({actionID:"selectTextStart",keyBinding:new a(36,!0,!0),predefined:!0}),b.push({actionID:"selectTextEnd",keyBinding:new a(35,!0,!0),predefined:!0}));b.push({actionID:"deletePrevious",keyBinding:new a(8),predefined:!0});b.push({actionID:"deletePrevious",keyBinding:new a(8,null,!0),predefined:!0});b.push({actionID:"deleteNext",keyBinding:new a(46),predefined:!0});b.push({actionID:"deleteWordPrevious",keyBinding:new a(8,!0),predefined:!0});b.push({actionID:"deleteWordPrevious",keyBinding:new a(8,
!0,!0),predefined:!0});b.push({actionID:"deleteWordNext",keyBinding:new a(46,!0),predefined:!0});b.push({actionID:"tab",keyBinding:new a(9),predefined:!0});b.push({actionID:"shiftTab",keyBinding:new a(9,null,!0),predefined:!0});b.push({actionID:"enter",keyBinding:new a(13),predefined:!0});b.push({actionID:"enter",keyBinding:new a(13,null,!0),predefined:!0});b.push({actionID:"selectAll",keyBinding:new a("a",!0),predefined:!0});b.push({actionID:"toggleTabMode",keyBinding:new a("m",!0),predefined:!0});
x&&(b.push({actionID:"deleteNext",keyBinding:new a(46,null,!0),predefined:!0}),b.push({actionID:"deleteWordPrevious",keyBinding:new a(8,null,null,!0),predefined:!0}),b.push({actionID:"deleteWordNext",keyBinding:new a(46,null,null,!0),predefined:!0}));if(!r){var c=x&&u;b.push({actionID:null,keyBinding:new a("u",!c,!1,!1,c),predefined:!0});b.push({actionID:null,keyBinding:new a("i",!c,!1,!1,c),predefined:!0});b.push({actionID:null,keyBinding:new a("b",!c,!1,!1,c),predefined:!0})}r&&(b.push({actionID:"copy",
keyBinding:new a(45,!0),predefined:!0}),b.push({actionID:"paste",keyBinding:new a(45,null,!0),predefined:!0}),b.push({actionID:"cut",keyBinding:new a(46,null,!0),predefined:!0}));x&&(b.push({actionID:"lineStart",keyBinding:new a("a",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a("e",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"lineUp",keyBinding:new a("p",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"lineDown",keyBinding:new a("n",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"charPrevious",
keyBinding:new a("b",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"charNext",keyBinding:new a("f",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deletePrevious",keyBinding:new a("h",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteNext",keyBinding:new a("d",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteLineEnd",keyBinding:new a("k",!1,!1,!1,!0),predefined:!0}),r?(b.push({actionID:"scrollPageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteLineStart",keyBinding:new a("u",
!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteWordPrevious",keyBinding:new a("w",!1,!1,!1,!0),predefined:!0})):(b.push({actionID:"pageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"centerLine",keyBinding:new a("l",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"enterNoCursor",keyBinding:new a("o",!1,!1,!1,!0),predefined:!0})));var d=this;this._actions={lineUp:{defaultHandler:function(){return d._doLineUp({select:!1})}},lineDown:{defaultHandler:function(){return d._doLineDown({select:!1})}},
lineStart:{defaultHandler:function(){return d._doHome({select:!1,ctrl:!1})}},lineEnd:{defaultHandler:function(){return d._doEnd({select:!1,ctrl:!1})}},charPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!1,unit:"character"})}},charNext:{defaultHandler:function(){return d._doCursorNext({select:!1,unit:"character"})}},pageUp:{defaultHandler:function(){return d._doPageUp({select:!1})}},pageDown:{defaultHandler:function(){return d._doPageDown({select:!1})}},scrollPageUp:{defaultHandler:function(){return d._doScroll({type:"pageUp"})}},
scrollPageDown:{defaultHandler:function(){return d._doScroll({type:"pageDown"})}},wordPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!1,unit:"word"})}},wordNext:{defaultHandler:function(){return d._doCursorNext({select:!1,unit:"word"})}},textStart:{defaultHandler:function(){return d._doHome({select:!1,ctrl:!0})}},textEnd:{defaultHandler:function(){return d._doEnd({select:!1,ctrl:!0})}},scrollTextStart:{defaultHandler:function(){return d._doScroll({type:"textStart"})}},scrollTextEnd:{defaultHandler:function(){return d._doScroll({type:"textEnd"})}},
centerLine:{defaultHandler:function(){return d._doScroll({type:"centerLine"})}},selectLineUp:{defaultHandler:function(){return d._doLineUp({select:!0})}},selectLineDown:{defaultHandler:function(){return d._doLineDown({select:!0})}},selectWholeLineUp:{defaultHandler:function(){return d._doLineUp({select:!0,wholeLine:!0})}},selectWholeLineDown:{defaultHandler:function(){return d._doLineDown({select:!0,wholeLine:!0})}},selectLineStart:{defaultHandler:function(){return d._doHome({select:!0,ctrl:!1})}},
selectLineEnd:{defaultHandler:function(){return d._doEnd({select:!0,ctrl:!1})}},selectCharPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!0,unit:"character"})}},selectCharNext:{defaultHandler:function(){return d._doCursorNext({select:!0,unit:"character"})}},selectPageUp:{defaultHandler:function(){return d._doPageUp({select:!0})}},selectPageDown:{defaultHandler:function(){return d._doPageDown({select:!0})}},selectWordPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!0,
unit:"word"})}},selectWordNext:{defaultHandler:function(){return d._doCursorNext({select:!0,unit:"word"})}},selectTextStart:{defaultHandler:function(){return d._doHome({select:!0,ctrl:!0})}},selectTextEnd:{defaultHandler:function(){return d._doEnd({select:!0,ctrl:!0})}},deletePrevious:{defaultHandler:function(){return d._doBackspace({unit:"character"})}},deleteNext:{defaultHandler:function(){return d._doDelete({unit:"character"})}},deleteWordPrevious:{defaultHandler:function(){return d._doBackspace({unit:"word"})}},
deleteWordNext:{defaultHandler:function(){return d._doDelete({unit:"word"})}},deleteLineStart:{defaultHandler:function(){return d._doBackspace({unit:"line"})}},deleteLineEnd:{defaultHandler:function(){return d._doDelete({unit:"line"})}},tab:{defaultHandler:function(){return d._doTab()}},shiftTab:{defaultHandler:function(){return d._doShiftTab()}},enter:{defaultHandler:function(){return d._doEnter()}},enterNoCursor:{defaultHandler:function(){return d._doEnter({noCursor:!0})}},selectAll:{defaultHandler:function(){return d._doSelectAll()}},
copy:{defaultHandler:function(){return d._doCopy()}},cut:{defaultHandler:function(){return d._doCut()}},paste:{defaultHandler:function(){return d._doPaste()}},toggleWrapMode:{defaultHandler:function(){return d._doWrapMode()}},toggleTabMode:{defaultHandler:function(){return d._doTabMode()}}}},_createRuler:function(a,b){if(this._clientDiv){var c=a.getLocation()==="left"?this._leftDiv:this._rightDiv;c.style.display="block";var d=document.createElement("DIV");d._ruler=a;d.rulerChanged=!0;d.style.position=
"relative";var c=c.firstChild.rows[0],e=c.cells.length,c=c.insertCell(b===void 0||b<0||b>e?e:b);c.vAlign="top";c.appendChild(d)}},_createView:function(){if(!this._clientDiv){for(var a=this._parent;a.hasChildNodes();)a.removeChild(a.lastChild);var b=document.createElement("DIV");this._rootDiv=b;b.tabIndex=-1;b.style.position="relative";b.style.overflow="hidden";b.style.width="100%";b.style.height="100%";a.style.overflow="hidden";b.setAttribute("role","application");a.appendChild(b);var c=document.createElement("DIV");
c.className="textviewLeftRuler";this._leftDiv=c;c.tabIndex=-1;c.style.overflow="hidden";c.style.MozUserSelect="none";c.style.WebkitUserSelect="none";c.style.position="absolute";c.style.cursor="default";c.style.display="none";c.setAttribute("aria-hidden","true");a=document.createElement("TABLE");c.appendChild(a);a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);b.appendChild(c);c=document.createElement("DIV");c.className="textview";this._viewDiv=c;c.tabIndex=-1;c.style.overflow=
"auto";c.style.position="absolute";c.style.top="0px";c.style.bottom="0px";c.style.borderWidth="0px";c.style.margin="0px";c.style.outline="none";b.appendChild(c);var d=document.createElement("DIV");d.className="textviewRightRuler";this._rightDiv=d;d.tabIndex=-1;d.style.display="none";d.style.overflow="hidden";d.style.MozUserSelect="none";d.style.WebkitUserSelect="none";d.style.position="absolute";d.style.cursor="default";d.style.right="0px";d.setAttribute("aria-hidden","true");a=document.createElement("TABLE");
d.appendChild(a);a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);b.appendChild(d);this._scrollDiv=a=document.createElement("DIV");a.style.margin="0px";a.style.borderWidth="0px";a.style.padding="0px";c.appendChild(a);if(r)this._clipboardDiv=a=document.createElement("DIV"),a.style.position="fixed",a.style.whiteSpace="pre",a.style.left="-1000px",b.appendChild(a);if(!q&&!y)this._clipDiv=a=document.createElement("DIV"),a.style.position="absolute",a.style.overflow="hidden",a.style.margin=
"0px",a.style.borderWidth="0px",a.style.padding="0px",b.appendChild(a),this._clipScrollDiv=c=document.createElement("DIV"),c.style.position="absolute",c.style.height="1px",c.style.top="-1000px",a.appendChild(c);this._setFullSelection(this._fullSelection,!0);a=document.createElement("DIV");a.className="textviewContent";this._clientDiv=a;a.style.position="absolute";a.style.borderWidth="0px";a.style.margin="0px";a.style.padding="0px";a.style.outline="none";a.style.zIndex="1";a.style.WebkitUserSelect=
"text";a.setAttribute("spellcheck","false");if(y||t)a.style.WebkitTapHighlightColor="transparent";(this._clipDiv||b).appendChild(a);if(y||t)this._vScrollDiv=c=document.createElement("DIV"),c.style.position="absolute",c.style.borderWidth="1px",c.style.borderColor="white",c.style.borderStyle="solid",c.style.borderRadius="4px",c.style.backgroundColor="black",c.style.opacity="0.5",c.style.margin="0px",c.style.padding="0px",c.style.outline="none",c.style.zIndex="3",c.style.width="8px",c.style.display=
"none",b.appendChild(c),this._hScrollDiv=c=document.createElement("DIV"),c.style.position="absolute",c.style.borderWidth="1px",c.style.borderColor="white",c.style.borderStyle="solid",c.style.borderRadius="4px",c.style.backgroundColor="black",c.style.opacity="0.5",c.style.margin="0px",c.style.padding="0px",c.style.outline="none",c.style.zIndex="3",c.style.height="8px",c.style.display="none",b.appendChild(c);if(r&&!a.setCapture)this._overlayDiv=c=document.createElement("DIV"),c.style.position=a.style.position,
c.style.borderWidth=a.style.borderWidth,c.style.margin=a.style.margin,c.style.padding=a.style.padding,c.style.cursor="text",c.style.zIndex="2",(this._clipDiv||b).appendChild(c);a.contentEditable="true";a.setAttribute("role","textbox");a.setAttribute("aria-multiline","true");this._setWrapMode(this._wrapMode,!0);this._setReadOnly(this._readonly);this._setThemeClass(this._themeClass,!0);this._setTabSize(this._tabSize,!0);if(!document.getElementById("_textviewStyle")&&(b="",w&&this._metrics.scrollWidth>
0&&(b+="\n.textviewContainer ::-webkit-scrollbar-corner {background: #eeeeee;}"),r&&x&&this._highlightRGB&&this._highlightRGB!=="Highlight"&&(b+="\n.textviewContainer ::-moz-selection {background: "+this._highlightRGB+";}"),b))a=document.createElement("STYLE"),a.id="_textviewStyle",c=document.getElementsByTagName("HEAD")[0]||document.documentElement,a.appendChild(document.createTextNode(b)),c.insertBefore(a,c.firstChild);this._hookEvents();b=this._rulers;for(a=0;a<b.length;a++)this._createRuler(b[a]);
this._update()}},_defaultOptions:function(){return{parent:{value:void 0,update:null},model:{value:void 0,update:this.setModel},readonly:{value:!1,update:this._setReadOnly},fullSelection:{value:!0,update:this._setFullSelection},tabMode:{value:!0,update:null},tabSize:{value:8,update:this._setTabSize},expandTab:{value:!1,update:null},wrapMode:{value:!1,update:this._setWrapMode},themeClass:{value:void 0,update:this._setThemeClass}}},_destroyRuler:function(a){var b=a.getLocation()==="left"?this._leftDiv:
this._rightDiv;if(b){for(var c=b.firstChild.rows[0],d=c.cells,e=0;e<d.length;e++)if(d[e].firstChild._ruler===a)break;if(e!==d.length&&(c.cells[e]._ruler=void 0,c.deleteCell(e),d.length===0))b.style.display="none"}},_destroyView:function(){if(this._clientDiv){this._setGrab(null);this._unhookEvents();if(this._autoScrollTimerID)clearTimeout(this._autoScrollTimerID),this._autoScrollTimerID=null;if(this._updateTimer)clearTimeout(this._updateTimer),this._updateTimer=null;var a=this._rootDiv;a.parentNode.removeChild(a);
this._hScrollDiv=this._vScrollDiv=this._rightDiv=this._leftDiv=this._overlayDiv=this._clientDiv=this._clipScrollDiv=this._clipDiv=this._viewDiv=this._scrollDiv=this._rootDiv=this._clipboardDiv=this._selDiv3=this._selDiv2=this._selDiv1=null}},_doAutoScroll:function(a,b,c){this._autoScrollDir=a;this._autoScrollX=b;this._autoScrollY=c;this._autoScrollTimerID||this._autoScrollTimer()},_endAutoScroll:function(){this._autoScrollTimerID&&clearTimeout(this._autoScrollTimerID);this._autoScrollTimerID=this._autoScrollDir=
void 0},_fixCaret:function(){var a=this._clientDiv;if(a){var b=this._hasFocus;this._ignoreFocus=!0;b&&a.blur();a.contentEditable=!1;a.contentEditable=!0;b&&a.focus();this._ignoreFocus=!1}},_getBaseText:function(a,b){var c=this._model;c.getBaseModel&&(a=c.mapOffset(a),b=c.mapOffset(b),c=c.getBaseModel());return c.getText(a,b)},_getBottomIndex:function(a){var b=this._bottomChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=b.getBoundingClientRect(),c=this._clientDiv.getBoundingClientRect();
a.bottom>c.bottom&&(b=this._getLinePrevious(b)||b)}return b.lineIndex},_getBoundsAtOffset:function(a){var b=this._getLine(this._model.getLineAtOffset(a)),a=b.getBoundingClientRect(a),c=this._getLinePixel(b.lineIndex);a.top+=c;a.bottom+=c;b.destroy();return a},_getClientHeight:function(){var a=this._getViewPadding();return Math.max(0,this._viewDiv.clientHeight-a.top-a.bottom)},_getClientWidth:function(){var a=this._getViewPadding();return Math.max(0,this._viewDiv.clientWidth-a.left-a.right)},_getClipboardText:function(a,
b){var c=this._model.getLineDelimiter(),d,e;if(window.clipboardData)return d=[],e=window.clipboardData.getData("Text"),h(e,function(a){d.push(a)},function(){d.push(c)}),e=d.join(""),b&&b(e),e;if(r){this._ignoreFocus=!0;var g=this._clipboardDiv;g.innerHTML="<pre contenteditable=''></pre>";g.firstChild.focus();var j=this,f=function(){var a=j._getTextFromElement(g);g.innerHTML="";d=[];h(a,function(a){d.push(a)},function(){d.push(c)});return d.join("")},k=!1;this._ignorePaste=!0;if(!A||this._lastMouseButton!==
2)try{k=document.execCommand("paste",!1,null)}catch(l){k=g.childNodes.length>1||g.firstChild&&g.firstChild.childNodes.length>0}this._ignorePaste=!1;if(!k)return a?(setTimeout(function(){j.focus();(e=f())&&b&&b(e);j._ignoreFocus=!1},0),null):(this.focus(),this._ignoreFocus=!1,"");this.focus();this._ignoreFocus=!1;(e=f())&&b&&b(e);return e}return a&&a.clipboardData?(d=[],e=a.clipboardData.getData("text/plain"),h(e,function(a){d.push(a)},function(){d.push(c)}),(e=d.join(""))&&b&&b(e),e):""},_getDOMText:function(a){for(var a=
this._getLineNode(a).firstChild,b="";a;){for(var c=a.firstChild;c;){if(a.ignoreChars)for(var d=0;d<c.length;d++){var e=c.data.substring(d,d+1);e!==" "&&(b+=e)}else b+=c.data;c=c.nextSibling}a=a.nextSibling}return b},_getTextFromElement:function(a){var b=a.ownerDocument,c=b.defaultView;if(!c.getSelection)return a.innerText||a.textContent;b=b.createRange();b.selectNode(a);var a=c.getSelection(),c=[],d;for(d=0;d<a.rangeCount;d++)c.push(a.getRangeAt(d));this._ignoreSelect=!0;a.removeAllRanges();a.addRange(b);
b=a.toString();a.removeAllRanges();for(d=0;d<c.length;d++)a.addRange(c[d]);this._ignoreSelect=!1;return b},_getViewPadding:function(){return this._metrics.viewPadding},_getLine:function(a){var b=this._getLineNode(a);return b&&!b.lineChanged&&!b.lineRemoved?b._line:new o(this,a)},_getLineHeight:function(a,b){if(a!==void 0&&this._lineHeight){var c=this._lineHeight[a];if(c)return c;if(b||b===void 0)return this._lineHeight[a]=this._calculateLineHeight(a)}return this._metrics.lineHeight},_getLineNode:function(a){for(var b=
this._clientDiv.firstChild;b;){if(a===b.lineIndex)return b;b=b.nextSibling}},_getLineNext:function(a){for(a=a?a.nextSibling:this._clientDiv.firstChild;a&&a.lineIndex===-1;)a=a.nextSibling;return a},_getLinePrevious:function(a){for(a=a?a.previousSibling:this._clientDiv.lastChild;a&&a.lineIndex===-1;)a=a.previousSibling;return a},_getLinePixel:function(a){a=Math.min(Math.max(0,a),this._model.getLineCount());if(this._lineHeight){var b=this._getTopIndex(),c=-this._topIndexY+this._getScroll().y;if(a>b)for(;b<
a;b++)c+=this._getLineHeight(b);else for(b-=1;b>=a;b--)c-=this._getLineHeight(b);return c}return this._getLineHeight()*a},_getLineIndex:function(a){var b,c=0,d=this._model.getLineCount();if(this._lineHeight){var c=this._getTopIndex(),e=-this._topIndexY+this._getScroll().y;if(a!==e)if(a<e)for(;a<e&&c>0;)a+=this._getLineHeight(--c);else for(b=this._getLineHeight(c);a-b>=e&&c<d-1;)a-=b,b=this._getLineHeight(++c)}else b=this._getLineHeight(),c=Math.floor(a/b);return Math.max(0,Math.min(d-1,c))},_getScroll:function(){var a=
this._viewDiv;return{x:a.scrollLeft,y:a.scrollTop}},_getSelection:function(){return this._selection.clone()},_getTopIndex:function(a){var b=this._topChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=b.getBoundingClientRect(),c=this._getViewPadding(),d=this._viewDiv.getBoundingClientRect();a.top<d.top+c.top&&(b=this._getLineNext(b)||b)}return b.lineIndex},_hookEvents:function(){var a=this;this._modelListener={onChanging:function(b){a._onModelChanging(b)},onChanged:function(b){a._onModelChanged(b)}};
this._model.addEventListener("preChanging",this._modelListener.onChanging);this._model.addEventListener("postChanged",this._modelListener.onChanged);var b=this._handlers=[],c=this._clientDiv,d=this._viewDiv,g=this._rootDiv,h=this._overlayDiv||c,j=q?document:window;b.push({target:window,type:"resize",handler:function(b){return a._handleResize(b)}});b.push({target:c,type:"blur",handler:function(b){return a._handleBlur(b)}});b.push({target:c,type:"focus",handler:function(b){return a._handleFocus(b)}});
b.push({target:d,type:"focus",handler:function(){c.focus()}});b.push({target:d,type:"scroll",handler:function(b){return a._handleScroll(b)}});b.push({target:c,type:"textInput",handler:function(b){return a._handleTextInput(b)}});b.push({target:c,type:"keydown",handler:function(b){return a._handleKeyDown(b)}});b.push({target:c,type:"keypress",handler:function(b){return a._handleKeyPress(b)}});b.push({target:c,type:"keyup",handler:function(b){return a._handleKeyUp(b)}});b.push({target:c,type:"selectstart",
handler:function(b){return a._handleSelectStart(b)}});b.push({target:c,type:"contextmenu",handler:function(b){return a._handleContextMenu(b)}});b.push({target:c,type:"copy",handler:function(b){return a._handleCopy(b)}});b.push({target:c,type:"cut",handler:function(b){return a._handleCut(b)}});b.push({target:c,type:"paste",handler:function(b){return a._handlePaste(b)}});if(y||t)b.push({target:document,type:"selectionchange",handler:function(b){return a._handleSelectionChange(b)}}),b.push({target:c,
type:"touchstart",handler:function(b){return a._handleTouchStart(b)}}),b.push({target:c,type:"touchmove",handler:function(b){return a._handleTouchMove(b)}}),b.push({target:c,type:"touchend",handler:function(b){return a._handleTouchEnd(b)}});else{b.push({target:c,type:"mousedown",handler:function(b){return a._handleMouseDown(b)}});b.push({target:c,type:"mouseover",handler:function(b){return a._handleMouseOver(b)}});b.push({target:c,type:"mouseout",handler:function(b){return a._handleMouseOut(b)}});
b.push({target:j,type:"mouseup",handler:function(b){return a._handleMouseUp(b)}});b.push({target:j,type:"mousemove",handler:function(b){return a._handleMouseMove(b)}});b.push({target:g,type:"mousedown",handler:function(b){return a._handleRootMouseDown(b)}});b.push({target:g,type:"mouseup",handler:function(b){return a._handleRootMouseUp(b)}});b.push({target:h,type:"dragstart",handler:function(b){return a._handleDragStart(b)}});b.push({target:h,type:"drag",handler:function(b){return a._handleDrag(b)}});
b.push({target:h,type:"dragend",handler:function(b){return a._handleDragEnd(b)}});b.push({target:h,type:"dragenter",handler:function(b){return a._handleDragEnter(b)}});b.push({target:h,type:"dragover",handler:function(b){return a._handleDragOver(b)}});b.push({target:h,type:"dragleave",handler:function(b){return a._handleDragLeave(b)}});b.push({target:h,type:"drop",handler:function(b){return a._handleDrop(b)}});b.push({target:this._clientDiv,type:r?"DOMMouseScroll":"mousewheel",handler:function(b){return a._handleMouseWheel(b)}});
if(r&&(!G||r>=15))(d=window.MutationObserver||window.MozMutationObserver)?(this._mutationObserver=new d(function(b){a._handleDataModified(b)}),this._mutationObserver.observe(c,{subtree:!0,characterData:!0})):b.push({target:this._clientDiv,type:"DOMCharacterDataModified",handler:function(b){return a._handleDataModified(b)}});this._overlayDiv&&(b.push({target:this._overlayDiv,type:"mousedown",handler:function(b){return a._handleMouseDown(b)}}),b.push({target:this._overlayDiv,type:"mouseover",handler:function(b){return a._handleMouseOver(b)}}),
b.push({target:this._overlayDiv,type:"mouseout",handler:function(b){return a._handleMouseOut(b)}}),b.push({target:this._overlayDiv,type:"contextmenu",handler:function(b){return a._handleContextMenu(b)}}));B||b.push({target:this._clientDiv,type:"dblclick",handler:function(b){return a._handleDblclick(b)}})}d=this._leftDiv;g=this._rightDiv;q&&b.push({target:d,type:"selectstart",handler:function(){return!1}});b.push({target:d,type:r?"DOMMouseScroll":"mousewheel",handler:function(b){return a._handleMouseWheel(b)}});
b.push({target:d,type:"click",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"dblclick",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"mousemove",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"mouseover",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"mouseout",handler:function(b){a._handleRulerEvent(b)}});q&&b.push({target:g,type:"selectstart",handler:function(){return!1}});b.push({target:g,type:r?"DOMMouseScroll":
"mousewheel",handler:function(b){return a._handleMouseWheel(b)}});b.push({target:g,type:"click",handler:function(b){a._handleRulerEvent(b)}});b.push({target:g,type:"dblclick",handler:function(b){a._handleRulerEvent(b)}});b.push({target:g,type:"mousemove",handler:function(b){a._handleRulerEvent(b)}});b.push({target:g,type:"mouseover",handler:function(b){a._handleRulerEvent(b)}});b.push({target:g,type:"mouseout",handler:function(b){a._handleRulerEvent(b)}});for(d=0;d<b.length;d++)g=b[d],e(g.target,
g.type,g.handler,g.capture)},_init:function(a){var c=a.parent;typeof c==="string"&&(c=window.document.getElementById(c));if(!c)throw"no parent";a.parent=c;a.model=a.model||new b.TextModel;var c=this._defaultOptions(),d;for(d in c)c.hasOwnProperty(d)&&(this["_"+d]=a[d]!==void 0?a[d]:c[d].value);this._rulers=[];this._selection=new l(0,0,!1);this._linksVisible=!1;this._maxLineWidth=this._redrawCount=0;this._maxLineIndex=-1;this._ignoreSelect=!0;this._hasFocus=this._ignoreFocus=!1;this._dragOffset=this._columnX=
-1;this._autoScrollTimerID=this._autoScrollY=this._autoScrollX=null;this._AUTO_SCROLL_RATE=50;this._mouseUpClosure=this._moseMoveClosure=this._grabControl=null;this._clickCount=this._lastMouseTime=this._lastMouseY=this._lastMouseX=0;this._clickTime=250;this._clickDist=5;this._isMouseDown=!1;this._doubleClickSelection=null;this._vScroll=this._hScroll=0;this._imeOffset=-1;this._createActions();this._createView()},_modifyContent:function(a,b){if(!this._readonly||a._code)if(a.type="Verify",this.onVerify(a),
!(a.text===null||a.text===void 0)){var c=this._model;try{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!0;c.setText(a.text,a.start,a.end)}finally{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!1}b&&(c=this._getSelection(),c.setCaret(a.start+a.text.length),this._setSelection(c,!0));this.onModify({type:"Modify"})}},_onModelChanged:function(a){a.type="ModelChanged";this.onModelChanged(a);a.type="Changed";var b=a.start,c=a.addedCharCount,d=a.removedCharCount,e=a.addedLineCount,g=a.removedLineCount,
h=this._getSelection();h.end>b&&(h.end>b&&h.start<b+d?h.setCaret(b+c):(h.start+=c-d,h.end+=c-d),this._setSelection(h,!1,!1));b=this._model.getLineAtOffset(b);for(c=this._getLineNext();c;){d=c.lineIndex;if(b<=d&&d<=b+g)b===d&&!c.modelChangedEvent&&!c.lineRemoved?(c.modelChangedEvent=a,c.lineChanged=!0):(c.lineRemoved=!0,c.lineChanged=!1,c.modelChangedEvent=null);if(d>b+g)c.lineIndex=d+e-g,c._line.lineIndex=c.lineIndex;c=this._getLineNext(c)}if(!this._wrapMode&&b<=this._maxLineIndex&&this._maxLineIndex<=
b+g)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._update()},_onModelChanging:function(a){a.type="ModelChanging";this.onModelChanging(a);a.type="Changing"},_queueUpdate:function(){if(!this._updateTimer&&!this._ignoreQueueUpdate){var a=this;this._updateTimer=setTimeout(function(){a._updateTimer=null;a._update()},0)}},_resetLineHeight:function(a,b){if(this._wrapMode){if(a!==void 0&&b!==void 0)for(var c=a;c<b;c++)this._lineHeight[c]=void 0;else this._lineHeight=
Array(this._model.getLineCount());this._calculateLineHeightTimer()}else this._lineHeight=null},_resetLineWidth:function(){var a=this._clientDiv;if(a)for(a=a.firstChild;a;)a.lineWidth=void 0,a=a.nextSibling},_reset:function(){this._maxLineIndex=-1;this._maxLineWidth=0;this._columnX=-1;this._bottomChild=this._topChild=null;this._topIndexY=0;this._resetLineHeight();this._setSelection(new l(0,0,!1),!1,!1);if(this._viewDiv)this._viewDiv.scrollLeft=0,this._viewDiv.scrollTop=0;var a=this._clientDiv;if(a){for(var b=
a.firstChild;b;)b.lineRemoved=!0,b=b.nextSibling;if(r)this._ignoreFocus=!1,(b=this._hasFocus)&&a.blur(),a.contentEditable=!1,a.contentEditable=!0,b&&a.focus(),this._ignoreFocus=!1}},_scrollView:function(a,b){this._ensureCaretVisible=!1;var c=this._viewDiv;a&&(c.scrollLeft+=a);b&&(c.scrollTop+=b)},_setClipboardText:function(a,b){var c;if(window.clipboardData)return c=[],h(a,function(a){c.push(a)},function(){c.push(J)}),window.clipboardData.setData("Text",c.join(""));if(b&&b.clipboardData&&(c=[],h(a,
function(a){c.push(a)},function(){c.push(J)}),b.clipboardData.setData("text/plain",c.join(""))))return!0;var d=document.createElement("PRE");d.style.position="fixed";d.style.left="-1000px";h(a,function(a){d.appendChild(document.createTextNode(a))},function(){d.appendChild(document.createElement("BR"))});d.appendChild(document.createTextNode(" "));this._clientDiv.appendChild(d);var e=document.createRange();e.setStart(d.firstChild,0);e.setEndBefore(d.lastChild);var g=window.getSelection();g.rangeCount>
0&&g.removeAllRanges();g.addRange(e);var j=this,e=function(){d&&d.parentNode===j._clientDiv&&j._clientDiv.removeChild(d);j._updateDOMSelection()},g=!1;this._ignoreCopy=!0;try{g=document.execCommand("copy",!1,null)}catch(f){}this._ignoreCopy=!1;if(!g&&b)return setTimeout(e,0),!1;e();return!0},_setDOMSelection:function(a,b,c,d){for(var e,g,h,j,f=0,k=a.firstChild,l,t,n=this._model.getLine(a.lineIndex).length;k;){l=k.firstChild;t=l.length;k.ignoreChars&&(t-=k.ignoreChars);if(f+t>b||f+t>=n){e=l;g=b-f;
k.ignoreChars&&t>0&&g===t&&(g+=k.ignoreChars);break}f+=t;k=k.nextSibling}for(var f=0,k=c.firstChild,o=this._model.getLine(c.lineIndex).length;k;){l=k.firstChild;t=l.length;k.ignoreChars&&(t-=k.ignoreChars);if(t+f>d||f+t>=o){h=l;j=d-f;k.ignoreChars&&t>0&&j===t&&(j+=k.ignoreChars);break}f+=t;k=k.nextSibling}this._setDOMFullSelection(a,b,n,c,d,o);if(this._hasFocus)if(window.getSelection)a=document.createRange(),a.setStart(e,g),a.setEnd(h,j),h=window.getSelection(),this._ignoreSelect=!1,h.rangeCount>
0&&h.removeAllRanges(),h.addRange(a),this._ignoreSelect=!0;else if(document.selection)b=document.body,a=document.createElement("DIV"),b.appendChild(a),b.removeChild(a),a=b.createTextRange(),a.moveToElementText(e.parentNode),a.moveStart("character",g),e=b.createTextRange(),e.moveToElementText(h.parentNode),e.moveStart("character",j),a.setEndPoint("EndToStart",e),this._ignoreSelect=!1,a.select(),this._ignoreSelect=!0},_setDOMFullSelection:function(a,b,c,d,e){if(this._selDiv1&&(c=this._selDiv1,c.style.width=
"0px",c.style.height="0px",c=this._selDiv2,c.style.width="0px",c.style.height="0px",c=this._selDiv3,c.style.width="0px",c.style.height="0px",!(a===d&&b===e))){var g=this._model,h=this._getViewPadding(),j=this._clientDiv.getBoundingClientRect(),f=this._viewDiv.getBoundingClientRect(),c=f.left+h.left,k=j.right,h=f.top+h.top,l=j.bottom,f=j=0;this._clipDiv?(f=this._clipDiv.getBoundingClientRect(),j=f.left-this._clipDiv.scrollLeft):(f=this._rootDiv.getBoundingClientRect(),j=f.left);f=f.top;this._ignoreDOMSelection=
!0;var a=(new o(this,a.lineIndex,a)).getBoundingClientRect(g.getLineStart(a.lineIndex)+b,!1),t=a.left,e=(new o(this,d.lineIndex,d)).getBoundingClientRect(g.getLineStart(d.lineIndex)+e,!1),b=e.left;this._ignoreDOMSelection=!1;var g=this._selDiv1,t=Math.min(k,Math.max(c,t)),n=Math.min(l,Math.max(h,a.top)),m=k,d=Math.min(l,Math.max(h,a.bottom));g.style.left=t-j+"px";g.style.top=n-f+"px";g.style.width=Math.max(0,m-t)+"px";g.style.height=Math.max(0,d-n)+"px";if(a.top===e.top)m=Math.min(b,k),g.style.width=
Math.max(0,m-t)+"px";else if(a=Math.min(l,Math.max(h,e.top)),b=Math.min(k,Math.max(c,b)),h=Math.min(l,Math.max(h,e.bottom)),l=this._selDiv3,l.style.left=c-j+"px",l.style.top=a-f+"px",l.style.width=Math.max(0,b-c)+"px",l.style.height=Math.max(0,h-a)+"px",a-d>0)h=this._selDiv2,h.style.left=c-j+"px",h.style.top=d-f+"px",h.style.width=Math.max(0,k-c)+"px",h.style.height=Math.max(0,a-d)+"px"}},_setGrab:function(a){if(a!==this._grabControl)a?(a.setCapture&&a.setCapture(),this._grabControl=a):(this._grabControl.releaseCapture&&
this._grabControl.releaseCapture(),this._grabControl=null)},_setLinksVisible:function(a){if(this._linksVisible!==a){this._linksVisible=a;if(q&&a)this._hadFocus=this._hasFocus;var b=this._clientDiv;b.contentEditable=!a;this._hadFocus&&!a&&b.focus();if(this._overlayDiv)this._overlayDiv.style.zIndex=a?"-1":"1";for(a=this._getLineNext();a;){if(a.hasLink)for(b=a.firstChild;b;){var c=b.nextSibling,d=b.viewStyle;d&&d.tagName==="A"&&a.replaceChild(a._line._createSpan(a,document,b.firstChild.data,d),b);b=
c}a=this._getLineNext(a)}}},_setSelection:function(a,b,c,d){if(a){this._columnX=-1;c===void 0&&(c=!0);var e=this._selection;this._selection=a;b&&this._showCaret(!1,d);c&&this._updateDOMSelection();if(!e.equals(a))this.onSelection({type:"Selection",oldValue:{start:e.start,end:e.end},newValue:{start:a.start,end:a.end}})}},_setSelectionTo:function(a,b,c,d){var e=this._model,g=this._getSelection(),b=this.convert({x:a,y:b},"page","document"),a=this._getLineIndex(b.y);if(this._clickCount===1){e=this._getLine(a);
a=e.getOffset(b.x,b.y-this._getLinePixel(a));e.destroy();if(d&&!c&&g.start<=a&&a<g.end)return this._dragOffset=a,!1;g.extend(a);c||g.collapse()}else(this._clickCount&1)===0?(e=this._getLine(a),a=e.getOffset(b.x,b.y-this._getLinePixel(a)),this._doubleClickSelection?a>=this._doubleClickSelection.start?(c=this._doubleClickSelection.start,d=e.getNextOffset(a,"wordend",1)):(c=e.getNextOffset(a,"word",-1),d=this._doubleClickSelection.end):(c=e.getNextOffset(a,"word",-1),d=e.getNextOffset(c,"wordend",1)),
e.destroy()):this._doubleClickSelection?(d=e.getLineAtOffset(this._doubleClickSelection.start),a>=d?(c=e.getLineStart(d),d=e.getLineEnd(a)):(c=e.getLineStart(a),d=e.getLineEnd(d))):(c=e.getLineStart(a),d=e.getLineEnd(a)),g.setCaret(c),g.extend(d);this._setSelection(g,!0,!0);return!0},_setFullSelection:function(a,b){this._fullSelection=a;if(w)this._fullSelection=!0;var c=this._clipDiv||this._rootDiv;if(c)if(this._fullSelection){if(!this._selDiv1&&this._fullSelection&&!y){this._highlightRGB=w?"transparent":
"Highlight";var d=document.createElement("DIV");this._selDiv1=d;d.style.position="absolute";d.style.borderWidth="0px";d.style.margin="0px";d.style.padding="0px";d.style.outline="none";d.style.background=this._highlightRGB;d.style.width="0px";d.style.height="0px";d.style.zIndex="0";c.appendChild(d);var e=document.createElement("DIV");this._selDiv2=e;e.style.position="absolute";e.style.borderWidth="0px";e.style.margin="0px";e.style.padding="0px";e.style.outline="none";e.style.background=this._highlightRGB;
e.style.width="0px";e.style.height="0px";e.style.zIndex="0";c.appendChild(e);var g=document.createElement("DIV");this._selDiv3=g;g.style.position="absolute";g.style.borderWidth="0px";g.style.margin="0px";g.style.padding="0px";g.style.outline="none";g.style.background=this._highlightRGB;g.style.width="0px";g.style.height="0px";g.style.zIndex="0";c.appendChild(g);if(r&&x){c=window.getComputedStyle(g,null).getPropertyValue("background-color");switch(c){case "rgb(119, 141, 168)":c="rgb(199, 208, 218)";
break;case "rgb(127, 127, 127)":c="rgb(198, 198, 198)";break;case "rgb(255, 193, 31)":c="rgb(250, 236, 115)";break;case "rgb(243, 70, 72)":c="rgb(255, 176, 139)";break;case "rgb(255, 138, 34)":c="rgb(255, 209, 129)";break;case "rgb(102, 197, 71)":c="rgb(194, 249, 144)";break;case "rgb(140, 78, 184)":c="rgb(232, 184, 255)";break;default:c="rgb(180, 213, 255)"}this._highlightRGB=c;d.style.background=c;e.style.background=c;g.style.background=c}b||this._updateDOMSelection()}}else{if(this._selDiv1)c.removeChild(this._selDiv1),
this._selDiv1=null;if(this._selDiv2)c.removeChild(this._selDiv2),this._selDiv2=null;if(this._selDiv3)c.removeChild(this._selDiv3),this._selDiv3=null}},_setReadOnly:function(a){this._readonly=a;this._clientDiv.setAttribute("aria-readonly",a?"true":"false")},_setTabSize:function(a,b){this._tabSize=a;this._customTabSize=void 0;var c=this._clientDiv;if(s){if(c)c.style.OTabSize=this._tabSize+""}else if(r>=4){if(c)c.style.MozTabSize=this._tabSize+""}else if(this._tabSize!==8)this._customTabSize=this._tabSize;
b||(this.redrawLines(),this._resetLineWidth())},_setThemeClass:function(a,b){this._themeClass=a;var c="textviewContainer";this._themeClass&&(c+=" "+this._themeClass);this._rootDiv.className=c;this._updateStyle(b)},_setWrapMode:function(a,b){this._wrapMode=a;var c=this._clientDiv,d=this._viewDiv;a?(c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",d.style.overflowX="hidden",d.style.overflowY="scroll"):(c.style.whiteSpace="pre",c.style.wordWrap="normal",d.style.overflowX="auto",d.style.overflowY=
"auto");b||(this.redraw(),this._resetLineWidth());this._resetLineHeight()},_showCaret:function(a,b){if(this._clientDiv){var c=this._model,d=this._getSelection(),e=this._getScroll(),g=d.getCaret(),h=d.start,j=d.end,f=c.getLineAtOffset(j),k=Math.max(Math.max(h,c.getLineStart(f)),j-1),c=this._getClientWidth(),f=this._getClientHeight(),l=c/4,t=this._getBoundsAtOffset(g===h?h:k),n=t.left,o=t.right,m=t.top,y=t.bottom;a&&!d.isEmpty()&&(t=this._getBoundsAtOffset(g===j?h:k),t.top===m?g===h?o=n+Math.min(t.right-
n,c):n=o-Math.min(o-t.left,c):g===h?y=m+Math.min(t.bottom-m,f):m=y-Math.min(y-t.top,f));d=0;n<e.x&&(d=Math.min(n-e.x,-l));o>e.x+c&&(d=Math.max(o-e.x-c,l));g=0;m<e.y?g=m-e.y:y>e.y+f&&(g=y-e.y-f);b&&(b>0?g>0&&(g=Math.max(g,b)):g<0&&(g=Math.min(g,b)));return d!==0||g!==0?(this._scrollView(d,g),f!==this._getClientHeight()||c!==this._getClientWidth()?this._showCaret():this._ensureCaretVisible=!0,!0):!1}},_startIME:function(){if(this._imeOffset===-1){var a=this._getSelection();a.isEmpty()||this._modifyContent({text:"",
start:a.start,end:a.end},!0);this._imeOffset=a.start}},_unhookEvents:function(){this._model.removeEventListener("preChanging",this._modelListener.onChanging);this._model.removeEventListener("postChanged",this._modelListener.onChanged);this._modelListener=null;for(var a=0;a<this._handlers.length;a++){var b=this._handlers[a],c=b.target,d=b.type,b=b.handler;typeof c.removeEventListener==="function"?c.removeEventListener(d,b,!1):c.detachEvent("on"+d,b)}this._handlers=null;if(this._mutationObserver)this._mutationObserver.disconnect(),
this._mutationObserver=null},_updateDOMSelection:function(){if(!this._ignoreDOMSelection&&this._clientDiv){var a=this._getSelection(),b=this._model,c=b.getLineAtOffset(a.start),d=b.getLineAtOffset(a.end),e=this._getLineNext();if(e){var g=this._getLinePrevious(),h;c<e.lineIndex?(h=e,c=0):c>g.lineIndex?(h=g,c=0):(h=this._getLineNode(c),c=a.start-b.getLineStart(c));d<e.lineIndex?a=0:d>g.lineIndex?(e=g,a=0):(e=this._getLineNode(d),a=a.end-b.getLineStart(d));this._setDOMSelection(h,c,e,a)}}},_update:function(a){if(!(this._redrawCount>
0)){if(this._updateTimer)clearTimeout(this._updateTimer),this._updateTimer=null,a=!1;var b=this._clientDiv;if(b){if(this._metrics.invalid)this._ignoreQueueUpdate=!0,this._updateStyle(),this._ignoreQueueUpdate=!1;var c=this._model,d=this._getScroll(),e=this._getViewPadding(),g=c.getLineCount(),h=this._getLineHeight(),j=this._getClientWidth();if(this._wrapMode)b.style.width=j+"px";var f,k,l,t,n=0,m=0;if(this._lineHeight){for(;m<g;){l=this._getLineHeight(m);if(n+l>d.y)break;n+=l;m++}f=m;k=Math.max(0,
f-1);l=c=d.y-n;f>0&&(c+=this._getLineHeight(f-1))}else t=Math.max(0,d.y)/h,f=Math.floor(t),k=Math.max(0,f-1),c=Math.round((t-k)*h),l=Math.round((t-f)*h);this._topIndexY=l;t=this._parent;var y=t.clientWidth,p=t.clientHeight;t=this._getClientHeight();if(a){k=0;this._leftDiv&&(f=this._leftDiv.getBoundingClientRect(),k=f.right-f.left);f=j;for(this._wrapMode||(f=Math.max(this._maxLineWidth,f));m<g;)l=this._getLineHeight(m,!1),n+=l,m++;g=n}else{for(var j=this._viewDiv,d=Math.min(f+Math.floor((t+l)/h),g-
1),x=Math.min(d+1,g-1),h=b.firstChild;h;){l=h.lineIndex;var s=h.nextSibling;if(!(k<=l&&l<=x)||h.lineRemoved||h.lineIndex===-1)this._mouseWheelLine===h?(h.style.display="none",h.lineIndex=-1):b.removeChild(h);h=s}h=this._getLineNext();s=document.createDocumentFragment();for(l=k;l<=x;l++)if(!h||h.lineIndex>l)(new o(this,l)).create(s,null);else{s.firstChild&&(b.insertBefore(s,h),s=document.createDocumentFragment());if(h&&h.lineChanged)h=(new o(this,l)).create(s,h),h.lineChanged=!1;h=this._getLineNext(h)}s.firstChild&&
b.insertBefore(s,h);if(w&&!this._wrapMode)b.style.width="0x7fffffffpx";h=this._getLineNext();l=t+c;for(s=!1;h;){k=h.lineWidth;if(k===void 0)x=h._line.getBoundingClientRect(),k=h.lineWidth=Math.ceil(x.right-x.left),this._lineHeight&&(this._lineHeight[h.lineIndex]=Math.ceil(x.bottom-x.top));if(this._lineHeight&&!s&&(l-=this._lineHeight[h.lineIndex],l<0))d=h.lineIndex,s=!0;if(!this._wrapMode){if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=h.lineIndex;if(this._checkMaxLineIndex===h.lineIndex)this._checkMaxLineIndex=
-1}if(h.lineIndex===f)this._topChild=h;if(h.lineIndex===d)this._bottomChild=h;h=this._getLineNext(h)}if(this._checkMaxLineIndex!==-1&&(l=this._checkMaxLineIndex,this._checkMaxLineIndex=-1,0<=l&&l<g)){h=new o(this,l);x=h.getBoundingClientRect();k=x.right-x.left;if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=l;h.destroy()}for(;m<g;)l=this._getLineHeight(m,m<=d),n+=l,m++;g=n;this._updateRuler(this._leftDiv,f,d);this._updateRuler(this._rightDiv,f,d);k=0;this._leftDiv&&(f=this._leftDiv.getBoundingClientRect(),
k=f.right-f.left);d=0;this._rightDiv&&(d=this._rightDiv.getBoundingClientRect(),d=d.right-d.left);j.style.left=k+"px";j.style.right=d+"px";d=this._scrollDiv;d.style.height=g+"px";n=j=this._getClientWidth();this._wrapMode||(n=Math.max(this._maxLineWidth,n));f=n;if((!q||q>=9)&&this._maxLineWidth>j)n+=e.right+e.left;d.style.width=n+"px";if(this._clipScrollDiv)this._clipScrollDiv.style.width=n+"px";d=this._getScroll();n=t+e.top+e.bottom;this._updateRulerSize(this._leftDiv,n);this._updateRulerSize(this._rightDiv,
n)}if(this._vScrollDiv)n=t-8,m=Math.max(15,Math.ceil(Math.min(1,n/(g+e.top+e.bottom))*n)),this._vScrollDiv.style.left=k+j-8+"px",this._vScrollDiv.style.top=Math.floor(Math.max(0,d.y*n/g))+"px",this._vScrollDiv.style.height=m+"px";if(!this._wrapMode&&this._hScrollDiv)n=j-8,m=Math.max(15,Math.ceil(Math.min(1,n/(this._maxLineWidth+e.left+e.right))*n)),this._hScrollDiv.style.left=k+Math.floor(Math.max(0,Math.floor(d.x*n/this._maxLineWidth)))+"px",this._hScrollDiv.style.top=t-9+"px",this._hScrollDiv.style.width=
m+"px";x=d.x;l=this._clipDiv;n=this._overlayDiv;if(l){l.scrollLeft=x;m=k+e.left;h=e.top;a=j;k=t;x=0;s=-c;if(d.x===0)m-=e.left,a+=e.left,x=e.left;d.x+j===f&&(a+=e.right);d.y===0&&(h-=e.top,k+=e.top,s+=e.top);d.y+t===g&&(k+=e.bottom);l.style.left=m+"px";l.style.top=h+"px";l.style.right=y-a-m+"px";l.style.bottom=p-k-h+"px";b.style.left=x+"px";b.style.top=s+"px";b.style.width=f+"px";b.style.height=t+c+"px";if(n)n.style.left=b.style.left,n.style.top=b.style.top,n.style.width=b.style.width,n.style.height=
b.style.height}else{m=x;h=c;y=x+j;p=c+t;m===0&&(m-=e.left);h===0&&(h-=e.top);y===f&&(y+=e.right);d.y+t===g&&(p+=e.bottom);b.style.clip="rect("+h+"px,"+y+"px,"+p+"px,"+m+"px)";b.style.left=-x+k+e.left+"px";b.style.width=(w?f:j+x)+"px";if(!a)b.style.top=-c+e.top+"px",b.style.height=t+c+"px";if(n&&(n.style.clip=b.style.clip,n.style.left=b.style.left,n.style.width=b.style.width,!a))n.style.top=b.style.top,n.style.height=b.style.height}this._updateDOMSelection();b=this._ensureCaretVisible;this._ensureCaretVisible=
!1;t!==this._getClientHeight()&&(this._update(),b&&this._showCaret())}}},_updateRulerSize:function(a,b){if(a){for(var c=this._topIndexY,d=this._getLineHeight(),e=a.firstChild.rows[0].cells,g=0;g<e.length;g++){var h=e[g].firstChild,j=d;h._ruler.getOverview()==="page"&&(j+=c);h.style.top=-j+"px";h.style.height=b+j+"px"}a.style.height=b+"px"}},_updateRuler:function(a,b,d){if(a)for(var a=a.firstChild.rows[0].cells,e=this._getLineHeight(),g=this._getViewPadding(),h=0;h<a.length;h++){var j=a[h].firstChild,
f=j._ruler;j.rulerChanged&&c(f.getRulerStyle(),j);var k,l=j.firstChild;l?(k=l,l=l.nextSibling):(k=document.createElement("DIV"),k.style.visibility="hidden",j.appendChild(k));var t,n;if(j.rulerChanged&&k){t=-1;if(n=f.getWidestAnnotation())if(c(n.style,k),n.html)k.innerHTML=n.html;k.lineIndex=t;k.style.height=e+g.top+"px"}var m,o;if(f.getOverview()==="page"){for(f=f.getAnnotations(b,d+1);l;)t=l.lineIndex,n=l.nextSibling,(!(b<=t&&t<=d)||l.lineChanged)&&j.removeChild(l),l=n;l=j.firstChild.nextSibling;
o=document.createDocumentFragment();for(t=b;t<=d;t++)if(!l||l.lineIndex>t){m=document.createElement("DIV");if(n=f[t]){c(n.style,m);if(n.html)m.innerHTML=n.html;m.annotation=n}m.lineIndex=t;m.style.height=this._getLineHeight(t)+"px";o.appendChild(m)}else if(o.firstChild&&(j.insertBefore(o,l),o=document.createDocumentFragment()),l)l=l.nextSibling;o.firstChild&&j.insertBefore(o,l)}else{n=this._getClientHeight();t=this._model.getLineCount();l=n+g.top+g.bottom-2*this._metrics.scrollWidth;k=e*t<l?e:l/t;
if(j.rulerChanged){for(n=j.childNodes.length;n>1;)j.removeChild(j.lastChild),n--;f=f.getAnnotations(0,t);o=document.createDocumentFragment();for(var y in f)if(t=y>>>0,!(t<0)){m=document.createElement("DIV");n=f[y];c(n.style,m);m.style.position="absolute";m.style.top=this._metrics.scrollWidth+e+Math.floor(t*k)+"px";if(n.html)m.innerHTML=n.html;m.annotation=n;m.lineIndex=t;o.appendChild(m)}j.appendChild(o)}else if(j._oldTrackHeight!==l)for(m=j.firstChild?j.firstChild.nextSibling:null;m;)m.style.top=
this._metrics.scrollWidth+e+Math.floor(m.lineIndex*k)+"px",m=m.nextSibling;j._oldTrackHeight=l}j.rulerChanged=!1}},_updateStyle:function(a){if(!a&&q)this._rootDiv.style.lineHeight="normal";var b=this._metrics=this._calculateMetrics();this._rootDiv.style.lineHeight=q?b.lineHeight-(b.lineTrim.top+b.lineTrim.bottom)+"px":"normal";a||(this.redraw(),this._resetLineWidth())}};a.EventTarget.addMixin(m.prototype);return{TextView:m}});
define("orion/textview/tooltip",["i18n!orion/textview/nls/messages","orion/textview/textView","orion/textview/textModel","orion/textview/projectionTextModel"],function(b,f,a,e){function c(a){this._view=a;this._create(a.getOptions("parent").ownerDocument);a.addEventListener("Destroy",this,this.destroy)}c.getTooltip=function(a){if(!a._tooltip)a._tooltip=new c(a);return a._tooltip};c.prototype={_create:function(a){if(!this._tooltipDiv){var b=this._tooltipDiv=a.createElement("DIV");b.className="textviewTooltip";
b.setAttribute("aria-live","assertive");b.setAttribute("aria-atomic","true");var c=this._tooltipContents=a.createElement("DIV");b.appendChild(c);a.body.appendChild(b);this.hide()}},destroy:function(){if(this._tooltipDiv){this.hide();var a=this._tooltipDiv.parentNode;a&&a.removeChild(this._tooltipDiv);this._tooltipDiv=null}},hide:function(){if(this._contentsView)this._contentsView.destroy(),this._contentsView=null;if(this._tooltipContents)this._tooltipContents.innerHTML="";if(this._tooltipDiv)this._tooltipDiv.style.visibility=
"hidden";if(this._showTimeout)clearTimeout(this._showTimeout),this._showTimeout=null;if(this._hideTimeout)clearTimeout(this._hideTimeout),this._hideTimeout=null;if(this._fadeTimeout)clearInterval(this._fadeTimeout),this._fadeTimeout=null},isVisible:function(){return this._tooltipDiv&&this._tooltipDiv.style.visibility==="visible"},setTarget:function(a,b){if(this.target!==a&&(this._target=a,this.hide(),a)){var c=this;b===0?c.show(!0):c._showTimeout=setTimeout(function(){c.show(!0)},b?b:500)}},show:function(a){if(this._target){var b=
this._target.getTooltipInfo();if(b){var c=this._tooltipDiv,j=this._tooltipContents;c.style.left=c.style.right=c.style.width=c.style.height=j.style.width=j.style.height="auto";var k=b.contents;k instanceof Array&&(k=this._getAnnotationContents(k));if(typeof k==="string")j.innerHTML=k;else if(this._isNode(k))j.appendChild(k);else if(k instanceof e.ProjectionTextModel){var l=this._view,n=l.getOptions();n.wrapMode=!1;n.parent=j;var o=n.themeClass;o?((o=o.replace("tooltip",""))&&(o=" "+o),o="tooltip"+
o):o="tooltip";n.themeClass=o;n=this._contentsView=new f.TextView(n);n._clientDiv.contentEditable=!1;n.addEventListener("LineStyle",function(a){l.onLineStyle(a)});n.setModel(k);k=n.computeSize();j.style.width=k.width+20+"px";j.style.height=k.height+"px";n.resize()}else return;j=c.ownerDocument.documentElement;b.anchor==="right"?(k=j.clientWidth-b.x,c.style.right=k+"px"):(k=parseInt(this._getNodeStyle(c,"padding-left","0"),10),k+=parseInt(this._getNodeStyle(c,"border-left-width","0"),10),k=b.x-k,c.style.left=
k+"px");c.style.maxWidth=j.clientWidth-k-10+"px";k=parseInt(this._getNodeStyle(c,"padding-top","0"),10);k+=parseInt(this._getNodeStyle(c,"border-top-width","0"),10);k=b.y-k;c.style.top=k+"px";c.style.maxHeight=j.clientHeight-k-10+"px";c.style.opacity="1";c.style.visibility="visible";if(a){var m=this;m._hideTimeout=setTimeout(function(){var a=parseFloat(m._getNodeStyle(c,"opacity","1"));m._fadeTimeout=setInterval(function(){c.style.visibility==="visible"&&a>0?(a-=0.1,c.style.opacity=a):m.hide()},50)},
5E3)}}}},_getAnnotationContents:function(a){function c(a){var b=a.title;if(b==="")return null;var d="<div>";a.html&&(d+=a.html+"&nbsp;");if(!b)b=a.end,a=j.getLineStart(j.getLineAtOffset(a.start)),b=j.getLineEnd(j.getLineAtOffset(b),!0),b=j.getText(a,b);b=b.replace(/</g,"&lt;").replace(/>/g,"&gt;");d+="<span style='vertical-align:middle;'>"+b+"</span><div>";return d}if(a.length===0)return null;var h=this._view.getModel(),j=h.getBaseModel?h.getBaseModel():h;if(a.length===1)if(h=a[0],h.title!==void 0)return c(h);
else{var a=new e.ProjectionTextModel(j),f=j.getLineStart(j.getLineAtOffset(h.start)),l=j.getCharCount();h.end!==l&&a.addProjection({start:h.end,end:l});f>0&&a.addProjection({start:0,end:f});return a}else{f="<div><em>"+b.multipleAnnotations+"</em></div>";for(l=0;l<a.length;l++)h=a[l],(h=c(h))&&(f+=h);return f}},_getNodeStyle:function(a,b,c){var e;if(a&&(e=a.style[b],!e))if(a.currentStyle){for(e=0;(e=b.indexOf("-",e))!==-1;)b=b.substring(0,e)+b.substring(e+1,e+2).toUpperCase()+b.substring(e+2);e=a.currentStyle[b]}else e=
(a=a.ownerDocument.defaultView.getComputedStyle(a,null))?a.getPropertyValue(b):null;return e||c},_isNode:function(a){return typeof Node==="object"?a instanceof Node:a&&typeof a==="object"&&typeof a.nodeType==="number"&&typeof a.nodeName==="string"}};return{Tooltip:c}});
define("orion/textview/rulers",["i18n!orion/textview/nls/messages","orion/textview/annotations","orion/textview/tooltip","orion/textview/i18nUtil"],function(b,f,a,e){function c(a,b,c,d){this._location=b||"left";this._overview=c||"page";this._rulerStyle=d;this._view=null;var e=this;this._listener={onTextModelChanged:function(a){e._onTextModelChanged(a)},onAnnotationModelChanged:function(a){e._onAnnotationModelChanged(a)}};this.setAnnotationModel(a)}function d(a,b,d,e,g){c.call(this,a,b,"page",d);this._oddStyle=
e||{style:{backgroundColor:"white"}};this._evenStyle=g||{style:{backgroundColor:"white"}};this._numOfDigits=0}function g(a,b,d){c.call(this,a,b,"page",d)}function h(a,b,d){c.call(this,a,b,"document",d)}function j(a,b,c){g.call(this,a,b,c)}c.prototype={getAnnotations:function(a,b){var c=this._annotationModel;if(!c)return[];var d=this._view.getModel(),e=d.getLineStart(a),g=d.getLineEnd(b-1),h=d;d.getBaseModel&&(h=d.getBaseModel(),e=d.mapOffset(e),g=d.mapOffset(g));for(var j=[],c=this.getAnnotationsByType(c,
e,g),e=0;e<c.length;e++)for(var g=c[e],f=h.getLineAtOffset(g.start),u=h.getLineAtOffset(Math.max(g.start,g.end-1)),v=f;v<=u;v++){var w=v;if(d!==h){w=h.getLineStart(v);w=d.mapOffset(w,!0);if(w===-1)continue;w=d.getLineAtOffset(w)}if(a<=w&&w<b){var t=this._mergeAnnotation(j[w],g,v-f,u-f+1);t&&(j[w]=t)}}if(!this._multiAnnotation&&this._multiAnnotationOverlay)for(var y in j)j[y]._multiple&&(j[y].html+=this._multiAnnotationOverlay.html);return j},getAnnotationModel:function(){return this._annotationModel},
getLocation:function(){return this._location},getOverview:function(){return this._overview},getRulerStyle:function(){return this._rulerStyle},getView:function(){return this._view},getWidestAnnotation:function(){return null},setAnnotationModel:function(a){this._annotationModel&&this._annotationModel.removEventListener("Changed",this._listener.onAnnotationModelChanged);(this._annotationModel=a)&&this._annotationModel.addEventListener("Changed",this._listener.onAnnotationModelChanged)},setMultiAnnotation:function(a){this._multiAnnotation=
a},setMultiAnnotationOverlay:function(a){this._multiAnnotationOverlay=a},setView:function(a){this._onTextModelChanged&&this._view&&this._view.removeEventListener("ModelChanged",this._listener.onTextModelChanged);this._view=a;this._onTextModelChanged&&this._view&&this._view.addEventListener("ModelChanged",this._listener.onTextModelChanged)},onClick:function(){},onDblClick:function(){},onMouseMove:function(b,c){var d=a.Tooltip.getTooltip(this._view);if(d&&!(d.isVisible()&&this._tooltipLineIndex===b)){this._tooltipLineIndex=
b;var e=this;d.setTarget({y:c.clientY,getTooltipInfo:function(){return e._getTooltipInfo(e._tooltipLineIndex,this.y)}})}},onMouseOver:function(a,b){this.onMouseMove(a,b)},onMouseOut:function(){var b=a.Tooltip.getTooltip(this._view);b&&b.setTarget(null)},_getTooltipInfo:function(a,b){if(a!==void 0){var c=this._view,d=c.getModel(),e=this._annotationModel,g=[];if(e){var g=d.getLineStart(a),h=d.getLineEnd(a);d.getBaseModel&&(g=d.mapOffset(g),h=d.mapOffset(h));g=this.getAnnotationsByType(e,g,h)}e=this._getTooltipContents(a,
g);if(!e)return null;e={contents:e,anchor:this.getLocation()};g=c.getClientArea();g.y=this.getOverview()==="document"?c.convert({y:b},"view","document").y:c.getLocationAtOffset(d.getLineStart(a)).y;c.convert(g,"document","page");e.x=g.x;e.y=g.y;e.anchor==="right"&&(e.x+=g.width);return e}},_getTooltipContents:function(a,b){return b},_onAnnotationModelChanged:function(a){function b(a){for(var g=0;g<a.length;g++)if(e.isAnnotationTypeVisible(a[g].type)){var h=a[g].start,j=a[g].end;d.getBaseModel&&(h=
d.mapOffset(h,!0),j=d.mapOffset(j,!0));h!==-1&&j!==-1&&c.redrawLines(d.getLineAtOffset(h),d.getLineAtOffset(Math.max(h,j-1))+1,e)}}var c=this._view;if(c){var d=c.getModel(),e=this,g=d.getLineCount();a.textModelChangedEvent?(a=a.textModelChangedEvent.start,d.getBaseModel&&(a=d.mapOffset(a,!0)),a=d.getLineAtOffset(a),c.redrawLines(a,g,e)):(b(a.added),b(a.removed),b(a.changed))}},_mergeAnnotation:function(a,b,c){a||(a={});if(c===0)if(a.html&&b.html){if(b.html!==a.html&&!a._multiple&&this._multiAnnotation)a.html=
this._multiAnnotation.html;a._multiple=!0}else a.html=b.html;a.style=this._mergeStyle(a.style,b.style);return a},_mergeStyle:function(a,b){if(b){a||(a={});a.styleClass&&b.styleClass&&a.styleClass!==b.styleClass?a.styleClass+=" "+b.styleClass:a.styleClass=b.styleClass;var c;if(b.style){if(!a.style)a.style={};for(c in b.style)a.style[c]||(a.style[c]=b.style[c])}if(b.attributes){if(!a.attributes)a.attributes={};for(c in b.attributes)a.attributes[c]||(a.attributes[c]=b.attributes[c])}}return a}};f.AnnotationTypeList.addMixin(c.prototype);
d.prototype=new c;d.prototype.getAnnotations=function(a,b){for(var d=c.prototype.getAnnotations.call(this,a,b),e=this._view.getModel(),g=a;g<b;g++){var h=g&1?this._oddStyle:this._evenStyle,j=g;e.getBaseModel&&(j=e.getLineStart(j),j=e.getBaseModel().getLineAtOffset(e.mapOffset(j)));d[g]||(d[g]={});d[g].html=j+1+"";if(!d[g].style)d[g].style=h}return d};d.prototype.getWidestAnnotation=function(){var a=this._view.getModel().getLineCount();return this.getAnnotations(a-1,a)[a-1]};d.prototype._onTextModelChanged=
function(a){var a=a.start,b=this._view.getModel(),c=((b.getBaseModel?b.getBaseModel().getLineCount():b.getLineCount())+"").length;if(this._numOfDigits!==c)this._numOfDigits=c,this._view.redrawLines(b.getLineAtOffset(a),b.getLineCount(),this)};g.prototype=new c;h.prototype=new c;h.prototype.getRulerStyle=function(){var a={style:{lineHeight:"1px",fontSize:"1px"}};return a=this._mergeStyle(a,this._rulerStyle)};h.prototype.onClick=function(a){a!==void 0&&this._view.setTopIndex(a)};h.prototype._getTooltipContents=
function(a,d){if(d.length===0){var g=this._view.getModel(),h=a;g.getBaseModel&&(h=g.getLineStart(h),h=g.getBaseModel().getLineAtOffset(g.mapOffset(h)));return e.formatMessage(b.line,h+1)}return c.prototype._getTooltipContents.call(this,a,d)};h.prototype._mergeAnnotation=function(a,b,c,d){if(c===0){if(!a)a={html:"&nbsp;",style:{style:{height:3*d+"px"}}},a.style=this._mergeStyle(a.style,b.overviewStyle);return a}};j.prototype=new g;j.prototype.onClick=function(b){if(b!==void 0){var c=this._annotationModel;
if(c){var d=this._view.getModel(),e=d.getLineStart(b),b=d.getLineEnd(b,!0);d.getBaseModel&&(e=d.mapOffset(e),b=d.mapOffset(b),d=d.getBaseModel());for(var g,c=c.getAnnotations(e,b);!g&&c.hasNext();)b=c.next(),this.isAnnotationTypeVisible(b.type)&&(g=b);g&&d.getLineAtOffset(g.start)===d.getLineAtOffset(e)&&((d=a.Tooltip.getTooltip(this._view))&&d.setTarget(null),g.expanded?g.collapse():g.expand(),this._annotationModel.modifyAnnotation(g))}}};j.prototype._getTooltipContents=function(a,b){return b.length===
1&&b[0].expanded?null:g.prototype._getTooltipContents.call(this,a,b)};j.prototype._onAnnotationModelChanged=function(a){function b(a){for(h=0;h<a.length;h++)if(e.isAnnotationTypeVisible(a[h].type)){var c=a[h].start;d.getBaseModel&&(c=d.mapOffset(c,!0));c!==-1&&(f=Math.min(f,d.getLineAtOffset(c)))}}if(a.textModelChangedEvent)g.prototype._onAnnotationModelChanged.call(this,a);else{var c=this._view;if(c){var d=c.getModel(),e=this,h,j=d.getLineCount(),f=j;b(a.added);b(a.removed);b(a.changed);a=c.getRulers();
for(h=0;h<a.length;h++)c.redrawLines(f,j,a[h])}}};return{Ruler:c,AnnotationRuler:g,LineNumberRuler:d,OverviewRuler:h,FoldingRuler:j}});
define("orion/editor/editorFeatures","i18n!orion/editor/nls/messages,orion/textview/undoStack,orion/textview/keyBinding,orion/textview/rulers,orion/textview/annotations,orion/textview/tooltip,orion/textview/textDND,orion/editor/regex,orion/textview/i18nUtil".split(","),function(b,f,a,e,c,d,g,h,j){function k(){}function l(){}function n(){}function o(){}function m(){}function p(a,b,c){this.editor=a;this.textView=a.getTextView();this.undoStack=b;this._incrementalFindActive=!1;this._incrementalFindSuccess=
!0;this._incrementalFindIgnoreSelection=!1;this._incrementalFindPrefix="";this._searcher=c;this._lastEditLocation=null;this.init()}function q(a,b,c,d){this.editor=a;this.textView=a.getTextView();this.undoStack=b;this.contentAssist=c;this.linkedMode=d;this.contentAssist&&this.contentAssist.addEventListener("ProposalApplied",this.contentAssistProposalApplied.bind(this));this.init()}function r(a){this.editor=a;this.textView=a.getTextView();this.linkedModeActive=!1;this.linkedModePositions=[];this.linkedModeEscapePosition=
this.linkedModeCurrentPositionIndex=0;this.linkedModeListener={onVerify:function(a){for(var b=!1,c=0,d=0;d<this.linkedModePositions.length;++d){var e=this.linkedModePositions[d];if(b)e.offset+=c;else if(a.start>=e.offset&&a.end<=e.offset+e.length)b=e.length,e.length=a.start-e.offset+a.text.length+(e.offset+e.length-a.end),c=e.length-b,b=!0}b?this.linkedModeEscapePosition+=c:this.cancel()}.bind(this)}}k.prototype={createUndoStack:function(c){var c=c.getTextView(),d=new f.UndoStack(c,200);c.setKeyBinding(new a.KeyBinding("z",
!0),"undo");c.setAction("undo",function(){d.undo();return!0},{name:b.undo});var e=navigator.platform.indexOf("Mac")!==-1;c.setKeyBinding(e?new a.KeyBinding("z",!0,!0):new a.KeyBinding("y",!0),"redo");c.setAction("redo",function(){d.redo();return!0},{name:b.redo});return d}};l.prototype={createLineNumberRuler:function(a){return new e.LineNumberRuler(a,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"})}};n.prototype={createFoldingRuler:function(a){return new e.FoldingRuler(a,
"left",{styleClass:"ruler folding"})}};o.prototype={createAnnotationModel:function(a){return new c.AnnotationModel(a)},createAnnotationStyler:function(a,b){return new c.AnnotationStyler(a,b)},createAnnotationRulers:function(a){var b=new e.AnnotationRuler(a,"left",{styleClass:"ruler annotations"}),a=new e.OverviewRuler(a,"right",{styleClass:"ruler overview"});return{annotationRuler:b,overviewRuler:a}}};m.prototype={createTextDND:function(a,b){return new g.TextDND(a.getTextView(),b)}};p.prototype={init:function(){var e=
this;this._incrementalFindListener={onVerify:function(a){var c=e.editor,d=c.getModel(),g=c.mapOffset(a.start),f=c.mapOffset(a.end),g=d.getText(g,f),d=e._incrementalFindPrefix;if((d=d.match(RegExp("^"+h.escape(g),"i")))&&d.length>0)d=e._incrementalFindPrefix+=a.text,e.editor.reportStatus(j.formatMessage(b.incrementalFind,d)),g=c.getSelection().start,(g=c.getModel().find({string:d,start:g,caseInsensitive:d.toLowerCase()===d}).next())?(e._incrementalFindSuccess=!0,e._incrementalFindIgnoreSelection=!0,
c.moveSelection(g.start,g.end),e._incrementalFindIgnoreSelection=!1):(c.reportStatus(j.formatMessage(b.incrementalFindNotFound,d),"error"),e._incrementalFindSuccess=!1),a.text=null},onSelection:function(){e._incrementalFindIgnoreSelection||e.toggleIncrementalFind()}};this._lastEditListener={onModelChanged:function(a){if(e.editor.isDirty())e._lastEditLocation=a.start+a.addedCharCount}};this.textView.addEventListener("ModelChanged",this._lastEditListener.onModelChanged);this.textView.setKeyBinding(new a.KeyBinding("k",
!0),"findNext");this.textView.setAction("findNext",function(){if(this._searcher){var a=this.textView.getSelection();a.start<a.end?this._searcher.findNext(!0,this.textView.getText(a.start,a.end)):this._searcher.findNext(!0);return!0}return!1}.bind(this),{name:b.findNext});this.textView.setKeyBinding(new a.KeyBinding("k",!0,!0),"findPrevious");this.textView.setAction("findPrevious",function(){if(this._searcher){var a=this.textView.getSelection();a.start<a.end?this._searcher.findNext(!1,this.textView.getText(a.start,
a.end)):this._searcher.findNext(!1);return!0}return!1}.bind(this),{name:b.findPrevious});this.textView.setKeyBinding(new a.KeyBinding("j",!0),"incrementalFind");this.textView.setAction("incrementalFind",function(){if(this._searcher&&this._searcher.visible())return!0;var a=this.editor;if(this._incrementalFindActive){var c=this._incrementalFindPrefix;if(c.length!==0){var d;d=0;this._incrementalFindSuccess&&(d=a.getSelection().start+1);(d=a.getModel().find({string:c,start:d,caseInsensitive:c.toLowerCase()===
c}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.moveSelection(d.start,d.end),this._incrementalFindIgnoreSelection=!1,a.reportStatus(j.formatMessage(b.incrementalFind,c))):(a.reportStatus(j.formatMessage(b.incrementalFindNotFound,c),"error"),this._incrementalFindSuccess=!1)}}else a.setCaretOffset(a.getCaretOffset()),this.toggleIncrementalFind();return!0}.bind(this),{name:b.incrementalFindKey});this.textView.setAction("deletePrevious",function(){if(this._incrementalFindActive){var a=
this.editor,c=this._incrementalFindPrefix,c=this._incrementalFindPrefix=c.substring(0,c.length-1);if(c.length===0)return this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.setCaretOffset(a.getSelection().start),this._incrementalFindIgnoreSelection=!1,this.toggleIncrementalFind(),!0;a.reportStatus(j.formatMessage(b.incrementalFind,c));var d=a.getModel().find({string:c,start:a.getCaretOffset()-c.length-1,reverse:!0,caseInsensitive:c.toLowerCase()===c}).next();d?(this._incrementalFindIgnoreSelection=
this._incrementalFindSuccess=!0,a.moveSelection(d.start,d.end),this._incrementalFindIgnoreSelection=!1):a.reportStatus(j.formatMessage(b.incrementalFindNotFound,c),"error");return!0}return!1}.bind(this));this.textView.setAction("tab",function(){if(this.textView.getOptions("tabMode")){var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),e=b.getLineAtOffset(c.end>c.start?c.end-1:c.end);if(d!==e){var g=[];g.push("");for(var h=d;h<=e;h++)g.push(b.getLine(h,!0));var h=b.getLineStart(d),
b=b.getLineEnd(e,!0),j=this.textView.getOptions("tabSize","expandTab"),j=j.expandTab?Array(j.tabSize+1).join(" "):"\t";a.setText(g.join(j),h,b);a.setSelection(h===c.start?c.start:c.start+j.length,c.end+(e-d+1)*j.length);return!0}a=a.getKeyModes();for(c=0;c<a.length;c++)if(a[c].isActive())return a[c].tab();return!1}}.bind(this));this.textView.setAction("shiftTab",function(){if(this.textView.getOptions("tabMode")){for(var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),
e=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=this.textView.getOptions("tabSize"),h=Array(g+1).join(" "),j=[],f=0,k=0,l=d;l<=e;l++){var n=b.getLine(l,!0);if(b.getLineStart(l)!==b.getLineEnd(l))if(n.indexOf("\t")===0)n=n.substring(1),f++;else if(n.indexOf(h)===0)n=n.substring(g),f+=g;else return!0;l===d&&(k=f);j.push(n)}d=b.getLineStart(d);g=b.getLineEnd(e,!0);b=b.getLineStart(e);a.setText(j.join(""),d,g);j=d===c.start?c.start:c.start-k;c=Math.max(j,c.end-f+(c.end===b+1&&c.start!==c.end?1:0));
a.setSelection(j,c);return!0}}.bind(this),{name:b.unindentLines});this.textView.setKeyBinding(new a.KeyBinding(38,!1,!1,!0),"moveLinesUp");this.textView.setAction("moveLinesUp",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start);if(d===0)return!0;var e=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=b.getLineCount(),c=b.getLineStart(d-1),h=b.getLineStart(d),j=b.getLineEnd(e,!0),f=b.getText(h,j),k=0;e===g-1&&(e=b.getLineEnd(d-1),d=b.getLineEnd(d-1,!0),f+=b.getText(e,
d),h=e,k=d-e);this.startUndo();a.setText("",h,j);a.setText(f,c,c);a.setSelection(c,c+f.length-k);this.endUndo();return!0}.bind(this),{name:b.moveLinesUp});this.textView.setKeyBinding(new a.KeyBinding(40,!1,!1,!0),"moveLinesDown");this.textView.setAction("moveLinesDown",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),e=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=b.getLineCount();if(e===g-1)return!0;var d=b.getLineStart(d),c=b.getLineEnd(e,!0),h=b.getLineEnd(e+
1,!0)-(c-d),j=0;e!==g-2?b=b.getText(d,c):(e=b.getLineEnd(e),b=b.getText(e,c)+b.getText(d,e),j+=c-e);this.startUndo();a.setText("",d,c);a.setText(b,h,h);a.setSelection(h+j,h+j+b.length);this.endUndo();return!0}.bind(this),{name:b.moveLinesDown});this.textView.setKeyBinding(new a.KeyBinding(38,!0,!1,!0),"copyLinesUp");this.textView.setAction("copyLinesUp",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),d=b.getLineStart(d),
e=b.getLineEnd(c,!0),g=b.getLineCount(),h="",e=b.getText(d,e);c===g-1&&(e+=h=b.getLineDelimiter());a.setText(e,d,d);a.setSelection(d,d+e.length-h.length);return!0}.bind(this),{name:b.copyLinesUp});this.textView.setKeyBinding(new a.KeyBinding(40,!0,!1,!0),"copyLinesDown");this.textView.setAction("copyLinesDown",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),e=b.getLineStart(d),d=b.getLineEnd(c,!0),g=b.getLineCount(),
h="",e=b.getText(e,d);c===g-1&&(e=(h=b.getLineDelimiter())+e);a.setText(e,d,d);a.setSelection(d+h.length,d+e.length);return!0}.bind(this),{name:b.copyLinesDown});this.textView.setKeyBinding(new a.KeyBinding("d",!0,!1,!1),"deleteLines");this.textView.setAction("deleteLines",function(){var a=this.editor,b=a.getSelection(),c=a.getModel(),d=c.getLineAtOffset(b.start),b=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),d=c.getLineStart(d),c=c.getLineEnd(b,!0);a.setText("",d,c);return!0}.bind(this),{name:b.deleteLines});
this.textView.setKeyBinding(new a.KeyBinding("l",!0),"gotoLine");this.textView.setAction("gotoLine",function(){var a=this.editor,c=a.getModel().getLineAtOffset(a.getCaretOffset());if(c=prompt(b.gotoLinePrompty,c+1))c=parseInt(c,10),a.onGotoLine(c-1,0);return!0}.bind(this),{name:b.gotoLine});this.textView.setKeyBinding(new a.KeyBinding(190,!0),"nextAnnotation");this.textView.setAction("nextAnnotation",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;for(var e=a.getModel(),g=a.getCaretOffset(),
b=b.getAnnotations(g,e.getCharCount());b.hasNext();){var h=b.next();if(!(h.start<=g)&&!(h.type!==c.AnnotationType.ANNOTATION_ERROR&&h.type!==c.AnnotationType.ANNOTATION_WARNING&&h.type!==c.AnnotationType.ANNOTATION_TASK&&h.type!==c.AnnotationType.ANNOTATION_BOOKMARK)){var j=d.Tooltip.getTooltip(this.textView);if(!j){a.moveSelection(h.start);break}var f=e.getLineAtOffset(h.start),k=this.textView;a.moveSelection(h.start,h.start,function(){setTimeout(function(){j.setTarget({getTooltipInfo:function(){var a=
k.convert({x:k.getLocationAtOffset(h.start).x,y:k.getLocationAtOffset(e.getLineStart(f)).y},"document","page");return{contents:[h],x:a.x,y:a.y+Math.floor(k.getLineHeight(f)*1.33)}}},0)},0)});break}}return!0}.bind(this),{name:b.nextAnnotation});this.textView.setKeyBinding(new a.KeyBinding(188,!0),"previousAnnotation");this.textView.setAction("previousAnnotation",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;for(var e=a.getModel(),g=a.getCaretOffset(),b=b.getAnnotations(0,g),
h=null;b.hasNext();){var j=b.next();j.start>=g||j.type!==c.AnnotationType.ANNOTATION_ERROR&&j.type!==c.AnnotationType.ANNOTATION_WARNING&&j.type!==c.AnnotationType.ANNOTATION_TASK&&j.type!==c.AnnotationType.ANNOTATION_BOOKMARK||(h=j)}if(h){var f=e.getLineAtOffset(h.start),k=d.Tooltip.getTooltip(this.textView);if(!k)return a.moveSelection(h.start),!0;var l=this.textView;a.moveSelection(h.start,h.start,function(){setTimeout(function(){k.setTarget({getTooltipInfo:function(){var a=l.convert({x:l.getLocationAtOffset(h.start).x,
y:l.getLocationAtOffset(e.getLineStart(f)).y},"document","page");return{contents:[h],x:a.x,y:a.y+Math.floor(l.getLineHeight(f)*1.33)}}},0)},0)})}return!0}.bind(this),{name:b.prevAnnotation});this.textView.setKeyBinding(new a.KeyBinding("e",!0,!1,!0,!1),"expand");this.textView.setAction("expand",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;var d=a.getModel(),a=a.getCaretOffset(),e=d.getLineAtOffset(a),a=d.getLineStart(e),e=d.getLineEnd(e,!0);d.getBaseModel&&(a=d.mapOffset(a),
e=d.mapOffset(e),d.getBaseModel());for(var g,d=b.getAnnotations(a,e);!g&&d.hasNext();)a=d.next(),a.type===c.AnnotationType.ANNOTATION_FOLDING&&(a.expanded||(g=a));g&&!g.expanded&&(g.expand(),b.modifyAnnotation(g));return!0}.bind(this),{name:b.expand});this.textView.setKeyBinding(new a.KeyBinding("c",!0,!1,!0,!1),"collapse");this.textView.setAction("collapse",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;var d=a.getModel(),e=a.getCaretOffset(),g=d.getLineAtOffset(e),e=d.getLineStart(g),
g=d.getLineEnd(g,!0);d.getBaseModel&&(e=d.mapOffset(e),g=d.mapOffset(g),d.getBaseModel());for(var h,d=b.getAnnotations(e,g);!h&&d.hasNext();)e=d.next(),e.type===c.AnnotationType.ANNOTATION_FOLDING&&(h=e);h&&h.expanded&&(a.setCaretOffset(h.start),h.collapse(),b.modifyAnnotation(h));return!0}.bind(this),{name:b.collapse});this.textView.setKeyBinding(new a.KeyBinding("e",!0,!0,!0,!1),"expandAll");this.textView.setAction("expandAll",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;
var a=a.getModel(),d=b.getAnnotations(0,a.getCharCount());for(this.textView.setRedraw(!1);d.hasNext();)a=d.next(),a.type===c.AnnotationType.ANNOTATION_FOLDING&&!a.expanded&&(a.expand(),b.modifyAnnotation(a));this.textView.setRedraw(!0);return!0}.bind(this),{name:b.expandAll});this.textView.setKeyBinding(new a.KeyBinding("c",!0,!0,!0,!1),"collapseAll");this.textView.setAction("collapseAll",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;var a=a.getModel(),d=b.getAnnotations(0,
a.getCharCount());for(this.textView.setRedraw(!1);d.hasNext();)a=d.next(),a.type===c.AnnotationType.ANNOTATION_FOLDING&&a.expanded&&(a.collapse(),b.modifyAnnotation(a));this.textView.setRedraw(!0);return!0}.bind(this),{name:b.collapseAll});var g=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding("q",!g,!1,!1,g),"lastEdit");this.textView.setAction("lastEdit",function(){typeof this._lastEditLocation==="number"&&this.editor.showSelection(this._lastEditLocation);return!0}.bind(this),
{name:b.lastEdit})},toggleIncrementalFind:function(){(this._incrementalFindActive=!this._incrementalFindActive)?(this.editor.reportStatus(j.formatMessage(b.incrementalFind,this._incrementalFindPrefix)),this.textView.addEventListener("Verify",this._incrementalFindListener.onVerify),this.textView.addEventListener("Selection",this._incrementalFindListener.onSelection)):(this._incrementalFindPrefix="",this.editor.reportStatus(""),this.textView.removeEventListener("Verify",this._incrementalFindListener.onVerify),
this.textView.removeEventListener("Selection",this._incrementalFindListener.onSelection),this.textView.setCaretOffset(this.textView.getCaretOffset()))},startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()},cancel:function(){this.toggleIncrementalFind()},isActive:function(){return this._incrementalFindActive},isStatusActive:function(){return this._incrementalFindActive},lineUp:function(){if(this._incrementalFindActive){var a=
this._incrementalFindPrefix;if(a.length===0)return!1;var c=this.editor,d=c.getModel(),d=this._incrementalFindSuccess?c.getCaretOffset()-a.length-1:d.getCharCount()-1;(d=c.getModel().find({string:a,start:d,reverse:!0,caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,c.moveSelection(d.start,d.end),this._incrementalFindIgnoreSelection=!1,c.reportStatus(j.formatMessage(b.incrementalFind,a))):(c.reportStatus(j.formatMessage(b.incrementalFindNotFound,
a),"error"),this._incrementalFindSuccess=!1);return!0}return!1},lineDown:function(){if(this._incrementalFindActive){var a=this._incrementalFindPrefix;if(a.length===0)return!1;var c=this.editor,d=0;this._incrementalFindSuccess&&(d=c.getSelection().start+1);(d=c.getModel().find({string:a,start:d,caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,c.moveSelection(d.start,d.end),this._incrementalFindIgnoreSelection=!1,c.reportStatus(j.formatMessage(b.incrementalFind,
a))):(c.reportStatus(j.formatMessage(b.incrementalFindNotFound,a),"error"),this._incrementalFindSuccess=!1);return!0}return!1},enter:function(){return!1}};q.prototype={startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()},init:function(){function c(a,b,d){var e=a.getLineAtOffset(b),g=a.getLineAtOffset(d),h,j,f,k,l,n;for(h=e;h>=0;h--)if(j=a.getLine(h),f=h===e?b-a.getLineStart(e):j.length,k=j.lastIndexOf("/*",
f),j=j.lastIndexOf("*/",f),j>k)break;else if(k!==-1){l=a.getLineStart(h)+k;break}for(h=g;h<a.getLineCount();h++)if(j=a.getLine(h),f=h===g?d-a.getLineStart(g):0,k=j.indexOf("/*",f),j=j.indexOf("*/",f),k!==-1&&k<j)break;else if(j!==-1){n=a.getLineStart(h)+j;break}return{commentStart:l,commentEnd:n}}this.textView.setAction("lineStart",function(){for(var a=this.editor,b=a.getModel(),c=a.getCaretOffset(),d=b.getLineAtOffset(c),e=b.getLineStart(d),b=b.getLine(d),d=0;d<b.length;d++){var g=b.charCodeAt(d);
if(!(g===32||g===9))break}d+=e;return c!==d?(a.setSelection(d,d),!0):!1}.bind(this));this.textView.setKeyBinding(new a.KeyBinding(191,!0),"toggleLineComment");this.textView.setAction("toggleLineComment",function(){for(var a=this.editor,b=a.getModel(),c=a.getSelection(),d=b.getLineAtOffset(c.start),e=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),g=!0,h=[],j,f,k=d;k<=e;k++)if(j=b.getLine(k,!0),h.push(j),!g||(f=j.indexOf("//"))===-1)g=!1;else if(f!==0){var l;for(l=0;l<f;l++)if(g=j.charCodeAt(l),!(g===
32||g===9))break;g=l===f}k=b.getLineStart(d);l=b.getLineEnd(e,!0);if(g){for(g=0;g<h.length;g++)j=h[g],f=j.indexOf("//"),h[g]=j.substring(0,f)+j.substring(f+2);h=h.join("");j=b.getLineStart(e);b=k===c.start?c.start:c.start-2;c=c.end-2*(e-d+1)+(c.end===j+1?2:0)}else h.splice(0,0,""),h=h.join("//"),b=k===c.start?c.start:c.start+2,c=c.end+2*(e-d+1);a.setText(h,k,l);a.setSelection(b,c);return!0}.bind(this),{name:b.toggleLineComment});var d=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding(191,
!0,!d,!1,d),"addBlockComment");this.textView.setAction("addBlockComment",function(){var a=this.editor,b=a.getModel(),d=a.getSelection(),e=RegExp("/\\*|\\*/","g"),g=c(b,d.start,d.end);if(g.commentStart!==void 0&&g.commentEnd!==void 0)return!0;b=b.getText(d.start,d.end);if(b.length===0)return!0;g=b.length;b=b.replace(e,"");e=b.length;a.setText("/*"+b+"*/",d.start,d.end);a.setSelection(d.start+2,d.end+2+(e-g));return!0}.bind(this),{name:b.addBlockComment});this.textView.setKeyBinding(new a.KeyBinding(220,
!0,!d,!1,d),"removeBlockComment");this.textView.setAction("removeBlockComment",function(){var a=this.editor,b=a.getModel(),d=a.getSelection(),e=b.getText(d.start,d.end),g,h,j;for(j=0;j<e.length;j++)if(e.substring(j,j+2)==="/*"){g=d.start+j;break}for(;j<e.length;j++)if(e.substring(j,j+2)==="*/"){h=d.start+j;break}if(g!==void 0&&h!==void 0)a.setText(b.getText(g+2,h),g,h+2),a.setSelection(g,h);else{e=c(b,d.start,d.end);if(e.commentStart===void 0||e.commentEnd===void 0)return!0;b=b.getText(e.commentStart+
2,e.commentEnd);a.setText(b,e.commentStart,e.commentEnd+2);a.setSelection(d.start-2,d.end-2)}return!0}.bind(this),{name:b.removeBlockComment})},contentAssistProposalApplied:function(a){a=a.data.proposal;if(a.positions&&this.linkedMode){for(var b=[],c=0;c<a.positions.length;++c)b[c]={positions:[{offset:a.positions[c].offset,length:a.positions[c].length}]};this.linkedMode.enterLinkedMode({groups:b,escapePosition:a.escapePosition})}else a.escapePosition&&this.textView.setCaretOffset(a.escapePosition);
return!0},cancel:function(){return!1},isActive:function(){return!0},isStatusActive:function(){return!1},lineUp:function(){return!1},lineDown:function(){return!1},enter:function(){var a=this.editor,b=a.getSelection();if(b.start===b.end){for(var c=a.getModel(),d=c.getLineAtOffset(b.start),e=c.getLine(d,!0),g=c.getLineStart(d),d=0,g=b.start-g,h;d<g&&((h=e.charCodeAt(d))===32||h===9);)d++;if(d>0){for(var j=e.substring(0,d),d=g;d<e.length&&((h=e.charCodeAt(d++))===32||h===9);)b.end++;a.setText(c.getLineDelimiter()+
j,b.start,b.end);return!0}}return!1},tab:function(){return!1}};r.prototype={enterLinkedMode:function(c){if(!this.linkedModeActive){this.linkedModeActive=!0;this.linkedModePositions=[];for(var d=0;d<c.groups.length;++d){var e=c.groups[d];this.linkedModePositions[d]={offset:e.positions[0].offset,length:e.positions[0].length}}this.linkedModeEscapePosition=c.escapePosition;this.linkedModeCurrentPositionIndex=0;this.selectTextForLinkedModePosition(this.linkedModePositions[this.linkedModeCurrentPositionIndex]);
this.textView.addEventListener("Verify",this.linkedModeListener.onVerify);this.textView.setKeyBinding(new a.KeyBinding(9),"nextLinkedModePosition");this.textView.setAction("nextLinkedModePosition",function(){this.linkedModeCurrentPositionIndex=++this.linkedModeCurrentPositionIndex%this.linkedModePositions.length;this.selectTextForLinkedModePosition(this.linkedModePositions[this.linkedModeCurrentPositionIndex]);return!0}.bind(this));this.textView.setKeyBinding(new a.KeyBinding(9,!1,!0),"previousLinkedModePosition");
this.textView.setAction("previousLinkedModePosition",function(){this.linkedModeCurrentPositionIndex=this.linkedModeCurrentPositionIndex>0?this.linkedModeCurrentPositionIndex-1:this.linkedModePositions.length-1;this.selectTextForLinkedModePosition(this.linkedModePositions[this.linkedModeCurrentPositionIndex]);return!0}.bind(this));this.editor.reportStatus(b.linkedModeEntered,null,!0)}},isActive:function(){return this.linkedModeActive},isStatusActive:function(){return this.linkedModeActive},enter:function(){this.cancel();
return!0},cancel:function(c){if(this.linkedModeActive)this.linkedModeActive=!1,this.textView.removeEventListener("Verify",this.linkedModeListener.onVerify),this.textView.setKeyBinding(new a.KeyBinding(9),"tab"),this.textView.setKeyBinding(new a.KeyBinding(9,!1,!0),"shiftTab"),c||this.textView.setCaretOffset(this.linkedModeEscapePosition,!1),this.editor.reportStatus(b.linkedModeExited,null,!0)},lineUp:function(){this.cancel(!0);return!1},lineDown:function(){this.cancel(!0);return!1},selectTextForLinkedModePosition:function(a){this.textView.setSelection(a.offset,
a.offset+a.length)}};return{UndoFactory:k,LineNumberRulerFactory:l,FoldingRulerFactory:n,AnnotationFactory:o,TextDNDFactory:m,TextActions:p,SourceCodeActions:q,LinkedMode:r}});
define("orion/editor/editor","i18n!orion/editor/nls/messages,orion/textview/keyBinding,orion/textview/eventTarget,orion/textview/tooltip,orion/textview/annotations,orion/textview/i18nUtil".split(","),function(b,f,a,e,c,d){function g(a){this._textViewFactory=a.textViewFactory;this._undoStackFactory=a.undoStackFactory;this._textDNDFactory=a.textDNDFactory;this._annotationFactory=a.annotationFactory;this._foldingRulerFactory=a.foldingRulerFactory;this._lineNumberRulerFactory=a.lineNumberRulerFactory;
this._contentAssistFactory=a.contentAssistFactory;this._keyBindingFactory=a.keyBindingFactory;this._statusReporter=a.statusReporter;this._domNode=a.domNode;this._foldingRuler=this._overviewRuler=this._lineNumberRuler=this._annotationRuler=this._annotationModel=this._annotationStyler=null;this._dirty=!1;this._title=this._contentAssist=null;this._keyModes=[]}function h(a){var b=this,c=Array.prototype.slice.call(arguments,1);return c.length?function(){return arguments.length?b.apply(a,c.concat(Array.prototype.slice.call(arguments))):
b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}var j;g.prototype={getAnnotationModel:function(){return this._annotationModel},getAnnotationRuler:function(){return this._annotationRuler},getAnnotationStyler:function(){return this._annotationStyler},getFoldingRuler:function(){return this._foldingRuler},getLineNumberRuler:function(){return this._lineNumberRuler},getModel:function(){var a=this._textView.getModel();a.getBaseModel&&(a=a.getBaseModel());return a},getOverviewRuler:function(){return this._overviewRuler},
getTextView:function(){return this._textView},getTitle:function(){return this._title},getKeyModes:function(){return this._keyModes},isDirty:function(){return this._dirty},setAnnotationRulerVisible:function(a){if(this._annotationRulerVisible!==a&&(this._annotationRulerVisible=a,this._annotationRuler)){var b=this._textView;a?b.addRuler(this._annotationRuler,0):b.removeRuler(this._annotationRuler)}},setFoldingRulerVisible:function(a){if(this._foldingRulerVisible!==a&&(this._foldingRulerVisible=a,this._foldingRuler)){var b=
this._textView;b.getModel().getBaseModel&&(a?b.addRuler(this._foldingRuler,100):b.removeRuler(this._foldingRuler))}},setDirty:function(a){if(this._dirty!==a)this._dirty=a,this.onDirtyChanged({type:"DirtyChanged"})},setLineNumberRulerVisible:function(a){if(this._lineNumberRulerVisible!==a&&(this._lineNumberRulerVisible=a,this._lineNumberRuler)){var b=this._textView;a?b.addRuler(this._lineNumberRuler,1):b.removeRuler(this._lineNumberRuler)}},setOverviewRulerVisible:function(a){if(this._overviewRulerVisible!==
a&&(this._overviewRulerVisible=a,this._overviewRuler)){var b=this._textView;a?b.addRuler(this._overviewRuler):b.removeRuler(this._overviewRuler)}},mapOffset:function(a,b){var c=this._textView.getModel();c.getBaseModel&&(a=c.mapOffset(a,b));return a},getCaretOffset:function(){return this.mapOffset(this._textView.getCaretOffset())},getSelection:function(){var a=this._textView,b=a.getSelection(),a=a.getModel();if(a.getBaseModel)b.start=a.mapOffset(b.start),b.end=a.mapOffset(b.end);return b},getText:function(a,
b){var c=this._textView.getModel();c.getBaseModel&&(c=c.getBaseModel());return c.getText(a,b)},_expandOffset:function(a){var b=this._textView.getModel(),d=this._annotationModel;if(d&&b.getBaseModel)for(a=d.getAnnotations(a,a+1);a.hasNext();)b=a.next(),b.type===c.AnnotationType.ANNOTATION_FOLDING&&b.expand&&(b.expand(),d.modifyAnnotation(b))},setCaretOffset:function(a){var b=this._textView,c=b.getModel();c.getBaseModel&&(this._expandOffset(a),a=c.mapOffset(a,!0));b.setCaretOffset(a)},setText:function(a,
b,c){var d=this._textView,e=d.getModel();e.getBaseModel&&(b!==void 0&&(this._expandOffset(b),b=e.mapOffset(b,!0)),c!==void 0&&(this._expandOffset(c),c=e.mapOffset(c,!0)));d.setText(a,b,c)},setFoldingEnabled:function(a){this.setFoldingRulerVisible(a)},setSelection:function(a,b,c){var d=this._textView,e=d.getModel();e.getBaseModel&&(this._expandOffset(a),this._expandOffset(b),a=e.mapOffset(a,!0),b=e.mapOffset(b,!0));d.setSelection(a,b,c)},moveSelection:function(a,b,c,d){var e=this._textView;this.setSelection(a,
b||a,!1);var b=e.getTopPixel(),g=e.getBottomPixel(),a=this.getModel().getLineAtOffset(a),a=e.getLinePixel(a);a<b||a>g?(g=Math.max(0,a-Math.floor((a<b?3:1)*(g-b)/4)),(new j({node:e,duration:300,curve:[b,g],onAnimate:function(a){e.setTopPixel(Math.floor(a))},onEnd:function(){e.showSelection();(d===void 0||d)&&e.focus();c&&c()}})).play()):(e.showSelection(),(d===void 0||d)&&e.focus(),c&&c())},checkDirty:function(){this.setDirty(!this._undoStack.isClean())},reportStatus:function(a,b,c){this._statusReporter?
this._statusReporter(a,b,c):window.alert(b==="error"?"ERROR: "+a:a)},_getTooltipInfo:function(a,b){var c=this._textView,d=this.getAnnotationModel();if(!d)return null;var e=this._annotationStyler;if(!e)return null;var g=c.getOffsetAtLocation(a,b);if(g===-1)return null;g=this.mapOffset(g);e=e.getAnnotationsByType(d,g,g+1);d=[];for(g=0;g<e.length;g++)e[g].rangeStyle&&d.push(e[g]);if(d.length===0)return null;c=c.convert({x:a,y:b},"document","page");return{contents:d,anchor:"left",x:c.x+10,y:c.y+20}},
_highlightCurrentLine:function(a,b){var d=this._annotationModel;if(d){var e=this._textView.getModel(),g=b?e.getLineAtOffset(b.start):-1,h=e.getLineAtOffset(a.start),j=a.start===a.end,f=!b||b.start===b.end,s=e.getLineStart(h),u=e.getLineEnd(h);e.getBaseModel&&(s=e.mapOffset(s),u=e.mapOffset(u));e=this._currentLineAnnotation;if(!(g===h&&f&&j&&e&&e.start===s&&e.end===u)){var g=e?[e]:null,v;j&&(e=c.AnnotationType.createAnnotation(c.AnnotationType.ANNOTATION_CURRENT_LINE,s,u),v=[e]);this._currentLineAnnotation=
e;d.replaceAnnotations(g,v)}}},installTextView:function(){this._textView=this._textViewFactory();if(this._undoStackFactory)this._undoStack=this._undoStackFactory.createUndoStack(this);if(this._textDNDFactory)this._textDND=this._textDNDFactory.createTextDND(this,this._undoStack);if(this._contentAssistFactory){var a=this._contentAssistFactory.createContentAssistMode(this);this._keyModes.push(a);this._contentAssist=a.getContentAssist()}var d=this,g=this._textView,h=this;this._listener={onModelChanged:function(){h.checkDirty()},
onMouseOver:function(a){h._listener.onMouseMove(a)},onMouseMove:function(a){var b=e.Tooltip.getTooltip(g);b&&b.setTarget({x:a.x,y:a.y,getTooltipInfo:function(){return h._getTooltipInfo(this.x,this.y)}})},onMouseOut:function(){var a=e.Tooltip.getTooltip(g);a&&a.setTarget(null)},onSelection:function(a){h._updateCursorStatus();h._highlightCurrentLine(a.newValue,a.oldValue)}};g.addEventListener("ModelChanged",this._listener.onModelChanged);g.addEventListener("Selection",this._listener.onSelection);g.addEventListener("MouseOver",
this._listener.onMouseOver);g.addEventListener("MouseOut",this._listener.onMouseOut);g.addEventListener("MouseMove",this._listener.onMouseMove);this._keyBindingFactory&&this._keyBindingFactory(this,this._keyModes,this._undoStack,this._contentAssist);g.setKeyBinding(new f.KeyBinding(27),"cancelMode");g.setAction("cancelMode",function(){for(var a=!1,b=0;b<this._keyModes.length;b++)this._keyModes[b].isActive()&&(a=this._keyModes[b].cancel()||a);return a}.bind(this),{name:b.cancelMode});g.setAction("lineUp",
function(){for(var a=0;a<this._keyModes.length;a++)if(this._keyModes[a].isActive())return this._keyModes[a].lineUp();return!1}.bind(this));g.setAction("lineDown",function(){for(var a=0;a<this._keyModes.length;a++)if(this._keyModes[a].isActive())return this._keyModes[a].lineDown();return!1}.bind(this));g.setAction("enter",function(){for(var a=0;a<this._keyModes.length;a++)if(this._keyModes[a].isActive())return this._keyModes[a].enter();return!1}.bind(this));a=function(a){if(a!==void 0&&a!==-1){for(var b=
this.getView().getModel(),e=this.getAnnotationModel(),g=d.mapOffset(b.getLineStart(a)),a=d.mapOffset(b.getLineEnd(a)),b=e.getAnnotations(g,a),h=null;b.hasNext();){var j=b.next();if(j.type===c.AnnotationType.ANNOTATION_BOOKMARK){h=j;break}}h?e.removeAnnotation(h):(h=c.AnnotationType.createAnnotation(c.AnnotationType.ANNOTATION_BOOKMARK,g,a),h.title=void 0,e.addAnnotation(h))}};if(this._annotationFactory){var j=g.getModel();j.getBaseModel&&(j=j.getBaseModel());if(this._annotationModel=this._annotationFactory.createAnnotationModel(j))if(j=
this._annotationStyler=this._annotationFactory.createAnnotationStyler(g,this._annotationModel))j.addAnnotationType(c.AnnotationType.ANNOTATION_CURRENT_SEARCH),j.addAnnotationType(c.AnnotationType.ANNOTATION_MATCHING_SEARCH),j.addAnnotationType(c.AnnotationType.ANNOTATION_ERROR),j.addAnnotationType(c.AnnotationType.ANNOTATION_WARNING),j.addAnnotationType(c.AnnotationType.ANNOTATION_MATCHING_BRACKET),j.addAnnotationType(c.AnnotationType.ANNOTATION_CURRENT_BRACKET),j.addAnnotationType(c.AnnotationType.ANNOTATION_CURRENT_LINE),
j.addAnnotationType("orion.annotation.highlightError");g.annotationModel=this._annotationModel;var j=this._annotationFactory.createAnnotationRulers(this._annotationModel),p=this._annotationRuler=j.annotationRuler;if(p)p.onClick=function(a){if(a!==void 0&&a!==-1)for(var b=this.getView().getModel(),c=this.getAnnotationModel(),e=d.mapOffset(b.getLineStart(a)),a=d.mapOffset(b.getLineEnd(a)),a=c.getAnnotations(e,a);a.hasNext();)if(c=a.next(),this.isAnnotationTypeVisible(c.type)){a=d.getModel();d.onGotoLine(a.getLineAtOffset(e),
c.start-e,c.end-e);break}},p.onDblClick=a,p.setMultiAnnotationOverlay({html:"<div class='annotationHTML overlay'></div>"}),p.addAnnotationType(c.AnnotationType.ANNOTATION_ERROR),p.addAnnotationType(c.AnnotationType.ANNOTATION_WARNING),p.addAnnotationType(c.AnnotationType.ANNOTATION_TASK),p.addAnnotationType(c.AnnotationType.ANNOTATION_BOOKMARK);this.setAnnotationRulerVisible(!0);if(p=this._overviewRuler=j.overviewRuler)p.onClick=function(a){a!==void 0&&(a=g.getModel().getLineStart(a),d.moveSelection(d.mapOffset(a)))},
p.addAnnotationType(c.AnnotationType.ANNOTATION_CURRENT_SEARCH),p.addAnnotationType(c.AnnotationType.ANNOTATION_MATCHING_SEARCH),p.addAnnotationType(c.AnnotationType.ANNOTATION_ERROR),p.addAnnotationType(c.AnnotationType.ANNOTATION_WARNING),p.addAnnotationType(c.AnnotationType.ANNOTATION_TASK),p.addAnnotationType(c.AnnotationType.ANNOTATION_BOOKMARK),p.addAnnotationType(c.AnnotationType.ANNOTATION_MATCHING_BRACKET),p.addAnnotationType(c.AnnotationType.ANNOTATION_CURRENT_BRACKET),p.addAnnotationType(c.AnnotationType.ANNOTATION_CURRENT_LINE);
this.setOverviewRulerVisible(!0)}if(this._lineNumberRulerFactory)this._lineNumberRuler=this._lineNumberRulerFactory.createLineNumberRuler(this._annotationModel),this._lineNumberRuler.onDblClick=a,this.setLineNumberRulerVisible(!0);if(this._foldingRulerFactory)this._foldingRuler=this._foldingRulerFactory.createFoldingRuler(this._annotationModel),this._foldingRuler.addAnnotationType(c.AnnotationType.ANNOTATION_FOLDING),this.setFoldingRulerVisible(!1);this.dispatchEvent({type:"TextViewInstalled",textView:g})},
_updateCursorStatus:function(){var a=this.getModel(),c=this.getCaretOffset(),e=a.getLineAtOffset(c),a=a.getLineStart(e);c-=a;for(a=0;a<this._keyModes.length;a++){var g=this._keyModes[a];if(g.isActive()&&g.isStatusActive&&g.isStatusActive())return}this.reportStatus(d.formatMessage(b.lineColumn,e+1,c+1))},showProblems:function(a){var b=this._annotationModel;if(b){for(var d=[],e=[],g=b.getTextModel(),h=b.getAnnotations(0,g.getCharCount()),j;h.hasNext();)j=h.next(),(j.type===c.AnnotationType.ANNOTATION_ERROR||
j.type===c.AnnotationType.ANNOTATION_WARNING)&&d.push(j);if(a)for(h=0;h<a.length;h++)if(j=a[h]){var f=j.description.replace(/'/g,"&#39;").replace(/"/g,"&#34;"),s=g.getLineStart(j.line-1);j=c.AnnotationType.createAnnotation(j.severity==="error"?c.AnnotationType.ANNOTATION_ERROR:c.AnnotationType.ANNOTATION_WARNING,s+j.start-1,s+j.end,f);e.push(j)}b.replaceAnnotations(d,e)}},showSelection:function(a,b,c,d,e){typeof a==="number"?(typeof b!=="number"&&(b=a),this.moveSelection(a,b)):typeof c==="number"&&
(a=this.getModel().getLineStart(c-1),typeof d==="number"&&(a+=d),typeof e!=="number"&&(e=0),this.moveSelection(a,a+e))},setInput:function(a,b,c,d){this._title=a;this._textView&&(d?(this._undoStack.markClean(),this.checkDirty()):(b?this._textView.setText(b):c!==null&&c!==void 0&&(this._textView.setText(c),this._textView.getModel().setLineDelimiter("auto"),this._highlightCurrentLine(this._textView.getSelection())),this._undoStack.reset(),this.checkDirty(),this._textView.focus()));this.onInputChanged({type:"InputChanged",
title:a,message:b,contents:c,contentsSaved:d})},onInputChanged:function(a){return this.dispatchEvent(a)},onGotoLine:function(a,b,c){if(this._textView){var d=this.getModel(),e=d.getLineStart(a),g=0;c===void 0&&(c=0);typeof b==="string"?(a=d.getLine(a).indexOf(b),a!==-1&&(g=a,c=g+b.length)):(g=b,b=d.getLineEnd(a)-e,g=Math.min(g,b),c=Math.min(c,b));this.moveSelection(e+g,e+c)}},onDirtyChanged:function(a){return this.dispatchEvent(a)}};a.EventTarget.addMixin(g.prototype);j=function(){function a(b){this.options=
b}a.prototype.play=function(){var a=typeof this.options.duration==="number"?this.options.duration:350,b=this.options.easing||this.defaultEasing,c=this.options.onAnimate||function(){},d=this.options.onEnd||function(){},e=this.options.curve[0],g=this.options.curve[1]-e,h,j,f=-1;j=setInterval(function(){f=f===-1?(new Date).getTime():f;var k=((new Date).getTime()-f)/a;k<1?(k=b(k),h=e+k*g,c(h)):(clearInterval(j),d())},typeof this.options.rate==="number"?this.options.rate:20)};a.prototype.defaultEasing=
function(a){return Math.sin(a*(Math.PI/2))};return a}();if(!Function.prototype.bind)Function.prototype.bind=h;return{Editor:g,util:{bind:h}}});
define("orion/contentTypes",[],function(){function b(a,b){function c(a,b,d,e){var d=b.filename.indexOf(d)>=0,g=b.extension.indexOf(e)>=0;if(d||g)if(!a||d&&a.extension.indexOf(e)>=0)return b;return a}for(var e=a&&a.split(".").pop(),f=null,l=0;l<b.length;l++){var n=b[l];c(f,n,a,e)===n&&(f=n)}return f}function f(b){this.serviceRegistry=b;this.map=function(a){function b(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var a=a.getServiceReferences(e).concat(a.getServiceReferences(c)),
d={},f=0;f<a.length;f++)for(var l=b(a[f].getProperty("contentTypes")),n=0;n<l.length;n++){var o=l[n];d[o.id]||(d[o.id]={id:o.id,name:o.name,image:o.image,"extends":o["extends"],extension:b(o.extension),filename:b(o.filename)})}return d}(b);b.registerService(a,this)}var a="orion.core.contenttypes",e="orion.core.contenttype",c="orion.file.contenttype";f.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},getContentTypesMap:function(){return this.map},
getFileContentType:function(a){return b(a.Name,this.getContentTypes())},getFilenameContentType:function(a){return b(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,b){a=typeof a==="string"?this.getContentType(a):a;b=typeof b==="string"?this.getContentType(b):b;if(!a||!b)return!1;if(a.id===b.id)return!0;else for(var c=a,e={};c&&(c=this.getContentType(c["extends"]));){if(c.id===b.id)return!0;if(e[c.id])throw Error("Cycle: "+c.id);e[c.id]=!0}return!1},
isSomeExtensionOf:function(a,b){for(var c=0;c<b.length;c++)if(this.isExtensionOf(a,b[c]))return!0;return!1}};return{ContentTypeService:f,getFilenameContentType:b}});
define("orion/PageUtil",[],function(){var b=/^http[s]?/i;return{matchResourceParameters:function(b){var b=b||window.location.toString(),a={resource:""},e=b.indexOf("#");if(e!==-1&&(b=b.substring(e+1),b.length!==0)){b=b.split(",");a.resource=decodeURIComponent(b[0]);for(e=1;e<b.length;e++){var c=b[e].split("="),d=decodeURIComponent(c[0]),c=c.length===2?decodeURIComponent(c[1]):null;c!==null&&d!=="resource"&&(a[d]=c)}}return a},validateURLScheme:function(f,a){var e=f;if(f.indexOf("://")===-1){var c=
document.createElement("a");c.href=f;e=c.href}c=!1;return(c=a?a.some(function(a){return RegExp("^"+a+":","i").test(e)}):b.test(e))?f:(console.log("Illegal URL Scheme: '"+f+"'"),"")}}});
define("examples/textview/textStyler",["orion/textview/annotations"],function(b){function f(a,b){this.keywords=a;this.whitespacesVisible=b;this.setText("")}function a(){f.call(this,null,!0)}function e(a){f.call(this,null,a)}function c(){f.call(this,null,!1)}function d(b,d,k){this.commentStart="/*";this.commentEnd="*/";var l=[];switch(d){case "java":l=h;break;case "js":l=g;break;case "css":l=j}this.whitespacesVisible=!1;this.detectHyperlinks=!0;this.highlightCaretLine=!1;this.detectTasks=this.foldingEnabled=
!0;this._scanner=new f(l,this.whitespacesVisible);this._firstScanner=new c;this._commentScanner=new e(this.whitespacesVisible);this._whitespaceScanner=new a;if(d==="css")this._scanner.isCSS=!0,this._firstScanner.isCSS=!0;this.view=b;this.annotationModel=k;this._bracketAnnotations=void 0;var n=this;this._listener={onChanged:function(a){n._onModelChanged(a)},onDestroy:function(a){n._onDestroy(a)},onLineStyle:function(a){n._onLineStyle(a)},onMouseDown:function(a){n._onMouseDown(a)},onSelection:function(a){n._onSelection(a)}};
d=b.getModel();d.getBaseModel&&(d=d.getBaseModel());d.addEventListener("Changed",this._listener.onChanged);b.addEventListener("MouseDown",this._listener.onMouseDown);b.addEventListener("Selection",this._listener.onSelection);b.addEventListener("Destroy",this._listener.onDestroy);b.addEventListener("LineStyle",this._listener.onLineStyle);this._computeComments();this._computeFolding();b.redrawLines()}var g="break,case,class,catch,continue,const,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield".split(","),
h="abstract,boolean,break,byte,case,catch,char,class,continue,default,do,double,else,extends,false,final,finally,float,for,if,implements,import,instanceof,int,interface,long,native,new,null,package,private,protected,public,return,short,static,super,switch,synchronized,this,throw,throws,transient,true,try,void,volatile,while".split(","),j="alignment-adjust,alignment-baseline,animation,animation-delay,animation-direction,animation-duration,animation-iteration-count,animation-name,animation-play-state,animation-timing-function,appearance,azimuth,backface-visibility,background,background-attachment,background-clip,background-color,background-image,background-origin,background-position,background-repeat,background-size,baseline-shift,binding,bleed,bookmark-label,bookmark-level,bookmark-state,bookmark-target,border,border-bottom,border-bottom-color,border-bottom-left-radius,border-bottom-right-radius,border-bottom-style,border-bottom-width,border-collapse,border-color,border-image,border-image-outset,border-image-repeat,border-image-slice,border-image-source,border-image-width,border-left,border-left-color,border-left-style,border-left-width,border-radius,border-right,border-right-color,border-right-style,border-right-width,border-spacing,border-style,border-top,border-top-color,border-top-left-radius,border-top-right-radius,border-top-style,border-top-width,border-width,bottom,box-align,box-decoration-break,box-direction,box-flex,box-flex-group,box-lines,box-ordinal-group,box-orient,box-pack,box-shadow,box-sizing,break-after,break-before,break-inside,caption-side,clear,clip,color,color-profile,column-count,column-fill,column-gap,column-rule,column-rule-color,column-rule-style,column-rule-width,column-span,column-width,columns,content,counter-increment,counter-reset,crop,cue,cue-after,cue-before,cursor,direction,display,dominant-baseline,drop-initial-after-adjust,drop-initial-after-align,drop-initial-before-adjust,drop-initial-before-align,drop-initial-size,drop-initial-value,elevation,empty-cells,fit,fit-position,flex-align,flex-flow,flex-inline-pack,flex-order,flex-pack,float,float-offset,font,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,grid-columns,grid-rows,hanging-punctuation,height,hyphenate-after,hyphenate-before,hyphenate-character,hyphenate-lines,hyphenate-resource,hyphens,icon,image-orientation,image-rendering,image-resolution,inline-box-align,left,letter-spacing,line-height,line-stacking,line-stacking-ruby,line-stacking-shift,line-stacking-strategy,list-style,list-style-image,list-style-position,list-style-type,margin,margin-bottom,margin-left,margin-right,margin-top,mark,mark-after,mark-before,marker-offset,marks,marquee-direction,marquee-loop,marquee-play-count,marquee-speed,marquee-style,max-height,max-width,min-height,min-width,move-to,nav-down,nav-index,nav-left,nav-right,nav-up,opacity,orphans,outline,outline-color,outline-offset,outline-style,outline-width,overflow,overflow-style,overflow-x,overflow-y,padding,padding-bottom,padding-left,padding-right,padding-top,page,page-break-after,page-break-before,page-break-inside,page-policy,pause,pause-after,pause-before,perspective,perspective-origin,phonemes,pitch,pitch-range,play-during,position,presentation-level,punctuation-trim,quotes,rendering-intent,resize,rest,rest-after,rest-before,richness,right,rotation,rotation-point,ruby-align,ruby-overhang,ruby-position,ruby-span,size,speak,speak-header,speak-numeral,speak-punctuation,speech-rate,stress,string-set,table-layout,target,target-name,target-new,target-position,text-align,text-align-last,text-decoration,text-emphasis,text-height,text-indent,text-justify,text-outline,text-shadow,text-transform,text-wrap,top,transform,transform-origin,transform-style,transition,transition-delay,transition-duration,transition-property,transition-timing-function,unicode-bidi,vertical-align,visibility,voice-balance,voice-duration,voice-family,voice-pitch,voice-pitch-range,voice-rate,voice-stress,voice-volume,volume,white-space,white-space-collapse,widows,width,word-break,word-spacing,word-wrap,z-index".split(","),
k={styleClass:"token_singleline_comment"},l={styleClass:"token_multiline_comment"},n={styleClass:"token_doc_comment"},o={styleClass:"token_doc_html_markup"},m={styleClass:"token_task_tag"},p={styleClass:"token_doc_tag"},q={styleClass:"token_string"},r={styleClass:"token_number"},s={styleClass:"token_keyword"},u={styleClass:"token_space"},v={styleClass:"token_tab"},w={styleClass:"line_caret"};f.prototype={getOffset:function(){return this.offset},getStartOffset:function(){return this.startOffset},getData:function(){return this.text.substring(this.startOffset,
this.offset)},getDataLength:function(){return this.offset-this.startOffset},_default:function(a){switch(a){case 32:case 9:if(this.whitespacesVisible)return a===32?11:10;do a=this._read();while(a===32||a===9);this._unread(a);return 9;case 123:case 125:case 40:case 41:case 91:case 93:case 60:case 62:return a;default:var b=this.isCSS,c=this.offset-1;if(!b&&48<=a&&a<=57){var d=b=!1,e=!1,g=a;do if(a=this._read(),a===46&&!b)b=!0;else if(a===101&&!d)b=d=!0,a=this._read(),a!==45&&this._unread(a);else if(a===
120&&g===48&&this.offset-c===2)b=d=e=!0;else if(!(48<=a&&a<=57||e&&(65<=a&&a<=70||97<=a&&a<=102)))break;while(1);this._unread(a);return 3}if(97<=a&&a<=122||65<=a&&a<=90||a===95||45===a&&b){do a=this._read();while(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57||45===a&&b);this._unread(a);a=this.keywords;if(a.length>0){c=this.text.substring(c,this.offset);for(b=0;b<a.length;b++)if(this.keywords[b]===c)return 2}}return 1}},_read:function(){return this.offset<this.text.length?this.text.charCodeAt(this.offset++):
-1},_unread:function(a){a!==-1&&this.offset--},nextToken:function(){for(this.startOffset=this.offset;;){var a=this._read(),b;switch(a){case -1:return null;case 47:a=this._read();if(!this.isCSS&&a===47)for(;;)if(a=this._read(),a===-1||a===10||a===13)return this._unread(a),6;if(a===42){a=this._read();b=7;for(a===42&&(b=8);;){for(;a===42;)if(a=this._read(),a===47)return b;if(a===-1)return this._unread(a),b;a=this._read()}}this._unread(a);return 1;case 39:for(b=4;;)switch(a=this._read(),a){case 39:return b;
case 13:case 10:case -1:return this._unread(a),b;case 92:switch(a=this._read(),a){case 10:b=5;break;case 13:b=5,a=this._read(),a!==10&&this._unread(a)}}break;case 34:for(b=4;;)switch(a=this._read(),a){case 34:return b;case 13:case 10:case -1:return this._unread(a),b;case 92:switch(a=this._read(),a){case 10:b=5;break;case 13:b=5,a=this._read(),a!==10&&this._unread(a)}}break;default:return this._default(a)}}},setText:function(a){this.text=a;this.startOffset=this.offset=0}};a.prototype=new f(null);a.prototype.nextToken=
function(){for(this.startOffset=this.offset;;){var a=this._read();switch(a){case -1:return null;case 32:return 11;case 9:return 10;default:do a=this._read();while(!(a===32||a===9||a===-1));this._unread(a);return 1}}};e.prototype=new f(null);e.prototype.setType=function(a){this._type=a};e.prototype.nextToken=function(){for(this.startOffset=this.offset;;){var a=this._read();switch(a){case -1:return null;case 32:case 9:if(this.whitespacesVisible)return a===32?11:10;do a=this._read();while(a===32||a===
9);this._unread(a);return 9;case 60:if(this._type===8){do a=this._read();while(!(a===62||a===-1));if(a===62)return 12}return 1;case 64:if(this._type===8){do a=this._read();while(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57);this._unread(a);return 13}return 1;case 84:if((a=this._read())===79)if((a=this._read())===68)if((a=this._read())===79)if(a=this._read(),!(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57))return this._unread(a),14;this._unread(a);default:do a=this._read();while(!(a===32||
a===9||a===-1||a===60||a===64||a===84));this._unread(a);return 1}}};c.prototype=new f(null);c.prototype._default=function(a){for(;;)switch(a=this._read(),a){case 47:case 34:case 39:case -1:return this._unread(a),1}};d.prototype={getClassNameForToken:function(a){switch(a){case "singleLineComment":return k.styleClass;case "multiLineComment":return l.styleClass;case "docComment":return n.styleClass;case "docHtmlComment":return o.styleClass;case "tasktag":return m.styleClass;case "doctag":return p.styleClass;
case "string":return q.styleClass;case "number":return r.styleClass;case "keyword":return s.styleClass;case "space":return u.styleClass;case "tab":return v.styleClass;case "caretLine":return w.styleClass;case "rulerStyle":return"ruler";case "annotationsStyle":return;case "rulerFolding":return;case "rulerOverview":return"ruler.overview";case "rulerLines":return;case "rulerLinesEven":return"rulerLines.even";case "rulerLinesOdd":return"rulerLines.odd"}return null},destroy:function(){var a=this.view;
if(a){var b=a.getModel();b.getBaseModel&&(b=b.getBaseModel());b.removeEventListener("Changed",this._listener.onChanged);a.removeEventListener("MouseDown",this._listener.onMouseDown);a.removeEventListener("Selection",this._listener.onSelection);a.removeEventListener("Destroy",this._listener.onDestroy);a.removeEventListener("LineStyle",this._listener.onLineStyle);this.view=null}},setHighlightCaretLine:function(a){this.highlightCaretLine=a},setWhitespacesVisible:function(a){this.whitespacesVisible=a;
this._scanner.whitespacesVisible=a;this._commentScanner.whitespacesVisible=a},setDetectHyperlinks:function(a){this.detectHyperlinks=a},setFoldingEnabled:function(a){this.foldingEnabled=a},setDetectTasks:function(a){this.detectTasks=a},_binarySearch:function(a,b,c,d,e){var g;d===void 0&&(d=-1);if(e===void 0)e=a.length;for(;e-d>1;)if(g=Math.floor((e+d)/2),b<=a[g].start)e=g;else if(c&&b<a[g].end){e=g;break}else d=g;return e},_computeComments:function(){var a=this.view.getModel();a.getBaseModel&&(a=a.getBaseModel());
this.comments=this._findComments(a.getText())},_computeFolding:function(){if(this.foldingEnabled){var a=this.view.getModel();if(a.getBaseModel){var c=this.annotationModel;if(c){c.removeAnnotations(b.AnnotationType.ANNOTATION_FOLDING);for(var d=[],e=a.getBaseModel(),g=this.comments,h=0;h<g.length;h++){var j=g[h];(j=this._createFoldingAnnotation(a,e,j.start,j.end))&&d.push(j)}c.replaceAnnotations(null,d)}}}},_createFoldingAnnotation:function(a,c,d,e){var g=c.getLineAtOffset(d),c=c.getLineAtOffset(e);
return g===c?null:new (b.AnnotationType.getType(b.AnnotationType.ANNOTATION_FOLDING))(d,e,a)},_computeTasks:function(a,c,d){if(this.detectTasks){var e=this.annotationModel;if(e){var g=this.view.getModel(),h=g;g.getBaseModel&&(h=g.getBaseModel());for(var j=e.getAnnotations(c,d),g=[],f=b.AnnotationType.ANNOTATION_TASK;j.hasNext();){var k=j.next();k.type===f&&g.push(k)}j=[];k=this._commentScanner;k.setText(h.getText(c,d));for(var l;l=k.nextToken();){var n=k.getStartOffset()+c;l===14&&(l=h.getLineEnd(h.getLineAtOffset(n)),
a!==6&&(l=Math.min(l,d-this.commentEnd.length)),j.push(b.AnnotationType.createAnnotation(f,n,l,h.getText(n,l))))}e.replaceAnnotations(g,j)}}},_getLineStyle:function(a){if(this.highlightCaretLine){var b=this.view,c=b.getModel(),b=b.getSelection();if(b.start===b.end&&c.getLineAtOffset(b.start)===a)return w}return null},_getStyles:function(a,b,c){a.getBaseModel&&(c=a.mapOffset(c));for(var d=c+b.length,e=[],g=c,h=this.comments,j=this._binarySearch(h,c,!0);j<h.length;j++){if(h[j].start>=d)break;var f=
h[j].start,k=h[j].end;g<f&&this._parse(b.substring(g-c,f-c),g,e);var m=h[j].type,o;switch(m){case 8:o=n;break;case 7:o=l;break;case 5:o=q}g=Math.max(g,f);f=Math.min(d,k);(m===8||m===7)&&(this.whitespacesVisible||this.detectHyperlinks)?this._parseComment(b.substring(g-c,f-c),g,e,o,m):m===5&&this.whitespacesVisible?this._parseString(b.substring(g-c,f-c),g,e,q):e.push({start:g,end:f,style:o});g=k}g<d&&this._parse(b.substring(g-c,d-c),g,e);if(a.getBaseModel)for(b=0;b<e.length;b++)c=e[b].end-e[b].start,
e[b].start=a.mapOffset(e[b].start,!0),e[b].end=e[b].start+c;return e},_parse:function(a,b,c){var d=this._scanner;for(d.setText(a);a=d.nextToken();){var e=d.getStartOffset()+b,g=null;switch(a){case 2:g=s;break;case 3:g=r;break;case 5:case 4:if(this.whitespacesVisible){this._parseString(d.getData(),e,c,q);continue}else g=q;break;case 8:this._parseComment(d.getData(),e,c,n,a);continue;case 6:this._parseComment(d.getData(),e,c,k,a);continue;case 7:this._parseComment(d.getData(),e,c,l,a);continue;case 10:this.whitespacesVisible&&
(g=v);break;case 11:this.whitespacesVisible&&(g=u)}c.push({start:e,end:d.getOffset()+b,style:g})}},_parseComment:function(a,b,c,d,e){var g=this._commentScanner;g.setText(a);for(g.setType(e);a=g.nextToken();){var e=g.getStartOffset()+b,h=d;switch(a){case 10:this.whitespacesVisible&&(h=v);break;case 11:this.whitespacesVisible&&(h=u);break;case 12:h=o;break;case 13:h=p;break;case 14:h=m;break;default:this.detectHyperlinks&&(h=this._detectHyperlinks(g.getData(),e,c,h))}h&&c.push({start:e,end:g.getOffset()+
b,style:h})}},_parseString:function(a,b,c,d){var e=this._whitespaceScanner;for(e.setText(a);a=e.nextToken();){var g=e.getStartOffset()+b,h=d;switch(a){case 10:this.whitespacesVisible&&(h=v);break;case 11:this.whitespacesVisible&&(h=u)}h&&c.push({start:g,end:e.getOffset()+b,style:h})}},_detectHyperlinks:function(a,b,c,d){var e=null,g;if((g=a.indexOf("://"))>0){for(var e=a,h=g;h>0;){g=e.charCodeAt(h-1);if(!(97<=g&&g<=122||65<=g&&g<=90||45===g||48<=g&&g<=57))break;h--}if(h>0&&(g="\"\"''(){}[]<>".indexOf(e.substring(h-
1,h)),g!==-1&&(g&1)===0&&(g=e.lastIndexOf("\"\"''(){}[]<>".substring(g+1,g+2)))!==-1)){var j=g;g=this._clone(d);g.tagName="A";g.attributes={href:e.substring(h,j)};c.push({start:b,end:b+h,style:d});c.push({start:b+h,end:b+j,style:g});c.push({start:b+j,end:b+a.length,style:d});return null}}else a.toLowerCase().indexOf("bug#")===0&&(e="https://bugs.eclipse.org/bugs/show_bug.cgi?id="+parseInt(a.substring(4),10));return e?(g=this._clone(d),g.tagName="A",g.attributes={href:e},g):d},_clone:function(a){if(!a)return a;
var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},_findComments:function(a,b){var b=b||0,c=this._firstScanner,d;c.setText(a);for(var e=[];d=c.nextToken();)(d===7||d===8||d===5)&&e.push({start:c.getStartOffset()+b,end:c.getOffset()+b,type:d}),(d===6||d===7||d===8)&&this._computeTasks(d,c.getStartOffset()+b,c.getOffset()+b);return e},_findMatchingBracket:function(a,b){var c="{}()[]<>",d=a.getText(b,b+1),e=c.indexOf(d,0);if(e===-1)return-1;var g;g=e&1?c.substring(e-1,e):c.substring(e+
1,e+2);for(var h=a.getLineAtOffset(b),c=a.getLine(h),j=a.getLineStart(h),f=a.getLineEnd(h),c=this._findBrackets(d,g,c,j,j,f),f=0;f<c.length;f++)if(j=c[f]>=0?1:-1,c[f]*j-1===b){var k=1;if(e&1){for(f--;f>=0;f--)if(j=c[f]>=0?1:-1,k+=j,k===0)return c[f]*j-1;for(h-=1;h>=0;){c=a.getLine(h);j=a.getLineStart(h);f=a.getLineEnd(h);c=this._findBrackets(d,g,c,j,j,f);for(e=c.length-1;e>=0;e--)if(j=c[e]>=0?1:-1,k+=j,k===0)return c[e]*j-1;h--}}else{for(f++;f<c.length;f++)if(j=c[f]>=0?1:-1,k+=j,k===0)return c[f]*
j-1;h+=1;for(e=a.getLineCount();h<e;){c=a.getLine(h);j=a.getLineStart(h);f=a.getLineEnd(h);c=this._findBrackets(d,g,c,j,j,f);for(f=0;f<c.length;f++)if(j=c[f]>=0?1:-1,k+=j,k===0)return c[f]*j-1;h++}}break}return-1},_findBrackets:function(a,b,c,d,e,g){for(var h=[],a=a.charCodeAt(0),b=b.charCodeAt(0),j=e,f=this._scanner,k,l=this.comments,n=this._binarySearch(l,e,!0);n<l.length;n++){if(l[n].start>=g)break;k=l[n].start;var m=l[n].end;if(j<k)for(f.setText(c.substring(j-e,k-e));k=f.nextToken();)k===a?h.push(f.getStartOffset()+
j-e+d+1):k===b&&h.push(-(f.getStartOffset()+j-e+d+1));j=m}if(j<g)for(f.setText(c.substring(j-e,g-e));k=f.nextToken();)k===a?h.push(f.getStartOffset()+j-e+d+1):k===b&&h.push(-(f.getStartOffset()+j-e+d+1));return h},_onDestroy:function(){this.destroy()},_onLineStyle:function(a){if(a.textView===this.view)a.style=this._getLineStyle(a.lineIndex);a.ranges=this._getStyles(a.textView.getModel(),a.lineText,a.lineStart)},_onSelection:function(a){var c=a.oldValue,d=a.newValue,e=this.view,a=e.getModel(),g;if(this.highlightCaretLine){var h=
a.getLineAtOffset(c.start);g=a.getLineAtOffset(d.start);var j=d.start===d.end,c=c.start===c.end;h===g&&c&&j||(c&&e.redrawLines(h,h+1),(h!==g||!c)&&j&&e.redrawLines(g,g+1))}if(this.annotationModel){var c=this._bracketAnnotations,f,k;if(d.start===d.end&&(k=e.getCaretOffset())>0)k-=1,a.getBaseModel&&(k=a.mapOffset(k),a=a.getBaseModel()),a=this._findMatchingBracket(a,k),a!==-1&&(f=[b.AnnotationType.createAnnotation(b.AnnotationType.ANNOTATION_MATCHING_BRACKET,a,a+1),b.AnnotationType.createAnnotation(b.AnnotationType.ANNOTATION_CURRENT_BRACKET,
k,k+1)]);this._bracketAnnotations=f;this.annotationModel.replaceAnnotations(c,f)}},_onMouseDown:function(a){if(a.clickCount===2){var b=this.view,c=b.getModel(),d=b.getOffsetAtLocation(a.x,a.y);if(d>0){var e=d-1,g=c;c.getBaseModel&&(e=c.mapOffset(e),g=c.getBaseModel());e=this._findMatchingBracket(g,e);e!==-1&&(a.preventDefault(),a=e,c.getBaseModel&&(a=c.mapOffset(a,!0)),d>a&&(d--,a++),b.setSelection(a,d))}}},_onModelChanged:function(a){var c=a.start,d=a.removedCharCount,e=a.addedCharCount-d,g=this.view,
a=g.getModel(),h=a.getBaseModel?a.getBaseModel():a,d=c+d,j=h.getCharCount(),f=this.comments.length,k=h.getLineStart(h.getLineAtOffset(c)),l=this._binarySearch(this.comments,k,!0),n=this._binarySearch(this.comments,d,!1,l-1,f);l<f&&this.comments[l].start<=k&&k<this.comments[l].end?(k=this.comments[l].start,k>c&&(k+=e)):k=l===f&&f>0&&j-e===this.comments[f-1].end?this.comments[f-1].start:k;var m;n<f?(m=this.comments[n].end,m>c&&(m+=e),n+=1):(n=f,m=j);for(var o,j=this._findComments(h.getText(k,m),k),
f=l;f<this.comments.length;f++)o=this.comments[f],o.start>c&&(o.start+=e),o.start>c&&(o.end+=e);var q=n-l!==j.length;if(!q)for(f=0;f<j.length;f++){o=this.comments[l+f];var p=j[f];if(o.start!==p.start||o.end!==p.end||o.type!==p.type){q=!0;break}}f=[l,n-l].concat(j);Array.prototype.splice.apply(this.comments,f);q&&(f=k,o=m,a!==h&&(f=a.mapOffset(f,!0),o=a.mapOffset(o,!0)),g.redrawRange(f,o));if(this.foldingEnabled&&h!==a&&this.annotationModel){g=this.annotationModel;l=g.getAnnotations(k,m);k=[];for(m=
[];l.hasNext();)if(o=l.next(),o.type===b.AnnotationType.ANNOTATION_FOLDING){m.push(o);for(f=0;f<j.length;f++)if(o.start===j[f].start&&o.end===j[f].end)break;f===j.length?(k.push(o),o.expand()):(f=o.start,n=o.end,f>c&&(f-=e),n>c&&(n-=e),f<=c&&c<n&&f<=d&&d<n&&(f=h.getLineAtOffset(o.start),n=h.getLineAtOffset(o.end),f!==n?o.expanded||(o.expand(),g.modifyAnnotation(o)):g.removeAnnotation(o)))}c=[];for(f=0;f<j.length;f++){o=j[f];for(e=0;e<m.length;e++)if(m[e].start===o.start&&m[e].end===o.end)break;e===
m.length&&(o=this._createFoldingAnnotation(a,h,o.start,o.end))&&c.push(o)}g.replaceAnnotations(k,c)}}};return{TextStyler:d}});
define("orion/editor/textMateStyler",["orion/editor/regex"],function(b){function f(a,b,d){this.initialize(a);this.grammar=this.clone(b);this.externalGrammars=d?this.clone(d):[];this._styles={};this._tree=null;this._allGrammars={};this.preprocess(this.grammar)}var a={unsupported:[{regex:/\(\?[ims\-]:/,func:function(){return"option on/off for subexp"}},{regex:/\(\?<([=!])/,func:function(a){return a[1]==="="?"lookbehind":"negative lookbehind"}},{regex:/\(\?>/,func:function(){return"atomic group"}}],
toRegExp:function(b){function c(a,b){throw Error('Unsupported regex feature "'+a+'": "'+b[0]+'" at index: '+b.index+" in "+b.input);}var d="",g,b=a.processGlobalFlag("x",b,function(a){for(var b="",c=!1,d=a.length,e=0;e<d;){var g=a.charAt(e);if(!c&&g==="#")for(;e<d&&g!=="\r"&&g!=="\n";)g=a.charAt(++e);else if(!c&&/\s/.test(g))for(;e<d&&/\s/.test(g);)g=a.charAt(++e);else g==="\\"?(b+=g,/\s/.test(a.charAt(e+1))||(b+=a.charAt(e+1),e+=1)):(g==="["?c=!0:g==="]"&&(c=!1),b+=g),e+=1}return b}),b=a.processGlobalFlag("i",
b,function(a){d+="i";return a});for(g=0;g<this.unsupported.length;g++){var h;(h=this.unsupported[g].regex.exec(b))&&c(this.unsupported[g].func(h),h)}return RegExp(b,d)},processGlobalFlag:function(a,b,d){function g(a,b){for(var c=0,d=a.length,e=-1,g=b;g<d&&e===-1;g++)switch(a.charAt(g)){case "\\":g++;break;case "(":c++;break;case ")":c--,c===0&&(e=g)}return e}var h="(?"+a+")",a="(?"+a+":";if(b.substring(0,h.length)===h)return d(b.substring(h.length));else if(b.substring(0,a.length)===a){h=g(b,0);if(h<
b.length-1)throw Error("Only a "+a+") group that encloses the entire regex is supported in: "+b);return d(b.substring(a.length,h))}return b},hasBackReference:function(a){return/\\\d+/.test(a.source)},getSubstitutedRegex:function(a,c,d){for(var d=typeof d==="undefined"?!0:!1,a=a.source.split(/(\\\d+)/g),g=[],h=0;h<a.length;h++){var j=a[h],f=/\\(\d+)/.exec(j);f?(j=c[f[1]]||"",g.push(d?b.escape(j):j)):g.push(j)}return RegExp(g.join(""))},groupify:function(a,b){for(var d=a.source,g=d.length,h=[],j=0,
f=[],l=1,n=1,o=[],m={},p={},q=0;q<g;q++){var r=h[h.length-1],s=d.charAt(q);switch(s){case "(":if(r===4)h.pop(),o.push(")"),f[f.length-1].end=q;var u=q+2<g?d.charAt(q+1)+""+d.charAt(q+2):null;if(u==="?:"||u==="?="||u==="?!"){var v;u==="?:"?v=1:(v=3,j++);h.push(v);f.push({start:q,end:-1,type:v});o.push(s);o.push(u);q+=u.length}else h.push(2),f.push({start:q,end:-1,type:2,oldNum:l,num:n}),o.push(s),j===0&&(p[n]=null),m[l]=n,l++,n++;break;case ")":r=h.pop();r===3&&j--;f[f.length-1].end=q;o.push(s);break;
case "*":case "+":case "?":case "}":var w=s,t=d.charAt(q-1),u=q-1;if(s==="}"){for(v=q-1;d.charAt(v)!=="{"&&v>=0;v--);t=d.charAt(v-1);u=v-1;w=d.substring(v,q+1)}v=f[f.length-1];if(t===")"&&(v.type===2||v.type===4)){o.splice(v.start,0,"(");o.push(w);o.push(")");s={start:v.start,end:o.length-1,type:4,num:v.num};for(t=0;t<f.length;t++)if(r=f[t],(r.type===2||r.type===4)&&r.start>=v.start&&r.end<=u)if(r.start+=1,r.end+=1,r.num+=1,r.type===2)m[r.oldNum]=r.num;f.push(s);n++;break}default:s!=="|"&&r!==2&&
r!==4&&j===0&&(h.push(4),f.push({start:q,end:-1,type:4,num:n}),o.push("("),p[n]=null,n++),o.push(s),s==="\\"&&(s=d.charAt(q+1),o.push(s),q+=1)}}for(;h.length;)h.pop(),o.push(")");var d=RegExp(o.join("")),g={},b=b||m,y;for(y in b)b.hasOwnProperty(y)&&(g[y]="\\"+b[y]);d=this.getSubstitutedRegex(d,g,!1);return[d,m,p]},complexCaptures:function(a){if(!a)return!1;for(var b in a)if(a.hasOwnProperty(b)&&b!=="0")return!0;return!1}};f.prototype={initialize:function(a){this.textView=a;var b=this;this._listener=
{onModelChanged:function(a){b.onModelChanged(a)},onDestroy:function(a){b.onDestroy(a)},onLineStyle:function(a){b.onLineStyle(a)}};a.addEventListener("ModelChanged",this._listener.onModelChanged);a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("LineStyle",this._listener.onLineStyle);a.redrawLines()},onDestroy:function(){this.destroy()},destroy:function(){if(this.textView)this.textView.removeEventListener("ModelChanged",this._listener.onModelChanged),this.textView.removeEventListener("Destroy",
this._listener.onDestroy),this.textView.removeEventListener("LineStyle",this._listener.onLineStyle),this.textView=null;this._listener=this._tree=this._styles=this.grammar=null},clone:function c(a){var b;if(a instanceof Array){b=Array(a.length);for(var h=0;h<a.length;h++)b[h]=c(a[h])}else for(h in b={},a)if(Object.prototype.hasOwnProperty.call(a,h)){var j=a[h];b[h]=typeof j==="object"&&j!==null?c(j):j}return b},preprocess:function(a){for(a=[a];a.length!==0;){var b=a.pop();if(!b._resolvedRule||!b._typedRule)if(b._resolvedRule=
this._resolve(b),b._typedRule=this._createTypedRule(b),this.addStyles(b.name),this.addStyles(b.contentName),this.addStylesForCaptures(b.captures),this.addStylesForCaptures(b.beginCaptures),this.addStylesForCaptures(b.endCaptures),b._resolvedRule!==b&&a.push(b._resolvedRule),b.patterns)for(var g=0;g<b.patterns.length;g++)a.push(b.patterns[g])}},addStyles:function(a){if(a&&!this._styles[a]){this._styles[a]=[];for(var b=a.split("."),g=0;g<b.length;g++)this._styles[a].push(b.slice(0,g+1).join("-"))}},
addStylesForCaptures:function(a){for(var b in a)a.hasOwnProperty(b)&&this.addStyles(a[b].name)},ContainerRule:function(){function a(b){this.rule=b;this.subrules=b.patterns}a.prototype.valueOf=function(){return"aa"};return a}(),BeginEndRule:function(){function b(c){this.rule=c;this.beginRegex=a.toRegExp(c.begin);this.endRegex=a.toRegExp(c.end);this.subrules=c.patterns||[];this.endRegexHasBackRef=a.hasBackReference(this.endRegex);var g=a.complexCaptures(c.captures),c=a.complexCaptures(c.beginCaptures)||
a.complexCaptures(c.endCaptures);if(this.isComplex=g||c)g=a.groupify(this.beginRegex),this.beginRegex=g[0],this.beginOld2New=g[1],this.beginConsuming=g[2],g=a.groupify(this.endRegex,this.beginOld2New),this.endRegex=g[0],this.endOld2New=g[1],this.endConsuming=g[2]}b.prototype.valueOf=function(){return this.beginRegex};return b}(),MatchRule:function(){function b(c){this.rule=c;this.matchRegex=a.toRegExp(c.match);if(this.isComplex=a.complexCaptures(c.captures))c=a.groupify(this.matchRegex),this.matchRegex=
c[0],this.matchOld2New=c[1],this.matchConsuming=c[2]}b.prototype.valueOf=function(){return this.matchRegex};return b}(),_createTypedRule:function(a){return a.match?new this.MatchRule(a):a.begin?new this.BeginEndRule(a):new this.ContainerRule(a)},_resolve:function(a){var b=a;if(a.include){if(a.begin||a.end||a.match)throw Error('Unexpected regex pattern in "include" rule '+a.include);a=a.include;if(a.charAt(0)==="#"){if(b=this.grammar.repository&&this.grammar.repository[a.substring(1)],!b)throw Error("Couldn't find included rule "+
a+" in grammar repository");}else if(a==="$self")b=this.grammar;else if(a==="$base")throw Error('Include "$base" is not supported');else if(b=this._allGrammars[a],!b)for(var g=0;g<this.externalGrammars.length;g++){var h=this.externalGrammars[g];if(h.scopeName===a){this.preprocess(h);b=this._allGrammars[a]=h;break}}}return b},ContainerNode:function(){function a(b,c){this.parent=b;this.rule=c;this.children=[];this.end=this.start=null}a.prototype.addChild=function(a){this.children.push(a)};a.prototype.valueOf=
function(){var a=this.rule;return"ContainerNode { "+(a.include||"")+" "+(a.name||"")+(a.comment||"")+"}"};return a}(),BeginEndNode:function(){function b(c,g,h){this.parent=c;this.rule=g;this.children=[];this.setStart(h);this.endMatch=this.end=null;this.endRegexSubstituted=g.endRegexHasBackRef?a.getSubstitutedRegex(g.endRegex,h):null}b.prototype.addChild=function(a){this.children.push(a)};b.prototype.getIndexInParent=function(){return this.parent?this.parent.children.indexOf(this):-1};b.prototype.setStart=
function(a){this.start=a.index;this.beginMatch=a};b.prototype.setEnd=function(a){a&&typeof a==="object"?(this.endMatch=a,this.end=a.index+a[0].length):(this.endMatch=null,this.end=a)};b.prototype.shiftStart=function(a){this.start+=a;this.beginMatch.index+=a};b.prototype.shiftEnd=function(a){this.end+=a;this.endMatch&&(this.endMatch.index+=a)};b.prototype.valueOf=function(){return"{"+this.rule.beginRegex+" range="+this.start+".."+this.end+"}"};return b}(),push:function(a,b){if(b)for(var g=b.length;g>
0;)a.push(b[--g])},exec:function(a,b,g){(b=a.exec(b))&&(b.index+=g);a.lastIndex=0;return b},afterMatch:function(a){return a.index+a[0].length},getEndMatch:function(a,b,g){if(a instanceof this.BeginEndNode){var h=a.rule,a=a.endRegexSubstituted||h.endRegex;return!a?null:this.exec(a,b,g)}return null},initialParse:function(){this.textView.getModel().getCharCount();this._tree=new this.ContainerNode(null,this.grammar._typedRule);this.parse(this._tree,!1,0)},onModelChanged:function(a){var b=a.addedCharCount,
g=a.removedCharCount,a=a.start;if(this._tree){var h=this.textView.getModel(),j=h.getCharCount(),h=h.getLineEnd(h.getLineAtOffset(a)-1),f=this.getFirstDamaged(h,h),h=h===-1?0:h,b=f?this.parse(f,!0,h,a,b,g):j;this.textView.redrawRange(h,b)}else this.initialParse()},getFirstDamaged:function(a,b){if(a<0)return this._tree;for(var g=[this._tree],h=null;g.length;){var j=g.pop();if(!j.parent||this.isDamaged(j,a,b)){j instanceof this.BeginEndNode&&(h=j);for(var f=0;f<j.children.length;f++)g.push(j.children[f])}}return h||
this._tree},isDamaged:function(a,b,g){return a.start<=g&&a.end>b},parse:function(a,b,g,h,j,f){var l=this.textView.getModel(),n=l.getLineStart(l.getLineCount()-1),o=l.getCharCount(),m=this.getInitialExpected(a,g),p=-1;if(b)a.repaired=!0,a.endNeedsUpdate=!0,p=(p=a.children[a.children.length-1])?l.getLineEnd(l.getLineAtOffset(p.end+(j-f))):-1,h=l.getLineEnd(l.getLineAtOffset(h+f)),p=Math.max(p,h);for(var p=p===-1?o:p,h=m,q=a,r=!1,s=g,u=-1;q&&(!b||s<p);){var v=this.getNextMatch(l,q,s);v||(s=s>=n?o:l.getLineStart(l.getLineAtOffset(s)+
1));var w=v&&v.match,t=v&&v.rule,y=v&&v.isEnd;if(v&&v.isSub){if(s=this.afterMatch(w),t instanceof this.BeginEndRule)r=!0,b&&t===h.rule&&q===h.parent?(q=h,q.setStart(w),q.repaired=!0,q.endNeedsUpdate=!0,h=this.getNextExpected(h,"begin")):(b&&(this.prune(q,h),b=!1),w=new this.BeginEndNode(q,t,w),q.addChild(w),q=w)}else if(y||s===o){if(q instanceof this.BeginEndNode)w?(r=!0,u=Math.max(u,q.end),q.setEnd(w),s=this.afterMatch(w),b&&q===h&&q.parent===h.parent?(q.repaired=!0,delete q.endNeedsUpdate,h=this.getNextExpected(h,
"end")):b&&(this.prune(q,h),b=!1)):(q.setEnd(o),delete q.endNeedsUpdate);q=q.parent}b&&s>=p&&!r&&(this.prune(a,m),b=!1)}this.removeUnrepairedChildren(a,b,g);this.cleanup(b,a,g,p,o,j,f);return b?Math.max(u,s):s},removeUnrepairedChildren:function(a,b,g){if(b){for(var b=a.children,h=-1,j=0;j<b.length;j++){var f=b[j];if(!f.repaired&&this.isDamaged(f,g,Number.MAX_VALUE)){h=j;break}}if(h!==-1)a.children.length=h}},cleanup:function(a,b,g,h,j,f,l){if(a){a=f-l;j=this.getIntersecting(h-a+1,j);b=this.getIntersecting(g,
h);for(g=0;g<j.length;g++)h=j[g],!h.repaired&&h instanceof this.BeginEndNode&&(h.shiftEnd(a),h.shiftStart(a));for(g=0;g<b.length;g++)h=b[g],h.repaired&&h.endNeedsUpdate&&h.shiftEnd(a),delete h.endNeedsUpdate,delete h.repaired}else{b=this.getIntersecting(g,h);for(g=0;g<b.length;g++)delete b[g].repaired}},getNextMatch:function(a,b,g,h){var j=a.getLineAtOffset(g),j=a.getLineEnd(j),f=a.getText(g,j),l=[],n=[],a=[],j=[];for(this.push(l,b.rule.subrules);l.length;){var o=l.length?l.pop():null,o=o&&o._resolvedRule._typedRule;
if(o instanceof this.ContainerRule&&n.indexOf(o)===-1)n.push(o),this.push(l,o.subrules);else if(!o||!h||o.matchRegex){var m=o&&this.exec(o.matchRegex||o.beginRegex,f,g);m&&(a.push(m),j.push(o))}}l=Number.MAX_VALUE;n=-1;for(o=0;o<a.length;o++)if(m=a[o],m.index<l)l=m.index,n=o;if(!h&&(g=this.getEndMatch(b,f,g)))if(h=b.rule.applyEndPatternLast,n===-1||g.index<l||!h&&g.index===l)return{isEnd:!0,rule:b.rule,match:g};return n===-1?null:{isSub:!0,rule:j[n],match:a[n]}},getInitialExpected:function(a,b){var g,
h;if(a===this._tree)for(g=0;g<a.children.length;g++){if(h=a.children[g],h.start>=b)return h}else if(a instanceof this.BeginEndNode&&a.endMatch){var j=a.endMatch.index;for(g=0;g<a.children.length;g++)if(h=a.children[g],h.start>=b)break;if(h&&h.start<j)return h}return a},getNextExpected:function(a,b){if(b==="begin"){var g=a.children[0];return g?g:a}else if(b==="end"&&(g=a.parent)){var h=g.children[g.children.indexOf(a)+1];return h?h:g}return null},prune:function(a,b){if(b.parent===a)a.children.length=
b.getIndexInParent();else if(a instanceof this.BeginEndNode)a.endMatch=null,a.end=null;if(a.parent)a.parent.children.length=a.getIndexInParent()+1},onLineStyle:function(a){this._tree||this.initialParse();var b=a.lineStart,g=this.textView.getModel(),h=g.getLineEnd(a.lineIndex),j=g.getLineEnd(g.getLineAtOffset(b)-1),j=this.getFirstDamaged(j,j),b=this.getLineScope(g,j,b,h);a.ranges=this.toStyleRanges(b);a.ranges.sort(function(a,b){return a.start-b.start})},getLineScope:function(a,b,g,h){for(var j=g,
f=this.getInitialExpected(b,g),l=[],n=[];b&&j<h;){var o=this.getNextMatch(a,b,j);if(!o)break;var m=o&&o.match,p=o&&o.rule,q=o&&o.isSub,o=o&&o.isEnd;m.index!==j&&n.push({start:j,end:m.index,node:b});if(q)j=this.afterMatch(m),p instanceof this.BeginEndRule?(this.addBeginScope(l,m,p),b=f,f=this.getNextExpected(f,"begin")):this.addMatchScope(l,m,p);else if(o)j=this.afterMatch(m),this.addEndScope(l,m,p),f=this.getNextExpected(f,"end"),b=b.parent}j<h&&n.push({start:j,end:h,node:b});a=this.getInheritedLineScope(n,
g,h);return l.concat(a)},getInheritedLineScope:function(a){for(var b=[],g=0;g<a.length;g++)for(var h=a[g],j=h.node;j;){var f=j.rule.rule,l=f.name;if(f=f.contentName||l){this.addScopeRange(b,h.start,h.end,f);break}j=j.parent}return b},addBeginScope:function(a,b,g){var h=g.rule;this.addCapturesScope(a,b,h.beginCaptures||h.captures,g.isComplex,g.beginOld2New,g.beginConsuming)},addEndScope:function(a,b,g){var h=g.rule;this.addCapturesScope(a,b,h.endCaptures||h.captures,g.isComplex,g.endOld2New,g.endConsuming)},
addMatchScope:function(a,b,g){var h=g.rule,j=h.name;(h=h.captures)?this.addCapturesScope(a,b,h,g.isComplex,g.matchOld2New,g.matchConsuming):this.addScope(a,b,j)},addScope:function(a,b,g){g&&a.push({start:b.index,end:this.afterMatch(b),scope:g})},addScopeRange:function(a,b,g,h){h&&a.push({start:b,end:g,scope:h})},addCapturesScope:function(a,b,g,h,j,f){if(g)if(h){for(var h={1:0},l=0,n=1;b[n]!==void 0;n++)f[n]!==void 0&&(l+=b[n].length),b[n+1]!==void 0&&(h[n+1]=l);f=b.index;for(l=1;g[l];l++){var n=g[l].name,
o=j[l],m=f+h[o];typeof b[o]!=="undefined"&&this.addScopeRange(a,m,m+b[o].length,n)}}else this.addScope(a,b,g[0]&&g[0].name)},getIntersecting:function(a,b){for(var g=[],h=this._tree?[this._tree]:[];h.length;){var j=h.pop(),f=!1;j instanceof this.ContainerNode?f=!0:this.isDamaged(j,a,b)&&(f=!0,g.push(j));if(f)for(var f=j.children.length,l=0;l<f;l++)h.push(j.children[l])}return g.reverse()},toStyleRanges:function(a){for(var b=[],g=0;g<a.length;g++){var h=a[g],j=this._styles[h.scope];if(!j)throw Error("styles not found for "+
h.scope);j=j.join(" ");b.push({start:h.start,end:h.end,style:{styleClass:j}})}return b}};return{RegexUtil:a,TextMateStyler:f}});
define("orion/editor/asyncStyler",["i18n!orion/editor/nls/messages","orion/textview/annotations"],function(b,f){function a(a){return a.getProperty("objectClass").indexOf(c)!==-1&&a.getProperty("type")==="highlighter"}function e(a,b,c){this.initialize(a,b,c);this.lineStyles=[]}var c="orion.edit.highlighter",d=c+" service must be an event emitter";f.AnnotationType.registerType("orion.annotation.highlightError",{title:b.syntaxError,html:"<div class='annotationHTML error'></div>",rangeStyle:{styleClass:"annotationRange error"}});
e.prototype={initialize:function(b,d,e){this.textView=b;this.serviceRegistry=d;this.annotationModel=e;this.services=[];var f=this;this.listener={onModelChanging:function(a){f.onModelChanging(a)},onModelChanged:function(a){f.onModelChanged(a)},onDestroy:function(a){f.onDestroy(a)},onLineStyle:function(a){f.onLineStyle(a)},onStyleReady:function(a){f.onStyleReady(a)},onServiceAdded:function(a){f.onServiceAdded(a.serviceReference,f.serviceRegistry.getService(a.serviceReference))},onServiceRemoved:function(a){f.onServiceRemoved(a.serviceReference,
f.serviceRegistry.getService(a.serviceReference))}};b.addEventListener("ModelChanging",this.listener.onModelChanging);b.addEventListener("ModelChanged",this.listener.onModelChanged);b.addEventListener("Destroy",this.listener.onDestroy);b.addEventListener("LineStyle",this.listener.onLineStyle);d.addEventListener("registered",this.listener.onServiceAdded);d.addEventListener("unregistering",this.listener.onServiceRemoved);b=d.getServiceReferences(c);for(e=0;e<b.length;e++){var l=b[e];a(l)&&this.addServiceListener(d.getService(l))}},
onDestroy:function(){this.destroy()},destroy:function(){if(this.textView)this.textView.removeEventListener("ModelChanging",this.listener.onModelChanging),this.textView.removeEventListener("ModelChanged",this.listener.onModelChanged),this.textView.removeEventListener("Destroy",this.listener.onDestroy),this.textView.removeEventListener("LineStyle",this.listener.onLineStyle),this.textView=null;if(this.services){for(var a=0;a<this.services.length;a++)this.removeServiceListener(this.services[a]);this.services=
null}if(this.serviceRegistry)this.serviceRegistry.removeEventListener("registered",this.listener.onServiceAdded),this.serviceRegistry.removeEventListener("unregistering",this.listener.onServiceRemoved),this.serviceRegistry=null;this.lineStyles=this.listener=null},onModelChanging:function(a){this.startLine=this.textView.getModel().getLineAtOffset(a.start)},onModelChanged:function(a){var b=this.startLine;(a.addedLineCount||a.removedLineCount)&&Array.prototype.splice.apply(this.lineStyles,[b,a.removedLineCount].concat(this._getEmptyStyle(a.addedLineCount)))},
onStyleReady:function(a){var b=a.lineStyles||a.style,a=Number.MAX_VALUE,c=-1,d=this.textView.getModel(),e;for(e in b)b.hasOwnProperty(e)&&(this.lineStyles[e]=b[e],a=Math.min(a,e),c=Math.max(c,e));a=Math.max(a,0);c=Math.min(c,d.getLineCount());if(b=this.annotationModel){for(var n=b.getAnnotations(d.getLineStart(a),d.getLineEnd(c)),o=[];n.hasNext();){var m=n.next();m.type==="orion.annotation.highlightError"&&o.push(m)}n=[];for(m=a;m<=c;m++){e=m;var p=this.lineStyles[e],p=p&&p.errors;e=d.getLineStart(e);
if(p)for(var q=0;q<p.length;q++){var r=p[q];n.push(f.AnnotationType.createAnnotation("orion.annotation.highlightError",r.start+e,r.end+e))}}b.replaceAnnotations(o,n)}this.textView.redrawLines(a,c+1)},onLineStyle:function(a){function b(a,c){for(var d=a.length,e=[],g=0;g<d;g++){var h=a[g];e.push({start:h.start+c,end:h.end+c,style:h.style})}return e}var c=this.lineStyles[a.lineIndex];if(c)if(c.ranges)a.ranges=b(c.ranges,a.lineStart);else if(c.style)a.style=c.style},_getEmptyStyle:function(a){for(var b=
[],c=0;c<a;c++)b.push(null);return b},setContentType:function(a){this.contentType=a;if(this.services)for(a=0;a<this.services.length;a++){var b=this.services[a];b.setContentType&&b.setContentType(this.contentType)}},onServiceAdded:function(b,c){a(b)&&this.addServiceListener(c)},onServiceRemoved:function(a,b){this.services.indexOf(b)!==-1&&this.removeServiceListener(b)},addServiceListener:function(a){typeof a.addEventListener==="function"?(a.addEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady),
this.services.push(a),a.setContentType&&this.contentType&&a.setContentType(this.contentType)):typeof console!=="undefined"&&console.log(Error(d))},removeServiceListener:function(a){typeof a.removeEventListener==="function"?(a.removeEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady),a=this.services.indexOf(a),a!==-1&&this.services.splice(a,1)):typeof console!=="undefined"&&console.log(Error(d))}};return{AsyncStyler:e}});
define("examples/textview/textStylerOptions",["orion/bootstrap"],function(b){function f(e){this._styler=e;this._view=this._styler.view;var c=this;this._listener={onStorage:function(a){c._onStorage(a)}};var d=this;this._view&&b.startup().then(function(b){a=b.preferences;d.preferences=a;d._updateStylesheet(a);d.storageKey=a.listenForChangedSettings(d._listener.onStorage)})}var a;f.prototype={_getSetting:function(a,b,d){for(var g,h=0;h<a.length;h++)if(a[h].label===b)for(var f=0;f<a[h].data.length;f++)if(a[h].data[f].label===
d){g=a[h].data[f].value;break}return g},_styleSheet:function(a,b){function d(a,d){var e=k.getClassNameForToken(a);if(e){var h=g[d],p=g.fontWeight;f.push("."+b+" ."+e+" {");f.push("\tcolor: "+h+";");f.push("\tfont-weight: "+p+";");f.push("}")}}for(var g=[],h=0;h<a.length;h++)g[a[h].element]=a[h].value;var f=[];f.push("");h=g.fontFamily;h=h==="sans serif"?'"Menlo", "Consolas", "Vera Mono", "monospace"':"monospace";f.push("."+b+" {");f.push("\tfont-family: "+h+";");f.push("\tfont-size: "+g.fontSize+
";");f.push("\tcolor: "+g.text+";");f.push("}");f.push("."+b+" .textview {");f.push("\tbackground-color: "+g.background+";");f.push("}");f.push("."+b+".ruler.annotations{");f.push("\tbackground-color: red;");f.push("}");f.push("."+b+" .ruler {");f.push("\tbackground-color: "+g.annotationRuler+";");f.push("}");f.push("."+b+" .rulerLines {");f.push("\tcolor: "+g.lineNumber+";");f.push("\tbackground-color: "+g.annotationRuler+";");f.push("}");f.push("."+b+" .rulerLines.even {");f.push("\tcolor: "+g.lineNumber+
";");f.push("\tbackground-color: "+g.annotationRuler+";");f.push("}");f.push("."+b+" .rulerLines.odd {");f.push("\tcolor: "+g.lineNumber+";");f.push("\tbackground-color: "+g.annotationRuler+";");f.push("}");f.push("."+b+" .annotationLine.currentLine {");f.push("\tbackground-color: "+g.currentLine+";");f.push("}");var k=this._styler;k.getClassNameForToken&&(d("keyword","keyword"),d("string","string"),d("singleLineComment","comment"),d("multiLineComment","comment"),d("docComment","comment"),d("docHtmlComment",
"comment"));return f.join("\n")},_onStorage:function(a){a.key===this.storageKey&&this._updateStylesheet(this.preferences)},_updateStylesheet:function(a,b){var d,g=this;a.getPreferences("/settings",2).then(function(a){if(a.get("JavaScript Editor")!==void 0&&(d=JSON.parse(a.get("JavaScript Editor")))){if(g._stylesheet)g._stylesheet.parentNode.removeChild(g._stylesheet),g._stylesheet=null;a=g._stylesheet=document.createElement("STYLE");a.appendChild(document.createTextNode(g._styleSheet(d,"userTheme",
b)));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(a);var a=g._view,e={themeClass:null};a.getOptions(e);var f=e.themeClass;f?((f=f.replace("userTheme",""))&&(f+=" "),f+="userTheme"):f="userTheme";e.themeClass=f;a.setOptions(e);a.update(!0)}})}};return{TextStylerOptions:f}});
define("orion/highlight",["dojo","examples/textview/textStyler","orion/editor/textMateStyler","orion/editor/asyncStyler","examples/textview/textStylerOptions"],function(b,f,a,e,c){function d(d,g,k,l,n,o,m){function p(a,c){var d=a.getProperty("contentType"),e=a.getProperty("fileTypes");if(d)return g.isSomeExtensionOf(k,d).then(function(b){return b?a:null});else if(c&&e&&e.indexOf(c)!==-1)return d=new b.Deferred,d.callback(a),d;return null}var q=function(a){var b=null;switch(a&&a.id){case "application/javascript":case "application/json":b=
new f.TextStyler(l,"js",n);break;case "text/x-java-source":b=new f.TextStyler(l,"java",n);break;case "text/css":b=new f.TextStyler(l,"css",n)}b&&new c.TextStylerOptions(b);return b}(k);if(q)return o=new b.Deferred,o.callback(q),o;for(var q=o&&o.split(".").pop().toLowerCase(),o=d.getServiceReferences("orion.edit.highlighter"),r=[],s=[],u=0;u<o.length;u++){var v=o[u];v.getProperty("type")==="grammar"&&r.push(v.getProperty("grammar"));(v=p(v,q))&&s.push(v)}return(new b.DeferredList(s)).then(function(b){for(var c,
g=b.length-1;g>=0;g--){var f=b[g][1];if(f&&(m||f.getProperty("type")!=="highlighter")){c=f;break}}var j;if(c)if(b=c.getProperty("type"),b==="highlighter")j=new e.AsyncStyler(l,d,n),j.setContentType(k);else if(b==="grammar"||typeof b==="undefined")c=c.getProperty("grammar"),j=new a.TextMateStyler(l,c,r);return j})}function g(a){this.serviceRegistry=a;this.styler=null}g.prototype={setup:function(a,b,c,e,g){g=typeof g==="undefined"?!0:g;if(this.styler)this.styler.destroy&&this.styler.destroy(),this.styler=
null;var f=this;return d(this.serviceRegistry,this.serviceRegistry.getService("orion.core.contenttypes"),a,b,c,e,g).then(function(a){return f.styler=a})},getStyler:function(){return this.styler}};return{createStyler:d,SyntaxHighlighter:g}});
define("orion/i18nUtil",["require","orion/Deferred"],function(b,f){function a(a){if(a=localStorage.getItem("orion/messageBundle/"+a))if(a=JSON.parse(a),a._expires&&a._expires>(new Date).getTime())return delete a._expires,a;return null}var e={};return{getMessageBundle:function(c){function d(){b(["i18n!"+c],function(a){if(a){var b=c;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}g.resolve(a)})}if(e[c])return e[c];var g=new f;e[c]=
g;var h=a(c);if(h)return g.resolve(h),g;try{b([c],d)}catch(j){b(["orion/i18n!"+c],d)}return g},formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})}}});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(b,f,a){function e(a,c,d){if(!a[c])throw c+b[" is not supported in this file system"];return a[c].apply(a,d)}function c(a,d,j,k){if(!a.readBlob)throw b["source file service does not support binary read"];if(!j.writeBlob)throw b["target file service does not support binary write"];if(d[d.length-1]!=="/")return e(a,"readBlob",[d]).then(function(a){return e(j,"writeBlob",[k,a])});var l=k.substring(0,
k.length-1),n=decodeURIComponent(l.substring(l.lastIndexOf("/")+1)),l=l.substring(0,l.lastIndexOf("/")+1);return e(j,"createFolder",[l,n]).then(function(){},function(){}).then(function(){d.indexOf("/")===0&&(d+="?depth=1");return e(a,"fetchChildren",[d]).then(function(b){for(var d=[],e=0;e<b.length;++e){var h=b[e].Location,l=h;b[e].Directory&&(l=h.substring(0,h.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+1));l=k+encodeURIComponent(l);b[e].Directory&&(l+="/");d[e]=c(a,h,j,l)}return f.all(d)})})}
function d(c,d){function e(a){var c=new f;c.reject(b["No Matching FileService for location:"]+a);return c}var k=c.getServiceReferences("orion.core.file"),l=k;if(d)for(var l=[],n=0;n<k.length;++n)d(k[n])&&l.push(k[n]);for(var o=[],m=[],p=[],q=[],r={fetchChildren:function(){var a=new f;a.resolve(q);return a},createWorkspace:function(){var a=new f;a.reject(b["no file service"]);return a},loadWorkspaces:function(){var a=new f;a.reject(b["no file service"]);return a},loadWorkspace:function(){var a=new f;
window.setTimeout(function(){a.resolve({Directory:!0,Length:0,LocalTimeStamp:0,Name:b["File Servers"],Location:"/",Children:q,ChildrenLocation:"/"})},100);return a},search:e,createProject:e,createFolder:e,createFile:e,deleteFile:e,moveFile:e,copyFile:e,read:e,write:e},k=0;k<l.length;++k)q[k]={Directory:!0,Length:0,LocalTimeStamp:0,Location:l[k].getProperty("top"),ChildrenLocation:l[k].getProperty("top"),Name:l[k].getProperty("Name")},n=l[k].getProperty("pattern")||".*",n[0]!=="^"&&(n="^"+n),o[k]=
RegExp(n),m[k]=c.getService(l[k]),p[k]=l[k].getProperty("Name"),l[k].getProperty("NameKey")&&l[k].getProperty("nls")&&a.getMessageBundle(l[k].getProperty("nls")).then(function(a,b){q[a].Name=b[l[a].getProperty("NameKey")];p[a]=b[l[a].getProperty("NameKey")]}.bind(this,k));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return m[0]?0:-1;for(var c=0;c<o.length;++c)if(o[c].test(a))return c;throw b["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return a===-1?r:m[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?r.Name:p[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?r.Location:q[a].Location}}d.prototype={getService:function(a){return this._getService(a)},fileServiceName:function(a){return this._getServiceName(a)},fileServiceRootURL:function(a){return this._getServiceRootURL(a)},fetchChildren:function(a){return e(this._getService(a),"fetchChildren",
arguments)},createWorkspace:function(a){return e(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return e(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(a){return e(this._getService(a),"loadWorkspace",arguments)},createProject:function(a,b,c,d){return e(this._getService(a),"createProject",arguments)},createFolder:function(a,b){return e(this._getService(a),"createFolder",arguments)},createFile:function(a,b){return e(this._getService(a),"createFile",
arguments)},deleteFile:function(a){return e(this._getService(a),"deleteFile",arguments)},moveFile:function(a,b,d){var f=this._getService(a),l=this._getService(b);if(f===l)return e(f,"moveFile",arguments);var n=a[a.length-1]==="/",o=b;o[o.length-1]!=="/"&&(o+="/");if(d)o+=encodeURIComponent(d);else{var m=a;n&&(m=m.substring(0,m.length-1));o+=m.substring(m.lastIndexOf("/")+1)}n&&o[o.length-1]!=="/"&&(o+="/");return c(f,a,l,o).then(function(){return e(f,"deleteFile",[a])})},copyFile:function(a,b,d){var f=
this._getService(a),l=this._getService(b);if(f===l)return e(f,"copyFile",arguments);var n=a[a.length-1]==="/",o=b;o[o.length-1]!=="/"&&(o+="/");if(d)o+=encodeURIComponent(d);else{var m=a;n&&(m=m.substring(0,m.length-1));o+=m.substring(m.lastIndexOf("/")+1)}n&&o[o.length-1]!=="/"&&(o+="/");return c(f,a,l,o)},read:function(a,b){return e(this._getService(a),"read",arguments)},write:function(a,b,c){return e(this._getService(a),"write",arguments)},remoteImport:function(a,b){return e(this._getService(a),
"remoteImport",arguments)},remoteExport:function(a,b){return e(this._getService(a),"remoteExport",arguments)},search:function(a,b){return e(this._getService(a),"search",arguments)}};d.prototype.constructor=d;return{FileClient:d}});
define("dojo/hash",["dojo"],function(b){(function(){function f(a,b){var c=a.indexOf(b);return c>=0?a.substring(c+1):""}function a(){return f(location.href,"#")}function e(){b.publish("/dojo/hashchange",[a()])}function c(){a()!==h&&(h=a(),e())}function d(a){if(j)if(j.isTransitioning())setTimeout(b.hitch(null,d,a),l);else{var e=j.iframe.location.href,g=e.indexOf("?");j.iframe.location.replace(e.substring(0,g)+"?"+a)}else location.replace("#"+a),!k&&c()}function g(){function c(){h=a();j=u?h:f(v.href,
"?");k=!1;r=null}var d=document.createElement("iframe"),g=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html");b.config.useXDomain&&!b.config.dojoBlankHtmlUrl&&console.warn("dojo.hash: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html");d.id="dojo-hash-iframe";d.src=g+"?"+a();d.style.display="none";document.body.appendChild(d);this.iframe=b.global["dojo-hash-iframe"];
var j,k,r,s,u,v=this.iframe.location;this.isTransitioning=function(){return k};this.pollLocation=function(){if(!u)try{var w=f(v.href,"?");if(document.title!=s)s=this.iframe.document.title=document.title}catch(t){u=!0,console.error("dojo.hash: Error adding history entry. Server unreachable.")}var y=a();if(k&&h===y)if(u||w===r)c(),e();else{setTimeout(b.hitch(this,this.pollLocation),0);return}else if(!(h===y&&(u||j===w)))if(h!==y){h=y;k=!0;r=y;d.src=g+"?"+r;u=!1;setTimeout(b.hitch(this,this.pollLocation),
0);return}else if(!u)location.href="#"+v.search.substring(1),c(),e();setTimeout(b.hitch(this,this.pollLocation),l)};c();setTimeout(b.hitch(this,this.pollLocation),l)}b.hash=function(b,c){if(!arguments.length)return a();b.charAt(0)=="#"&&(b=b.substring(1));c?d(b):location.href="#"+b;return b};var h,j,k,l=b.config.hashPollFrequency||100;b.addOnLoad(function(){"onhashchange"in b.global&&(!b.isIE||b.isIE>=8&&document.compatMode!="BackCompat")?k=b.connect(b.global,"onhashchange",e):document.addEventListener?
(h=a(),setInterval(c,l)):document.attachEvent&&(j=new g)})})();return b.hash});
define("orion/uiUtils",["i18n!orion/nls/messages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(b,f,a){function e(a){var b=window.navigator.platform.indexOf("Mac")!==-1;return b&&a.metaKey||!b&&a.ctrlKey}return{getUserKeyString:function(a){var b="",e=navigator.platform.indexOf("Mac")!==-1;a.mod1&&(b+=e?"Cmd+":"Ctrl+");a.mod2&&(b+="Shift+");a.mod3&&(b+="Alt+");a.mod4&&e&&(b+="Ctrl+");if(a.alphaKey)return b+a.alphaKey;for(var h in f.keys)if(typeof(f.keys[h]==="number")&&f.keys[h]===
a.keyCode)return b+h;var j;switch(a.keyCode){case 59:j=a.mod2?":":";";break;case 61:j=a.mod2?"+":"=";break;case 188:j=a.mod2?"<":",";break;case 190:j=a.mod2?">":".";break;case 191:j=a.mod2?"?":"/";break;case 192:j=a.mod2?"~":"`";break;case 219:j=a.mod2?"{":"[";break;case 220:j=a.mod2?"|":"\\";break;case 221:j=a.mod2?"}":"]";break;case 222:j=a.mod2?'"':"'"}return j?b+j:b+String.fromCharCode(a.keyCode)},getUserText:function(b,d,e,h,j,k,l,n,o){var l=function(l){return function(n){var m=a.byId(b),s=m.get("value");
l&&n.keyCode===f.keys.ESCAPE?(e&&f.style(d,"display","inline"),m.destroyRecursive(),k&&k()):l&&n.keyCode!==f.keys.ENTER||(!m.isValid()||!o&&s===h?e&&f.style(d,"display","inline"):j(s),m.destroyRecursive(),k&&k())}},m=new a.form.ValidationTextBox({id:b,required:!0,value:h||""});f.place(m.domNode,d,"after");f.addClass(m.domNode,"userEditBoxPrompt");e&&f.style(d,"display","none");f.connect(m,"onKeyDown",l(!0));f.connect(m,"onBlur",l(!1));window.setTimeout(function(){m.focus();if(h){var d=f.byId(b),e=
n?h.indexOf(n):-1;e>0?a.selectInputText(d,0,e):d.select()}},0)},openInNewWindow:e,followLink:function(a,b){b&&e(b)?window.open(a):window.location=a}}});
define("orion/commands","i18n!orion/nls/messages,require,dojo,dijit,orion/uiUtils,orion/PageUtil,orion/explorers/navigationUtils,dijit/Menu,dijit/form/DropDownButton,dijit/MenuItem,dijit/PopupMenuItem,dijit/MenuSeparator,dijit/Tooltip,dijit/TooltipDialog".split(","),function(b,f,a,e,c,d,g){function h(b,c,d){var e=function(){d&&a.addClass(this,d)},g=function(){d&&a.removeClass(this,d)};a.connect(b,"onmouseover",b,e);a.connect(c,"onfocus",b,e);a.connect(b,"onmouseout",b,g);a.connect(c,"onblur",b,g)}
function j(a,b,c,d,e){this.commandService=a;this.handler=b;this.items=c;this.userData=d;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function k(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._init(a);this._parameterCollector=null;this.showMenuIcons=!1}function l(b,c,d){a.addClass(c,"commandImage");var e;b.imageClass?(e=a.create("span",{},c,"last"),a.addClass(e,b.spriteClass),a.addClass(e,b.imageClass)):
(e=new Image,e.alt=b.name,e.name=d,e.id=d,e.src=b.image,a.place(e,c,"last"));return e}function n(a){this._init(a)}function o(b,c,d,e,g,h,f){this.keyCode=typeof b==="string"?b.toUpperCase().charCodeAt(0):b;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=d!==void 0&&d!==null?d:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=g!==void 0&&g!==null?g:!1;typeof h==="string"?(this.domScope=a.byId(h),this.scopeName=f||h):(this.domScope=h,this.scopeName=f||h?h.id:null)}function m(a,b){this.token=a;this.parameterName=
b}function p(a,b,c,d,e){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1}function q(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}var r=window.navigator.platform.indexOf("Mac")!==-1;j.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(a){var b=new j(this.commandService,
this.handler,this.items,this.userData,this.command);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}};j.prototype.constructor=j;var s=a.declare(e.MenuItem,{constructor:function(){var b=arguments[0]||{};b.onKeyDown=a.hitch(this,function(b){if((b.keyCode===a.keys.ENTER||b.keyCode===a.keys.SPACE)&&this._anchorLocation)b.ctrlKey?window.open(this._anchorLocation):window.location=this._anchorLocation});
this.inherited(arguments||[b])},postCreate:function(){var b=a.query("a",this.domNode)[0];if(b)a.addClass(b,"commandMenuItemAnchor"),this._anchorLocation=b.href},_setLabelAttr:function(b){typeof b==="string"?this.containerNode.textContent=b:b&&(a.empty(this.containerNode),this.containerNode.appendChild(b.cloneNode(!0)))},setLink:function(b,c){var b=d.validateURLScheme(b),e=a.create("a",{className:"commandMenuItemAnchor",href:b});e.textContent=c;a.place(e,this.containerNode,"only");this._anchorLocation=
b},_onClick:function(a){this.hasLink||this.inherited(arguments)}}),u=a.declare(e.form.DropDownButton,{_setLabelAttr:function(b){if(typeof b==="string"){if(this._set("label",b),this.containerNode.textContent=b,this.showLabel===!1&&!this.params.title)this.titleNode.title=a.trim(this.containerNode.innerText||this.containerNode.textContent||"")}else b&&(a.empty(this.containerNode),this.containerNode.appendChild(b.cloneNode(!0)))}}),v=a.declare(e.PopupMenuItem,{_setLabelAttr:function(b){typeof b==="string"?
this.containerNode.textContent=b:(a.empty(this.containerNode),this.containerNode.appendChild(b.cloneNode(!0)))}}),w=a.declare(e.Tooltip,{constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.showDelay=1E3},_onUnHover:function(){this._showTimer&&(window.clearTimeout(this._showTimer),delete this._showTimer);this.polling=!1;this.close()},_onHover:function(b){this.inherited(arguments);this.polling=!0;this.pollForMissingTarget();window.setTimeout(function(){e._masterTT&&a.removeAttr(e._masterTT.containerNode,
"role")},this.showDelay+1)},pollForMissingTarget:function(){this.polling&&window.setTimeout(a.hitch(this,function(){this._stillInDocument(this._connectNode)?this.pollForMissingTarget():(this.polling=!1,this.close())}),this.showDelay+500)},_stillInDocument:function(a){for(;a;){if(a===window.document)return!0;a=a.parentNode}return!1},postMixInProperties:function(){this.inherited(arguments);this.options.commandParent&&e.byId(this.options.commandParent.id)&&a.connect(this.options.commandParent,"onClose",
a.hitch(this,function(){this.close()}))},_setLabelAttr:function(b){this.label=null;typeof b==="string"?this.domNode.textContent=b:(a.empty(this.domNode),this.domNode.appendChild(b.cloneNode(!0)))}});k.prototype={_init:function(b){this._registry=b.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._defaultSelectionService=b.selection;a.connect(window.document,"onkeydown",a.hitch(this,function(a){a=a||window.event;if(function(a){if(r){if(a.metaKey&&
!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;else if(a.charCode||a.keyCode)switch(a=a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable===
"true")return;var b=a.target.nodeName.toLowerCase();if(b==="input")switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(b==="textarea")return}this._processKey(a)}))},_processKey:function(b){function c(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var d in this._activeBindings)if(this._activeBindings[d]&&
this._activeBindings[d].keyBinding&&this._activeBindings[d].command&&this._activeBindings[d].keyBinding.match(b)){var e=this._activeBindings[d],g=e.invocation;if(g)if(e=e.command,e.hrefCallback){c(b);b=e.hrefCallback.call(g.handler||window,g);b.then?b.then(function(a){window.open(a)}):window.open(b);break}else if(e.callback){c(b);window.setTimeout(a.hitch(this,function(){this._invoke(g)}),0);break}}},processURL:function(b){for(var c in this._urlBindings)if(this._urlBindings[c]&&this._urlBindings[c].urlBinding&&
this._urlBindings[c].command){var d=this._urlBindings[c].urlBinding.match(b);if(d){var e=this._urlBindings[c],g=e.command,h=e.invocation;if(h&&h.parameters&&g.callback){h.parameters.setValue(d.parameterName,d.parameterValue);window.setTimeout(a.hitch(this,function(){this._invoke(h)}),0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(b,c,d,e){if(c){var g=this._commandList[b];g&&(g.visibleWhen?g.visibleWhen(c):1)&&g.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(new j(this,
d,c,null,g),e)}),0)}else{var h=this._urlBindings[b];h&&h.command&&h.command.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(h.invocation,e)}),0)}},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},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(b,c){if(b)if(this._parameterCollector&&b.parameters&&b.parameters.hasParameters()&&(c||b.parameters.shouldCollectParameters())){var d=!1;b.parameters.updateParameters(b);d=this._parameterCollector.collectParameters(b);if(!d){var g=new e.TooltipDialog({onBlur:function(){e.popup.close(g)}}),h=a.create("div");a.addClass(h,"parameterPopup");var f=
window.document.activeElement,j=this._parameterCollector.getFillFunction(b,function(){e.popup.close(g);g.destroyRecursive();f&&f.focus()})(h);h.childNodes.length>0&&(g.set("content",h),h=(h=e.byId(b.domParent.id))?a.position(h.eclipseScopeId,!0):a.position(b.domNode,!0),h.x&&h.y&&h.w&&(e.popup.open({popup:g,x:h.x+h.w-8,y:h.y+8}),window.setTimeout(function(){j.focus();j.select()},0),d=!0))}d||b.command.callback.call(b.handler||window,b)}else b.command.callback.call(b.handler||window,b);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},
collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(b){var d={},e,g,h;for(h in this._activeBindings)if((g=this._activeBindings[h])&&g.keyBinding&&g.command)g.keyBinding.scopeName?(d[g.keyBinding.scopeName]||(d[g.keyBinding.scopeName]=[]),d[g.keyBinding.scopeName].push(g)):(e=c.getUserKeyString(g.keyBinding),a.place("<span role='listitem'>"+e+" = "+g.command.name+"<br></span>",b,"last"));for(var f in d)if(d[f].length&&d[f].length>0){a.place("<h2>"+f+"</h2>",b,"last");
for(h=0;h<d[f].length;h++)g=d[f][h],e=c.getUserKeyString(g.keyBinding),a.place("<span role='listitem'>"+e+" = "+g.command.name+"<br></span>",b,"last")}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,c,d,e,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));if(a[b]){if(d)a[b].title=d;if(c)a[b].position=c;a[b].emptyGroupMessage=g}else a[b]={title:d,position:c,emptyGroupMessage:g,
children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var c=b.split("/"),d=0;d<c.length;d++)if(c[d].length>1)a[c[d]]||(a[c[d]]={position:0,children:{}}),a=a[c[d]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,d,e,g,h){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=
this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};g&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:g,bindingOnly:e});h&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:h,bindingOnly:e});a.sortedContributions=null},_isLastChildSeparator:function(b,c){if(c==="tool"||c==="button")return b.childNodes.length>0&&a.hasClass(b.childNodes[b.childNodes.length-1],"commandSeparator");if(c==="menu"){var d=b.getChildren();return d.length>
0&&d[d.length-1]instanceof e.MenuSeparator}return!1},renderCommands:function(b,c,d,e,g,h,f){if(typeof b!=="string")throw"a scope id for rendering must be specified";typeof c==="string"&&(c=a.byId(c));if(!c)throw"no parent";var j=this._contributionsByScopeId[b];if(!d&&j){var d=j.localSelectionService||this._defaultSelectionService,k=this;d&&d.getSelections(function(a){k.renderCommands(b,c,a,e,g,h)})}else j&&(this._render(this._contributionsByScopeId[b],c,d,e,g,h,f),g==="tool"||g==="button"?this._isLastChildSeparator(c,
g)&&c.removeChild(c.childNodes[c.childNodes.length-1]):g==="menu"&&this._isLastChildSeparator(c,g)&&(d=c.getChildren()[c.getChildren().length-1],c.removeChild(d),d.destroy()))},destroy:function(b){typeof b==="string"&&(b=a.byId(b));if(!b)throw"no parent";var c=e.findWidgets(b);a.forEach(c,function(a){a.destroyRecursive()});a.empty(b)},_render:function(c,d,f,k,l,n,m){var o=c.sortedContributions;if(!o){var o=[],q=!1,p;for(p in c)if(!c.hasOwnProperty||c.hasOwnProperty(p)){var s=c[p];if(s&&typeof s.position===
"number")s.id=p,o.push(s),q=!0}if(q)o.sort(function(a,b){return a.position-b.position}),c.sortedContributions=o}for(c=0;c<o.length;c++){var r,w;if(o[c].children&&Object.getOwnPropertyNames(o[c].children).length>0){p=o[c];var P,q=o[c].children,K=this;if(l==="tool"||l==="button")if(p.title){var D=new e.Menu({style:"display: none;"});r=new u({label:p.title==="*"?b.Actions:p.title,showLabel:p.title!=="*",style:"visibility: hidden;",dropDown:D});a.addClass(r.domNode,"commandMenu");m&&g.generateNavGrid(m,
r.domNode,r);s=d;d.nodeName.toLowerCase()==="ul"?s=a.create("li",{},d):a.addClass(r.domNode,"commandMargins");a.removeAttr(r.titleNode,"title");a.destroy(r.valueNode);h(r.domNode,r.focusNode);a.place(r.domNode,s,"last");D.eclipseScopeId=d.eclipseScopeId||d.id;window.setTimeout(a.hitch({contributions:q,emptyGroupMessage:p.emptyGroupMessage},function(){if(!D._destroyed){K._render(this.contributions,D,f,k,"menu",n,m);P=D.getChildren();if(K._isLastChildSeparator(D,"menu")){var b=P[P.length-1];D.removeChild(b);
b.destroy();P=D.getChildren()}P.length===0?this.emptyGroupMessage?(a.connect(r.focusNode,"onclick",this,function(){var a=document.createElement("p");a.textContent=this.emptyGroupMessage;var b=new e.TooltipDialog({content:a,onMouseLeave:function(){e.popup.close(b);b.destroyRecursive()}});e.popup.open({popup:b,around:r.domNode});window.setTimeout(function(){e.popup.close(b);b.destroyRecursive()},15E3)}),a.style(r.domNode,"visibility","visible")):(m&&g.removeNavGrid(m,r.domNode),r.destroyRecursive()):
a.style(r.domNode,"visibility","visible")}}),0)}else{var I;d.childNodes.length>0&&!this._isLastChildSeparator(d,l)&&(I=this.generateSeparatorImage(d));K._render(q,d,f,k,l,n,m);d.childNodes.length>0&&d.childNodes[d.childNodes.length-1]!==I&&(I=this.generateSeparatorImage(d))}else if(p.title)s=new e.Menu,p=new v({label:p.title,popup:s}),d.addChild(p),K._render(q,s,f,k,l,n,m),s.getChildren().length===0&&(p.set("label","removeme"),d.removeChild(p),p.destroyRecursive());else{var E;d.getChildren().length>
0&&!this._isLastChildSeparator(d,l)&&(E=new e.MenuSeparator,d.addChild(E));K._render(q,d,f,k,l,n,m);q=d.getChildren();q[q.length-1]!==E&&(E=new e.MenuSeparator,d.addChild(E))}}else{p=(q=this._commandList[o[c].id])?!0:!1;var F=null,F=null;if(q){w=new j(this,k,f,n,q);w.domParent=d;s=p&&(q.visibleWhen?q.visibleWhen(f):!0);if(this._activeBindings[q.id]&&this._activeBindings[q.id].keyBinding)F=this._activeBindings[q.id],F.invocation=s?w:null,F.bindingOnly&&(p=!1);if(this._urlBindings[q.id]&&this._urlBindings[q.id].urlBinding)F=
this._urlBindings[q.id],F.invocation=s?w:null,F.bindingOnly&&(p=!1);p=p&&s}if(p)if(q.choiceCallback)if(p=new e.Menu({style:"display: none;"}),l==="tool"||l==="button"){r=new u({label:q.name,dropDown:p,postCreate:function(){a.connect(this._buttonNode,"mousedown",this,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,f,k,n)});u.prototype.postCreate.apply(this,Array.prototype.slice.call(arguments))}});a.addClass(r.domNode,"commandMenu");a.removeAttr(r.titleNode,"title");a.destroy(r.valueNode);
if(q.image)a.addClass(r.iconNode,"commandImage"),r.iconNode.src=q.image;a.place(r.domNode,d,"last");r.eclipseCommand=q;r.eclipseChoices=p}else{if(l==="menu")s=new v({label:q.name,popup:p}),d.addChild(s),s.eclipseCommand=q,s.eclipseChoices=p,a.connect(d,"_openPopup",s,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,f,k,n)})}else l==="tool"?(p="tool"+q.id+c,q._addTool(d,p,w,m)):l==="button"?(p="button"+q.id+c,q._addButton(d,p,w,m)):l==="menu"&&q._addMenuItem(d,w,m)}}},generateSeparatorImage:function(b){b=
b.nodeName.toLowerCase()==="ul"?a.create("li",null,b,"last"):a.create("span",null,b,"last");a.addClass(b,"core-sprite-sep");a.addClass(b,"imageSprite");a.addClass(b,"commandSeparator");return b}};k.prototype.constructor=k;n.prototype={_init:function(a){this.id=a.id;this.name=a.name;a.tooltip||a.name?(this.tooltip=document.createElement("span"),this.tooltip.textContent=a.tooltip||a.name):this.tooltip=null;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;
this.image=a.image||f.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},_addTool:function(b,c,d,e){d.handler=d.handler||this;var f,j;if(this.hrefCallback){if(f=this._makeLink(d),!f)return}else f=a.create("span",{tabindex:e?"-1":"0",role:"button"}),this.hasImage()?(j=l(this,f,c),this._addAccessibleLabel(f)):(c=window.document.createTextNode(this.name),a.place(c,f,"last"),a.addClass(f,"commandMissingImageButton commandButton")),
this._hookCallback(f,d),h(f,f,j?"commandImageOver":"commandButtonOver");d.domNode=f;d.domParent=b;this.tooltip&&new w({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:b,commandService:d.commandService});b.nodeName.toLowerCase()==="ul"?b=a.create("li",{},b):a.addClass(f,"commandMargins");a.place(f,b,"last");g.generateNavGrid(e,d.domNode)},_addButton:function(b,c,d,e){d.handler=d.handler||this;var f;if(this.hrefCallback){if(f=this._makeLink(d),!f)return}else{f=
a.create("span",{tabindex:"0",role:"button"});this._hookCallback(f,d);var j;this.name?(a.place(window.document.createTextNode(this.name),f,"last"),a.addClass(f,"commandButton"),j="commandButtonOver"):(l(this,f,c),j="commandImageOver",this._addAccessibleLabel(f));h(f,f,j)}f.id=c;this.tooltip&&new w({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:b,commandService:d.commandService});d.domParent=b;d.domNode=f;b.nodeName.toLowerCase()==="ul"?b=a.create("li",{},
b):a.addClass(f,"commandMargins");a.place(f,b,"last");g.generateNavGrid(e,d.domNode)},_addMenuItem:function(b,c,d){var e=c.commandService.showMenuIcons;c.domParent=b.domNode;var h=new s({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:e?this.imageClass:null,hasLink:!!this.hrefCallback});this.tooltip&&new w({connectId:[h.domNode],label:this.tooltip,commandParent:b,commandService:c.commandService});if(this.hrefCallback){var f=this.hrefCallback.call(c.handler,c);if(f)if(f.then)f.then(a.hitch(this,
function(a){h.setLink(a,this.name)}));else if(f)h.setLink(f,this.name);else return}else if(this.callback)h.onClick=a.hitch(this,function(){c.commandService._invoke(c)});h.eclipseCommand=this;b.addChild(h);if(e)if(this.imageClass)a.addClass(h.iconNode,this.spriteClass);else if(this.image)a.addClass(h.iconNode,"commandMenuItem"),h.iconNode.src=this.image;c.domNode=h.domNode;g.generateNavGrid(d,c.domNode)},_makeLink:function(b){var c=a.create("a",{tabindex:"0"});a.addClass(c,"commandLink");a.place(window.document.createTextNode(this.name),
c,"last");b=this.hrefCallback.call(b.handler,b);if(b.then)b.then(function(a){c.href=a});else if(b)c.href=b;else return null;return c},_hookCallback:function(b,c){a.connect(b,"onclick",this,function(){c.commandService._invoke(c)});a.connect(b,"onkeypress",this,function(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&c.commandService._invoke(c)})},_addAccessibleLabel:function(b){var c=this.name||this.tooltip;c&&a.attr(b,"aria-label",c)},populateChoicesMenu:function(b,c,d,g){b.focusedChild=
null;a.forEach(b.getChildren(),function(a){b.removeChild(a);a.destroy()});for(var d=this.getChoices(c,d,g),g=this.showMenuIcons,h=0;h<d.length;h++){var f=d[h],j;if(f.name){if(j=new e.MenuItem({label:f.name,iconClass:g?f.imageClass:null,onClick:this.makeChoiceCallback(f,c)}),g)if(f.imageClass)a.addClass(j.iconNode,f.spriteClass||"commandSprite");else if(f.image)a.addClass(j.iconNode,"commandImage"),j.iconNode.src=f.image}else j=new e.MenuSeparator;b.addChild(j)}},getChoices:function(a,b,c){return this.choiceCallback?
this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==f.toUrl("images/none.png")}};n.prototype.constructor=n;o.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(r?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(r&&this.mod4!==a.ctrlKey)return!1;if(!this.domScope)return!0;for(a=a.target;a;){if(a===
window.document)break;if(a===this.domScope)return!0;a=a.parentNode}}return!1},equals:function(a){return!a?!1:this.keyCode!==a.keyCode?!1:this.mod1!==a.mod1?!1:this.mod2!==a.mod2?!1:this.mod3!==a.mod3?!1:this.mod4!==a.mod4?!1:this.domScope!==a.domScope?!1:!0}};o.prototype.constructor=o;m.prototype={match:function(a){a=d.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;p.prototype={optionsRequested:function(){return this.optionsRequested}};
p.prototype.constructor=p;q.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){this.parameterTable={};for(var b=0;b<a.length;b++)this.parameterTable[a[b].name]=a[b]}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},
valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var c=this.parameterTable[a];if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new p(b.name,b.type,b.label,b.value,b.lines);a.push(b)});var b=new q(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};
q.prototype.constructor=q;return{CommandService:k,CommandKeyBinding:o,Command:n,CommandInvocation:j,CommandMenuItem:s,URLBinding:m,ParametersDescription:q,CommandParameter:p,CommandTooltip:w}});
define("orion/searchUtils",["require","dojo","orion/editor/regex","orion/commands"],function(b,f,a,e){var c=c||{};c.searchUtils=c.searchUtils||{};c.searchUtils.parseQueryStr=function(a,b){var e=a.indexOf("?"),f=a.indexOf("q=");e<f&&f>0&&(a=a.substring(e+1));e=a.indexOf("regEx&");e===0&&(a=a.substring(e+6));var f=a.split("&"),k={queryStr:a,start:0,rows:10,sort:"Path asc",replace:null};k.useRegEx=e===0;for(var l=0;l<f.length;l++){var n=f[l].indexOf("q="),o=f[l].indexOf("replace=");if(n>=0)e===0?c.searchUtils.parseLocationAndSearchStrRegEx(f[l].substring(n+
2),k,b):c.searchUtils.parseLocationAndSearchStr(f[l].substring(n+2),k,b);else if(o>=0)k.replace=f[l].substring(o+8);else if(n=f[l].split("="),n.length===2)if(n[0]==="rows")k.rows=parseInt(n[1]);else if(n[0]==="start")k.start=parseInt(n[1]);else if(n[0]==="sort")k.sort=n[1]}return k};c.searchUtils.copyQueryParams=function(a,b){return{sort:a.sort,useRegEx:a.useRegEx,rows:a.rows,start:a.start,searchStr:a.searchStr,location:a.location,replace:b?a.replace:null}};c.searchUtils.generateSearchHref=function(a){return b.toUrl("search/search.html")+
"#"+c.searchUtils.generateSearchQuery(a)};c.searchUtils.generateSearchQuery=function(a){var b="Path asc",c=40,e=0,f="",l="",n="",o="";if(a){a.useRegEx&&(o="regEx&");if(a.sort)b=a.sort;if(a.rows)c=a.rows;if(a.start)e=a.start;if(a.searchStr)f=a.searchStr;if(a.location)l=a.location,l.length>0&&l[l.length-1]!=="*"&&(l+="*"),l!==""&&(l="+Location:"+l);a.replace!==null&&a.replace!==void 0&&(n="&replace="+a.replace)}return"?"+o+"sort="+b+"&rows="+c+"&start="+e+"&q="+f+l+n};c.searchUtils.parseLocationAndSearchStr=
function(a,b,e){var f=a.indexOf("+Location:")>-1;b.location="";b.searchStr=a;if(f&&(a=a.split("+Location:"),a.length===2))f=a[1],f.length>0&&f[f.length-1]==="*"&&(f=f.substring(0,f.length-1)),b.location=f,b.searchStr=a[0];b.searchStrTitle=b.searchStr.split("\\").join("");if(b.searchStr.indexOf(" ")>=0)b.searchStrWithWhiteSpace='"'+b.searchStr+'"';b.inFileQuery=c.searchUtils.generateInFileQuery(b.searchStr,e)};c.searchUtils.parseLocationAndSearchStrRegEx=function(a,b,e){var f=a.indexOf("+Location:")>
-1;b.location="";b.searchStr=a;if(f&&(a=a.split("+Location:"),a.length===2))f=a[1],f.length>0&&f[f.length-1]==="*"&&(f=f.substring(0,f.length-1)),b.location=f,b.searchStr=a[0];b.searchStrTitle=b.searchStr;b.inFileQuery=c.searchUtils.generateInFileQueryRegEx(b.searchStr,e)};c.searchUtils.generateInFileQuery=function(b,c){var e={};e.originalSearchStr=b;var f=b.indexOf("*")>-1,k=b.indexOf("?")>-1;f&&(b=b.split("*").join(".*"));k&&(b=b.split("?").join("."));if(!f&&!k)e.searchStr=b.split("\\").join("").toLowerCase(),
e.wildCard=!1;else if(e.searchStr=b.toLowerCase(),f="",c&&(f="^"),k=a.parse("/"+f+e.searchStr+"/"))f=k.pattern,k=k.flags,k+=k.indexOf("i")===-1?"i":"",e.regExp={pattern:f,flags:k},e.wildCard=!0;e.searchStrLength=e.searchStr.length;return e};c.searchUtils.generateInFileQueryRegEx=function(b,c){var e={};e.originalSearchStr=b;e.searchStr=b;var f="";c&&(f="^");var k=a.parse("/"+f+e.searchStr+"/");if(k)f=k.pattern,k=k.flags,k+=k.indexOf("i")===-1?"i":"",e.regExp={pattern:f,flags:k},e.wildCard=!0;e.searchStrLength=
e.searchStr.length;return e};c.searchUtils.generateFindURLBinding=function(a,b,c){var e=",find=";a.wildCard&&(e+="@@useRegEx@@true@@");e+=encodeURIComponent(a.searchStr);typeof c==="string"&&(e=e+"@@replaceWith@@"+encodeURIComponent(c));typeof b==="number"&&(e=e+"@@atLine@@"+b);return e};c.searchUtils.parseFindURLBinding=function(a){var b=null,c=a.split("@@atLine@@");c.length>1&&(b=parseInt(c[1]),b<1&&(b=1));var a=null,c=c[0].split("@@replaceWith@@"),e=c[0],f=!1;e.indexOf("@@useRegEx@@true@@")===
0&&(f=!0,e=e.split("@@useRegEx@@true@@")[1]);c.length>1&&(a=c[1]);return{searchStr:e,replaceStr:a,lineNumber:b,useRegExp:f}};c.searchUtils.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};c.searchUtils.replaceStringLiteral=function(b,e,h){e=a.parse("/"+e+"/gim");return c.searchUtils.replaceRegEx(b,e,h)};c.searchUtils.searchOnelineLiteral=function(a,b,c){var e;e=0;for(var f=!1,l=[];;)if(e=b.indexOf(a.searchStr,e),e<0)break;else{l.push({startIndex:e});f=!0;if(c)break;e+=a.searchStrLength}return f?
l:null};c.searchUtils.findRegExp=function(a,b,c,e){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var f=null;return(f=RegExp(b,c).exec(a.substring(e)))&&{startIndex:f.index+e,length:f[0].length}};c.searchUtils.searchOnelineRegEx=function(a,b,e){for(var f=0,k=!1,l=[];;)if(f=c.searchUtils.findRegExp(b,a.regExp.pattern,a.regExp.flags,f)){l.push(f);k=!0;if(e)break;f=f.startIndex+f.length}else break;return k?l:null};c.searchUtils.generateNewContents=function(a,b,
e,f,k){if(e&&a){var l;l=b.length>0?!0:!1;for(var n=0;n<a.length;n++){for(var o=a[n],m=!1,p=!1,q=[],r,s=0,u=0;u<e.children.length;u++)if(e.children[u].lineNumber-1===n){s=u;for(m=0;m<e.children[u].matches.length;m++)e.children[u+m].checked!==!1&&q.push(m);p=q.length>0;r=e.children[u].matches;m=!0;break}if(m){if(p){q=c.searchUtils.replaceCheckedMatches(o,f,r,q,k);o=q.replacedStr;for(m=0;m<e.children[s].matches.length;m++)e.children[s+m].newMatches=q.newMatches}else for(m=0;m<e.children[s].matches.length;m++)e.children[s+
m].newMatches=e.children[s+m].matches;l?b[n]=o:b.push(o)}else l||b.push(o)}}};c.searchUtils.generateMatchContext=function(a,b,c){var e=[],f=a*2+1,l;b.length<=f?(l=0,a=b.length-1):(l=c-a,l<0?(l=0,a=l+f-1):(a=c+a,a>b.length-1&&(a=b.length-1,l=a-f+1)));for(f=l;f<=a;f++)e.push({context:b[f],current:f===c});return e};c.searchUtils.splitFile=function(a){for(var b=0,c=0,e=0,f=0,l=[];;){b!==-1&&b<=e&&(b=a.indexOf("\r",e));c!==-1&&c<=e&&(c=a.indexOf("\n",e));if(c===-1&&b===-1){l.push(a.substring(f));break}var n=
1;b!==-1&&c!==-1?b+1===c?(n=2,e=c+1):e=(b<c?b:c)+1:e=b!==-1?b+1:c+1;l.push(a.substring(f,e-n));f=e}return l};c.searchUtils.searchWithinFile=function(a,b,e,f,k,l){e=c.searchUtils.splitFile(e);if(k)b.contents=e;if(b){b.children=[];for(var n=f=0;n<e.length;n++){var o=e[n];if(o&&o.length>0){var m=l?o:o.toLowerCase();if(m=a.wildCard?c.searchUtils.searchOnelineRegEx(a,m):c.searchUtils.searchOnelineLiteral(a,m)){var p=n+1;if(k)for(var q=0;q<m.length;q++){var r=q+1,r={parent:b,checked:b.checked,type:"detail",
matches:m,lineNumber:p,matchNumber:r,name:o,location:b.location+"-"+p+"-"+r};b.children.push(r)}else r={parent:b,context:c.searchUtils.generateMatchContext(2,e,n),checked:b.checked,type:"detail",matches:m,lineNumber:p,name:o,location:b.location+"-"+p},b.children.push(r);f+=m.length}}}b.totalMatches=f}};c.searchUtils.replaceCheckedMatches=function(a,b,c,e,f){for(var l=0,n="",o=[],m=0;m<c.length;m++){l!==c[m].startIndex&&(n+=a.substring(l,c[m].startIndex));if(c[m].length)f=c[m].length;for(var l=!1,
p=0;p<e.length;p++)if(e[p]===m){l=!0;break}l?(o.push({startIndex:n.length,length:b.length}),n+=b):(o.push({startIndex:n.length,length:f}),n+=a.substring(c[m].startIndex,c[m].startIndex+f));l=c[m].startIndex+f}l<a.length&&(n+=a.substring(l));return{replacedStr:n,newMatches:o}};c.searchUtils.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};c.searchUtils.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};
c.searchUtils._storeRecentSearch=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b)})};c.searchUtils.addRecentSearch=function(a,b,e){typeof b==="string"&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var k,f=f.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));if(f){for(k in f)if(f[k].name===b)return;f.length>=20&&f.splice(19,f.length-20+1)}else f=[];f.splice(0,0,{name:b,
regEx:e});c.searchUtils._storeRecentSearch(a,f)})};c.searchUtils.populateSearchMenu=function(a,b,h,j){b.focusedChild=null;f.forEach(b.getChildren(),function(a){b.removeChild(a);a.destroy()});c.searchUtils.getSearches(a,h,function(a){if(a)for(i in a)b.addChild(new e.CommandMenuItem({label:j(a[i]),hasLink:!0}))})};c.searchUtils.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)})};c.searchUtils.getMixedSearches=function(a,b,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var d,f=a.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));if(b)for(d in a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a){var n=c.searchUtils.parseQueryStr(a[d].query);f.some(function(a){return n.searchStrTitle===a.name})||f.push({name:n.searchStrTitle,label:a[d].name})}f&&e&&e(f)})};c.searchUtils.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=
a.get("openSearchPref");typeof a==="string"&&(a=JSON.parse(a));b(a?a.openInNewTab:!0)})};c.searchUtils.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return c.searchUtils});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/searchUtils,orion/contentTypes,orion/Deferred,dojo".split(","),function(b,f,a,e,c,d){function g(b,c,d,e){this.registry=b;this.fileClient=c;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=e&&e.searchOnName;this._buildSkeletonOnly=e&&e.buildSkeletonOnly;this._fetchChildrenCallBack=e&&e.fetchChildrenCallBack;this.queryObj=this._searchOnName||this._buildSkeletonOnly?
null:a.parseQueryStr(d);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location}g.prototype.search=function(a){var c=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=a;var d=this;this.registry.getService("orion.page.dialog").confirm(b["The search term on this location will not use indexed files."]+"\n"+b["It will take longer time. Do you want to proceed?"],function(a){a&&c.getContentTypes().then(function(a){d.contentTypesCache=
a;d._visitRecursively(d._childrenLocation).then(function(){d._sort(d.fileLocations);d._onSearchComplete({response:{numFound:d.fileLocations.length,docs:d.fileLocations}})})})})};g.prototype.searchName=function(b,c){if(b)this.queryObj=a.parseQueryStr(b,!0);if(c)this.onSearchNameComplete=c;var d=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var e=0;e<this.fileSkeleton.length;e++){var f=this.fileSkeleton[e].Name.toLowerCase();if(this.queryObj.inFileQuery.wildCard?a.searchOnelineRegEx(this.queryObj.inFileQuery,
f,!0):a.searchOnelineLiteral(this.queryObj.inFileQuery,f,!0))if(d.push(this.fileSkeleton[e]),d.length>=this.queryObj.rows)break}this.onSearchNameComplete({response:{numFound:d.length,docs:d}})}};g.prototype.buildSkeleton=function(a,b){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),d=this;a();c.getContentTypes().then(function(a){d.contentTypesCache=a;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;b();d.queryObj&&!d._buildSkeletonOnly&&
d.searchName()})})};g.prototype._searchCompleted=function(){console.log("Search Completed.")};g.prototype._searchFiles=function(){var a=[],b;if(this.fileLocations.length>0){b=this;for(var d=0;d<b.fileLocations.length;d++)a.push(b._sniffSearch(b.fileLocations[d]))}return c.all(a)};g.prototype._sort=function(a){a.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};g.prototype._visitRecursively=function(a){var b=[],d=this;this._fetchChildrenCallBack&&
this._fetchChildrenCallBack(a);return d.fileClient.fetchChildren(a).then(function(a){for(var f=0;f<a.length;f++)if(a[f].Directory!==void 0&&a[f].Directory===!1)if(d._searchOnName)b.push(d._buildSingleSkeleton(a[f]));else if(d._buildSkeletonOnly)b.push(d._buildSingleSkeleton(a[f]));else{var g=e.getFilenameContentType(a[f].Name,d.contentTypesCache);g&&g["extends"]==="text/plain"&&b.push(d._sniffSearch(a[f]))}else a[f].Location&&b.push(d._visitRecursively(a[f].ChildrenLocation));return c.all(b)})};g.prototype._hitOnceWithinFile=
function(b){b=b.toLowerCase();return this.queryObj.inFileQuery.wildCard?a.searchOnelineRegEx(this.queryObj.inFileQuery,b,!0):a.searchOnelineLiteral(this.queryObj.inFileQuery,b,!0)};g.prototype._sniffSearch=function(a){this._totalCounter++;var c=this;return c.fileClient.read(a.Location).then(function(e){if(c._hitOnceWithinFile(e))a.LastModified=a.LocalTimeStamp,c.fileLocations.push(a),c._hitCounter++,c._sort(c.fileLocations),c._onSearchComplete({response:{numFound:c.fileLocations.length,docs:c.fileLocations}},
!0);c.registry.getService("orion.page.message").setProgressResult({Message:d.string.substitute(b["${0} files found out of ${1}"],[c._hitCounter,c._totalCounter])})},function(a){console.error("Error loading file content: "+a.message)})};g.prototype._buildSingleSkeleton=function(a){this._totalCounter++;this.fileSkeleton.push(a);this.queryObj&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();a=new c;a.resolve(this._totalCounter);return a};g.prototype.constructor=g;return{SearchCrawler:g}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,dojo,dijit,orion/searchUtils,orion/crawler/searchCrawler,dijit/form/Button,dijit/layout/BorderContainer,dijit/layout/ContentPane".split(","),function(b,f,a,e,c,d){function g(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;(this._fileService=a.fileService)||console.error("No file service on search client")}g.prototype={search:function(a,b,e,f){var g=c.parseQueryStr(a),o=function(a){for(var b=[],d=0;d<a.response.docs.length;d++){var e=
a.response.docs[d];b.push({name:e.Name,path:e.Location,folderName:c.path2FolderName(e.Path?e.Path:e.Location,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return b};if(this._crawler&&!f)this._crawler.searchName(a,function(a){e(o(a),null)});else try{this._fileService.search(g.location,a).then(function(a){var b=g.searchStr,b=b.substring(b.indexOf("}")+1),b=b.substring(b.indexOf(":")+1);e(o(a),b)},function(a){e(null,null,a)})}catch(m){typeof m==="string"&&m.indexOf("search")>-1&&this._crawler?
this._crawler.searchName(a,function(a){e(o(a),null)}):typeof m==="string"&&m.indexOf("search")>-1&&f?(new d.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(a){e(o(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(m)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(b,c){console.error(b);var d=document.createTextNode(b);a.place(d,c,"only");return b},
setLocationByMetaData:function(c,d){var e="",f=null;this._searchRootLocation=this._fileService.fileServiceRootURL(c.Location);d&&c&&c.Parents&&c.Parents.length>0?f=d.index==="last"?c.Parents[c.Parents.length-1]:c.Parents[0]:c&&c.Directory&&c.Location&&c.Parents&&(f=c);if(f)this.setLocationbyURL(f.Location),e=f.Name,this._childrenLocation=f.ChildrenLocation;else if(c)this.setLocationbyURL(this._searchRootLocation),e=this._fileService.fileServiceName(c.Location),this._childrenLocation=c.ChildrenLocation;
f=a.byId("search");e||(e="");if(f&&f.placeholder){f.value="";var g=a.string.substitute(b["Search ${0}"],[e]);f.placeholder=g.length>30?g.substring(0,27)+"...":a.string.substitute(b["Search ${0}"],[e])}if(f&&f.title)f.title=b["Type a keyword or wild card to search in "]+e},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation},
getSearchRootLocation:function(){return this._searchRootLocation},getChildrenLocation:function(){return this._childrenLocation},createSearchQuery:function(a,b,d,e,f,g){d||(d="Path");d+=" asc";if(b)return a=/\*$/.test(b)?"":"*",c.generateSearchQuery({sort:d,rows:100,start:0,location:e?this._searchRootLocation:this._searchLocation,searchStr:f+this._luceneEscape(b,!0)+a});b=g?!0:this.useRegEx;return c.generateSearchQuery({sort:d,useRegEx:b,rows:40,start:0,searchStr:b?a:this._luceneEscape(a,!0),location:e?
this._searchRootLocation:this._searchLocation})},_luceneEscape:function(a,b){for(var c="",d='+-&|!(){}[]^"~:\\'+(!b?"*?":""),e=0;e<a.length;e++){var f=a.charAt(e);d.indexOf(f)>=0&&(c+="\\");c+=f}return c},defaultRenderer:{makeRenderFunction:function(c,d,e,g,n){function o(a){return!c?!0:(a=c.getFilenameContentType(a))&&a["extends"]==="text/plain"?!0:!1}return function(c,h,q){if(q)a.place("<div>"+b["Search failed."]+"</div>",d,"only"),typeof g==="function"&&g(d);else{var q=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)}}}(),r=!1;a.empty(d);if(c&&c.length>0){var s=document.createElement("table");s.setAttribute("role","presentation");for(var u=0;u<c.length;u++){var v=c[u],w;if(!r&&(r=!0,e))w=
s.insertRow(0).insertCell(0),w.textContent=e;w=s.insertRow(-1).insertCell(0);w.colspan=2;n&&n(w);var t=document.createElement("a");a.place(document.createTextNode(v.name),t);v.LineNumber&&a.place(document.createTextNode(" (Line "+v.LineNumber+")"),t);var y=v.location;v.isExternalResource?y=v.path:(y=v.directory?f.toUrl("navigate/table.html")+"#"+v.path:o(v.name)?f.toUrl("edit/edit.html")+"#"+v.path:v.path,y==="#"&&(y=""));t.setAttribute("href",y);t.setAttribute("aria-describedby",(v.folderName?v.folderName:
v.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));a.style(t,"verticalAlign","middle");w.appendChild(t);q(w,v)}a.place(s,d,"last");typeof g==="function"&&g(d)}!r&&h&&(c=a.string.substitute(b["No matches found for ${0}"],[h]),a.place(document.createTextNode(c),d,"only"),typeof g==="function"&&g(d))}}}}};g.prototype.constructor=g;return{Searcher:g}});
define("orion/widgets/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,dojo,dijit,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/OpenResourceDialog.html".split(","),function(b,f,a,e,c,d){return c.declare("orion.widgets.OpenResourceDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:c.cache("orion","widgets/templates/OpenResourceDialog.html"),SEARCH_DELAY:500,
timeoutId:null,time:null,options:null,searcher:null,searchRenderer:null,favService:null,constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.searcher=(this.options=arguments[0])&&this.options.searcher;this.contentTypeService=new a.ContentTypeService(this.searcher.registry);if(!this.searcher)throw Error("Missing required argument: searcher");this.searcher.setCrawler(null);this._forceUseCrawler=!1;this._searchOnRoot=!0;this.fileService=this.searcher.getFileService();
if(!this.fileService)throw Error(b["Missing required argument: fileService"]);this.searchRenderer=this.options&&this.options.searchRenderer;if(!this.searchRenderer||typeof this.searchRenderer.makeRenderFunction!=="function")throw Error(b["Missing required argument: searchRenderer"]);this.favService=this.options.favoriteService;if(!this.favService)throw Error(b["Missing required argument: favService"]);},postMixInProperties:function(){this.options.title=this.options.title||b["Find File Named"];this.selectFile=
b["Type the name of a file to open (? = any character, * = any string):"];this.searchPlaceHolder=b.Search;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);c.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(c.hitch(this,this.checkSearch),0)});c.connect(this.resourceName,"onKeyPress",this,function(a){a.keyCode===c.keys.ENTER&&this.results&&(a=c.query("a",this.results),a.length>0&&(window.open(a[0].href),
this.hide()))});c.connect(this,"onKeyPress",this,function(a){var b,e,f,g,o;if(a.keyCode===c.keys.DOWN_ARROW||a.keyCode===c.keys.UP_ARROW)e=c.query("a",this.results),b=c.query("a",this.favresults),f=d.getFocus(),o=e.indexOf(f.node),g=b.indexOf(f.node),a.keyCode===c.keys.DOWN_ARROW?g>=0?d.focus(g<b.length-1?b[g+1]:e.length>0?e[0]:b[0]):o>=0?d.focus(o<e.length-1?e[o+1]:b.length>0?b[0]:e[0]):(e.length>0||b.length>0)&&d.focus(-1<b.length-1?b[0]:e[0]):g>=0?(f=this.resourceName&&this.resourceName.get("textbox"),
d.focus(g>0?b[g-1]:f)):o>=0?(f=this.resourceName&&this.resourceName.get("textbox"),d.focus(o>0?e[o-1]:b.length>0?b[b.length-1]:f)):e.length>0?d.focus(e[e.length-1]):b.length>0&&d.focus(b[b.length-1]),c.stopEvent(a)});c.connect(this,"onMouseUp",function(a){a.target.focus()});this.populateFavorites();var a=this;setTimeout(function(){if(a._forceUseCrawler||!a.fileService.getService(a.searcher.getSearchLocation()).search){var d=a._searchOnRoot?a.searcher.getSearchRootLocation():a.searcher.getChildrenLocation(),
d=new f.SearchCrawler(a.searcher.registry,a.fileService,"",{searchOnName:!0,location:d});a.searcher.setCrawler(d);d.buildSkeleton(function(){c.addClass("crawlingProgress","progressPane_running_dialog");c.byId("crawlingProgress").title=b["Building file skeleton..."]},function(){c.removeClass("crawlingProgress","progressPane_running_dialog");c.byId("crawlingProgress").title=""})}},0)},populateFavorites:function(){c.place("<div>"+b["Populating favorites&#x2026;"]+"</div>",this.favresults,"only");this.favService.getFavorites().then(this.showFavorites());
this.favService.addEventListener("favoritesChanged",this.showFavorites())},onCancel:function(){console.log("cancelled")},showFavorites:function(){var a=this;return function(b){if(b.navigator)b=b.navigator;a.searchRenderer.makeRenderFunction(a.contentTypeService,a.favresults,!1,c.hitch(a,a.decorateResult),a.showFavoritesImage)(b);b&&b.length>0&&c.place("<hr/>",a.favresults,"last")}},showFavoritesImage:function(a){var d=new Image;c.addClass(d,"modelDecorationSprite");c.addClass(d,"core-sprite-makeFavorite");
d.src=e.toUrl("images/none.png");d.title=b.Favorite;a.appendChild(d);c.style(d,"verticalAlign","middle")},checkSearch:function(){clearTimeout(this.timeoutId);var a=(new Date).getTime();a-this.time>this.SEARCH_DELAY?(this.time=a,this.doSearch()):this.timeoutId=setTimeout(c.hitch(this,"checkSearch"),50)},doSearch:function(){var a=this.resourceName&&this.resourceName.get("value"),d=this.showFavorites();this.favService.queryFavorites(a).then(function(a){d(a)});if(a){c.place("<div>"+b["Searching&#x2026;"]+
"</div>",this.results,"only");var e=this;setTimeout(function(){var b=e.searcher.createSearchQuery(null,a,e.searcher._crawler?!1:"NameLower",e._searchOnRoot,e.searcher._crawler?"":"NameLower:"),d=e.searchRenderer.makeRenderFunction(e.contentTypeService,e.results,!1,c.hitch(e,e.decorateResult));e.searcher.search(b,!1,d)},0)}},decorateResult:function(a){var b=this;c.query("a",a).forEach(function(a){c.connect(a,"onmouseup",function(a){!c.mouseButtons.isMiddle(a)&&!c.isCopyKey(a)&&b.hide()});c.connect(a,
"onkeyup",b,function(a){a.keyCode===c.keys.ENTER&&b.hide()})})},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});
define("orion/extensionCommands","require,dojo,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil".split(","),function(b,f,a,e,c,d,g){var h={},b=window.location.href.split("#")[0],j=b.substring(0,b.length-window.location.pathname.length);h._cloneItemWithoutChildren=function l(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=l(a[c]));return b};h._createOpenWithCommands=function(a){function b(a,c){for(var d=
a.getServiceReferences("orion.navigate.openWith"),e=[],f=0;f<d.length;f++){var g=d[f];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?e=e.concat(g):g!==null&&typeof g!=="undefined"&&e.push(g))}return e}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],f=e.getProperty("id");c.push({id:f,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||
e.getProperty("uriTemplate")})}return c}(),d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],f=0;f<c.length;f++){var g=c[f],h=d&&d.editor===g.id,j=b(a,g);j.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:j,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:h?"default":"editor"},service:{}})}return e};
h._makeValidator=function(a,b,e,g){function h(a,b,c,d){var e=c.match,f;if(b.indexOf("|")>=0)return f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),h(a,f,c,d)?!0:h(a,b,c,d);else if(b.indexOf(":")>=0)return f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?h(a[f],b,c,d):!1;else{a:{f=!1;var g;if(a[b]){if(e)if(typeof e==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(e=RegExp(e).exec(a[b]))f=e[0],g=c.variableMatchPosition==="before"?a[b].substring(0,
e.index):c.variableMatchPosition==="after"?a[b].substring(e.index+f.length):c.variableMatchPosition==="only"?f:a[b],f=!0}else{c=RegExp(e).test(a[b]);break a}}else a[b]===e&&(g=a[b],f=!0);else g=a[b],f=!0;if(f&&c.variableName&&(d[c.variableName]=g,d.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?d[c.variableName]=d[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=f}else c=!1}return c}}b={info:a};b.validationFunction=f.hitch(b,function(b){typeof g==="function"&&(b=g.call(this,b));if(b){if(f.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 d=0;d<b.length;d++){var j;a:{var n=b[d],v=e;if(this.info.validationProperties)for(j=0;j<this.info.validationProperties.length;j++){var w=this.info.validationProperties[j];if(w.source){if(!h(n,w.source,w,this)){j=!1;break a}}else{window.console.log("Invalid validationProperties in "+
a.id+".  No source property specified.");j=!1;break a}}if(this.info.contentType&&v){w=!1;if(n=c.getFilenameContentType(n.Name,v))for(j=0;j<this.info.contentType.length;j++)if(n.id===this.info.contentType[j]){w=!0;break}j=w}else j=!0}if(!j)return!1}return!0}return!1});b.generatesURI=f.hitch(b,function(){return!!this.info.uriTemplate});b.getURI=f.hitch(b,function(a){if(this.info.uriTemplate){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var e=
this.info.validationProperties[c];e.source&&e.variableName&&(this.itemCached===a&&this[e.variableName]||h(a,e.source,e,this),a[e.variableName]?window.console.log("Variable name "+e.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[e.variableName]=this[e.variableName])}b.OrionHome=j;a=new d(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null});return b};h._createCommandOptions=function(a,b,c,d,e,j){function r(g,
s){var r=h._makeValidator(a,c,d,j);g.visibleWhen=r.validationFunction;if(e)r.generatesURI()?g.hrefCallback=f.hitch(r,function(a){return this.getURI(f.isArray(a.items)?a.items[0]:a.items)}):g.callback=f.hitch(a,function(a){var d;if(this.forceSingleItem)a=f.isArray(a.items)?a.items[0]:a.items,d=h._cloneItemWithoutChildren(a);else if(f.isArray(a.items)){d=[];for(var e=0;e<a.items.length;e++)d.push(h._cloneItemWithoutChildren(a.items[e]))}else d=h._cloneItemWithoutChildren(a.items);b.run?b.run(d):c&&
c.getService(b).run(d)});s.resolve(g)}var s=new f.Deferred;a.nls?g.getMessageBundle(a.nls).then(function(b){r({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},s)}):r({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},s);return s};h.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};return h});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,dojo,dijit,orion/commands,dijit/Menu".split(","),function(b,f,a,e,c){a.declare("orion.widgets.UserMenu",[e.Menu],{widgetsInTemplate:!1,id:"userMenu",templateString:'<table role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0"><tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody></table>',postCreate:function(){this.inherited(arguments);this.label=b.test;a.style(this.domNode,"border-radius",
"3px");a.style(this.domNode,"border","1px solid #DDD")},constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(a){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b},
_renderAuthenticatedService:function(d,e,f){var j=this;(e=this.authenticatedServices[d].authService)&&e.logout&&this.addChild(new c.CommandMenuItem({label:f?b["Sign Out "]+f:b["Sign Out"],onClick:a.hitch(this,function(b,c){return function(){b.logout().then(a.hitch(j,function(){this.addUserItem(c,b,this.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)}b.getAuthForm(window.location.href).then(function(a){window.location=a})}))}})(e,d)}))},_renderUnauthenticatedService:function(d,e,f){var j=this,k=this.unauthenticatedServices[d].authService;if(k)k.getAuthForm?a.hitch(j,function(a){k.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(d){d+=d.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+a:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+a;j.addChild(new c.CommandMenuItem({label:f?"<a target='_blank' href="+d+">"+b["Sign In To "]+f+"</a>":"<a target='_blank' href="+d+">"+b["Sign In"]+"</a>",hasLink:!0}),e)})})(d):k.login&&this.addChild(new c.CommandMenuItem({label:f?"Sign In To "+f:"Sign In",onClick:a.hitch(j,function(a){return function(){a.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(k)}),e);else{var l=this.unauthenticatedServices[d].SignInLocation;l+=l.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+d:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+d;d=document.createElement("a");d.target="_blank";d.href=l;d.textContent=f?b["Sign In To "]+f:b["Sign In"];this.addChild(new c.Command.MenuItem({label:d,hasLink:!0}),e)}},renderServices:function(){for(var a=this.getChildren(),g=0;g<a.length;g++)this.removeChild(a[g]);a=document.createElement("a");a.href=f.toUrl("help/index.jsp");a.textContent=b.Help;this.addChild(new c.CommandMenuItem({label:a,hasLink:!0}));this.keyAssistFunction&&
this.addChild(new c.CommandMenuItem({label:b["Keyboard Shortcuts"],onClick:this.keyAssistFunction}));this.addChild(new e.MenuSeparator);a=document.createElement("a");a.href=f.toUrl("settings/settings.html");a.textContent=b.Settings;this.addChild(new c.CommandMenuItem({label:a,hasLink:!0}));if(this.isSingleService())for(g in this.authenticatedServices)this._renderAuthenticatedService(g,0)},getUserLabel:function(a){if(a.data){var b=a.data.Name&&a.data.Name.replace(/^\s+|\s+$/g,"")!==""?a.data.Name:
a.data.login;b.length>40&&(b=b.substring(0,30)+"...");b+=" ("+a.label+")";return b}else return a.label},setUserName:function(){},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(d,e,h,j){j?(this.unauthenticatedServices[d]&&delete this.unauthenticatedServices[d],this.authenticatedServices[d]={authService:e,label:h,data:j}):(this.authenticatedServices[d]&&delete this.authenticatedServices[d],this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?
{authService:e,label:h,pending:this.unauthenticatedServices[d].pending}:{authService:e,label:h});a.hitch(this,this.renderServices)();if(a.byId("userInfo"))if(this.isSingleService()&&j)h=d=j.Name&&j.Name.replace(/^\s+|\s+$/g,"")!==""?j.Name:j.login,h.length>40&&(h=h.substring(0,30)+"..."),j=a.create("a",{href:f.toUrl("profile/user-profile.html")+"#"+j.Location,style:"margin-right: 0px"},a.byId("userInfo"),"only"),j.textContent=h,j.setAttribute("aria-label",b["View profile of "]+d),new c.CommandTooltip({connectId:[j],
label:b["View profile of "]+d,position:["above","left","right","below"]});else if(this.isSingleService()&&!j)if(e.getAuthForm)a.hitch(this,function(c){e.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(d){d+=d.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+c:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+c;a.create("a",{href:d,style:"margin-right: 0px",target:"_blank"},a.byId("userInfo"),"only").textContent=
b["Sign In"]})})(d);else{if(e.login){var k=a.create("a",{style:"margin-right: 0px"},a.byId("userInfo"),"only");k.textContent=b["Sign In"];a.connect(k,"onmouseover",k,function(){k.style.cursor="pointer"});a.connect(k,"onmouseout",k,function(){k.style.cursor="default"});a.connect(k,"onclick",function(){e.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else a.empty(a.byId("userInfo"))}})});
define("orion/section",["dojo","orion/selection","orion/commands","orion/commonHTMLFragments"],function(b,f,a,e){function c(a,c){var d=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!c.id)throw Error("Missing required argument: id");this.id=c.id;if(!c.title)throw Error("Missing required argument: title");this.domNode=b.create("div",{"class":(c.useAuxStyle?"sectionWrapper sectionWrapperAux":
"sectionWrapper")+" toolComposite",id:c.id},a);if(c.canHide)this.twistie=b.create("span",{"class":"modelDecorationSprite layoutLeft sectionTitle"},this.domNode),b.style(this.domNode,"cursor","pointer"),b.attr(this.domNode,"tabIndex","0"),b.connect(this.domNode,"onclick",function(a){(a.target===d.titleNode||a.target===d.twistie)&&d._changeExpandedState()}),b.connect(this.domNode,"onkeydown",function(a){a.keyCode===b.keys.ENTER&&(a.target===d.domNode||a.target===d.titleNode||a.target===d.twistie)&&
d._changeExpandedState()});if(c.iconClass){var f=b.create("span",{"class":"sectionIcon"},this.domNode);b.addClass(f,c.iconClass)}this.titleNode=b.create("div",{id:c.id+"Title","class":"sectionAnchor sectionTitle layoutLeft"},this.domNode);this.titleNode.textContent=c.title;if(typeof c.getItemCount==="function")b.create("div",{"class":"layoutLeft sectionItemCount"},this.domNode).textContent=c.getItemCount(this);this._progressNode=b.create("div",{id:c.id+"Progress","class":"sectionProgress sectionTitle layoutLeft"},
this.domNode);this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";b.create("div",{id:c.id+"FilterSearchBox"},this.domNode);this._toolActionsNode=b.create("div",{id:c.id+"ToolActionsArea","class":"layoutRight sectionActions"},this.domNode);this.actionsNode=b.create("div",{id:c.id+"ActionArea","class":"layoutRight sectionActions"},this.domNode);this.selectionNode=b.create("div",{id:c.id+"SelectionArea","class":"layoutRight sectionActions"},this.domNode);if(c.slideout)this.slideout=
e.slideoutHTMLFragment(c.id),b.place(this.slideout,this.domNode);this._contentParent=b.create("div",{id:this.id+"Content",role:"region","class":"sectionTable","aria-labelledby":this.titleNode.id},a,"last");c.content&&this.setContent(c.content);this.hidden=c.hidden;if(typeof c.onExpandCollapse==="function")this._onExpandCollapse=c.onExpandCollapse;this._preferenceService=c.preferenceService;b.style(this._contentParent,"display","none");this._preferenceService?this._preferenceService.getPreferences("/window/views").then(b.hitch(this,
function(a){a=a.get(this.id);if(a!==void 0)this.hidden=!a;this.hidden||b.style(this._contentParent,"display","block");this._updateExpandedState(!this.hidden,!1)})):(this.hidden||b.style(this._contentParent,"display","block"),this._updateExpandedState(!this.hidden,!1));this._commandService=c.commandService;this._lastMonitor=0;this._loading={}}function d(a){this._section=a;this._id=++a._lastMonitor}c.prototype={setTitle:function(a){this.titleNode.textContent=a},setContent:function(a){typeof a==="string"?
this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new d(this)},_setMonitorMessage:function(a,b){this._progressNode.style.visibility="visible";this._loading[a]=b;var c="",d;for(d in this._loading)c!==""&&(c+="\n"),c+=this._loading[d];this._progressNode.title=c},_monitorDone:function(a){delete this._loading[a];var a="",b;for(b in this._loading)a!==""&&
(a+="\n"),a+=this._loading[b];this._progressNode.title=a;if(a==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){var a=new b.fx.Toggler({node:this._contentParent.id,showDuration:500,hideDuration:500,showFunc:b.fx.wipeIn,hideFunc:b.fx.wipeOut});this.hidden?(a.show(),this.hidden=!1):(a.hide(),this.hidden=!0);this._updateExpandedState(!this.hidden,!0)},_updateExpandedState:function(a,c){var d=this.twistie,e=this.id;d&&(b.addClass(d,a?this._expandImageClass:this._collapseImageClass),
b.removeClass(d,a?this._collapseImageClass:this._expandImageClass));this._preferenceService&&c&&this._preferenceService.getPreferences("/window/views").then(function(b){b.put(e,a)});this._onExpandCollapse&&this._onExpandCollapse(a,this)}};c.prototype.constructor=c;d.prototype={begin:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},worked:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},done:function(a){this.status=a;this._section._monitorDone(this.id)}};
d.prototype.constructor=d;return{Section:c}});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,dojo,orion/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(b,f,a,e,c,d){var g={};g.Explorer=function(){function b(a,c,d){this.registry=a;this.renderer=d;this.selection=c;this.myTree=null}b.prototype={changedItem:function(b,c){a.hitch(this.myTree,this.myTree.refresh)(b,c,!0)},updateCommands:function(b){this.myTree&&a.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(b))},makeNewItemPlaceHolder:function(b,
c,d){b=this.getRow(b);if(d&&(b=b.childNodes[d],a.place("<br><span id='"+c+"placeHolderRow'></span>",b,"last"),d=a.byId(c+"placeHolderRow")))return{tempNode:d,refNode:d};return b&&(a.place("<tr id='"+c+"placeHolderRow'><td id='"+c+"placeHolderCol'></td>",b,"after"),d=a.byId(c+"placeHolderRow"),b=a.byId(c+"placeHolderCol"),d&&b)?{tempNode:d,refNode:b}:null},getRow:function(b){if(b=this.model.getId(b))return a.byId(b)},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(b,d,f){this.selection&&this.selection.setSelections([]);
this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=b+"innerTree",h=a.byId(g);h&&a.destroy(h);if(d)d.rootId=g;this.model=d;this._parentId=b;this._treeOptions=f;if(!f||f&&!f.noSelection)this.selectionPolicy=f?f.selectionPolicy:"",this._navDict=new c.ExplorerNavDict(this.model);this.myTree=new e.TableTree({id:g,model:d,showRoot:!1,parent:b,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,indent:f?f.indent:void 0,onCollapse:f?f.onCollapse:void 0,tableElement:f?
f.tableElement:void 0,tableBodyElement:f?f.tableBodyElement:void 0,tableRowElement:f?f.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];if(a&&this.getNavDict())for(var c=a.getSelection(),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=new c.ExplorerNavHandler(this,this._navDict,{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}();g.createExplorerCommands=function(a,c){function e(a){return typeof a.getItemCount==="function"?a.getItemCount()>0?c?c(a):!0:!1:!1}var f=new d.Command({tooltip:b["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return e(a)},
callback:function(a){a.items.expandAll()}}),g=new d.Command({tooltip:b["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return e(a)},callback:function(a){a.items.collapseAll()}});a.addCommand(f);a.addCommand(g)};g.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}b.prototype={destroy:function(){},getRoot:function(b){this.fetchItems(this.rootPath).then(a.hitch(this,
function(a){this.root=a;b(a)}))},getChildren:function(b,c){b.Children?c(b.Children):b.ChildrenLocation?this.fetchItems(b.ChildrenLocation).then(a.hitch(this,function(a){b.Children=a;c(a)})):c([])},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}();g.ExplorerFlatModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=
c;this.root=d}b.prototype=new g.ExplorerModel;b.prototype.getRoot=function(b){this.root?b(this.root):this.fetchItems(this.rootPath).then(a.hitch(this,function(a){this.root=a;b(a)}))};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();g.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;this._decorateAlternatingLines=!0;if(a.decorateAlternatingLines===!1)this._decorateAlternatingLines=!1;if(!this.actionScopeId)this.actionScopeId=
a.actionScopeId}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(b,c){this.tableTree=c;a.empty(b);this._treeTableClass&&a.addClass(b,this._treeTableClass);this.renderTableHeader(b)},getActionsColumn:function(b,c,d,e,f){var d=d||"tool",g=this.explorer.registry.getService("orion.page.command"),h=document.createElement("td");h.id=c.id+"actionswrapper";e&&a.addClass(h,e);this.actionScopeId?g.renderCommands(this.actionScopeId,h,b,this.explorer,d,null,f&&this.explorer.getNavDict()?
this.explorer.getNavDict().getGridNavHolder(b,!0):null):window.console.log("Warning, no action scope was specified.  No commands rendered.");return h},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(b,c){if(this._useCheckboxSelection){var d=document.createElement("td"),e=document.createElement("span");e.id=this.getCheckBoxId(c.id);a.addClass(e,"core-sprite-check selectionCheckmarkSprite");e.itemId=c.id;if(this.getCheckedFunc)e.checked=
this.getCheckedFunc(b),this._highlightSelection&&a.toggleClass(c,"checkedRow",e.checked),a.toggleClass(e,"core-sprite-check_on",e.checked);d.appendChild(e);a.connect(e,"onclick",a.hitch(this,function(a){this.onCheck(c,a.target,a.target.checked?!1:!0,!0)}));return d}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(b,c,d,e,f){c.checked=d;a.toggleClass(c,"core-sprite-check_on",d);if(this.onCheckedFunc)this.onCheckedFunc(c.itemId,d,e);this.explorer.getNavHandler()&&f&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(b.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(b){b=window.sessionStorage[b+"selection"];typeof b==="string"&&(b=b.length>0?JSON.parse(b):null);var c;if(b&&this.explorer.getNavDict()){var d=[];for(c=0;c<b.length;c++){var e=this.explorer.getNavDict().getValue(b[c]);if(e&&e.rowDomNode&&
e.model&&(d.push(e.model),this._highlightSelection&&a.addClass(e.rowDomNode,"checkedRow"),e=a.byId(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,a.addClass(e,"core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(d),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(b){var c=!1,d=window.sessionStorage[b+"expanded"];
typeof d==="string"&&(d=d.length>0?JSON.parse(d):null);var e;if(d)for(e=0;e<d.length;e++)a.byId(d[e])&&(this._expanded.push(d[e]),this.tableTree.expand(d[e],a.hitch(this,function(){this._restoreSelections(b)})),c=!0);return!c},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(b,
c){var d=a.byId(this.expandCollapseImageId(b.id));d&&(a.addClass(d,c?this._expandImageClass:this._collapseImageClass),a.removeClass(d,c?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(b,c,d,e){var f=a.create("span",{id:this.expandCollapseImageId(b.id)},c,"last");a.addClass(f,this._twistieSpriteClass);a.addClass(f,this._collapseImageClass);d&&(c=a.create("span",null,c,"last"),a.addClass(c,e||"imageSprite"),a.addClass(c,d));f.onclick=a.hitch(this,function(){this.tableTree.toggle(b.id);
if(this.tableTree.isExpanded(b.id))this._expanded.push(b.id);else for(var a in this._expanded)if(this._expanded[a]===b.id){this._expanded.splice(a,1);break}(a=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(a)});return f},render:function(b,c){a.addClass(c,"navRow");this.renderRow(b,c)},rowsChanged:function(){this._decorateAlternatingLines&&a.query(".treeTableRow").forEach(function(b,c){c%2?(a.addClass(b,"darkTreeTableRow"),a.removeClass(b,"lightTreeTableRow")):(a.addClass(b,
"lightTreeTableRow"),a.removeClass(b,"darkTreeTableRow"))});this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){var b=this.explorer.registry;a.query(".treeTableRow").forEach(function(c){var d=a.byId(c.id+"actionswrapper"),e=b.getService("orion.page.command");e.destroy(d);this.actionScopeId&&e.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}();g.SelectionRenderer=function(){function b(a,c){this._init(a);this.explorer=c}b.prototype=new g.ExplorerRenderer;b.prototype.renderTableHeader=function(b){var c=document.createElement("thead"),d=document.createElement("tr");a.addClass(c,"navTableHeading");this._useCheckboxSelection&&d.appendChild(this.initCheckboxColumn(b));for(var e=0,f=this.getCellHeaderElement(e);f;)f.innerHTML.length>
0&&a.addClass(f,"navColumn"),d.appendChild(f),f=this.getCellHeaderElement(++e);c.appendChild(d);b.appendChild(c)};b.prototype.renderRow=function(b,c){a.style(c,"verticalAlign","baseline");a.addClass(c,"treeTableRow");var d=this.explorer.getNavDict();d&&(d.addRow(b,c),a.connect(c,"onclick",a.hitch(this,function(a){if(this.explorer.getNavHandler())this.explorer.getNavHandler().onClick(b,a)})));if(d=this.getCheckboxColumn(b,c))a.addClass(d,"checkColumn"),c.appendChild(d);for(var d=0,e=this.getCellElement(d,
b,c);e;)c.appendChild(e),d===0?this.getPrimColumnStyle?a.addClass(e,this.getPrimColumnStyle()):a.addClass(e,"navColumn"):this.getSecondaryColumnStyle?a.addClass(e,this.getSecondaryColumnStyle()):a.addClass(e,"secondaryColumn"),e=this.getCellElement(++d,b,c)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();g.SimpleFlatModel=function(){function a(b,c,d){this.items=b;this.getKey=d;this.idPrefix=c;this.root={children:b}}a.prototype=new g.ExplorerModel;
a.prototype.getRoot=function(a){a(this.root)};a.prototype.destroy=function(){};a.prototype.getId=function(a){for(var a=this.getKey(a).replace(/[\\\/]/g,""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return this.idPrefix+b};a.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return a}();return g});
define("orion/searchAndReplace/textSearcher","i18n!orion/search/nls/messages,require,orion/textview/annotations,dojo,dijit,orion/commands,orion/editor/regex,orion/searchUtils,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton".split(","),function(b,f,a,e,c){var d=d||{};d.TextSearcher=function(){function d(a,b,c,e){this._editor=a;this._commandService=b;this._undoStack=c;this._wrapSearch=this._ignoreCase=this._showAllOccurrence=!0;this._wholeWord=!1;this._incremental=!0;this._useRegExp=!1;this._findAfterReplace=
!0;this._reverse=!1;this.isMac=navigator.platform.indexOf("Mac")!==-1;this._timer=this._searchRange=null;this._searchOnRange=!1;this._lastSearchString="";var f=this;this._listeners={onEditorFocus:function(a){f.removeCurrentAnnotation(a)}};this.setOptions(e)}d.prototype={_createActionTable:function(){var d=this;this._commandService.openParameterCollector("pageNavigationActions",function(f){var g=document.createElement("input");g.type="text";g.name=b["Find:"];g.id="localSearchFindWith";g.placeholder=
b["Find With"];g.onkeyup=function(a){return d._handleKeyUp(a)};g.onkeydown=function(a){return d._handleKeyDown(a,!0)};f.appendChild(g);d.createButton("Next",f,function(){d.findNext(!0)});d.createButton("Previous",f,function(){d.findNext(!1)});var l=document.createElement("input");l.type="text";l.name=b["ReplaceWith:"];l.id="localSearchReplaceWith";l.placeholder=b["Replace With"];e.addClass(l,"searchCmdGroupMargin");l.onkeydown=function(a){return d._handleKeyDown(a,!1)};f.appendChild(l);d.createButton(b.Replace,
f,function(){d.replace()});d.createButton(b["Replace All"],f,function(){d.replaceAll()});(l=c.byId("searchOptMenu"))&&l.destroy();l=new c.Menu({style:"display: none;",id:"searchOptMenu"});l.addChild(new c.CheckedMenuItem({label:b["Show all"],checked:d._showAllOccurrence,onChange:function(b){d.setOptions({showAllOccurrence:b});b?d.markAllOccurrences(!0):(b=d._editor.getAnnotationModel())&&b.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)}}));l.addChild(new c.CheckedMenuItem({label:b["Case sensitive"],
checked:!d._ignoreCase,onChange:function(a){d.setOptions({ignoreCase:!a})}}));l.addChild(new c.CheckedMenuItem({label:b["Wrap search"],checked:d._wrapSearch,onChange:function(a){d.setOptions({wrapSearch:a})}}));l.addChild(new c.CheckedMenuItem({label:b["Incremental search"],checked:d._incremental,onChange:function(a){d.setOptions({incremental:a})}}));l.addChild(new c.CheckedMenuItem({label:b["Whole Word"],checked:d._wholeWord,onChange:function(a){d.setOptions({wholeWord:a})}}));l.addChild(new c.CheckedMenuItem({label:b["Regular expression"],
checked:d._useRegExp,onChange:function(a){d.setOptions({useRegExp:a})}}));l.addChild(new c.CheckedMenuItem({label:b["Find after replace"],checked:d._findAfterReplace,onChange:function(a){d.setOptions({findAfterReplace:a})}}));l=new c.form.DropDownButton({label:b.Options,dropDown:l});e.addClass(l.domNode,"findSlideoutMenu");e.place(l.domNode,f,"last");return g},function(){d.closeUI()})},visible:function(){return document.getElementById("localSearchFindWith")?!0:!1},_handleKeyUp:function(){if(this._incremental&&
!this._keyUpHandled)this._noSelection?this._noSelection=!1:this.findNext(!0,null,!0);this._keyUpHandled=!1;return!0},_handleKeyDown:function(a,b){var c=(this.isMac?a.metaKey:a.ctrlKey)&&!a.altKey&&!a.shiftKey;if(c&&a.keyCode===70)return this._keyUpHandled=b,a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,!1;if((this.isMac?a.metaKey:a.ctrlKey)&&!a.altKey&&a.keyCode===75||a.keyCode===13)return a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,this.findNext(!a.shiftKey),this._keyUpHandled=
b,!1;if(c&&a.keyCode===82)return a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,b||this.replace(),this._keyUpHandled=b,!1;return a.keyCode===27?(this.closeUI(),this._keyUpHandled=b,!1):!0},closeUI:function(){this.visible()&&this._commandService.closeParameterCollector();this._editor.getTextView().removeEventListener("Focus",this._listeners.onEditorFocus);this._editor.getTextView().focus();var b=this._editor.getAnnotationModel();b&&(b.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),
b.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH))},removeCurrentAnnotation:function(){var b=this._editor.getAnnotationModel();b&&b.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH)},createButton:function(a,b,c){var d=e.create("span",{tabindex:"0",role:"button"});e.connect(d,"onclick",this,c);e.connect(d,"onkeypress",this,function(a){a.keyCode===e.keys.ENTER||a.charCode===e.keys.SPACE?c():a.keyCode===e.keys.ESCAPE&&this.closeUI()});e.place(window.document.createTextNode(a),
d,"last");e.addClass(d,"findSlideoutButton");e.place(d,b,"last")},buildToolBar:function(a,b){this._keyUpHandled=!0;this._editor.getTextView().addEventListener("Focus",this._listeners.onEditorFocus);var c=document.getElementById("localSearchFindWith");if(this.visible())a.length>0?c.value=a:this._noSelection=!0;else{this._createActionTable();if(typeof b==="string")document.getElementById("localSearchReplaceWith").value=b;c=document.getElementById("localSearchFindWith");c.value=a}window.setTimeout(function(){c.select();
c.focus()},10)},setOptions:function(a){if(a){if(a.showAllOccurrence===!0||a.showAllOccurrence===!1)this._showAllOccurrence=a.showAllOccurrence;if(a.ignoreCase===!0||a.ignoreCase===!1)this._ignoreCase=a.ignoreCase;if(a.wrapSearch===!0||a.wrapSearch===!1)this._wrapSearch=a.wrapSearch;if(a.wholeWord===!0||a.wholeWord===!1)this._wholeWord=a.wholeWord;if(a.incremental===!0||a.incremental===!1)this._incremental=a.incremental;if(a.useRegExp===!0||a.useRegExp===!1)this._useRegExp=a.useRegExp;if(a.findAfterReplace===
!0||a.findAfterReplace===!1)this._findAfterReplace=a.findAfterReplace;if(a.reverse===!0||a.reverse===!1)this._reverse=a.reverse;if(a.toolBarId)this._toolBarId=a.toolBarId;if(a.searchRange)this._searchRange=a.searchRange;if(a.searchOnRange===!0||a.searchOnRange===!1)this._searchOnRange=a.searchOnRange}},getSearchStartIndex:function(a,b){var c=this._editor.getCaretOffset();if(a){var d=this._editor.getSelection(),e=d.end>d.start?d.end-d.start:0;return!b?c-e-1>0?c-e-1:0:d.end>0?d.end:0}return c>0?c:0},
findNext:function(a,b,c){this.setOptions({reverse:!a});var d=document.getElementById("localSearchFindWith"),c=this.getSearchStartIndex(c?!0:!a);b||(b=d?d.value:this._lastSearchString);return this._doFind(b,c,!a,this._wrapSearch)},startUndo:function(){this._undoStack&&this._undoStack.startCompoundChange()},endUndo:function(){this._undoStack&&this._undoStack.endCompoundChange()},replace:function(){this.startUndo();var a=document.getElementById("localSearchReplaceWith").value,b=this._editor,c=b.getSelection(),
d=document.getElementById("localSearchFindWith").value,e=c?c.start:0,c=c?c.end:0;if(d){var f=b.getModel().find({string:d,start:e,reverse:!1,wrap:this._wrapSearch,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(f)e=f.start,c=f.end}b.setText(a,e,c);b.setSelection(e,e+a.length,!0);this.endUndo();this._findAfterReplace&&d&&this._doFind(d,this.getSearchStartIndex(!1),!1,this._wrapSearch)},_doFind:function(c,d,e,f){var g=this._editor,o=g.getAnnotationModel();
if(!c)return o&&(o.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),o.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)),null;this._lastSearchString=c;var m=g.getModel().find({string:c,start:d,reverse:e,wrap:f,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(!this._replacingAll&&(m?this._editor.reportStatus(""):this._editor.reportStatus(b["Not found"],"error"),this.visible()&&(c=a.AnnotationType.ANNOTATION_CURRENT_SEARCH,o&&(o.removeAnnotations(c),
m&&o.addAnnotation(a.AnnotationType.createAnnotation(c,m.start,m.end))),this._showAllOccurrence))){this._timer&&window.clearTimeout(this._timer);var p=this;this._timer=window.setTimeout(function(){p.markAllOccurrences(m);p._timer=null},500)}m&&g.moveSelection(m.start,m.end,null,!1);return m},replaceAll:function(){var a=document.getElementById("localSearchFindWith").value;if(a){this._replacingAll=!0;var c=this._editor;c.reportStatus("");c.reportStatus(b["Replacing all..."],"progress");var d=document.getElementById("localSearchReplaceWith").value;
window.setTimeout(e.hitch(this,function(){for(var e=0,f=0;;){if(!this._doFind(a,e))break;f++;f===1&&this.startUndo();e=c.getSelection();c.setText(d,e.start,e.end);c.setSelection(e.start,e.start+d.length,!0);e=this.getSearchStartIndex(!0,!0)}f>0&&this.endUndo();c.reportStatus("","progress");e>0?c.reportStatus(b["Replaced "]+f+b[" matches"]):c.reportStatus(b["Nothing replaced"],"error");this._replacingAll=!1}),100)}},markAllOccurrences:function(b){var c=this._editor.getAnnotationModel();if(c){for(var d=
a.AnnotationType.ANNOTATION_MATCHING_SEARCH,e=c.getAnnotations(0,c.getTextModel().getCharCount()),f=[],g;e.hasNext();){var m=e.next();m.type===d&&f.push(m)}e=document.getElementById("localSearchFindWith").value;if(b&&e){e=this._editor.getModel().find({string:e,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase});for(g=[];e.hasNext();)b=e.next(),g.push(a.AnnotationType.createAnnotation(d,b.start,b.end))}c.replaceAnnotations(f,g)}}};return d}();return d});
define("orion/outliner","i18n!orion/nls/messages,dojo,orion/uiUtils,orion/section,orion/explorers/explorer,orion/commands,orion/URITemplate,orion/EventTarget".split(","),function(b,f,a,e,c,d,g,h){function j(a,b,c,d){this.explorer=b;this._init(a);this.title=c;this.selectionService=d}function k(a,b,c){this.registry=a;this.renderer=new j({checkbox:!1,decorateAlternatingLines:!1,treeTableClass:"outlineExplorer"},this,c,b)}function l(a,b){this.items=a;this.root={children:a};this.root.outlinerId=b;this.idItemMap=
{}}function n(a){this._init(a)}function o(a){this._serviceRegistry=a.serviceRegistry;this._preferences=a.preferences;h.attach(this);this._serviceRegistration=this._serviceRegistry.registerService("orion.edit.outline",this);this._outlinePref=this._preferences.getPreferences("/edit/outline");this._provider=new f.Deferred}j.prototype=c.SelectionRenderer.prototype;j.prototype.constructor=j;j.prototype.getLabelColumnIndex=function(){return 0};j.prototype.getCellElement=function(a,b,c){b&&(a=f.create("span",
null,c,"last"),b.className&&f.addClass(a,b.className),b.children&&this.getExpandImage(c,a),b.href?this._createLink(b.label,b.href,a):b.line||b.column||b.start?(c=(new g("#{,resource,params*}")).expand({resource:this.title,params:b}),this._createLink(b.label,c,a)):b.label&&f.place(document.createTextNode(b.label),a,"last"))};j.prototype._createLink=function(b,c,d){d=f.create("a",null,d,"last");this.selectionService?f.style(d,"cursor","pointer"):d.href=c;f.addClass(d,"navlinkonpage");f.place(document.createTextNode(b),
d);if(this.selectionService){var e=this.selectionService;f.connect(d,"onclick",d,function(b){a.openInNewWindow(b)?a.followLink(c,b):e.setSelections(c)})}return d};k.prototype=c.Explorer.prototype;k.prototype.constructor=k;l.prototype.constructor=l;l.prototype.getRoot=function(a){a(this.root)};l.prototype.destroy=function(){};l.prototype.getId=function(a){if(a.outlinerId)return a.outlinerId;var b=a.label.replace(/[\\\/\.\:\-\_]/g,"");this.idItemMap[b]&&this.idItemMap[b]!==a||f.byId(b)?(b=(new Date).getTime().toString(),
this.idItemMap[b]=a,a.outlinerId=b):this.idItemMap[b]=a;return b};l.prototype.getChildren=function(a,b){if(a.children){for(var c=0;c<a.children.length;c++)a.children[c].parent=a;b(a.children)}else b([])};l.prototype.doExpansions=function(a){for(var b=0;b<this.root.children.length;b++)this.root.children[b].children&&a.expand(this.root.children[b])};n.prototype={_init:function(a){var c=a.parent;typeof c==="string"&&(c=f.byId(c));if(!c)throw"no parent";if(!a.outlineService)throw"no outline service";
this._parent=c;this._serviceRegistry=a.serviceRegistry;this._outlineService=a.outlineService;this._commandService=a.commandService;this._selectionService=a.selectionService;var e=this;f.when(this._outlineService,function(a){a.addEventListener("outline",function(a){e.providerId=a.providerId;e._renderHeadingAndMenu(e.outlineProviders);e._renderOutline(a.outline,a.title)})});this._commandService.addCommand(new d.Command({name:b.Switch,tooltip:b["Switch the type of outliner used"],id:"eclipse.edit.outline.switch",
visibleWhen:function(){return!0},choiceCallback:f.hitch(this,this._menuCallback)}))},outlineChanged:function(a,b,c){var d=this;a.getOutline(c,b).then(function(a){d._renderOutline(a,b)})},setSelectedProvider:function(a){this.providerId=a.getProperty("id");this.providerName=a.getProperty("name")},setOutlineProviders:function(a){this.outlineProviders=a;this._renderHeadingAndMenu(this.outlineProviders)},_renderOutline:function(a,b){f.byId("outlinerHeading")||this._renderHeadingAndMenu();var c=f.byId("outlineSectionContent");
f.empty(c);if(a=a instanceof Array?a:[a])c=new l(a),this.explorer=new k(this._serviceRegistry,this._selectionService,b),this.explorer.createTree("outlineSectionContent",c,{selectionPolicy:"cursorOnly",setFocus:!1}),c.doExpansions(this.explorer.myTree)},_menuCallback:function(){for(var a=[],b=0;b<this.outlineProviders.length;b++){var c=this.outlineProviders[b],d=c.displayName||c.getProperty("name")||c.name+c.serviceId||"undefined",e=c.getProperty("id")===this.providerId?"&bull; ":"";a.push({name:e+
d,callback:f.hitch(this,this.setSelectedProvider,c)})}return a},_renderHeadingAndMenu:function(a){if(!this.outlineSection)this.outlineSection=new e.Section(this._parent,{id:"outlinerHeading",title:b.Outliner,content:'<div id="outlineSectionContent"></div>',useAuxStyle:!0}),this._commandService.registerCommandContribution(this.outlineSection.selectionNode.id,"eclipse.edit.outline.switch",1);this._commandService.destroy(this.outlineSection.selectionNode.id);a.length>1&&this._commandService.renderCommands(this.outlineSection.selectionNode.id,
this.outlineSection.selectionNode.id,{},this,"button")}};n.prototype.constructor=n;o.prototype={setOutlineProviders:function(a){this.providers=a;var b=this;f.when(this._outlinePref,function(c){for(var d,e=0;e<a.length;e++)if(d=a[e],c.get("outlineProvider")===a[e].getProperty("id"))break;d&&b.setProvider(d)})},setProvider:function(a){if(this._provider.fired!==-1)this._provider=new f.Deferred;this._provider.callback(a);var b=a.getProperty("id");b&&this._outlinePref.then(function(a){a.put("outlineProvider",
b)})},getProvider:function(){return this._provider},emitOutline:function(a,b){var c=this;f.when(this.getProvider(),function(d){c._serviceRegistry.getService(d).getOutline(a,b).then(function(a){c.dispatchEvent({type:"outline",outline:a,title:b,providerId:d.getProperty("id")})})})}};o.prototype.constructor=o;return{Outliner:n,OutlineService:o}});
define("orion/fileUtils",["i18n!orion/nls/messages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(){return{makeRelative:function(b){if(!b)return b;var f=window.location.protocol+"//"+window.location.host;return b.indexOf(f)===0?b.substring(f.length):b},isAtRoot:function(b){return this.makeRelative(b).indexOf("/workspace")===0}}});
define("orion/favorites",["require","dojo","orion/fileUtils","orion/EventTarget"],function(b,f,a,e){function c(a){this._favorites=[];e.attach(this);this._init(a);this._initializeFavorites()}c.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(b){for(var b=
f.isArray(b)?b:[b],c=0;c<b.length;c++){var e=b[c],j=e.ChildrenLocation?e.ChildrenLocation:e.Location,j=a.makeRelative(j);this.addFavorite(e.Name,j,e.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(a){this.addFavorite(a,a,!1,!0)},addFavorite:function(a,b,c){this._favorites.push({name:a,path:b,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(a){for(var b in this._favorites)if(this._favorites[b].path===
a){this._favorites.splice(b,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(a,b){var c=!1,e;for(e in this._favorites)if(this._favorites[e].path===a){var f=this._favorites[e];if(f.name!==b)f.name=b,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(a){for(var b in this._favorites)if(this._favorites[b].path===a)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(a){var b;
if(!a)return this._favorites;var c="";for(b=0;b<a.length;b++){var e=a.charAt(b);c+=e==="*"?".*":e==="?"?".?":this._SPECIAL_CHARS.indexOf(e)>=0?"\\"+e:e}c+=".*";a=RegExp(c);c=[];for(b in this._favorites)this._favorites[b].name.search(a)===0&&c.push(this._favorites[b]);return c},_initializeFavorites:function(){var a=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var c,b=b.get("navigate");typeof b==="string"&&(b=JSON.parse(b));if(b)for(c in b)b[c].isFavorite=
!0,a._favorites.push(b[c]);a._favorites.sort(a._sorter);a._notifyListeners()})},_storeFavorites:function(){var a=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("navigate",a)})},_sorter:function(a,b){var c=a.name.toLowerCase(),e=b.name.toLowerCase();return c>e?1:c<e?-1:0},getFavorites:function(){return{navigator:this._favorites}}};c.prototype.constructor=c;return{FavoritesService:c}});
define("orion/globalCommands","i18n!orion/nls/messages,require,dojo,dijit,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/textview/keyBinding,orion/breadcrumbs,orion/splitter,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/container/ThemeSheetWriter,orion/searchUtils,orion/inputCompletion/inputCompletion,orion/Deferred,dojo/DeferredList,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton,orion/widgets/OpenResourceDialog,orion/widgets/UserMenu,orion/widgets/UserMenuDropDown".split(","),function(b,
f,a,e,c,d,g,h,j,k,l,n,o,m,p,q,r,s,u,v){function w(b,c){if(b.getLabel)return b.getLabel();else{var d=new a.Deferred;d.callback(c.properties.name);return d}}function t(b){(b=b.getService("orion.page.progress"))&&a.hitch(b,b.init)("progressPane")}function y(a,b){var c=a.getService("orion.core.auth");c!==null&&c.getUser().then(function(a){if(a.Name)b.containerNode.textContent=a.Name;else if(a.login)b.containerNode.textContent=a.login})}function x(c){var f=c.getServiceReferences("orion.core.auth");F=[];
var g=a.byId("userMenu");if(g){if(!e.byId("logins")){var h=new orion.widgets.UserMenuDropDown({id:"logins",dropDown:E,label:b.Options,showLabel:!0});a.place(h.domNode,g,"only");h.valueNode&&a.destroy(h.valueNode);h.titleNode&&a.attr(h.titleNode,"title")&&a.removeAttr(h.titleNode,"title");new d.CommandTooltip({connectId:[h.focusNode],label:b.Options,position:["above","left","right","below"]});y(c,h)}for(g=0;g<f.length;g++){var h=f[g],j=c.getService(h);a.hitch(this,function(a,b){w(a,b).then(function(b){a.getKey().then(function(c){F.push(c);
a.getUser().then(function(d){E.addUserItem(c,a,b,d)},function(d,e){E.addUserItem(c,a,b,e)});window.addEventListener("storage",function(){I[c]!==localStorage.getItem(c)&&(I[c]=localStorage.getItem(c),a.getUser().then(function(d){E.addUserItem(c,a,b,d)},function(){E.addUserItem(c,a,b)}))},!1)})})})(j,h)}}}function G(b,c,d,f,g){var h=new e.Menu({style:"display: none;"}),c=new e.PopupMenuItem({label:c,popup:h});b.addChild(c);s.populateSearchMenu(d,h,f,function(a){return g(a)});a.connect(b,"_openPopup",
c,function(){s.populateSearchMenu(d,h,f,function(a){return g(a)})})}function A(a,b){var c=document.createElement("a");c.href=f.toUrl("search/search.html")+"#"+a;c.textContent=b;return c}function B(c,d,f,g){(d=e.byId("searchOptionsDropDown"))&&d.destroy();d=new e.Menu({style:"display: none;padding:0px;border-radius:3px;",id:"searchOptionsMenu"});a.addClass(d.domNode,"commandMenu");d.addChild(new e.CheckedMenuItem({label:b["Open in new tab"],checked:g,onChange:function(a){s.setOpenSearchPref(c,a)}}));
d.addChild(new e.MenuSeparator);d.addChild(new e.CheckedMenuItem({label:b["Regular expression"],checked:!1,onChange:function(a){f.useRegEx=a}}));d.addChild(new e.MenuSeparator);G(d,b["Recent searches"],c,"recentSearch",function(a){return A(f.createSearchQuery(a.name,!1,null,!1,null,a.regEx),a.name)});G(d,b["Saved searches"],c,"search",function(a){return A(a.query,a.name)});g=new orion.widgets.UserMenuDropDown({label:b["Search options"],showLabel:!1,id:"searchOptionsDropDown",dropDown:d});g.valueNode&&
a.destroy(g.valueNode);g.titleNode&&a.attr(g.titleNode,"title")&&a.removeAttr(g.titleNode,"title");a.addClass(g.domNode,"bannerMenu");a.addClass(g.domNode,"bannerMenuSearchOptions");a.place(g.domNode,"searchOptions","last")}function z(){if(a.byId("relatedLinks")&&O){var b=e.byId("related");b&&b.closeDropDown();O.focusedChild=null;a.forEach(O.getChildren(),function(a){O.removeChild(a);a.destroy()})}}function J(c,d){O||(O=new e.Menu({style:"display: none;padding:3px;border-radius:3px;",id:"relatedLinksMenu"}));
c._addMenuItem(O,d);var f=e.byId("related"),g=a.byId("relatedLinks");g&&!f&&(f=new orion.widgets.UserMenuDropDown({id:"related",label:b.Related,dropDown:O}),f.valueNode&&a.destroy(f.valueNode),f.titleNode&&a.attr(f.titleNode,"title")&&a.removeAttr(f.titleNode,"title"),a.addClass(f.domNode,"bannerMenu"),a.place(f.domNode,g,"only"))}function C(b,c,e,f,g){var j,k=b.getServiceReferences("orion.page.link.related");k.length<=0||a.byId("relatedLinks")&&a.when(function(){if(j)return j;var a=b.getService("orion.core.contenttypes");
a||(a=new m.ContentTypeService(b),a=b.getService("orion.core.contenttypes"));return a.getContentTypes().then(function(a){return j=a})}(),a.hitch(this,function(){var l;z();for(var n=[],m=0;m<k.length;m++){var o={},p,q=k[m].getPropertyKeys();for(p=0;p<q.length;p++)o[q[p]]=k[m].getProperty(q[p]);if(o.id){var s=function(b){if(b)if(!b.visibleWhen||b.visibleWhen(c)){var e=new d.CommandInvocation(f,c,c,null,b);J(b,e)}else typeof g==="function"&&(l||(l=g()),a.when(l,a.hitch(b,function(a){a&&c===$&&(!this.visibleWhen||
this.visibleWhen(a))&&J(this,new d.CommandInvocation(f,a,a,null,this))})))},r=null;if(a.indexOf(e,o.id)<0)if((o.nls&&o.nameKey||o.name)&&o.uriTemplate)p=h._createCommandOptions(o,k[m],b,j,!0),n.push(p),p.then(a.hitch(this,function(a){a=new d.Command(a);s(a)}));else{if(!r&&(r=f.findCommand(o.id))){s(r);continue}if(!r){var t=b.getServiceReferences("orion.navigate.command");for(p=0;p<t.length;p++)if(t[p].getProperty("id")===o.id){for(var o={},q=t[p].getPropertyKeys(),w=0;w<q.length;w++)o[q[w]]=t[p].getProperty(q[w]);
p=h._createCommandOptions(o,t[p],b,j,!0);n.push(p);p.then(a.hitch(this,function(a){r=new d.Command(a);s(r)}));break}}}}}(new a.DeferredList(n)).addBoth(a.hitch(this,function(){var b=a.byId("relatedLinks");O&&b&&(O.getChildren().length===0?a.style(b,"visibility","hidden"):a.style(b,"visibility","visible"))}))}))}function H(b){var c=a.byId("globalActions");c&&(b.destroy(c),b.renderCommands(c.id,c,{},{},"tool"))}function M(a){var c=a.getService("orion.core.favorite");c||(c=new o.FavoritesService({serviceRegistry:a}),
c=a.getService("orion.core.favorite"));L&&L.Location&&c.hasFavorite(L.ChildrenLocation||L.Location).then(function(d){d?a.getService("orion.page.message").setMessage(L.Name+b[" is already a favorite."],2E3):(c.makeFavorites([L]),a.getService("orion.page.message").setMessage(L.Name+b[" has been added to the favorites list."],2E3))})}function R(c,e){var f=a.byId("pageFavorite");f&&(L&&L.Location?(a.addClass(f,"bannerButton"),a.connect(f,"onclick",this,function(){M(c)}),a.connect(f,"onkeypress",this,
function(b){b.keyCode===a.keys.ENTER&&M(c)}),new d.CommandTooltip({connectId:[f],label:b["Add to the favorites list"],position:["below","left","right","above"],commandService:e}),a.style(f,"visibility","visible")):a.style(f,"visibility","hidden"))}function V(a){a.getPreferences("/themes",2).then(function(a){var b=a.get("selected");if(b){var b=JSON.parse(b),a=JSON.parse(a.get("styles")),c;for(c in a)if(a[c].name===b.selected){c=a[c];c=(new r.ThemeSheetWriter).getSheet(c);a=document.createElement("STYLE");
a.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(a);break}}})}function P(b){var c={},d=null;typeof b==="string"&&(b=a.byId(b));b||(b=a.byId("pageActions"));for(var e=b;e;){if(a.hasClass(e,"toolComposite")){d=e;break}e=e.parentNode}if(a.hasClass(b,"commandMarker"))c.commandNode=b;if(d&&(c.slideContainer=a.query(".slideParameters",d)[0],c.parameterArea=a.query(".parameters",d)[0],c.dismissArea=a.query(".parametersDismiss",d)[0],
c.notifications=a.query("#notificationArea",d)[0],d.parentNode&&(c.toolbarTarget=a.query(".toolbarTarget",d.parentNode)[0],c.toolbarTarget)))b=a.position(d),c.toolbarTargetY=b.h+1;return c}function K(b){if(b.toolbarTarget&&b.toolbarTargetY){var c=0,d;b.notifications&&a.hasClass(b.notifications,"slideContainerActive")&&(d=a.position(b.notifications),c+=d.h);b.slideContainer&&a.hasClass(b.slideContainer,"slideContainerActive")&&(d=a.position(b.slideContainer),c+=d.h);c>0&&(c+=8);a.style(b.toolbarTarget,
{top:b.toolbarTargetY+c+"px",bottom:0})}}var D=function(a){var b=document.createElement("a");b.href=a;return b.href}(f.toUrl("auth/NotifyAuthentication.html")),I={},E=new orion.widgets.UserMenu,F=[],O,$,U=[],L=null,N;return{generateUserInfo:x,generateRelatedLinks:C,generateBanner:function(h,l,m,r,w,y,z,A){function M(b){a.query(".targetSelector").forEach(function(a){a.target=b})}function G(a){a.registerService("orion.cm.managedservice",{updated:function(a){M(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?
"_blank":"_self":"_self")}},{pid:"nav.config"})}var C;V(r);r=a.byId(h);if(!a.byId("staticBanner")){if(!r)throw b["could not find banner parent, id was "]+h;a.place(c.topHTMLFragment,r,"first")}if(h=a.byId("pageToolbar"))a.addClass(h,"toolbarLayout"),a.place(c.toolbarHTMLFragment,h,"only");(h=a.byId("footer"))&&a.place(c.bottomHTMLFragment,h,"only");m.setParameterCollector(new g.CommandParameterCollector(P,K));a.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',
document.body,"last");var D=a.byId("primaryNav");if(D)for(var h=l.getServiceReferences("orion.page.link"),r=q.matchResourceParameters(window.location.href),ga={OrionHome:window.location.protocol+"//"+window.location.host,Location:r.resource},r=0;r<h.length;r++){for(var T={},y=h[r].getPropertyKeys(),F=0;F<y.length;F++)T[y[F]]=h[r].getProperty(y[F]);T.uriTemplate&&T.nls&&(T.name||T.nameKey)?f(["i18n!"+T.nls],function(b){var c=new p(T.uriTemplate),c=window.decodeURIComponent(c.expand(ga)),c=q.validateURLScheme(c),
c=a.create("a",{href:c,target:"_self","class":"targetSelector"},D,"last");C=document.createTextNode(T.nameKey?b[T.nameKey]:T.name);a.place(C,c,"only")}):T.uriTemplate&&T.name&&(y=new p(T.uriTemplate),y=window.decodeURIComponent(y.expand(ga)),y=q.validateURLScheme(y),y=a.create("a",{href:y,target:"_self","class":"targetSelector"},D,"last"),C=document.createTextNode(T.name),a.place(C,y,"only"))}var ba=a.byId("search");if(!ba)throw"failed to generate HTML for banner";new u.InputCompletion(ba,function(a){s.getMixedSearches(l,
!0,function(b){var c,d=[],e=!1;for(c in b)b[c].label?(e||(d.push({type:"category",label:"Saved searches"}),e=!0),d.push({type:"proposal",label:b[c].label,value:b[c].name})):d.push({type:"proposal",label:b[c].name,value:b[c].name});a(d)})},{group:"globalSearch",extendedProvider:function(a,b){var c=l.getServiceReferences("orion.search.proposal");if(!c||c.length===0)b(null);else{var d=[];c.forEach(function(b){var c=b.getProperty("filterForMe");d.push(l.getService(b).run(a).then(function(a){for(var b=
{filterForMe:c,proposals:[]},d=0;d<a.length;d++){b.proposals.push({type:"category",label:a[d].category});for(var e=0;e<a[d].datalist.length;e++)b.proposals.push({type:"proposal",label:a[d].datalist[e],value:a[d].datalist[e]})}return b}))});v.all(d).then(function(a){for(var c=[],d=0;d<a.length;d++)c.push(a[d]);b(c)})}}});ba.addEventListener("keydown",function(a){if(!a.defaultPrevented&&(a.charCode||a.keyCode)===13)if(w){if(ba.value.length>0){s.addRecentSearch(l,ba.value,w.useRegEx);var c=w.createSearchQuery(ba.value);
s.getOpenSearchPref(l,function(a){var b=f.toUrl("search/search.html")+"#"+c;a?window.open(b):window.location=b})}}else window.alert(b["Can't search: no search service is available"])});s.getOpenSearchPref(l,function(a){B(l,m,w,a)});var h=a.query(".dijitManagesLayout")[0],Y;h&&h.id&&(Y=e.byId(h.id));var J;if(h=a.query(".split")[0]){var r=a.query(".sidePanelLayout")[0],I=a.query(".mainPanelLayout")[0];if(r&&I&&(J=new n.Splitter({node:h,sidePanel:r,mainPanel:I}),h=new d.Command({name:"Toggle side panel",
tooltip:"Open or close the side panel",id:"orion.toggleSidePane",callback:function(){J.toggleSidePanel()}}),m.addCommand(h),m.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.CommandKeyBinding("o",!0)),z||Y))J.addResizeListener(function(a){z&&a===I&&z.getTextView().resize();Y&&Y.resize()}),z&&(z.getTextView().setKeyBinding(new k.KeyBinding("o",!0),"toggleOutliner"),z.getTextView().setAction("toggleOutliner",function(){J.toggleSidePanel();return!0},{name:"Toggle Outliner"}))}Y&&
window.setTimeout(function(){Y.layout()},10);h=new d.Command({name:b["Make Favorite"],tooltip:b["Add to the favorites list"],imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(b){b=a.isArray(b)?b:[b];if(b.length===0)return!1;for(var c=0;c<b.length;c++)if(!b[c].Location)return!1;return!0},callback:function(c){for(var c=a.isArray(c.items)?c.items:[c.items],d=l.getService("orion.core.favorite"),e=function(a){return function(c){c?l.getService("orion.page.message").setMessage(a.Name+
b[" is already a favorite."],2E3):d.makeFavorites(a)}},f=0;f<c.length;f++){var g=c[f];d.hasFavorite(g.ChildrenLocation||g.Location).then(e(g))}}});m.addCommand(h);var L=function(b,c,d){var e=c.getService("orion.core.favorite");e||(e=new o.FavoritesService({serviceRegistry:c}),e=c.getService("orion.core.favorite"));var f=new orion.widgets.OpenResourceDialog({searcher:b,searchRenderer:b.defaultRenderer,favoriteService:e});d&&a.connect(f,"onHide",function(){d.getTextView().focus()});window.setTimeout(function(){f.show()},
0)},h=new d.Command({name:b["Find File Named..."],tooltip:b["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){L(w,l,z)}});z&&(z.getTextView().setKeyBinding(new k.KeyBinding("f",!0,!0,!1),h.id),z.getTextView().setAction(h.id,function(){L(w,l,z);return!0},h));m.addCommand(h);m.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new d.CommandKeyBinding("f",!0,!0));h=new d.Command({name:b["Toggle banner and footer"],tooltip:b["Hide or show the page banner and footer"],
id:"orion.toggleTrim",callback:function(){var b=a.byId("banner"),c=a.byId("footer"),d=a.query(".content-fixedHeight")[0];b.style.display==="none"?(b.style.display="block",c.style.display="block",a.removeClass(d,"content-fixedHeight-maximized")):(b.style.display="none",c.style.display="none",a.addClass(d,"content-fixedHeight-maximized"));z&&z.getTextView().resize();Y&&window.setTimeout(function(){Y.resize()},10);return!0}});m.addCommand(h);m.registerCommandContribution("globalActions","orion.toggleTrim",
100,null,!0,new d.CommandKeyBinding("m",!0,!0));z&&(z.getTextView().setKeyBinding(new d.CommandKeyBinding("m",!0,!0),h.id),z.getTextView().setAction(h.id,h.callback,h));var W=a.byId("keyAssist");a.connect(document,"onkeypress",a.hitch(this,function(b){if(b.charOrCode===a.keys.ESCAPE)W.style.display="none"}));a.connect(document,"onclick",a.hitch(this,function(a){if((a=a.target||a.originalTarget||a.srcElement)&&a.id!=="keyAssist")W.style.display="none"}));z&&z.getTextView().addEventListener("MouseDown",
function(){W.style.display="none"});A&&A.addHandler({isActive:function(){return W.style.display==="block"},cancel:function(){return this.isActive()?(W.style.display="none",!0):!1}});A=new d.Command({name:b["System Configuration Details"],tooltip:b["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return f.toUrl("help/about.html")}});m.addCommand(A);m.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.CommandKeyBinding(112,!0,!0));A=
new d.Command({name:b["Background Operations"],tooltip:b["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return f.toUrl("operations/list.html")}});m.addCommand(A);m.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.CommandKeyBinding("o",!0,!0));A=new d.Command({name:b["Show Keys"],tooltip:b["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(W.style.display==="none"){a.empty(W);
if(z){a.place("<h2>"+b.Editor+"</h2>",W,"last");for(var c=z.getTextView().getActions(!1),d=0;d<c.length;d++){var e=c[d],f=e,g=z.getTextView(),h=g.getActionDescription(e);if(h&&h.name)f=h.name;e=g.getKeyBindings(e);for(g=0;g<e.length;g++)a.place('<span role="listitem">'+j.getUserKeyString(e[g])+" = "+f+"<br></span>",W,"last")}}a.place("<h2>"+b.Global+"</h2>",W,"last");m.showKeyBindings(W);W.style.display="block"}else W.style.display="none";return!0}});m.addCommand(A);m.registerCommandContribution("globalActions",
"eclipse.keyAssist",100,null,!0,new d.CommandKeyBinding(191,!1,!0));z&&(h=window.navigator.platform.indexOf("Mac")!==-1,z.getTextView().setKeyBinding(new d.CommandKeyBinding(191,!1,!0,!h,h),A.id),z.getTextView().setAction(A.id,A.callback,A));E.setKeyAssist(A.callback);R(l,m);H(m);x(l);t(l);a.subscribe("/dojo/hashchange",m,function(){m.processURL(window.location.href)});window.setTimeout(function(){G(l)},0)},getToolbarElements:P,layoutToolbarElements:K,setPageTarget:function(b){var c,d,e=b.breadcrumbRootName;
b.target?(b.searchService&&b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(d=e?e+" ":"",d+=b.fileService.fileServiceName(b.target.Location),e=null),c=b.name||b.target.Name,$=b.target,C(b.serviceRegistry,b.target,U,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),c=b.name);(N=b.title)||(N=c?c+" - "+b.task:b.task);window.document.title=N;a.empty("location");new l.BreadCrumbs({container:"location",resource:b.breadcrumbTarget||b.target,
rootSegmentName:e,workspaceRootSegmentName:d,makeHref:b.makeBreadcrumbLink});L=b.target&&b.isFavoriteTarget?b.target:null;R(b.serviceRegistry,b.commandService)},setDirtyIndicator:function(b){if(N)N.charAt(0)==="*"&&!b&&(N=N.substring(1)),b&&N.charAt(0)!=="*"&&(N="*"+N),window.document.title=N;var c=a.byId("dirty");if(c)c.textContent=b?"*":""},setPageCommandExclusions:function(a){U=a},notifyAuthenticationSite:D}});
define("orion/status",["require","dojo","orion/globalCommands"],function(b,f,a){function e(a,b,c,e,f){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=f;this.domId=c;this.progressDomId=e||c;this._hookedClose=!1}function c(a,b,c,e){this.statusService=a;this.progressId=b;if(c){this.deferred=c;this.begin(e);var k=this;c.then(function(){f.hitch(k,k.done)()},function(){f.hitch(k,k.done)()})}}e.prototype=
{_init:function(){var a=f.byId("closeNotifications");a&&!this._hookedClose&&(f.connect(a,"onclick",this,function(){this.setProgressMessage("")}),f.connect(a,"onkeypress",this,function(a){(a.keyCode===f.keys.ENTER||a.keyCode===f.keys.SPACE)&&this.setProgressMessage("")}))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=a.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(a,b,c){this._init();this.currentMessage=a;
if(typeof c==="boolean"){var e=this,k=f.byId(this.domId),l=f.attr(k,"aria-live");f.attr(k,"aria-live",c?"polite":"off");window.setTimeout(function(){a===e.currentMessage&&(f.place(window.document.createTextNode(a),e.domId,"only"),window.setTimeout(function(){f.attr(k,"aria-live",l)},100))},100)}else f.place(window.document.createTextNode(a),this.domId,"only");typeof b==="number"&&(e=this,window.setTimeout(function(){a===e.currentMessage&&f.place(window.document.createTextNode(""),e.domId,"only")},
b))},setErrorMessage:function(a){this.currentMessage=a;this._init();var b=a.responseText||a.message||a;try{b=JSON.parse(b)}catch(c){}var a=b.Message||b,e="red";if(b.Severity)switch(b.Severity){case "Warning":e="#FFCC00";break;case "Error":e="red";break;case "Info":case "Ok":e="green"}b=f.create("span",{style:{color:e}});f.place(window.document.createTextNode(a),b);f.place(b,this.domId,"only")},setProgressMessage:function(b){this._init();this.currentMessage=b;var c=f.create("span",{"class":"imageSprite core-sprite-progress"});
f.place(c,this.progressDomId,"only");f.place(window.document.createTextNode(b),this.progressDomId,"last");f.addClass(this.notificationContainerDomId,"progressNormal");if(b&&b.length>0)f.addClass(this.notificationContainerDomId,"slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else f.removeClass(this.notificationContainerDomId,"slideContainerActive");a.layoutToolbarElements(this._getNotifierElements())},setProgressResult:function(b){this.currentMessage=
b;b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}this._init();var e=b.Message||b,j="imageSprite core-sprite-info",k="progressInfo",l="progressWarning progressError progressNormal";if(b.Severity)switch(b.Severity){case "Warning":j="imageSprite core-sprite-warning";k="progressWarning";l="progressInfo progressError progressNormal";break;case "Error":j="imageSprite core-sprite-error",k="progressError",l="progressWarning progressInfo progressNormal"}j=f.create("span",{"class":j});f.place(j,this.progressDomId,
"only");b.HTML?f.place(e,this.progressDomId,"last"):f.place(window.document.createTextNode("   "+e),this.progressDomId,"last");k&&this.progressDomId!==this.domId&&(f.addClass(this.notificationContainerDomId,k),f.removeClass(this.notificationContainerDomId,l));f.addClass(this.notificationContainerDomId,"slideContainerActive");a.layoutToolbarElements(this._getNotifierElements())},showWhile:function(a,b){var c=this;b&&(c.setProgressMessage(b),a.addBoth(function(){b===c.currentMessage&&c.setProgressMessage("")}));
return a},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(a,b){return new c(this,++this._lastProgressId,a,b)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var a="",b=!0,c;for(c in this._progressMonitors)this._progressMonitors[c].status&&(b||(a+=", "),a+=this._progressMonitors[c].status,b=!1);this.setProgressMessage(a)}else this.setProgressMessage("")},_beginProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._progressMonitors.length++;
this._renderOngoingMonitors()},_workedProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._renderOngoingMonitors()},_doneProgressMonitor:function(a){delete this._progressMonitors[a.progressId];this._progressMonitors.length--;a.status?this.setProgressResult(a.status):this._renderOngoingMonitors()}};e.prototype.constructor=e;c.prototype.begin=function(a){this.status=a;this.statusService._beginProgressMonitor(this)};c.prototype.done=function(a){this.status=a;this.statusService._doneProgressMonitor(this)};
c.prototype.worked=function(a){this.status=a;this.statusService._workedProgressMonitor(this)};c.prototype.constructor=c;return{StatusReportingService:e,ProgressMonitor:c}});
define("orion/progress",["i18n!orion/nls/messages","require","dojo","orion/globalCommands","orion/widgets/OperationsDialog"],function(b,f,a){function e(a,b){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._operationsClient=b;this._initDone=!1;this._topicListeners={};this._myOperations={};this._lastIconClass=this._lastOperation=null}e.prototype={init:function(b){if(!this._progressPane){this._progressPane=a.byId(b);this._operationsDialog=new orion.widgets.OperationsDialog;
a.connect(this._progressPane,"onclick",a.hitch(this,this._openOperationsPopup));var d=this;a.connect(this._progressPane,"onkeypress",function(b){(b.charOrCode===" "||b.keyCode===a.keys.ENTER)&&a.hitch(d,d._openOperationsPopup)()});new Date-this.getLastListUpdate()>3E5?this._operationsClient.getRunningOperations().then(function(b){a.hitch(d,d._loadOperationsList)(b);window.setTimeout(function(){a.hitch(d,d._checkOperationsChanges())},5E3)},function(a){console.error(a)}):(a.hitch(d,d._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||
'{"Children": []}'))),window.setTimeout(function(){a.hitch(d,d._checkOperationsChanges())},5E3));window.addEventListener("storage",function(b){b.key==="orionOperations"&&a.hitch(d,d._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')))})}},_loadOperationsList:function(a){a.lastClientDate=new Date;a.lastClientDate-this.getLastListUpdate()>3E5&&(localStorage.setItem("orionOperations",JSON.stringify(a)),this._generateOperationsInfo(a))},getLastListUpdate:function(){var a=
JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}');return a.lastClientDate?new Date(a.lastClientDate):new Date(0)},_markOperationAsFailed:function(a,d,e){a.Message=b["Operation status is unknown"];a.Running=!1;a.Failed=!0;a.Result={HttpCode:e?e.xhr.staus:500,Severity:d,Message:d.Message?d.Message:d};this.writeOperation(a)},_checkOperationsChanges:function(){for(var b=this,d=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),e=[],f=[],j=0;j<d.Children.length;j++){var k=
d.Children[j];if(k.Running==!0&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>5E3){var l=this._operationsClient.getOperation(k.Location);f.push(l);a.hitch(this,function(f){l.then(function(d){d.lastClientDate=new Date;a.hitch(b,b.writeOperation)(d)},function(h,j){if(h.status==404)return e.push(f),h;a.hitch(b,b._markOperationAsFailed(d.Children[f],h,j))})})(j)}!k.Running&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>3E5&&e.push(j)}(new a.DeferredList(f)).addBoth(function(){if(e.length>
0){d.lastClientDate=new Date;for(var f=e.length-1;f>=0;f--)d.Children.splice(e[f],1);localStorage.setItem("orionOperations",JSON.stringify(d));a.hitch(b,b._generateOperationsInfo)(d)}window.setTimeout(function(){a.hitch(b,b._checkOperationsChanges())},5E3)})},_openOperationsPopup:function(){try{dijit.popup.open({popup:this._operationsDialog,around:this._progressPane})}catch(a){}dijit.focus(this._operationsDialog.domNode)},_switchIconTo:function(b){this._lastIconClass&&a.removeClass(this._progressPane,
this._lastIconClass);this._lastIconClass=b;a.addClass(this._progressPane,this._lastIconClass)},_generateOperationsInfo:function(c){this._operationsDialog.setOperations(c,this._myOperations);if(!c.Children||c.Children.length==0)this._switchIconTo("progressPane_empty"),this._progressPane.title=b.Operations,this._progressPane.alt=b.Operations,a.hasAttr(this._progressPane,"aria-valuetext")&&a.removeAttr(this._progressPane,"aria-valuetext");else{for(var d="",e=0;e<c.Children.length;e++){var f=c.Children[e];
if(this._myOperations[f.Id]&&f.Running==!0){d="running";break}}if(d===""&&this._lastOperation!=null&&this._lastOperation.Result)switch(this._operationsDialog.parseProgressResult(this._lastOperation.Result).Severity){case "Warning":d!=="error"&&(d="warning");break;case "Error":d="error"}switch(d){case "running":this._progressPane.title=b["Operations running"];this._progressPane.alt=b["Operations running"];a.attr(this._progressPane,"aria-valuetext",b["Operations running"]);this._switchIconTo("progressPane_running");
break;case "warning":this._progressPane.title=b["Some operations finished with warning"];this._progressPane.alt=b["Some operations finished with warning"];a.attr(this._progressPane,"aria-valuetext",b["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=b["Some operations finished with error"];this._progressPane.alt=b["Some operations finished with error"];a.attr(this._progressPane,"aria-valuetext",b["Some operations finished with error"]);
this._switchIconTo("progressPane_error");break;default:this._progressPane.title=b.Operations,this._progressPane.alt=b.Operations,a.hasAttr(this._progressPane,"aria-valuetext")&&a.removeAttr(this._progressPane,"aria-valuetext"),this._switchIconTo("progressPane_operations")}}},followOperation:function(b,d,e){b.Id&&(this._myOperations[b.Id]=!0);var f=d?d:new a.Deferred;this.writeOperation(b);var j=this;if(b&&b.Location&&b.Running==!0)window.setTimeout(function(){j._operationsClient.getOperation(b.Location).then(function(d){a.hitch(j,
j.followOperation(d,f,b.Location))},function(d,e){a.hitch(j,j.setProgressResult)({Severity:"Error",Message:d});a.hitch(j,j._markOperationAsFailed(b,d,e));f.errback(d,e)})},2E3);else if(b&&b.Result)j._serviceRegistry.getService("orion.page.message").setProgressMessage(""),d=this._operationsDialog.parseProgressResult(b.Result).Severity,d=="Error"||d=="Warning"?(b.Result.failedOperation={Location:e,Id:b.Id,Name:b.Name},f.callback(b),setTimeout(function(){j._myOperations[b.Id]&&a.hitch(j,j._openOperationsPopup)()},
10)):f.callback(b),!b.Failed&&b.Idempotent==!0&&window.setTimeout(function(){a.hitch(j,j.removeOperation)(e,b.Id)},5E3);return f},removeOperation:function(b,d){that=this;if(d){if(this._lastOperation!=null&&this._lastOperation.Id===d)this._lastOperation=null;delete this._myOperations[d]}a.hitch(that._operationsClient,that._operationsClient.removeOperation)(b).then(function(){a.hitch(that,that.removeOperationFromTheList)(d)})},removeOperationFromTheList:function(a){if(this._lastOperation!=null&&this._lastOperation.Id===
a)this._lastOperation=null;delete this._myOperations[a];for(var b=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),e=0;e<b.Children.length;e++){var f=b.Children[e];if(f.Id&&f.Id===a){b.Children.splice(e,1);break}}localStorage.setItem("orionOperations",JSON.stringify(b));this._generateOperationsInfo(b)},removeCompletedOperations:function(){for(var a=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),b=a.Children.length-1;b>=0;b--)a.Children[b].Running||a.Children.splice(b,
1);localStorage.setItem("orionOperations",JSON.stringify(a));this._generateOperationsInfo(a)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(b,d){d&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(d);var e=this;return b.then(function(b){if(b&&b.Location&&b.Message&&b.Running)return a.hitch(e,e.followOperation)(b,null,b.Location);e._serviceRegistry.getService("orion.page.message").setProgressMessage("");
return b},function(b){a.hitch(e,e.setProgressResult)(b);return b})},followTopic:function(a,b){this._topicListeners[a]||(this._topicListeners[a]=[]);this._topicListeners[a].push(b)},writeOperation:function(a){this._lastOperation=a=JSON.parse(JSON.stringify(a));for(var b=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),e=0;e<b.Children.length;e++){var f=b.Children[e];if(f.Id&&f.Id===a.Id){b.Children.splice(e,1);break}}!a.Running&&!a.Failed&&delete a.Result;a.lastClientDate=new Date;
b.Children.push(a);b.lastClientDate=new Date;localStorage.setItem("orionOperations",JSON.stringify(b));this._generateOperationsInfo(b)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/editorCommands","i18n!orion/edit/nls/messages,dojo,orion/commands,orion/globalCommands,orion/extensionCommands,orion/contentTypes,orion/textview/keyBinding,orion/textview/undoStack,orion/searchUtils".split(","),function(b,f,a,e,c,d,g,h,j){var e={},k=null;e.EditorCommandFactory=function(){function e(a,b,c,d,f,g,h,j){this.serviceRegistry=a;this.commandService=b;this.fileClient=c;this.inputManager=d;this.toolbarId=f;this.pageNavId=h;this.isReadOnly=g;this._searcher=j}e.prototype={generateEditorCommands:function(e){function h(a){if(k)return k;
var b=a.getService("orion.core.contenttypes");b||(b=new d.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return k=a})}function l(a){var b=new g.KeyBinding;g.KeyBinding.apply(b,a);return b}function p(a){var c={Severity:"Error"};a.status===0?c.Message=b["No response from server.  Check your internet connection and try again."]:c=a;(a=serviceRegistry.getService("orion.page.message"))?a.setProgressResult(c):window.console.log(c)}if(!this.isReadOnly){e.getTextView().setKeyBinding(new g.KeyBinding("s",
!0),"save");this.inputManager.onSave?e.getTextView().setAction("save",f.hitch(this,function(){var a=e.getText();this.inputManager.onSave(this.inputManager.getInput(),a,f.hitch(this,function(){e.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()}),f.hitch(this,function(a){a.log=!0}));return!0}),{name:b.Save}):e.getTextView().setAction("save",f.hitch(this,function(){var a=e.getText(),c={ETag:this.inputManager.getFileMetadata().ETag};this.fileClient.write(this.inputManager.getInput(),
a,c).then(f.hitch(this,function(b){this.inputManager.getFileMetadata().ETag=b.ETag;e.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()}),f.hitch(this,function(c){c.status===412?confirm(b["Resource is out of sync with the server. Do you want to save it anyway?"])&&this.fileClient.write(this.inputManager.getInput(),a).then(f.hitch(this,function(b){this.inputManager.getFileMetadata().ETag=b.ETag;e.setInput(this.inputManager.getInput(),null,a,
!0);this.inputManager.afterSave&&this.inputManager.afterSave()},p)):p(c)}));return!0}),{name:b.Save});this.commandService.addCommand(new a.Command({name:b.Save,tooltip:b["Save this file"],id:"orion.save",callback:function(a){a.items.getTextView().invokeAction("save")}}));this.commandService.registerCommandContribution(this.toolbarId,"orion.save",1,null,!1,new a.CommandKeyBinding("s",!0));var q=new a.ParametersDescription([new a.CommandParameter("line","number","Line:")],{hasOptionalParameters:!1},
function(){var b=e.getModel().getLineAtOffset(e.getCaretOffset())+1;return[new a.CommandParameter("line","number","Line:",b.toString())]}),q=new a.Command({name:b["Go to Line"],tooltip:b["Go to specified line number"],id:"orion.gotoLine",parameters:q,callback:function(a){var c=e.getModel();a.parameters&&a.parameters.valueFor("line")?a=a.parameters.valueFor("line"):(a=c.getLineAtOffset(e.getCaretOffset()),(a=prompt(b["Go to line:"],a+1))&&(a=parseInt(a,10)));if(a)e.onGotoLine(a-1,0)}});this.commandService.addCommand(q);
this.commandService.registerCommandContribution(this.pageNavId,"orion.gotoLine",1,null,!0,new a.CommandKeyBinding("l",!0),new a.URLBinding("gotoLine","line"));e.getTextView().setKeyBinding(new g.KeyBinding("l",!0),"gotoLine");e.getTextView().setAction("gotoLine",f.hitch(this,function(){this.commandService.runCommand("orion.gotoLine");return!0}),q);var q=new a.ParametersDescription([new a.CommandParameter("find","text","Find:")],{clientCollect:!0},function(){var b=e.getSelection(),c="";b.end>b.start&&
(c=e.getModel().getText(b.start,b.end));return[new a.CommandParameter("find","text","Find:",c)]}),r=this,q=new a.Command({name:b.Find,tooltip:b.Find,id:"orion.editor.find",parameters:q,callback:function(a){if(r._searcher){var b="",c=null,d=e.getSelection();if(d.end>d.start)b=e.getModel().getText(d.start,d.end),fromSelection=!0;else if(a.parameters&&a.parameters.valueFor("find"))a=a.parameters.valueFor("find"),c=j.parseFindURLBinding(a),b=c.searchStr;c?(r._searcher.setOptions({useRegExp:c.useRegExp}),
c.lineNumber?(a=e.getModel().getLineStart(c.lineNumber-1),e.moveSelection(a,a,function(){r._searcher.buildToolBar(b,c?c.replaceStr:null);r._searcher.findNext(!0)},focus)):(r._searcher.buildToolBar(b,c?c.replaceStr:null),r._searcher.findNext(!0))):r._searcher.buildToolBar(b);return!0}return!1}});this.commandService.addCommand(q);this.commandService.registerCommandContribution(this.pageNavId,"orion.editor.find",2,null,!0,new a.CommandKeyBinding("f",!0),new a.URLBinding("find","find"));e.getTextView().setKeyBinding(new g.KeyBinding("f",
!0),"find");e.getTextView().setAction("find",f.hitch(this,function(){this.commandService.runCommand("orion.editor.find");return!0}),q);var s=this.serviceRegistry.getServiceReferences("orion.edit.command"),u=this.inputManager,v=function(b,c,d){d.callback=f.hitch(e,function(a){e=a?a.items||this:this;var b=e.getSelection(),a=e.getModel(),d=a.getText();c.run(a.getText(b.start,b.end),d,b,u.getInput()).then(function(a){a&&a.text?(e.setText(a.text),a.selection&&(e.setSelection(a.selection.start,a.selection.end),
e.getTextView().focus())):typeof a==="string"&&(e.setText(a,b.start,b.end),e.setSelection(b.start,b.start+a.length),e.getTextView().focus())});return!0});return new a.Command(d)};f.when(h(this.serviceRegistry),f.hitch(this,function(){for(var a=[],b=0;b<s.length;b++){for(var d=s[b],g=this.serviceRegistry.getService(s[b]),h={},j=s[b].getPropertyKeys(),o=0;o<j.length;o++)h[j[o]]=s[b].getProperty(j[o]);h.forceSingleItem=!0;d=c._createCommandOptions(h,d,this.serviceRegistry,k,!1,function(){return u.getFileMetadata()});
a.push(d);d.then(f.hitch(this,function(a){a=v(h,g,a);this.commandService.addCommand(a);this.commandService.registerCommandContribution(this.toolbarId,a.id,100+b);if(h.key){var c=e.getTextView();c.setKeyBinding(l(h.key),a.id);c.setAction(a.id,a.callback,a)}}))}(new f.DeferredList(a)).addBoth(f.hitch(this,function(){if(u.getFileMetadata()){var a=f.byId("pageActions");a&&(this.commandService.destroy(a),this.commandService.renderCommands(a.id,a,e,e,"button"));if(a=f.byId("pageNavigationActions"))this.commandService.destroy(a),
this.commandService.renderCommands(a.id,a,e,e,"button")}}))}))}}};return e}();e.UndoCommandFactory=function(){function c(a,b,d){this.serviceRegistry=a;this.commandService=b;this.toolbarId=d}c.prototype={createUndoStack:function(c){var d=new h.UndoStack(c.getTextView(),200),e=new a.Command({name:b.Undo,id:"orion.undo",callback:function(a){a.items.getTextView().invokeAction("undo")}});c.getTextView().setKeyBinding(new g.KeyBinding("z",!0),"undo");c.getTextView().setAction("undo",function(){d.undo();
return!0},e);this.commandService.addCommand(e);var e=navigator.platform.indexOf("Mac")!==-1?new g.KeyBinding("z",!0,!0):new g.KeyBinding("y",!0),f=new a.Command({name:b.Redo,id:"orion.redo",callback:function(a){a.items.getTextView().invokeAction("redo")}});c.getTextView().setKeyBinding(e,"redo");c.getTextView().setAction("redo",function(){d.redo();return!0},f);this.commandService.addCommand(f);this.commandService.registerCommandContribution(this.toolbarId,"orion.undo",400,null,!0,new a.CommandKeyBinding("z",
!0));this.commandService.registerCommandContribution(this.toolbarId,"orion.redo",401,null,!0,e);return d}};return c}();return e});
define("orion/edit/dispatcher",["orion/edit/dispatcher"],function(){function b(b,a,e){this.serviceRegistry=b;this.editor=a;this.contentType=e;this.contentTypeService=b.getService("orion.core.contenttypes");this.serviceReferences={};var c=this;this.listener={onServiceAdded:function(a){c._onServiceAdded(a.serviceReference)},onServiceRemoved:function(a){c._onServiceRemoved(a.serviceReference)}};this.serviceRegistry.addEventListener("registered",this.listener.onServiceAdded);this.serviceRegistry.addEventListener("unregistering",
this.listener.onServiceRemoved);this._init()}b.prototype={_init:function(){var b=this;this.editor.getTextView()?this._wire(this.serviceRegistry):this.editor.addEventListener("TextViewInstalled",function(){b._wire(b.serviceRegistry)})},_wire:function(b){for(var b=b.getServiceReferences("orion.edit.model"),a=0;a<b.length;a++)this._wireServiceReference(b[a])},_wireServiceReference:function(b){var a=b.getProperty("contentType");if(typeof a!==void 0&&a!==null){var e=this;this.contentTypeService.isSomeExtensionOf(this.contentType,
a).then(function(a){a&&e._wireService(b,e.serviceRegistry.getService(b))})}},_wireService:function(b,a){var e=b.getProperty("types"),c=this.editor.getTextView();if(e){for(var d=0;d<e.length;d++){var g=e[d],h=a["on"+g];h&&this._wireServiceMethod(b,a,h,c,g)}this._initService(a,c)}},_wireServiceMethod:function(b,a,e,c,d){a=function(a){e(a).then()};b=b.getProperty("service.id");this.serviceReferences[b]=this.serviceReferences[b]||[];this.serviceReferences[b].push([c,d,a]);c.addEventListener(d,a)},_onServiceRemoved:function(b){var b=
b.getProperty("service.id"),a=this.serviceReferences[b];if(a){for(var e=0;e<a.length;e++){var c=a[e];c[0].removeEventListener(c[1],c[2])}delete this.serviceReferences[b]}},_onServiceAdded:function(b){b.getProperty("objectClass").indexOf("orion.edit.model")!==-1&&this._wireServiceReference(b)},_initService:function(b,a){var e=b.onModelChanging;if(typeof e==="function"){var c=a.getModel(),d=c.getText(),c={type:"Changing",text:d,start:0,removedCharCount:0,addedCharCount:d.length,removedLineCount:0,addedLineCount:c.getLineCount()};
e.call(b,c)}}};return{Dispatcher:b}});
define("edit/setup","i18n!orion/edit/nls/messages,require,dojo,orion/selection,orion/status,orion/progress,orion/dialogs,orion/commands,orion/favorites,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/outliner,orion/problems,orion/editor/contentAssist,orion/editorCommands,orion/editor/editorFeatures,orion/editor/editor,orion/syntaxchecker,orion/textview/textView,orion/textview/textModel,orion/textview/projectionTextModel,orion/textview/keyBinding,orion/searchAndReplace/textSearcher,orion/edit/dispatcher,orion/contentTypes,orion/PageUtil,orion/highlight,orion/i18nUtil,dojo/hash".split(","),function(b,
f,a,e,c,d,g,h,j,k,l,n,o,m,p,q,r,s,u,v,w,t,y,x,G,A,B,z,J,C){var H=H||{};H.setUpEditor=function(f,H,V){function P(b,c){var d=f.getServiceReferences("orion.edit.outliner");S=[];for(var e=0;e<d.length;e++){var g=d[e],h=g.getProperty("contentType"),j=g.getProperty("pattern"),k=!1;h?k=h.some(function(a){return O.isExtensionOf(b,a)}):j&&RegExp(j).test(c)&&(k=!0);k&&S.push(g)}d=[];for(e=0;e<S.length;e++)S[e].getProperty("nameKey")&&S[e].getProperty("nls")?(g=new a.Deferred,d.push(g),C.getMessageBundle(S[e].getProperty("nls")).then(a.hitch(this,
function(a,b,c){S[a].displayName=c[S[a].getProperty("nameKey")];b.resolve()},e,g),a.hitch(this,function(a,b,c){b.reject(c)},e,g))):S[e].displayName=S[e].getProperty("name");d.length===0?(F.setOutlineProviders(S),aa&&aa.setOutlineProviders(S)):(new a.DeferredList(d)).addBoth(a.hitch(this,function(){F.setOutlineProviders(S);aa&&aa.setOutlineProviders(S)}))}var K=window.document,D,I,E,F,O;(function(){D=new e.Selection(f);var a=new l.OperationsClient(f);E=new c.StatusReportingService(f,a,"statusPane",
"notifications","notificationArea");new d.ProgressService(f,a);new g.DialogService(f);I=new h.CommandService({serviceRegistry:f,selection:D});new p.ProblemService(f);F=new m.OutlineService({serviceRegistry:f,preferences:H});new j.FavoritesService({serviceRegistry:f});O=new B.ContentTypeService(f)})();var $=a.byId("outline"),U=a.byId("editor"),L=a.byId("searchFloat"),N=new J.SyntaxHighlighter(f),Z=new k.FileClient(f),ca=new n.Searcher({serviceRegistry:f,commandService:I,fileService:Z}),ea,X={lastFilePath:"",
setInput:function(c,d){function e(a){try{return a=JSON.parse(a.responseText),a.Message}catch(b){}return a.responseText}c&&c[0]!=="#"&&(c="#"+c);var g=z.matchResourceParameters(c),h=g.resource;(function(a,b){for(var c=0;c<b.length;c++){var d=b[c];a[d]&&(a[d]=parseInt(a[d],10))}})(g,["start","end","line","offset","length"]);if(h){if(h===this.lastFilePath)d.showSelection(g.start,g.end,g.line,g.offset,g.length);else{d.getTextView()||d.installTextView();var j=setTimeout(function(){d.setInput(h,b["Fetching "]+
h,null)},800),k=a.hitch(this,function(b,e){var k;if(e){this._fileMetadata=e;if(k=a.byId("pageActions"))I.destroy(k),I.renderCommands(k.id,k,d,d,"button");if(k=a.byId("pageNavigationActions"))I.destroy(k),I.renderCommands(k.id,k,d,d,"button");this.setTitle(e.Location);this._contentType=O.getFileContentType(e);k=e.Name}else this._fileMetadata=null,this.setTitle(h),this._contentType=O.getFilenameContentType(this.getTitle()),k=this.getTitle();o.setPageTarget({task:"Coding",name:k,target:e,isFavoriteTarget:!0,
makeAlternate:function(){if(e.Parents&&e.Parents.length>0)return Z.read(e.Parents[0].Location,!0)},serviceRegistry:f,commandService:I,searchService:ca,fileService:Z});o.setDirtyIndicator(!1);N.setup(this._contentType,d.getTextView(),d.getAnnotationModel(),h,!0).then(a.hitch(this,function(){var a=N.getStyler();d.setFoldingEnabled(a&&a.foldingEnabled);P(this._contentType,c);ea||(ea=new A.Dispatcher(f,d,this._contentType));d.setInput(h,null,b);d.showSelection(g.start,g.end,g.line,g.offset,g.length);
I.processURL(window.location.href)}));clearTimeout(j)}),l=a.hitch(this,function(a){var c=a[0][0],d=c?a[0][1]:null,f=a[1][0],g=f?a[1][1]:null;clearTimeout(j);c||(c=a[0][1],console.error("HTTP status code: ",c.status),d=b["An error occurred: "]+e(c));f||(c=a[1][1],console.error("Error loading file metadata: "+e(c)));k(d,g)});(new a.DeferredList([Z.read(h),Z.read(h,!0)])).then(l,l)}this.lastFilePath=h}else d.setInput(b["No File Selected"],"",null)},getInput:function(){return this.lastFilePath},setTitle:function(a){var b=
a.lastIndexOf("/");b!==-1&&(a=a.substring(b+1));this._lastTitle=a},getTitle:function(){return this._lastTitle},getFileMetadata:function(){return this._fileMetadata},getContentType:function(){return this._contentType},setDirty:function(a){o.setDirtyIndicator(a)},hashChanged:function(){this._lastHash||this.getInput();var b=this.getInput();D.setSelections("#"+a.hash());var c=a.hash(),d=this.getInput(),b=z.matchResourceParameters("#"+b).resource!==z.matchResourceParameters("#"+d).resource,d=z.matchResourceParameters("#"+
d).resource===z.matchResourceParameters("#"+c).resource;!b&&!d?a.hash(this._lastHash):(b&&a.hash(c),this._lastHash=c)},shouldGoToURI:function(a,c){if(a.isDirty()){var d=z.matchResourceParameters("#"+this.lastFilePath).resource,e=z.matchResourceParameters(c).resource;if(d!==e)return window.confirm(b["There are unsaved changes.  Do you still want to navigate away?"])}return!0}},fa={handlers:[],addHandler:function(a){this.handlers.push(a)},cancel:function(){return!1},isActive:function(){for(var a=0;a<
this.handlers.length;a++)if(this.handlers[a].isActive())return!0;return!1},lineUp:function(){return!1},lineDown:function(){return!1},enter:function(){return!1},tab:function(){for(var a=0;a<this.handlers.length;a++)if(this.handlers[a].isActive())return this.handlers[a].tab()}},da={handlers:[],addHandler:function(a){this.handlers.push(a)},cancel:function(){for(var a=!1,b=0;b<this.handlers.length;b++)a=this.handlers[b].cancel()||a;return a},isActive:function(){for(var a=0;a<this.handlers.length;a++)if(this.handlers[a].isActive())return!0;
return!1},lineUp:function(){return!1},lineDown:function(){return!1},enter:function(){return!1},tab:function(){return!1}},ha=V?null:{createContentAssistMode:function(a){var b=new q.ContentAssist(a.getTextView());b.addEventListener("Activating",function(){for(var c=X.getContentType(),d=a.getTitle(),e=f.getServiceReferences("orion.edit.contentAssist"),g=[],h=0;h<e.length;h++){var j=e[h],k=j.getProperty("contentType"),l=j.getProperty("pattern");(k&&O.isSomeExtensionOf(c,k)||l&&RegExp(l).test(d))&&g.push(f.getService(j))}b.setProviders(g)});
var c=new q.ContentAssistWidget(b,"contentassist");return new q.ContentAssistMode(b,c)}},ia=new s.AnnotationFactory,Q=new u.Editor({textViewFactory:function(){return new w.TextView({parent:U,model:new y.ProjectionTextModel(new t.TextModel),tabSize:4,readonly:V})},undoStackFactory:new r.UndoCommandFactory(f,I,"pageActions"),textDNDFactory:new s.TextDNDFactory,annotationFactory:ia,foldingRulerFactory:new s.FoldingRulerFactory,lineNumberRulerFactory:new s.LineNumberRulerFactory,contentAssistFactory:ha,
keyBindingFactory:function(c,d,e,g){d.push(fa);var h=new G.TextSearcher(c,I,e),j=new s.TextActions(c,e,h);d.push(j);j=new s.LinkedMode(c);d.push(j);e=new s.SourceCodeActions(c,e,g,j);d.push(e);(new r.EditorCommandFactory(f,I,Z,X,"pageActions",V,"pageNavigationActions",h)).generateEditorCommands(c);d.push(da);c.getTextView().setKeyBinding(new x.KeyBinding("w",!0,!1,!0),"toggleWrapMode");c.getTextView().setKeyBinding(new x.KeyBinding("h",!0),"searchFiles");c.getTextView().setAction("searchFiles",function(){window.setTimeout(function(){var d=
c.getTextView(),e=d.getSelection(),f="";e.end>e.start&&(f=d.getText().substring(e.start,e.end));f.length<=0&&(f=prompt(b["Enter search term:"],f));if(f)a.connect(K,"onkeypress",a.hitch(this,function(b){if(b.charOrCode===a.keys.ESCAPE)L.style.display="none",a.query("a",L).indexOf(K.activeElement)!==-1&&c.getTextView().focus()})),fa.addHandler({isActive:function(){return L.style.display==="block"},tab:function(){return this.isActive()?(a.query("a",L)[0].focus(),!0):!1}}),da.addHandler({isActive:function(){return L.style.display===
"block"},cancel:function(){return this.isActive()?(L.style.display="none",!0):!1}}),a.place(K.createTextNode(b["Searching for occurrences of "]),L,"last"),d=a.create("b",null,L,"last"),a.place(K.createTextNode('"'+f+'"...'),d,"only"),L.style.display="block",f=ca.createSearchQuery(f,null,"Name",!0),d=ca.defaultRenderer.makeRenderFunction(null,L,!1),ca.search(f,X.getInput(),d,!0)},0);return!0},{name:b["Search Files"]})},statusReporter:function(a,b,c){b==="progress"?E.setProgressMessage(a):b==="error"?
E.setErrorMessage(a):E.setMessage(a,null,c)},domNode:U});f.getService("orion.core.marker").addEventListener("problemsChanged",function(a){Q.showProblems(a.problems)});Q.addEventListener("DirtyChanged",function(){X.setDirty(Q.isDirty())});D.addEventListener("selectionChanged",function(a){a=a.selection;X.shouldGoToURI(Q,a)&&X.setInput(a,Q)});a.subscribe("/dojo/hashchange",X,function(){X.hashChanged(Q)});X.setInput(a.hash(),Q);o.generateBanner("orion-editor",f,I,H,ca,Q,Q,da);var ja=new v.SyntaxChecker(f,
Q);Q.addEventListener("InputChanged",function(a){ja.checkSyntax(X.getContentType(),a.title,a.message,a.contents)});var S,aa=new m.Outliner({parent:$,serviceRegistry:f,outlineService:f.getService("orion.edit.outline"),commandService:I,selectionService:D});S&&aa.setOutlineProviders(S);Q.addEventListener("InputChanged",function(){F.emitOutline(Q.getText(),Q.getTitle())});a.connect(aa,"setSelectedProvider",function(a){F.setProvider(a);F.emitOutline(Q.getText(),Q.getTitle())});window.onbeforeunload=function(){if(Q.isDirty())return b["There are unsaved changes."]}};
return H});define("edit/edit",["dojo","orion/bootstrap","edit/setup"],function(b,f,a){b.addOnLoad(function(){f.startup().then(function(b){a.setUpEditor(b.serviceRegistry,b.preferences,!1)})})});