/**
 * @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) 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). 
 *
 * 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, 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) 2010, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (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) 2010, 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) 2010, 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) 2010, 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: 
 *		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) 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, 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) 2010, 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: 
 *		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, 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: 
 *		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, 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 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: 
 *		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, 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) 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, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 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) 2010, 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
 *               Alex Lakatos - fix for bug#369781
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation 
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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) 2010, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 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) 2009, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 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) 2009, 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) 2009, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - _initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 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) 2010, 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). 
 *
 * 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) 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). 
 * 
 * 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, 2011 IBM Corporation and others. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others. 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 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
 *     Andy Clement (vmware) - bug 344614
 *******************************************************************************/
/******************************************************************************* 
 * @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, 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) 2010, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others. 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/******************************************************************************* 
 * @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, 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) 2004, 2011, The Dojo Foundation and others. All Rights Reserved.
 *	Available via Academic Free License >= 2.1 OR the modified BSD license.
 *	see: http://dojotoolkit.org/license for details
 *
 * Contributors:
 *     Dojo Foundation: _handleOnChange function, and cookie management code
 *     IBM Corporation: Initial API and implementation of the remainder of the script
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others. 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 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, 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) 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, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others. 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 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 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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, 2011 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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


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


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

 Contributors: IBM Corporation - initial API and implementation

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


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


 Copyright (c) 2010, 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: 
 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, 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: 
 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, 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

 Copyright (c) 2010, 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

 Copyright (c) 2010, 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 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
 Alex Lakatos - fix for bug#369781

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 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
 Andy Clement (vmware) - bug 344614

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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, 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) 2004, 2011, The Dojo Foundation and others. All Rights Reserved.
 Available via Academic Free License >= 2.1 OR the modified BSD license.
 see: http://dojotoolkit.org/license for details

 Contributors:
 Dojo Foundation: _handleOnChange function, and cookie management code
 IBM Corporation: Initial API and implementation of the remainder of the script

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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) 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) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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, 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) 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
*/
(function(){function c(a,c,g){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var e="assert,count,debug,dir,dirxml,error,group,groupEnd,info,profile,profileEnd,time,timeEnd,trace,warn,log".split(","),i=0,h;h=e[i++];)console[h]||function(){var a=h+"";console[a]="log"in console?function(){var c=Array.apply({},arguments);c.unshift(a+":");console.log(c.join(" "))}:function(){};console[a]._fake=!0}()}typeof a=="undefined"&&(a={_scopeName:"dojo",
_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}});var f=a;typeof c=="undefined"&&(c={_scopeName:"dijit"});typeof g=="undefined"&&(g={_scopeName:"dojox"});if(!f._scopeArgs)f._scopeArgs=[a,c,g];f.global=this;f.config={isDebug:!1,debugAtAllCosts:!1};if(e=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var j in e)f.config[j]=e[j];a.locale=f.config.locale;j="$Rev: 24595 $".match(/\d+/);a.version={major:1,minor:6,patch:1,flag:"",
revision:j?+j[0]:NaN,toString:function(){with(f.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",f.version.toString());var l,m,o={};for(i in{toString:1}){l=[];break}a._extraNames=l=l||"hasOwnProperty,valueOf,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,constructor".split(",");m=l.length;a._mixin=function(a,c){var d,e,g;for(d in c)if(e=c[d],!(d in a)||a[d]!==e&&(!(d in o)||
o[d]!==e))a[d]=e;if(m&&c)for(g=0;g<m;++g)if(d=l[g],e=c[d],!(d in a)||a[d]!==e&&(!(d in o)||o[d]!==e))a[d]=e;return a};a.mixin=function(a,c){a||(a={});for(var d=1,e=arguments.length;d<e;d++)f._mixin(a,arguments[d]);return a};a._getProp=function(a,c,d){for(var d=d||f.global,e=0,g;d&&(g=a[e]);e++)e==0&&f._scopeMap[g]&&(g=f._scopeMap[g]),d=g in d?d[g]:c?d[g]={}:void 0;return d};a.setObject=function(a,c,d){var e=a.split("."),a=e.pop();return(d=f._getProp(e,!0,d))&&a?d[a]=c:void 0};a.getObject=function(a,
c,d){return f._getProp(a.split("."),c,d)};a.exists=function(a,c){return f.getObject(a,!1,c)!==void 0};a.eval=function(a){return f.global.eval?f.global.eval(a):eval(a)};f.deprecated=f.experimental=function(){}})();return{dojo:a,dijit:c,dojox:g}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=c();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var f=c();dojo=f.dojo;dijit=f.dijit;dojox=f.dojox}})();
define("domReady",[],function(){function c(a){for(var c=0,d;d=a[c];c++)d(i)}function f(){var a=h,d=k;e&&(a.length&&(h=[],c(a)),j.resourcesDone&&d.length&&(k=[],c(d)))}function a(){e||(e=!0,m&&clearInterval(m),f())}function d(a){e?a(i):h.push(a);return d}var g=typeof window!=="undefined"&&window.document,e=!g,i=g?document:null,h=[],k=[],j=requirejs||require||{},l=j.resourcesReady,m;if("resourcesReady"in j)j.resourcesReady=function(a){l&&l(a);a&&f()};g&&(document.addEventListener?(document.addEventListener("DOMContentLoaded",
a,!1),window.addEventListener("load",a,!1)):window.attachEvent&&(window.attachEvent("onload",a),self===self.top&&(m=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),a())}catch(c){}},30))),document.readyState==="complete"&&a());d.withResources=function(a){e&&j.resourcesDone?a(i):k.push(a);return d};d.version="1.0.0";d.load=function(a,c,e,g){g.isBuild?e(null):d(e)};return d});
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap","domReady"],function(c,f,a){var d="_moduleHasPrefix,_loadPath,_loadUri,_loadUriAndCheck,loaded,_callLoaded,_getModuleSymbols,_loadModule,require,provide,platformRequire,requireIf,requireAfterIf,registerModulePath".split(","),g,e;for(g=0;g<d.length;)e=d[g++],f[e]=function(a){return function(){console.warn("dojo."+a+" not available when using an AMD loader.")}}(e);var i=function(a){var c=[],d;for(d=0;d<a.length;)c.push(a[d++]);return c},
h=function(a,c){return c?typeof c=="string"?function(){a[c]()}:function(){c.call(a)}:a};f.ready=f.addOnLoad=function(c,d){a(d?h(c,d):c)};f.addOnLoad(function(){f.postLoad=f.config.afterOnLoad=!0});if(d=f.config.addOnLoad)f.addOnLoad[d instanceof Array?"apply":"call"](f,d);var k=f._loaders=[],j=function(){var a=k.slice(0);for(Array.prototype.splice.apply(k,[0,k.length]);a.length;)a.shift().call()};k.unshift=function(){Array.prototype.unshift.apply(k,i(arguments));a(j)};k.splice=function(){Array.prototype.splice.apply(k,
i(arguments));a(j)};var l=f._unloaders=[];f.unloaded=function(){for(;l.length;)l.pop().call()};f._onto=function(a,c,d){a.push(d?h(c,d):c)};f._modulesLoaded=function(){};f.loadInit=function(a){a()};f.getL10nName=function(a,c,d){d=d?d.toLowerCase():f.locale;a="i18n!"+a.replace(/\./g,"/");return/root/i.test(d)?a+"/nls/"+c:a+"/nls/"+d+"/"+c};f.requireLocalization=function(a,d,e){c.vendor!="altoviso.com"&&(e=!e||e.toLowerCase()===f.locale?"root":e);return c(f.getL10nName(a,d,e))};f.i18n={getLocalization:f.requireLocalization,
normalizeLocale:function(a){a=a?a.toLowerCase():f.locale;a=="root"&&(a="ROOT");return a}};var m=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,o=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;f._Url=function(){for(var a=arguments,c=[a[0]],d=1;d<a.length;d++)if(a[d]){var e=new f._Url(a[d]+""),c=new f._Url(c[0]+"");if(e.path==""&&!e.scheme&&!e.authority&&!e.query){if(e.fragment!=null)c.fragment=e.fragment;e=c}else if(!e.scheme&&(e.scheme=c.scheme,!e.authority&&(e.authority=
c.authority,e.path.charAt(0)!="/"))){for(var c=(c.path.substring(0,c.path.lastIndexOf("/")+1)+e.path).split("/"),g=0;g<c.length;g++)c[g]=="."?g==c.length-1?c[g]="":(c.splice(g,1),g--):g>0&&!(g==1&&c[0]=="")&&c[g]==".."&&c[g-1]!=".."&&(g==c.length-1?(c.splice(g,1),c[g-1]=""):(c.splice(g-1,2),g-=2));e.path=c.join("/")}c=[];e.scheme&&c.push(e.scheme,":");e.authority&&c.push("//",e.authority);c.push(e.path);e.query&&c.push("?",e.query);e.fragment&&c.push("#",e.fragment)}this.uri=c.join("");a=this.uri.match(m);
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,d){if(!a)return null;var a=a.replace(/\./g,"/")+(d?"/"+d:""),e="",g=a.match(/(.+)(\.[^\/]*)$/);g&&(a=g[1],e=g[2]);return new f._Url(c.nameToUrl(a,
e))};return f});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(c){if(typeof window!="undefined"){c.isBrowser=!0;c._name="browser";(function(){var a=c;if(document&&document.getElementsByTagName)for(var d=document.getElementsByTagName("script"),g=/dojo(\.xd)?\.js(\W|$)/i,e=0;e<d.length;e++){var i=d[e].getAttribute("src");if(i){var h=i.match(g);if(h){if(!a.config.baseUrl)a.config.baseUrl=i.substring(0,h.index);if(d=d[e].getAttribute("djConfig")||d[e].getAttribute("data-dojo-config")){var d=eval("({ "+
d+" })"),f;for(f in d)c.config[f]=d[f]}break}}}a.baseUrl=a.config.baseUrl;f=navigator;d=f.userAgent;g=f.appVersion;e=parseFloat(g);if(d.indexOf("Opera")>=0)a.isOpera=e;if(d.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=g.indexOf("Konqueror")>=0?e:0;a.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0;a.isChrome=parseFloat(d.split("Chrome/")[1])||void 0;a.isMac=g.indexOf("Macintosh")>=0;if((i=Math.max(g.indexOf("WebKit"),g.indexOf("Safari"),0))&&!c.isChrome)if(a.isSafari=parseFloat(g.split("Version/")[1]),
!a.isSafari||parseFloat(g.substr(i+7))<=419.3)a.isSafari=2;if(d.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=e;if(a.isMoz)a.isFF=parseFloat(d.split("Firefox/")[1]||d.split("Minefield/")[1])||void 0;if(document.all&&!a.isOpera&&(a.isIE=parseFloat(g.split("MSIE ")[1])||void 0,(d=document.documentMode)&&d!=5&&Math.floor(a.isIE)!=d))a.isIE=d;if(c.isIE&&window.location.protocol==="file:")c.config.ieForceActiveXXhr=!0;a.isQuirks=document.compatMode=="BackCompat";a.locale=c.config.locale||
(a.isIE?f.userLanguage:f.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var d,e;if(!c.isIE||!c.config.ieForceActiveXXhr)try{d=new XMLHttpRequest}catch(g){}if(!d)for(var h=0;h<3;++h){var i=a._XMLHTTP_PROGIDS[h];try{d=new ActiveXObject(i)}catch(j){e=j}if(d){a._XMLHTTP_PROGIDS=[i];break}}if(!d)throw Error("XMLHTTP not available: "+e);return d};a._isDocumentOk=function(a){var a=a.status||0,c=location.protocol;return a>=200&&
a<300||a==304||a==1223||!a&&(c=="file:"||c=="chrome:"||c=="chrome-extension:"||c=="app:")};var j=window.location+"",l=(f=document.getElementsByTagName("base"))&&f.length>0;a._getText=function(d,e){var g=a._xhrObj();!l&&c._Url&&(d=(new c._Url(j,d)).toString());a.config.cacheBust&&(d+="",d+=(d.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,""));g.open("GET",d,!1);try{if(g.send(null),!a._isDocumentOk(g)){var h=Error("Unable to load "+d+" status:"+g.status);h.status=g.status;h.responseText=
g.responseText;throw h;}}catch(i){if(e)return null;throw i;}return g.responseText};var m=window,o=function(a,c){var d=m.attachEvent||m.addEventListener,a=m.attachEvent?a:a.substring(2);d(a,function(){c.apply(m,arguments)},!1)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var c=a._windowUnloaders;c.length;)c.pop()();a=null};var n=0;a.addOnWindowUnload=function(c,d){a._onto(a._windowUnloaders,c,d);n||(n=1,o("onunload",a.windowUnloaded))};var p=0;a.addOnUnload=function(d,e){a._onto(a._unloaders,
d,e);p||(p=1,o("onbeforeunload",c.unloaded))}})();c._initFired=!1;c._loadInit=function(){if(c._scrollIntervalId)clearInterval(c._scrollIntervalId),c._scrollIntervalId=0;if(!c._initFired)c._initFired=!0,!c.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",c._loadInit),c._inFlightCount==0&&c._modulesLoaded()};if(!c.config.afterOnLoad)if(document.addEventListener)document.addEventListener("DOMContentLoaded",c._loadInit,!1),window.addEventListener("load",c._loadInit,!1);else if(window.attachEvent&&
(window.attachEvent("onload",c._loadInit),!c.config.skipIeDomLoaded&&self===self.top))c._scrollIntervalId=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),c._loadInit())}catch(a){}},30);if(c.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a="*,group,roundrect,oval,shape,rect,imagedata,path,textpath,text".split(","),d=0,g=1,e=document.createStyleSheet();if(c.isIE>=8)d=1,g=a.length;for(;d<g;++d)e.addRule("v\\:"+a[d],"behavior:url(#default#VML); display:inline-block")})()}catch(f){}}(function(){var a=
c.config.modulePaths;if(a)for(var d in a)c.registerModulePath(d,a[d])})();c.config.isDebug&&c.require("dojo._firebug.firebug");c.config.debugAtAllCosts&&(c.require("dojo._base._loader.loader_debug"),c.require("dojo.i18n"));return c});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(c){return dojo=c});
define("dojo/_base/lang",["dojo/lib/kernel"],function(c){(function(){var f=Object.prototype.toString;c.isString=function(a){return typeof a=="string"||a instanceof String};c.isArray=function(a){return a&&(a instanceof Array||typeof a=="array")};c.isFunction=function(a){return f.call(a)==="[object Function]"};c.isObject=function(a){return a!==void 0&&(a===null||typeof a=="object"||c.isArray(a)||c.isFunction(a))};c.isArrayLike=function(a){return a&&a!==void 0&&!c.isString(a)&&!c.isFunction(a)&&!(a.tagName&&
a.tagName.toLowerCase()=="form")&&(c.isArray(a)||isFinite(a.length))};c.isAlien=function(a){return a&&!c.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))};c.extend=function(a,d){for(var e=1,g=arguments.length;e<g;e++)c._mixin(a.prototype,arguments[e]);return a};c._hitchArgs=function(a,d){var e=c._toArray(arguments,2),g=c.isString(d);return function(){var h=c._toArray(arguments),i=g?(a||c.global)[d]:d;return i&&i.apply(a||this,e.concat(h))}};c.hitch=function(a,d){if(arguments.length>2)return c._hitchArgs.apply(c,
arguments);d||(d=a,a=null);if(c.isString(d)){a=a||c.global;if(!a[d])throw['dojo.hitch: scope["',d,'"] is null (scope="',a,'")'].join("");return function(){return a[d].apply(a,arguments||[])}}return!a?d:function(){return d.apply(a,arguments||[])}};c.delegate=c._delegate=function(){function a(){}return function(d,e){a.prototype=d;var g=new a;a.prototype=null;e&&c._mixin(g,e);return g}}();var a=function(a,c,d){return(d||[]).concat(Array.prototype.slice.call(a,c||0))},d=function(a,c,d){d=d||[];for(c=
c||0;c<a.length;c++)d.push(a[c]);return d};c._toArray=c.isIE?function(c){return(c.item?d:a).apply(this,arguments)}:a;c.partial=function(a){return c.hitch.apply(c,[null].concat(c._toArray(arguments)))};var g=c._extraNames,e=g.length,i={};c.clone=function(a){if(!a||typeof a!="object"||c.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 d,h,f,o;if(c.isArray(a)){d=[];for(h=0,f=a.length;h<
f;++h)h in a&&d.push(c.clone(a[h]))}else d=a.constructor?new a.constructor:{};for(o in a)if(f=a[o],!(o in d)||d[o]!==f&&(!(o in i)||i[o]!==f))d[o]=c.clone(f);if(e)for(h=0;h<e;++h)if(o=g[h],f=a[o],!(o in d)||d[o]!==f&&(!(o in i)||i[o]!==f))d[o]=f;return d};c.trim=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var h=/\{([^\}]+)\}/g;c.replace=function(a,d,e){return a.replace(e||h,c.isFunction(d)?d:function(a,e){return c.getObject(e,
!1,d)})}})();return c});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var f=function(a,g,e){return[typeof a=="string"?a.split(""):a,g||c.global,typeof e=="string"?new Function("item","index","array",e):e]},a=function(a,c,e,i){for(var e=f(c,i,e),c=e[0],i=0,h=c.length;i<h;++i){var k=!!e[2].call(e[1],c[i],i,c);if(a^k)return k}return a};c.mixin(c,{indexOf:function(a,c,e,i){var h=1,f=a.length||0,j=0;i&&(j=f-1,h=f=-1);e!=void 0&&(j=e);if(i&&j>f||j<f)for(;j!=f;j+=h)if(a[j]==c)return j;
return-1},lastIndexOf:function(a,g,e){return c.indexOf(a,g,e,!0)},forEach:function(a,c,e){if(a&&a.length)for(var c=f(a,e,c),a=c[0],e=0,i=a.length;e<i;++e)c[2].call(c[1],a[e],e,a)},every:function(c,g,e){return a(!0,c,g,e)},some:function(c,g,e){return a(!1,c,g,e)},map:function(a,c,e,i){for(var c=f(a,e,c),a=c[0],i=i?new i:[],e=0,h=a.length;e<h;++e)i.push(c[2].call(c[1],a[e],e,a));return i},filter:function(a,c,e){for(var c=f(a,e,c),a=c[0],e=[],i=0,h=a.length;i<h;++i)c[2].call(c[1],a[i],i,a)&&e.push(a[i]);
return e}})})();return c});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(c){(function(){function f(a,c){throw Error("declare"+(c?" "+c:"")+": "+a);}function a(a,c,d){var e,g,h,i,j,k,l,m=this._inherited=this._inherited||{};typeof a=="string"&&(e=a,a=c,c=d);d=0;i=a.callee;(e=e||i.nom)||f("can't deduce a name to call inherited()",this.declaredClass);j=this.constructor._meta;h=j.bases;l=m.p;if(e!=v){if(m.c!==i&&(l=0,k=h[0],j=k._meta,j.hidden[e]!==i)){(g=j.chains)&&typeof g[e]=="string"&&
f("calling chained method with inherited: "+e,this.declaredClass);do if(j=k._meta,g=k.prototype,j&&(g[e]===i&&g.hasOwnProperty(e)||j.hidden[e]===i))break;while(k=h[++l]);l=k?l:-1}if(k=h[++l])if(g=k.prototype,k._meta&&g.hasOwnProperty(e))d=g[e];else{i=r[e];do if(g=k.prototype,(d=g[e])&&(k._meta?g.hasOwnProperty(e):d!==i))break;while(k=h[++l])}d=k&&d||r[e]}else{if(m.c!==i&&(l=0,(j=h[0]._meta)&&j.ctor!==i)){g=j.chains;for((!g||g.constructor!=="manual")&&f("calling chained constructor with inherited",
this.declaredClass);k=h[++l];)if((j=k._meta)&&j.ctor===i)break;l=k?l:-1}for(;k=h[++l];)if(d=(j=k._meta)?j.ctor:k)break;d=k&&d}m.c=d;m.p=l;if(d)return c===!0?d:d.apply(this,c||a)}function d(a,c){return typeof a=="string"?this.inherited(a,c,!0):this.inherited(a,!0)}function g(a){for(var c=this.constructor._meta.bases,d=0,e=c.length;d<e;++d)if(c[d]===a)return!0;return this instanceof a}function e(a,c){var d,e=0,g=p._extraNames.length;for(d in c)d!=v&&c.hasOwnProperty(d)&&(a[d]=c[d]);for(;e<g;++e)d=p._extraNames[e],
d!=v&&c.hasOwnProperty(d)&&(a[d]=c[d])}function i(a,c){var d,e,g=0,h=p._extraNames.length;for(d in c)if(e=c[d],(e!==r[d]||!(d in r))&&d!=v){if(s.call(e)=="[object Function]")e.nom=d;a[d]=e}for(;g<h;++g)if(d=p._extraNames[g],e=c[d],(e!==r[d]||!(d in r))&&d!=v){if(s.call(e)=="[object Function]")e.nom=d;a[d]=e}return a}function h(a){i(this.prototype,a);return this}function k(a,c){return function(){var w;var d=arguments,e=d,g=d[0],h,i;i=a.length;var f;if(!(this instanceof d.callee))return n(d);if(c&&
(g&&g.preamble||this.preamble)){f=Array(a.length);f[0]=d;for(h=0;;){if(g=d[0])(g=g.preamble)&&(d=g.apply(this,d)||d);g=a[h].prototype;(g=g.hasOwnProperty("preamble")&&g.preamble)&&(d=g.apply(this,d)||d);if(++h==i)break;f[h]=d}}for(h=i-1;h>=0;--h)g=a[h],(w=(i=g._meta)?i.ctor:g,g=w)&&g.apply(this,f?f[h]:d);(g=this.postscript)&&g.apply(this,e)}}function j(a,c){return function(){var d=arguments,e=d,g=d[0];if(!(this instanceof d.callee))return n(d);if(c){if(g)(g=g.preamble)&&(e=g.apply(this,e)||e);(g=
this.preamble)&&g.apply(this,e)}a&&a.apply(this,d);(g=this.postscript)&&g.apply(this,d)}}function l(a){return function(){var w;var c=arguments,d=0,e,g;if(!(this instanceof c.callee))return n(c);for(;e=a[d];++d)if(w=(g=e._meta)?g.ctor:e,e=w){e.apply(this,c);break}(e=this.postscript)&&e.apply(this,c)}}function m(a,c,d){return function(){var e,g,h=0,i=1;d&&(h=c.length-1,i=-1);for(;e=c[h];h+=i)g=e._meta,(e=(g?g.hidden:e.prototype)[a])&&e.apply(this,arguments)}}function o(a){u.prototype=a.prototype;a=
new u;u.prototype=null;return a}function n(a){var c=a.callee,d=o(c);c.apply(d,a);return d}var p=c,q=p._mixin,r=Object.prototype,s=r.toString,u=new Function,t=0,v="constructor";p.declare=function(c,w,n){typeof c!="string"&&(n=w,w=c,c="");var n=n||{},B,u,E,A,I,C,y,J=1,K=w;if(s.call(w)=="[object Array]"){J=c;E=[];A=[{cls:0,refs:[]}];C={};for(var G=1,F=w.length,O=0,H,N,D,L;O<F;++O){(H=w[O])?s.call(H)!="[object Function]"&&f("mixin #"+O+" is not a callable constructor.",J):f("mixin #"+O+" is unknown. Did you use dojo.require to pull it in?",
J);N=H._meta?H._meta.bases:[H];D=0;for(H=N.length-1;H>=0;--H){L=N[H].prototype;if(!L.hasOwnProperty("declaredClass"))L.declaredClass="uniqName_"+t++;L=L.declaredClass;C.hasOwnProperty(L)||(C[L]={count:0,refs:[],cls:N[H]},++G);L=C[L];D&&D!==L&&(L.refs.push(D),++D.count);D=L}++D.count;A[0].refs.push(D)}for(;A.length;){D=A.pop();E.push(D.cls);for(--G;u=D.refs,u.length==1;){D=u[0];if(!D||--D.count){D=0;break}E.push(D.cls);--G}if(D)for(O=0,F=u.length;O<F;++O)D=u[O],--D.count||A.push(D)}G&&f("can't build consistent linearization",
J);H=w[0];E[0]=H?H._meta&&H===E[E.length-H._meta.bases.length]?H._meta.bases.length:1:0;C=E;E=C[0];J=C.length-E;w=C[J]}else C=[0],w?s.call(w)=="[object Function]"?(E=w._meta,C=C.concat(E?E.bases:w)):f("base class is not a callable constructor.",c):w!==null&&f("unknown base class. Did you use dojo.require to pull it in?",c);if(w)for(u=J-1;;--u){B=o(w);if(!u)break;E=C[u];(E._meta?e:q)(B,E.prototype);A=new Function;A.superclass=w;A.prototype=B;w=B.constructor=A}else B={};i(B,n);E=n.constructor;if(E!==
r.constructor)E.nom=v,B.constructor=E;for(u=J-1;u;--u)(E=C[u]._meta)&&E.chains&&(y=q(y||{},E.chains));B["-chains-"]&&(y=q(y||{},B["-chains-"]));E=!y||!y.hasOwnProperty(v);C[0]=A=y&&y.constructor==="manual"?l(C):C.length==1?j(n.constructor,E):k(C,E);A._meta={bases:C,hidden:n,chains:y,parents:K,ctor:n.constructor};A.superclass=w&&w.prototype;A.extend=h;A.prototype=B;B.constructor=A;B.getInherited=d;B.inherited=a;B.isInstanceOf=g;if(c)B.declaredClass=c,p.setObject(c,A);if(y)for(I in y)if(B[I]&&typeof y[I]==
"string"&&I!=v)E=B[I]=m(I,C,y[I]==="after"),E.nom=I;return A};p.safeMixin=i})();return c.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(c){c._listener={getDispatcher:function(){return function(){var c=Array.prototype,a=arguments.callee,d=a._listeners,a=(a=a.target)&&a.apply(this,arguments),g,d=[].concat(d);for(g in d)g in c||d[g].apply(this,arguments);return a}},add:function(f,a,d){var f=f||c.global,g=f[a];if(!g||!g._listeners){var e=c._listener.getDispatcher();e.target=g;e._listeners=[];g=f[a]=e}return g._listeners.push(d)},remove:function(f,a,d){(f=(f||c.global)[a])&&
f._listeners&&d--&&delete f._listeners[d]}};c.connect=function(f,a,d,g,e){var i=arguments,h=[],k=0;h.push(c.isString(i[0])?null:i[k++],i[k++]);var j=i[k+1];h.push(c.isString(j)||c.isFunction(j)?i[k++]:null,i[k++]);for(j=i.length;k<j;k++)h.push(i[k]);return c._connect.apply(this,h)};c._connect=function(f,a,d,g){var e=c._listener,d=e.add(f,a,c.hitch(d,g));return[f,a,d,e]};c.disconnect=function(f){f&&f[0]!==void 0&&(c._disconnect.apply(this,f),delete f[0])};c._disconnect=function(c,a,d,g){g.remove(c,
a,d)};c._topics={};c.subscribe=function(f,a,d){return[f,c._listener.add(c._topics,f,c.hitch(a,d))]};c.unsubscribe=function(f){f&&c._listener.remove(c._topics,f[0],f[1])};c.publish=function(f,a){var d=c._topics[f];d&&d.apply(this,a||[])};c.connectPublisher=function(f,a,d){var g=function(){c.publish(f,arguments)};return d?c.connect(a,d,g):c.connect(a,g)};return c.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var f=function(){},a=Object.freeze||function(){},d=function(){var a,c,d,h,f=!1,j=function(){};return function(l){if(f)a?(c.next={task:l,next:null},c=c.next):c=a={task:l,next:null};else{f=!0;do try{for(;l;){l();if(d)a?c.next=d:a=d,c=h;a?(d=a.next,h=c,l=a.task,a=c=null):l=null}f=!1}catch(m){l=j,console.error(m)}while(f)}}}();c.Deferred=function(g){function e(a){if(k)throw Error("This deferred has already been resolved");
h=a;k=!0;d(i)}function i(){for(var a;!a&&m;){var d=m;m=m.next;if(a=d.progress==f)k=!1;var e=j?d.error:d.resolved;if(e)try{var g=e(h);g&&typeof g.then==="function"?g.then(c.hitch(d.deferred,"resolve"),c.hitch(d.deferred,"reject"),c.hitch(d.deferred,"progress")):(e=a&&g===void 0,a&&!e&&(j=g instanceof Error),d.deferred[e&&j?"reject":"resolve"](e?h:g))}catch(i){d.deferred.reject(i)}else j?d.deferred.reject(h):d.deferred.resolve(h)}}var h,k,j,l,m,o=this.promise={};this.resolve=this.callback=function(a){this.fired=
0;this.results=[a,null];e(a)};this.reject=this.errback=function(a){j=!0;this.fired=1;e(a);this.results=[null,a];if(!a||a.log!==!1)(c.config.deferredOnError||function(a){console.error(a)})(a)};this.progress=function(a){for(var c=m;c;){var d=c.progress;d&&d(a);c=c.next}};this.addCallbacks=function(a,c){this.then(a,c,f);return this};this.then=o.then=function(a,e,g){var h=g==f?this:new c.Deferred(o.cancel),a={resolved:a,error:e,progress:g,deferred:h};m?l=l.next=a:m=l=a;k&&d(i);return h.promise};var n=
this;this.cancel=o.cancel=function(){if(!k){var a=g&&g(n);if(!k)a instanceof Error||(a=Error(a)),a.log=!1,n.reject(a)}};a(o)};c.extend(c.Deferred,{addCallback:function(a){return this.addCallbacks(c.hitch.apply(c,arguments))},addErrback:function(a){return this.addCallbacks(null,c.hitch.apply(c,arguments))},addBoth:function(a){var d=c.hitch.apply(c,arguments);return this.addCallbacks(d,d)},fired:-1})})();c.when=function(c,a,d,g){return c&&typeof c.then==="function"?c.then(a,d,g):a(c)};return c.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(c){c.fromJson=function(c){return eval("("+c+")")};c._escapeString=function(c){return('"'+c.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};c.toJsonIndentStr="\t";c.toJson=function(f,a,d){if(f===void 0)return"undefined";var g=typeof f;if(g=="number"||g=="boolean")return f+"";if(f===null)return"null";if(c.isString(f))return c._escapeString(f);var e=
arguments.callee,i,d=d||"",h=a?d+c.toJsonIndentStr:"";i=f.__json__||f.json;if(c.isFunction(i)&&(i=i.call(f),f!==i))return e(i,a,h);if(f.nodeType&&f.cloneNode)throw Error("Can't serialize DOM nodes");i=a?" ":"";var k=a?"\n":"";if(c.isArray(f))return"["+c.map(f,function(c){c=e(c,a,h);typeof c!="string"&&(c="undefined");return k+h+c}).join(","+i)+k+d+"]";if(g=="function")return null;var g=[],j;for(j in f){var l,m;if(typeof j=="number")l='"'+j+'"';else if(typeof j=="string")l=c._escapeString(j);else continue;
m=e(f[j],a,h);typeof m=="string"&&g.push(k+h+l+":"+i+m)}return"{"+g.join(","+i)+k+d+"}"};return c});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(c){(function(){c.Color=function(c){c&&this.setColor(c)};c.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:c.config.transparentColor||[255,255,255]};c.extend(c.Color,
{r:255,g:255,b:255,a:1,_set:function(c,a,d,g){this.r=c;this.g=a;this.b=d;this.a=g},setColor:function(f){c.isString(f)?c.colorFromString(f,this):c.isArray(f)?c.colorFromArray(f,this):(this._set(f.r,f.g,f.b,f.a),f instanceof c.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"#"+c.map(["r","g","b"],function(c){c=this[c].toString(16);return c.length<2?"0"+
c:c},this).join("")},toCss:function(c){var a=this.r+", "+this.g+", "+this.b;return(c?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(!0)}});c.blendColors=function(f,a,d,g){var e=g||new c.Color;c.forEach(["r","g","b","a"],function(c){e[c]=f[c]+(a[c]-f[c])*d;c!="a"&&(e[c]=Math.round(e[c]))});return e.sanitize()};c.colorFromRgb=function(f,a){var d=f.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return d&&c.colorFromArray(d[1].split(/\s*,\s*/),a)};c.colorFromHex=function(f,
a){var d=a||new c.Color,g=f.length==4?4:8,e=(1<<g)-1,f=Number("0x"+f.substr(1));if(isNaN(f))return null;c.forEach(["b","g","r"],function(a){var c=f&e;f>>=g;d[a]=g==4?17*c:c});d.a=1;return d};c.colorFromArray=function(f,a){var d=a||new c.Color;d._set(Number(f[0]),Number(f[1]),Number(f[2]),Number(f[3]));if(isNaN(d.a))d.a=1;return d.sanitize()};c.colorFromString=function(f,a){var d=c.Color.named[f];return d&&c.colorFromArray(d,a)||c.colorFromRgb(f,a)||c.colorFromHex(f,a)}})();return c.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(c){c.doc=window.document||null;c.body=function(){return c.doc.body||c.doc.getElementsByTagName("body")[0]};c.setContext=function(f,a){c.global=f;c.doc=a};c.withGlobal=function(f,a,d,g){var e=c.global;try{return c.global=f,c.withDoc.call(null,f.document,a,d,g)}finally{c.global=e}};c.withDoc=function(f,a,d,g){var e=c.doc,i=c._bodyLtr,h=c.isQuirks;try{return c.doc=f,delete c._bodyLtr,c.isQuirks=c.doc.compatMode=="BackCompat",d&&typeof a=="string"&&
(a=d[a]),a.apply(d,g||[])}finally{c.doc=e;delete c._bodyLtr;if(i!==void 0)c._bodyLtr=i;c.isQuirks=h}};return c});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(c){(function(){var f=c._event_listener={add:function(a,d,e){if(a){d=f._normalizeEventName(d);e=f._fixCallback(d,e);if(!c.isIE&&(d=="mouseenter"||d=="mouseleave"))var g=e,d=d=="mouseenter"?"mouseover":"mouseout",e=function(d){if(!c.isDescendant(d.relatedTarget,a))return g.call(this,d)};a.addEventListener(d,e,!1);return e}},remove:function(a,d,e){if(a){d=f._normalizeEventName(d);if(!c.isIE&&(d=="mouseenter"||d=="mouseleave"))d=
d=="mouseenter"?"mouseover":"mouseout";a.removeEventListener(d,e,!1)}},_normalizeEventName:function(a){return a.slice(0,2)=="on"?a.slice(2):a},_fixCallback:function(a,c){return a!="keypress"?c:function(a){return c.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}};c.fixEvent=function(a,c){return f._fixEvent(a,c)};c.stopEvent=function(a){a.preventDefault();a.stopPropagation()};var a=c._listener;c._connect=function(d,e,g,h,i){i=d&&(d.nodeType||d.attachEvent||d.addEventListener)?i?2:1:0;g=[c._listener,f,a][i].add(d,e,c.hitch(g,h));return[d,e,g,i]};c._disconnect=function(d,e,g,h){[c._listener,f,a][h].remove(d,e,g)};c.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:c.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:c.isMac&&!c.isAIR?c.isSafari?91:224:17};var d=c.isMac?"metaKey":"ctrlKey";c.isCopyKey=function(a){return a[d]};c.mouseButtons=c.isIE<9||c.isIE&&c.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(a,c){return a.button&c},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,c){return a.button==c},isLeft:function(a){return a.button==
0},isMiddle:function(a){return a.button==1},isRight:function(a){return a.button==2}};if(c.isIE){var g=function(a,c){try{return a.keyCode=c}catch(d){return 0}},e=c._listener,i=c._ieListenersName="_"+c._scopeName+"_listeners";if(!c.config._allow_leaks)var a=e=c._ie_listener={handlers:[],add:function(a,d,e){var a=a||c.global,g=a[d];if(!g||!g[i]){var f=c._getIeDispatcher();f.target=g&&h.push(g)-1;f[i]=[];g=a[d]=f}return g[i].push(h.push(e)-1)},remove:function(a,d,e){var j;j=(a=(a||c.global)[d])&&a[i],
d=j;a&&d&&e--&&(delete h[d[e]],delete d[e])}},h=e.handlers;c.mixin(f,{add:function(a,c,d){if(a){c=f._normalizeEventName(c);if(c=="onkeypress"){var g=a.onkeydown;if(!g||!g[i]||!g._stealthKeydownHandle){var h=f.add(a,"onkeydown",f._stealthKeyDown),g=a.onkeydown;g._stealthKeydownHandle=h;g._stealthKeydownRefs=1}else g._stealthKeydownRefs++}return e.add(a,c,f._fixCallback(d))}},remove:function(a,c,d){c=f._normalizeEventName(c);e.remove(a,c,d);if(c=="onkeypress")c=a.onkeydown,--c._stealthKeydownRefs<=
0&&(e.remove(a,"onkeydown",c._stealthKeydownHandle),delete c._stealthKeydownHandle)},_normalizeEventName:function(a){return a.slice(0,2)!="on"?"on"+a:a},_nop:function(){},_fixEvent:function(a,d){if(!a)a=(d&&(d.ownerDocument||d.document||d).parentWindow||window).event;if(!a)return a;a.target=a.srcElement;a.currentTarget=d||a.srcElement;a.layerX=a.offsetX;a.layerY=a.offsetY;var e=a.srcElement,e=e&&e.ownerDocument||document,e=c.isIE<6||e.compatMode=="BackCompat"?e.body:e.documentElement,g=c._getIeDocumentElementOffset();
a.pageX=a.clientX+c._fixIeBiDiScrollLeft(e.scrollLeft||0)-g.x;a.pageY=a.clientY+(e.scrollTop||0)-g.y;if(a.type=="mouseover")a.relatedTarget=a.fromElement;if(a.type=="mouseout")a.relatedTarget=a.toElement;if(c.isIE<9||c.isQuirks)a.stopPropagation=f._stopPropagation,a.preventDefault=f._preventDefault;return f._fixKeys(a)},_fixKeys:function(a){switch(a.type){case "keypress":var c="charCode"in a?a.charCode:a.keyCode;c==10?(c=0,a.keyCode=13):c==13||c==27?c=0:c==3&&(c=99);a.charCode=c;f._setKeyChar(a)}return a},
_stealthKeyDown:function(a){var d=a.currentTarget.onkeypress;if(d&&d[i]){var e=a.keyCode,h=(e!=13||c.isIE>=9&&!c.isQuirks)&&e!=32&&e!=27&&(e<48||e>90)&&(e<96||e>111)&&(e<186||e>192)&&(e<219||e>222);if(h||a.ctrlKey){h=h?0:e;if(a.ctrlKey)if(e==3||e==13)return;else h>95&&h<106?h-=48:!a.shiftKey&&h>=65&&h<=90?h+=32:h=f._punctMap[h]||h;e=f._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:h});d.call(a.currentTarget,e);if(c.isIE<9||c.isIE&&c.isQuirks)a.cancelBubble=e.cancelBubble;a.returnValue=e.returnValue;
g(a,e.keyCode)}}},_stopPropagation:function(){this.cancelBubble=!0},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&g(this,0);this.returnValue=!1}});c.stopEvent=c.isIE<9||c.isQuirks?function(a){a=a||window.event;f._stopPropagation.call(a);f._preventDefault.call(a)}:c.stopEvent}f._synthesizeEvent=function(a,d){var e=c.mixin({},a,d);f._setKeyChar(e);e.preventDefault=function(){a.preventDefault()};e.stopPropagation=function(){a.stopPropagation()};return e};c.isOpera&&c.mixin(f,
{_fixEvent:function(a){switch(a.type){case "keypress":var c=a.which;c==3&&(c=99);c=c<41&&!a.shiftKey?0:c;a.ctrlKey&&!a.shiftKey&&c>=65&&c<=90&&(c+=32);return f._synthesizeEvent(a,{charCode:c})}return a}});if(c.isWebKit)f._add=f.add,f._remove=f.remove,c.mixin(f,{add:function(a,c,d){if(a){var e=f._add(a,c,d);if(f._normalizeEventName(c)=="keypress")e._stealthKeyDownHandle=f._add(a,"keydown",function(a){var c=a.keyCode,e=c!=13&&c!=32&&(c<48||c>90)&&(c<96||c>111)&&(c<186||c>192)&&(c<219||c>222);if(e||
a.ctrlKey){e=e?0:c;if(a.ctrlKey)if(c==3||c==13)return;else e>95&&e<106?e-=48:!a.shiftKey&&e>=65&&e<=90?e+=32:e=f._punctMap[e]||e;c=f._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:e});d.call(a.currentTarget,c)}});return e}},remove:function(a,c,d){a&&(d._stealthKeyDownHandle&&f._remove(a,"keydown",d._stealthKeyDownHandle),f._remove(a,c,d))},_fixEvent:function(a){switch(a.type){case "keypress":if(a.faux)break;var c=a.charCode;return f._synthesizeEvent(a,{charCode:c>=32?c:0,faux:!0})}return a}})})();
if(c.isIE)c._ieDispatcher=function(f,a){var d=Array.prototype,g=c._ie_listener.handlers,e=f.callee,i=e[c._ieListenersName],e=(e=g[e.target])&&e.apply(a,f),i=[].concat(i),h;for(h in i){var k=g[i[h]];!(h in d)&&k&&k.apply(a,f)}return e},c._getIeDispatcher=function(){return new Function(c._scopeName+"._ieDispatcher(arguments, this)")},c._event_listener._fixCallback=function(f){var a=c._event_listener._fixEvent;return function(c){return f.call(this,a(c,this))}};return c.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(c){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(f){}c.byId=c.isIE?function(a,d){if(typeof a!="string")return a;var g=d||c.doc,e=g.getElementById(a);if(e&&(e.attributes.id.value==a||e.id==a))return e;else{g=g.all[a];if(!g||g.nodeName)g=[g];for(var i=0;e=g[i++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}}:function(a,d){return(typeof a=="string"?(d||c.doc).getElementById(a):a)||
null};(function(){var a=c.byId,d=null,g;c.addOnWindowUnload(function(){d=null});c._destroyElement=c.destroy=function(c){c=a(c);try{var e=c.ownerDocument;if(!d||g!=e)d=e.createElement("div"),g=e;d.appendChild(c.parentNode?c.parentNode.removeChild(c):c);d.innerHTML=""}catch(h){}};c.isDescendant=function(c,d){try{c=a(c);for(d=a(d);c;){if(c==d)return!0;c=c.parentNode}}catch(e){}return!1};c.setSelectable=function(d,e){d=a(d);if(c.isMozilla)d.style.MozUserSelect=e?"":"none";else if(c.isKhtml||c.isWebKit)d.style.KhtmlUserSelect=
e?"auto":"none";else if(c.isIE){var g=d.unselectable=e?"":"on";c.query("*",d).forEach("item.unselectable = '"+g+"'")}};var e=function(a,c){var d=c.parentNode;d&&d.insertBefore(a,c)};c.place=function(d,g,h){g=a(g);typeof d=="string"&&(d=/^\s*</.test(d)?c._toDom(d,g.ownerDocument):a(d));if(typeof h=="number"){var i=g.childNodes;!i.length||i.length<=h?g.appendChild(d):e(d,i[h<0?0:h])}else switch(h){case "before":e(d,g);break;case "after":h=d;(i=g.parentNode)&&(i.lastChild==g?i.appendChild(h):i.insertBefore(h,
g.nextSibling));break;case "replace":g.parentNode.replaceChild(d,g);break;case "only":c.empty(g);g.appendChild(d);break;case "first":if(g.firstChild){e(d,g.firstChild);break}default:g.appendChild(d)}return d};c.boxModel="content-box";if(c.isIE)c.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var i;i=c.isWebKit?function(a){var c;if(a.nodeType==1){var d=a.ownerDocument.defaultView;c=d.getComputedStyle(a,null);if(!c&&a.style)a.style.display="",c=d.getComputedStyle(a,null)}return c||
{}}:c.isIE?function(a){return a.nodeType==1?a.currentStyle:{}}:function(a){return a.nodeType==1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};c.getComputedStyle=i;c._toPixelValue=c.isIE?function(a,c){if(!c)return 0;if(c=="medium")return 4;if(c.slice&&c.slice(-2)=="px")return parseFloat(c);with(a){var d=style.left,e=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=c,c=style.pixelLeft}catch(g){c=0}style.left=d;runtimeStyle.left=e}return c}:function(a,c){return parseFloat(c)||
0};var h=c._toPixelValue,f=function(a,c){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(d){return c?{}:null}};c._getOpacity=c.isIE<9?function(a){try{return f(a).Opacity/100}catch(c){return 1}}:function(a){return i(a).opacity};c._setOpacity=c.isIE<9?function(a,d){var e=d*100,g=d==1;a.style.zoom=g?"":1;if(f(a))f(a,1).Opacity=e;else{if(g)return d;a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+e+")"}f(a,1).Enabled=!g;a.nodeName.toLowerCase()=="tr"&&c.query("> td",
a).forEach(function(a){c._setOpacity(a,d)});return d}:function(a,c){return a.style.opacity=c};var j={left:!0,top:!0},l=/margin|padding|width|height|max|min|offset/,m=function(a,d,e){d=d.toLowerCase();if(c.isIE){if(e=="auto"){if(d=="height")return a.offsetHeight;if(d=="width")return a.offsetWidth}if(d=="fontweight")switch(e){case 700:return"bold";default:return"normal"}}d in j||(j[d]=l.test(d));return j[d]?h(a,e):e},o=c.isIE?"styleFloat":"cssFloat",n={cssFloat:o,styleFloat:o,"float":o};c.style=function(d,
e,g){var h=a(d),f=arguments.length,j=e=="opacity",e=n[e]||e;if(f==3)return j?c._setOpacity(h,g):h.style[e]=g;if(f==2&&j)return c._getOpacity(h);j=i(h);if(f==2&&typeof e!="string"){for(var v in e)c.style(d,v,e[v]);return j}return f==1?j:m(h,e,j[e]||h.style[e])};c._getPadExtents=function(a,c){var d=c||i(a),e=h(a,d.paddingLeft),g=h(a,d.paddingTop);return{l:e,t:g,w:e+h(a,d.paddingRight),h:g+h(a,d.paddingBottom)}};c._getBorderExtents=function(a,c){var d=c||i(a),e=d.borderLeftStyle!="none"?h(a,d.borderLeftWidth):
0,g=d.borderTopStyle!="none"?h(a,d.borderTopWidth):0;return{l:e,t:g,w:e+(d.borderRightStyle!="none"?h(a,d.borderRightWidth):0),h:g+(d.borderBottomStyle!="none"?h(a,d.borderBottomWidth):0)}};c._getPadBorderExtents=function(a,d){var e=d||i(a),g=c._getPadExtents(a,e),e=c._getBorderExtents(a,e);return{l:g.l+e.l,t:g.t+e.t,w:g.w+e.w,h:g.h+e.h}};c._getMarginExtents=function(a,d){var e=d||i(a),g=h(a,e.marginLeft),f=h(a,e.marginTop),j=h(a,e.marginRight),v=h(a,e.marginBottom);c.isWebKit&&e.position!="absolute"&&
(j=g);return{l:g,t:f,w:g+j,h:f+v}};c._getMarginBox=function(a,d){var e=d||i(a),g=c._getMarginExtents(a,e),h=a.offsetLeft-g.l,f=a.offsetTop-g.t,j=a.parentNode;if(c.isMoz){var v=parseFloat(e.left),e=parseFloat(e.top);!isNaN(v)&&!isNaN(e)?(h=v,f=e):j&&j.style&&(v=i(j),v.overflow!="visible"&&(j=c._getBorderExtents(j,v),h+=j.l,f+=j.t))}else if((c.isOpera||c.isIE>7&&!c.isQuirks)&&j)j=c._getBorderExtents(j),h-=j.l,f-=j.t;return{l:h,t:f,w:a.offsetWidth+g.w,h:a.offsetHeight+g.h}};c._getMarginSize=function(d,
e){var d=a(d),g=c._getMarginExtents(d,e||i(d)),h=d.getBoundingClientRect();return{w:h.right-h.left+g.w,h:h.bottom-h.top+g.h}};c._getContentBox=function(a,d){var e=d||i(a),g=c._getPadExtents(a,e),e=c._getBorderExtents(a,e),h=a.clientWidth,f;h?(f=a.clientHeight,e.w=e.h=0):(h=a.offsetWidth,f=a.offsetHeight);c.isOpera&&(g.l+=e.l,g.t+=e.t);return{l:g.l,t:g.t,w:h-g.w-e.w,h:f-g.h-e.h}};c._getBorderBox=function(a,d){var e=d||i(a),g=c._getPadExtents(a,e),e=c._getContentBox(a,e);return{l:e.l-g.l,t:e.t-g.t,
w:e.w+g.w,h:e.h+g.h}};c._setBox=function(a,c,d,e,g,h){h=h||"px";a=a.style;if(!isNaN(c))a.left=c+h;if(!isNaN(d))a.top=d+h;if(e>=0)a.width=e+h;if(g>=0)a.height=g+h};c._isButtonTag=function(a){return a.tagName=="BUTTON"||a.tagName=="INPUT"&&(a.getAttribute("type")||"").toUpperCase()=="BUTTON"};c._usesBorderBox=function(a){var d=a.tagName;return c.boxModel=="border-box"||d=="TABLE"||c._isButtonTag(a)};c._setContentSize=function(a,d,e,g){c._usesBorderBox(a)&&(g=c._getPadBorderExtents(a,g),d>=0&&(d+=g.w),
e>=0&&(e+=g.h));c._setBox(a,NaN,NaN,d,e)};c._setMarginBox=function(a,d,e,g,h,f){var j=f||i(a),f=c._usesBorderBox(a)?p:c._getPadBorderExtents(a,j);if(c.isWebKit&&c._isButtonTag(a)){var v=a.style;if(g>=0&&!v.width)v.width="4px";if(h>=0&&!v.height)v.height="4px"}j=c._getMarginExtents(a,j);g>=0&&(g=Math.max(g-f.w-j.w,0));h>=0&&(h=Math.max(h-f.h-j.h,0));c._setBox(a,d,e,g,h)};var p={l:0,t:0,w:0,h:0};c.marginBox=function(d,e){var g=a(d),h=i(g);return!e?c._getMarginBox(g,h):c._setMarginBox(g,e.l,e.t,e.w,
e.h,h)};c.contentBox=function(d,e){var g=a(d),h=i(g);return!e?c._getContentBox(g,h):c._setContentSize(g,e.w,e.h,h)};c._docScroll=function(){var a=c.global;return"pageXOffset"in a?{x:a.pageXOffset,y:a.pageYOffset}:(a=c.isQuirks?c.doc.body:c.doc.documentElement,{x:c._fixIeBiDiScrollLeft(a.scrollLeft||0),y:a.scrollTop||0})};c._isBodyLtr=function(){return"_bodyLtr"in c?c._bodyLtr:c._bodyLtr=(c.body().dir||c.doc.documentElement.dir||"ltr").toLowerCase()=="ltr"};c._getIeDocumentElementOffset=function(){var a=
c.doc.documentElement;if(c.isIE<8){var d=a.getBoundingClientRect(),e=d.left,d=d.top;c.isIE<7&&(e+=a.clientLeft,d+=a.clientTop);return{x:e<0?0:e,y:d<0?0:d}}else return{x:0,y:0}};c._fixIeBiDiScrollLeft=function(a){var d=c.isIE;if(d&&!c._isBodyLtr()){var e=c.isQuirks,g=e?c.doc.body:c.doc.documentElement;d==6&&!e&&c.global.frameElement&&g.scrollHeight>g.clientHeight&&(a+=g.clientLeft);return d<8||e?a+g.clientWidth-g.scrollWidth:-a}return a};c._abs=c.position=function(d,e){var d=a(d),g=c.body(),f=g.parentNode,
j=d.getBoundingClientRect(),j={x:j.left,y:j.top,w:j.right-j.left,h:j.bottom-j.top};c.isIE?(f=c._getIeDocumentElementOffset(),j.x-=f.x+(c.isQuirks?g.clientLeft+g.offsetLeft:0),j.y-=f.y+(c.isQuirks?g.clientTop+g.offsetTop:0)):c.isFF==3&&(g=i(f),j.x-=h(f,g.marginLeft)+h(f,g.borderLeftWidth),j.y-=h(f,g.marginTop)+h(f,g.borderTopWidth));e&&(g=c._docScroll(),j.x+=g.x,j.y+=g.y);return j};c.coords=function(d,e){var g=a(d),h=i(g),h=c._getMarginBox(g,h),g=c.position(g,e);h.x=g.x;h.y=g.y;return h};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:c.isIE,value:1},u=function(a,c){var d=a.getAttributeNode&&a.getAttributeNode(c);return d&&d.specified};c.hasAttr=function(c,d){var e=d.toLowerCase();return s[q[e]||d]||u(a(c),r[e]||d)};var t={},v=0,x=c._scopeName+"attrid",w={col:1,colgroup:1,table:1,
tbody:1,tfoot:1,thead:1,tr:1,title:1};c.attr=function(d,e,g){var d=a(d),h=arguments.length;if(h==2&&typeof e!="string"){for(var i in e)c.attr(d,i,e[i]);return d}var f=e.toLowerCase();i=q[f]||e;var j=s[i],f=r[f]||e;if(h==3){if(i=="style"&&typeof g!="string")c.style(d,g);else if(i=="innerHTML")c.isIE&&d.tagName.toLowerCase()in w?(c.empty(d),d.appendChild(c._toDom(g,d.ownerDocument))):d[i]=g;else if(c.isFunction(g)){h=c.attr(d,x);h||(h=v++,c.attr(d,x,h));t[h]||(t[h]={});if(j=t[h][i])c.disconnect(j);
else try{delete d[i]}catch(l){}t[h][i]=c.connect(d,i,g)}else j||typeof g=="boolean"?d[i]=g:d.setAttribute(f,g);return d}g=d[i];return j&&typeof g!="undefined"?g:i!="href"&&(typeof g=="boolean"||c.isFunction(g))?g:u(d,f)?d.getAttribute(f):null};c.removeAttr=function(c,d){a(c).removeAttribute(r[d.toLowerCase()]||d)};c.getNodeProp=function(c,d){var c=a(c),e=d.toLowerCase(),g=q[e]||d;if(g in c&&g!="href")return c[g];e=r[e]||d;return u(c,e)?c.getAttribute(e):null};c.create=function(d,e,g,h){var i=c.doc;
if(g)g=a(g),i=g.ownerDocument;typeof d=="string"&&(d=i.createElement(d));e&&c.attr(d,e);g&&c.place(d,g,h);return d};c.empty=c.isIE?function(d){for(var d=a(d),e;e=d.lastChild;)c.destroy(e)}:function(c){a(c).innerHTML=""};var z={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"]},B=/<\s*([\w\:]+)/,M={},E=0,A="__"+c._scopeName+
"ToDomId",I;for(I in z)if(z.hasOwnProperty(I))o=z[I],o.pre=I=="option"?'<select multiple="multiple">':"<"+o.join("><")+">",o.post="</"+o.reverse().join("></")+">";c._toDom=function(a,d){var d=d||c.doc,e=d[A];e||(d[A]=e=++E+"",M[e]=d.createElement("div"));a+="";var g=a.match(B),h=g?g[1].toLowerCase():"",e=M[e];if(g&&z[h]){g=z[h];e.innerHTML=g.pre+a+g.post;for(g=g.length;g;--g)e=e.firstChild}else e.innerHTML=a;if(e.childNodes.length==1)return e.removeChild(e.firstChild);for(h=d.createDocumentFragment();g=
e.firstChild;)h.appendChild(g);return h};c.hasClass=function(d,c){return(" "+a(d).className+" ").indexOf(" "+c+" ")>=0};var C=/\s+/,y=[""],J={},K=function(a){return typeof a=="string"||a instanceof String?a.indexOf(" ")<0?(y[0]=a,y):a.split(C):a||""};c.addClass=function(d,c){var d=a(d),c=K(c),e=d.className,g,e=e?" "+e+" ":" ";g=e.length;for(var h=0,i=c.length,f;h<i;++h)(f=c[h])&&e.indexOf(" "+f+" ")<0&&(e+=f+" ");g<e.length&&(d.className=e.substr(1,e.length-2))};c.removeClass=function(d,e){var d=
a(d),g;if(e!==void 0){e=K(e);g=" "+d.className+" ";for(var h=0,i=e.length;h<i;++h)g=g.replace(" "+e[h]+" "," ");g=c.trim(g)}else g="";d.className!=g&&(d.className=g)};c.replaceClass=function(d,e,g){d=a(d);J.className=d.className;c.removeClass(J,g);c.addClass(J,e);if(d.className!==J.className)d.className=J.className};c.toggleClass=function(a,d,e){e===void 0&&(e=!c.hasClass(a,d));c[e?"addClass":"removeClass"](a,d)}})();return c});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(c){(function(){var f=Array.prototype,a=f.slice,d=f.concat,g=function(d,e,g){d.sort||(d=a.call(d,0));g=g||this._NodeListCtor||c._NodeListCtor;d.constructor=g;c._mixin(d,g.prototype);d._NodeListCtor=g;return e?d._stash(e):d},e=function(d,e,g){e=[0].concat(a.call(e,0));g=g||c.global;return function(a){e[0]=a;return d.apply(g,e)}},i=function(a,d){return function(){this.forEach(e(a,
arguments,d));return this}},h=function(a,d){return function(){return this.map(e(a,arguments,d))}},k=function(a,d,g){return function(){var h=arguments,i=e(a,h,g);if(d.call(g||c.global,h))return this.map(i);this.forEach(i);return this}},j=function(a){return a.length==1&&typeof a[0]=="string"},l=function(a){var d=a.parentNode;d&&d.removeChild(a)};c.NodeList=function(){return g(Array.apply(null,arguments))};var m=c._NodeListCtor=c.NodeList,o=m.prototype;m._wrap=o._wrap=g;m._adaptAsMap=h;m._adaptAsForEach=
i;m._adaptAsFilter=function(a,d){return function(){return this.filter(e(a,arguments,d))}};m._adaptWithCondition=k;c.forEach(["slice","splice"],function(a){var d=f[a];o[a]=function(){return this._wrap(d.apply(this,arguments),a=="slice"?this:null)}});c.forEach(["indexOf","lastIndexOf","every","some"],function(d){var e=c[d];o[d]=function(){return e.apply(c,[this].concat(a.call(arguments,0)))}});c.forEach(["attr","style"],function(a){o[a]=k(c[a],j)});c.forEach("connect,addClass,removeClass,replaceClass,toggleClass,empty,removeAttr".split(","),
function(a){o[a]=i(c[a])});c.extend(c.NodeList,{_normalize:function(a,d){var e=a.parse===!0?!0:!1;if(typeof a.template=="string")var g=a.templateFunc||c.string&&c.string.substitute,a=g?g(a.template,a):a;g=typeof a;g=="string"||g=="number"?(a=c._toDom(a,d&&d.ownerDocument),a=a.nodeType==11?c._toArray(a.childNodes):[a]):c.isArrayLike(a)?c.isArray(a)||(a=c._toArray(a)):a=[a];if(e)a._runParse=!0;return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,d,e,g){if(!(d.nodeType!=1&&e=="only"))for(var h,
i=a.length,f=i-1;f>=0;f--){var j=g?this._cloneNode(a[f]):a[f];if(a._runParse&&c.parser&&c.parser.parse){h||(h=d.ownerDocument.createElement("div"));h.appendChild(j);c.parser.parse(h);for(j=h.firstChild;h.firstChild;)h.removeChild(h.firstChild)}f==i-1?c.place(j,d,e):d.parentNode.insertBefore(j,d);d=j}},_stash:function(a){this._parent=a;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(e){var g=c.isArray(this)?this:a.call(this,0),h=c.map(arguments,
function(d){return d&&!c.isArray(d)&&(typeof NodeList!="undefined"&&d.constructor===NodeList||d.constructor===this._NodeListCtor)?a.call(d,0):d});return this._wrap(d.apply(g,h),this)},map:function(a,d){return this._wrap(c.map(this,a,d),this)},forEach:function(a,d){c.forEach(this,a,d);return this},coords:h(c.coords),position:h(c.position),place:function(a,d){var e=c.query(a)[0];return this.forEach(function(a){c.place(a,e,d)})},orphan:function(a){return(a?c._filterQueryResult(this,a):this).forEach(l)},
adopt:function(a,d){return c.query(a).place(this[0],d)._stash(this)},query:function(a){if(!a)return this;var e=this.map(function(d){return c.query(a,d).filter(function(a){return a!==void 0})});return this._wrap(d.apply([],e),this)},filter:function(a){var d=arguments,e=this,g=0;if(typeof a=="string"){e=c._filterQueryResult(this,d[0]);if(d.length==1)return e._stash(this);g=1}return this._wrap(c.filter(e,d[g],d[g+1]),this)},addContent:function(a,d){for(var a=this._normalize(a,this[0]),c=0,e;e=this[c];c++)this._place(a,
e,d,c>0);return this},instantiate:function(a,d){var e=c.isFunction(a)?a:c.getObject(a),d=d||{};return this.forEach(function(a){new e(d,a)})},at:function(){var a=new this._NodeListCtor;c.forEach(arguments,function(d){d<0&&(d=this.length+d);this[d]&&a.push(this[d])},this);return a._stash(this)}});m.events="blur,focus,change,click,error,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,submit".split(",");c.forEach(m.events,function(a){var d="on"+a;o[d]=
function(a,c){return this.connect(d,a,c)}})})();return c.NodeList});
(function(){var c=function(a){var d=a.trim,c=a.forEach,e=a._NodeListCtor=a.NodeList,i=(a.isWebKit||a.isMozilla)&&a.doc.compatMode=="BackCompat",h=a.doc.firstChild.children?"children":"childNodes",f=!1,j=function(){return!0},l=function(a){a+=">~+".indexOf(a.slice(-1))>=0?" * ":" ";for(var c=function(c,e){return d(a.slice(c,e))},e=[],g=-1,h=-1,i=-1,j=-1,v=-1,l=-1,x=-1,m="",w="",o,n=0,p=a.length,z=null,q=null,B=function(){if(l>=0)z.id=c(l,n).replace(/\\/g,""),l=-1;if(x>=0){var a=x==n?null:c(x,n);z[">~+".indexOf(a)<
0?"tag":"oper"]=a;x=-1}v>=0&&(z.classes.push(c(v+1,n).replace(/\\/g,"")),v=-1)};m=w,w=a.charAt(n),n<p;n++)if(m!="\\")if(z||(o=n,z={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return f?this.otag:this.tag}},x=n),g>=0)if(w=="]"){q.attr?q.matchFor=c(i||g+1,n):q.attr=c(g+1,n);if((g=q.matchFor)&&(g.charAt(0)=='"'||g.charAt(0)=="'"))q.matchFor=g.slice(1,-1);z.attrs.push(q);q=null;g=i=-1}else{if(w=="=")i="|~^$*".indexOf(m)>=0?m:"",q.type=i+w,q.attr=c(g+1,n-i.length),
i=n+1}else if(h>=0){if(w==")"){if(j>=0)q.value=c(h+1,n);j=h=-1}}else if(w=="#")B(),l=n+1;else if(w==".")B(),v=n;else if(w==":")B(),j=n;else if(w=="[")B(),g=n,q={};else if(w=="(")j>=0&&(q={name:c(j+1,n),value:null},z.pseudos.push(q)),h=n;else if(w==" "&&m!=w){B();j>=0&&z.pseudos.push({name:c(j+1,n)});z.loops=z.pseudos.length||z.attrs.length||z.classes.length;z.oquery=z.query=c(o,n);z.otag=z.tag=z.oper?null:z.tag||"*";if(z.tag)z.tag=z.tag.toUpperCase();if(e.length&&e[e.length-1].oper)z.infixOper=e.pop(),
z.query=z.infixOper.query+" "+z.query;e.push(z);z=null}return e},m=function(a,d){return!a?d:!d?a:function(){return a.apply(window,arguments)&&d.apply(window,arguments)}},o=function(a,d){var c=d||[];a&&c.push(a);return c},n=function(a){return 1==a.nodeType},p=function(a,d){return!a?"":d=="class"?a.className||"":d=="for"?a.htmlFor||"":d=="style"?a.style.cssText||"":(f?a.getAttribute(d):a.getAttribute(d,2))||""},q={"*=":function(a,d){return function(c){return p(c,a).indexOf(d)>=0}},"^=":function(a,d){return function(c){return p(c,
a).indexOf(d)==0}},"$=":function(a,d){return function(c){c=" "+p(c,a);return c.lastIndexOf(d)==c.length-d.length}},"~=":function(a,d){var c=" "+d+" ";return function(d){return(" "+p(d,a)+" ").indexOf(c)>=0}},"|=":function(a,d){var c=" "+d+"-";return function(e){e=" "+p(e,a);return e==d||e.indexOf(c)==0}},"=":function(a,d){return function(c){return p(c,a)==d}}},r=typeof a.doc.firstChild.nextElementSibling=="undefined",s=!r?"nextElementSibling":"nextSibling",u=!r?"previousElementSibling":"previousSibling",
t=r?n:j,v=function(a){for(;a=a[u];)if(t(a))return!1;return!0},x=function(a){for(;a=a[s];)if(t(a))return!1;return!0},w=function(a){var d=a.parentNode,c=0,e=d[h],g=a._i||-1,i=d._l||-1;if(!e)return-1;e=e.length;if(i==e&&g>=0&&i>=0)return g;d._l=e;g=-1;for(d=d.firstElementChild||d.firstChild;d;d=d[s])if(t(d))d._i=++c,a===d&&(g=c);return g},z=function(a){return!(w(a)%2)},B=function(a){return w(a)%2},M={checked:function(){return function(a){return!!("checked"in a?a.checked:a.selected)}},"first-child":function(){return v},
"last-child":function(){return x},"only-child":function(){return function(a){return!v(a)?!1:!x(a)?!1:!0}},empty:function(){return function(a){for(var d=a.childNodes,a=a.childNodes.length-1;a>=0;a--){var c=d[a].nodeType;if(c===1||c==3)return!1}return!0}},contains:function(a,d){var c=d.charAt(0);if(c=='"'||c=="'")d=d.slice(1,-1);return function(a){return a.innerHTML.indexOf(d)>=0}},not:function(a,d){var c=l(d)[0],e={el:1};if(c.tag!="*")e.tag=1;if(!c.classes.length)e.classes=1;var g=A(c,e);return function(a){return!g(a)}},
"nth-child":function(a,d){var c=parseInt;if(d=="odd")return B;else if(d=="even")return z;if(d.indexOf("n")!=-1){var e=d.split("n",2),g=e[0]?e[0]=="-"?-1:c(e[0]):1,h=e[1]?c(e[1]):0,i=0,f=-1;g>0?h<0?h=h%g&&g+h%g:h>0&&(h>=g&&(i=h-h%g),h%=g):g<0&&(g*=-1,h>0&&(f=h,h%=g));if(g>0)return function(a){a=w(a);return a>=i&&(f<0||a<=f)&&a%g==h};else d=h}var j=c(d);return function(a){return w(a)==j}}},E=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(a){var d=a.toLowerCase();d=="class"&&(a="className");return function(c){return f?
c.getAttribute(a):c[a]||c[d]}}:function(a){return function(d){return d&&d.getAttribute&&d.hasAttribute(a)}},A=function(a,d){if(!a)return j;var d=d||{},e=null;"el"in d||(e=m(e,n));"tag"in d||a.tag!="*"&&(e=m(e,function(d){return d&&d.tagName==a.getTag()}));"classes"in d||c(a.classes,function(a,d){var c=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");e=m(e,function(a){return c.test(a.className)});e.count=d});"pseudos"in d||c(a.pseudos,function(a){var d=a.name;M[d]&&(e=m(e,M[d](d,a.value)))});"attrs"in d||c(a.attrs,
function(a){var d,c=a.attr;a.type&&q[a.type]?d=q[a.type](c,a.matchFor):c.length&&(d=E(c));d&&(e=m(e,d))});"id"in d||a.id&&(e=m(e,function(d){return!!d&&d.id==a.id}));e||"default"in d||(e=j);return e},I=function(a){return function(d,c,e){for(;d=d[s];)if(!r||n(d)){(!e||S(d,e))&&a(d)&&c.push(d);break}return c}},C=function(a){return function(d,c,e){for(d=d[s];d;){if(t(d)){if(e&&!S(d,e))break;a(d)&&c.push(d)}d=d[s]}return c}},y=function(a){a=a||j;return function(d,c,e){for(var g=0,i=d[h];d=i[g++];)t(d)&&
(!e||S(d,e))&&a(d,g)&&c.push(d);return c}},J={},K=function(d){var c=J[d.query];if(c)return c;var e=d.infixOper,e=e?e.oper:"",g=A(d,{el:1}),h="*"==d.tag,f=a.doc.getElementsByClassName;if(e){f={el:1};if(h)f.tag=1;g=A(d,f);"+"==e?c=I(g):"~"==e?c=C(g):">"==e&&(c=y(g))}else if(d.id)g=!d.loops&&h?j:A(d,{el:1,id:1}),c=function(c,e){var h=a.byId(d.id,c.ownerDocument||c);if(h&&g(h))if(9==c.nodeType)return o(h,e);else{for(var i=h.parentNode;i;){if(i==c)break;i=i.parentNode}if(i)return o(h,e)}};else if(f&&/\{\s*\[native code\]\s*\}/.test(String(f))&&
d.classes.length&&!i)var g=A(d,{el:1,classes:1,id:1}),v=d.classes.join(" "),c=function(a,d,c){for(var d=o(0,d),e,h=0,i=a.getElementsByClassName(v);e=i[h++];)g(e,a)&&S(e,c)&&d.push(e);return d};else!h&&!d.loops?c=function(a,c,e){for(var c=o(0,c),g=0,h=a.getElementsByTagName(d.getTag());a=h[g++];)S(a,e)&&c.push(a);return c}:(g=A(d,{el:1,tag:1,id:1}),c=function(a,c,e){for(var c=o(0,c),h,i=0,f=a.getElementsByTagName(d.getTag());h=f[i++];)g(h,a)&&S(h,e)&&c.push(h);return c});return J[d.query]=c},G={},
F={},O=function(a){var c=l(d(a));if(c.length==1){var g=K(c[0]);return function(a){if(a=g(a,new e))a.nozip=!0;return a}}return function(a){for(var a=o(a),d,e,g=c.length,h,i,f=0;f<g;f++){i=[];d=c[f];e=a.length-1;if(e>0)h={},i.nozip=!0;e=K(d);for(var j=0;d=a[j];j++)e(d,i,h);if(!i.length)break;a=i}return i}},H=navigator.userAgent,H=a.isWebKit&&H.indexOf("WebKit/")>0&&parseFloat(H.split("WebKit/")[1])>528,N=a.isIE?"commentStrip":"nozip",D=!!a.doc.querySelectorAll&&(!a.isSafari||a.isSafari>3.1||H),L=/n\+\d|([^ ])?([>~+])([^ =])?/g,
P=function(a,d,c,e){return c?(d?d+" ":"")+c+(e?" "+e:""):a},T=function(d,c){d=d.replace(L,P);if(D){var e=F[d];if(e&&!c)return e}if(e=G[d])return e;var e=d.charAt(0),g=-1==d.indexOf(" ");d.indexOf("#")>=0&&g&&(c=!0);if(D&&!c&&">~+".indexOf(e)==-1&&(!a.isIE||d.indexOf(":")==-1)&&!(i&&d.indexOf(".")>=0)&&d.indexOf(":contains")==-1&&d.indexOf(":checked")==-1&&d.indexOf("|=")==-1){var h=">~+".indexOf(d.charAt(d.length-1))>=0?d+" *":d;return F[d]=function(a){try{if(!(9==a.nodeType||g))throw"";var c=a.querySelectorAll(h);
c[N]=!0;return c}catch(e){return T(d,!0)(a)}}}else{var f=d.split(/\s*,\s*/);return G[d]=f.length<2?O(d):function(a){for(var d=0,c=[],e;e=f[d++];)c=c.concat(O(e)(a));return c}}},R=0,U=a.isIE?function(a){return f?a.getAttribute("_uid")||a.setAttribute("_uid",++R)||R:a.uniqueID}:function(a){return a._uid||(a._uid=++R)},S=function(a,d){if(!d)return 1;var c=U(a);return!d[c]?d[c]=1:0},W=function(d){if(d&&d.nozip)return e._wrap?e._wrap(d):d;var c=new e;if(!d||!d.length)return c;d[0]&&c.push(d[0]);if(d.length<
2)return c;R++;if(a.isIE&&f){var g=R+"";d[0].setAttribute("_zipIdx",g);for(var h=1,i;i=d[h];h++)d[h].getAttribute("_zipIdx")!=g&&c.push(i),i.setAttribute("_zipIdx",g)}else if(a.isIE&&d.commentStrip)try{for(h=1;i=d[h];h++)n(i)&&c.push(i)}catch(j){}else{d[0]&&(d[0]._zipIdx=R);for(h=1;i=d[h];h++)d[h]._zipIdx!=R&&c.push(i),i._zipIdx=R}return c};a.query=function(d,c){e=a._NodeListCtor;if(!d)return new e;if(d.constructor==e)return d;if(typeof d!="string")return new e(d);if(typeof c=="string"&&(c=a.byId(c),
!c))return new e;var c=c||a.doc,g=c.ownerDocument||c.documentElement;f=c.contentType&&c.contentType=="application/xml"||a.isOpera&&(c.doctype||g.toString()=="[object XMLDocument]")||!!g&&(a.isIE?g.xml:c.xmlVersion||g.xmlVersion);return(g=T(d)(c))&&g.nozip&&!e._wrap?g:W(g)};a.query.pseudos=M;a._filterQueryResult=function(d,c,e){for(var g=new a._NodeListCtor,h=l(c),h=h.length==1&&!/[^\w#\.]/.test(c)?A(h[0]):function(a){return dojo.query(c,e).indexOf(a)!=-1},i=0,f;f=d[i];i++)h(f)&&g.push(f);return g}},
f=function(){acme={trim:function(a){for(var a=a.replace(/^\s+/,""),d=a.length-1;d>=0;d--)if(/\S/.test(a.charAt(d))){a=a.substring(0,d+1);break}return a},forEach:function(a,d,c){if(a&&a.length)for(var g=0,f=a.length;g<f;++g)d.call(c||window,a[g],g,a)},byId:function(a,d){return typeof a=="string"?(d||document).getElementById(a):a},doc:document,NodeList:Array};var a=navigator,d=a.userAgent,a=a.appVersion,c=parseFloat(a);acme.isOpera=d.indexOf("Opera")>=0?c:void 0;acme.isKhtml=a.indexOf("Konqueror")>=
0?c:void 0;acme.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0;acme.isChrome=parseFloat(d.split("Chrome/")[1])||void 0;if((d=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome)if(acme.isSafari=parseFloat(a.split("Version/")[1]),!acme.isSafari||parseFloat(a.substr(d+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){c(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"),c(this.queryPortability||this.acme||dojo)):c(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(c){(function(){var f=c.config;c.fieldToObject=function(a){var d=null;if(a=c.byId(a)){var e=a.name,g=(a.type||"").toLowerCase();if(e&&g&&!a.disabled)if(g=="radio"||g=="checkbox"){if(a.checked)d=a.value}else a.multiple?(d=[],c.query("option",a).forEach(function(a){a.selected&&d.push(a.value)})):d=a.value}return d};c.formToObject=function(a){var d={};c.forEach(c.byId(a).elements,
function(a){var e=a.name,g=(a.type||"").toLowerCase();if(e&&g&&"file|submit|image|reset|button|".indexOf(g)==-1&&!a.disabled){a=c.fieldToObject(a);if(a!==null){var h=d[e];typeof h=="string"?d[e]=[h,a]:c.isArray(h)?h.push(a):d[e]=a}if(g=="image")d[e+".x"]=d[e+".y"]=d[e].x=d[e].y=0}});return d};c.objectToQuery=function(a){var d=encodeURIComponent,e=[],g={},h;for(h in a){var i=a[h];if(i!=g[h]){var f=d(h)+"=";if(c.isArray(i))for(var j=0;j<i.length;j++)e.push(f+d(i[j]));else e.push(f+d(i))}}return e.join("&")};
c.formToQuery=function(a){return c.objectToQuery(c.formToObject(a))};c.formToJson=function(a,d){return c.toJson(c.formToObject(a),d)};c.queryToObject=function(a){var d={},a=a.split("&"),e=decodeURIComponent;c.forEach(a,function(a){if(a.length){var g=a.split("="),a=e(g.shift()),g=e(g.join("="));typeof d[a]=="string"&&(d[a]=[d[a]]);c.isArray(d[a])?d[a].push(g):d[a]=g}});return d};c._blockAsync=!1;var a=c._contentHandlers=c.contentHandlers={text:function(a){return a.responseText},json:function(a){return c.fromJson(a.responseText||
null)},"json-comment-filtered":function(a){c.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,d=a.indexOf("/*"),e=a.lastIndexOf("*/");if(d==-1||e==-1)throw Error("JSON was not comment filtered");return c.fromJson(a.substring(d+
2,e))},javascript:function(a){return c.eval(a.responseText)},xml:function(a){var d=a.responseXML;if(c.isIE&&(!d||!d.documentElement)){var e=function(a){return"MSXML"+a+".DOMDocument"},e=["Microsoft.XMLDOM",e(6),e(4),e(3),e(2)];c.some(e,function(c){try{var e=new ActiveXObject(c);e.async=!1;e.loadXML(a.responseText);d=e}catch(g){return!1}return!0})}return d},"json-comment-optional":function(d){return d.responseText&&/^[^{\[]*\/\*/.test(d.responseText)?a["json-comment-filtered"](d):a.json(d)}};c._ioSetArgs=
function(a,d,e,g){var h={args:a,url:a.url},i=null;if(a.form){var i=c.byId(a.form),j=i.getAttributeNode("action");h.url=h.url||(j?j.value:null);i=c.formToObject(i)}j=[{}];i&&j.push(i);a.content&&j.push(a.content);a.preventCache&&j.push({"dojo.preventCache":(new Date).valueOf()});h.query=c.objectToQuery(c.mixin.apply(null,j));h.handleAs=a.handleAs||"text";var l=new c.Deferred(d);l.addCallbacks(e,function(a){return g(a,l)});var k=a.load;k&&c.isFunction(k)&&l.addCallback(function(d){return k.call(a,d,
h)});var m=a.error;m&&c.isFunction(m)&&l.addErrback(function(d){return m.call(a,d,h)});var n=a.handle;n&&c.isFunction(n)&&l.addBoth(function(d){return n.call(a,d,h)});f.ioPublish&&c.publish&&h.args.ioPublish!==!1&&(l.addCallbacks(function(a){c.publish("/dojo/io/load",[l,a]);return a},function(a){c.publish("/dojo/io/error",[l,a]);return a}),l.addBoth(function(a){c.publish("/dojo/io/done",[l,a]);return a}));l.ioArgs=h;return l};var d=function(a){a.canceled=!0;var d=a.ioArgs.xhr,c=typeof d.abort;(c==
"function"||c=="object"||c=="unknown")&&d.abort();a=a.ioArgs.error;if(!a)a=Error("xhr cancelled"),a.dojoType="cancel";return a},g=function(d){d=a[d.ioArgs.handleAs](d.ioArgs.xhr);return d===void 0?null:d},e=function(a,d){d.ioArgs.args.failOk||console.error(a);return a},i=null,h=[],k=0,j=function(a){k<=0&&(k=0,f.ioPublish&&c.publish&&(!a||a&&a.ioArgs.args.ioPublish!==!1)&&c.publish("/dojo/io/stop"))},l=function(){var a=(new Date).getTime();if(!c._blockAsync)for(var d=0,e;d<h.length&&(e=h[d]);d++){var g=
e.dfd,f=function(){if(!g||g.canceled||!e.validCheck(g))h.splice(d--,1),k-=1;else if(e.ioCheck(g))h.splice(d--,1),e.resHandle(g),k-=1;else if(g.startTime&&g.startTime+(g.ioArgs.args.timeout||0)<a){h.splice(d--,1);var c=Error("timeout exceeded");c.dojoType="timeout";g.errback(c);g.cancel();k-=1}};if(c.config.debugAtAllCosts)f.call(this);else try{f.call(this)}catch(l){g.errback(l)}}j(g);h.length||(clearInterval(i),i=null)};c._ioCancelAll=function(){try{c.forEach(h,function(a){try{a.dfd.cancel()}catch(d){}})}catch(a){}};
c.isIE&&c.addOnWindowUnload(c._ioCancelAll);c._ioNotifyStart=function(a){f.ioPublish&&c.publish&&a.ioArgs.args.ioPublish!==!1&&(k||c.publish("/dojo/io/start"),k+=1,c.publish("/dojo/io/send",[a]))};c._ioWatch=function(a,d,c,e){var g=a.ioArgs.args;if(g.timeout)a.startTime=(new Date).getTime();h.push({dfd:a,validCheck:d,ioCheck:c,resHandle:e});i||(i=setInterval(l,50));g.sync&&l()};var m=function(a){return a.ioArgs.xhr.readyState},o=function(a){return 4==a.ioArgs.xhr.readyState},n=function(a){var d=a.ioArgs.xhr;
if(c._isDocumentOk(d))a.callback(a);else{var e=Error("Unable to load "+a.ioArgs.url+" status:"+d.status);e.status=d.status;e.responseText=d.responseText;a.errback(e)}};c._ioAddQueryToUrl=function(a){if(a.query.length)a.url+=(a.url.indexOf("?")==-1?"?":"&")+a.query,a.query=null};c.xhr=function(a,h,i){var f=c._ioSetArgs(h,d,g,e),j=f.ioArgs,l=j.xhr=c._xhrObj(j.args);if(!l)return f.cancel(),f;"postData"in h?j.query=h.postData:"putData"in h?j.query=h.putData:"rawBody"in h?j.query=h.rawBody:(arguments.length>
2&&!i||"POST|PUT".indexOf(a.toUpperCase())==-1)&&c._ioAddQueryToUrl(j);l.open(a,j.url,h.sync!==!0,h.user||void 0,h.password||void 0);if(h.headers)for(var v in h.headers)v.toLowerCase()==="content-type"&&!h.contentType?h.contentType=h.headers[v]:h.headers[v]&&l.setRequestHeader(v,h.headers[v]);l.setRequestHeader("Content-Type",h.contentType||"application/x-www-form-urlencoded");(!h.headers||!("X-Requested-With"in h.headers))&&l.setRequestHeader("X-Requested-With","XMLHttpRequest");c._ioNotifyStart(f);
if(c.config.debugAtAllCosts)l.send(j.query);else try{l.send(j.query)}catch(k){j.error=k,f.cancel()}c._ioWatch(f,m,o,n);return f};c.xhrGet=function(a){return c.xhr("GET",a)};c.rawXhrPost=c.xhrPost=function(a){return c.xhr("POST",a,!0)};c.rawXhrPut=c.xhrPut=function(a){return c.xhr("PUT",a,!0)};c.xhrDelete=function(a){return c.xhr("DELETE",a)}})();return c.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(c){(function(){var f=c._mixin;c._Line=function(a,d){this.start=a;this.end=d};c._Line.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};c.Animation=function(a){f(this,a);if(c.isArray(this.curve))this.curve=new c._Line(this.curve[0],this.curve[1])};c._Animation=c.Animation;c.extend(c.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var a=this._percent,d=this.easing;return d?d(a):a},_fire:function(a,d){var e=d||[];if(this[a])if(c.config.debugAtAllCosts)this[a].apply(this,e);else try{this[a].apply(this,e)}catch(g){console.error("exception in animation handler for:",a),console.error(g)}return this},play:function(a,d){this._delayTimer&&this._clearTimer();if(d)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,g=c.hitch(this,"_play",d);if(e>0)return this._delayTimer=setTimeout(g,e),this;g();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,d){this._stopTimer();this._active=this._paused=!0;this._percent=a;d&&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,d=null,g={run:function(){}};c.extend(c.Animation,{_startTimer:function(){if(!this._timer)this._timer=c.connect(g,"run",this,"_cycle"),a++;d||(d=setInterval(c.hitch(g,"run"),this.rate))},_stopTimer:function(){if(this._timer)c.disconnect(this._timer),this._timer=null,a--;a<=0&&(clearInterval(d),d=null,a=0)}});var e=c.isIE?function(a){var d=
a.style;if(!d.width.length&&c.style(a,"width")=="auto")d.width="auto"}:function(){};c._fade=function(a){a.node=c.byId(a.node);var d=f({properties:{}},a),a=d.properties.opacity={};a.start=!("start"in d)?function(){return+c.style(d.node,"opacity")||0}:d.start;a.end=d.end;a=c.animateProperty(d);c.connect(a,"beforeBegin",c.partial(e,d.node));return a};c.fadeIn=function(a){return c._fade(f({end:1},a))};c.fadeOut=function(a){return c._fade(f({end:0},a))};c._defaultEasing=function(a){return 0.5+Math.sin((a+
1.5)*Math.PI)/2};var i=function(a){this._properties=a;for(var d in a){var e=a[d];if(e.start instanceof c.Color)e.tempColor=new c.Color}};i.prototype.getValue=function(a){var d={},e;for(e in this._properties){var g=this._properties[e],i=g.start;i instanceof c.Color?d[e]=c.blendColors(i,g.end,a,g.tempColor).toCss():c.isArray(i)||(d[e]=(g.end-i)*a+i+(e!="opacity"?g.units||"px":0))}return d};c.animateProperty=function(a){var d=a.node=c.byId(a.node);if(!a.easing)a.easing=c._defaultEasing;a=new c.Animation(a);
c.connect(a,"beforeBegin",a,function(){var a={},e;for(e in this.properties){if(e=="width"||e=="height")this.node.display="block";var g=this.properties[e];c.isFunction(g)&&(g=g(d));g=a[e]=f({},c.isObject(g)?g:{end:g});if(c.isFunction(g.start))g.start=g.start(d);if(c.isFunction(g.end))g.end=g.end(d);var h=e.toLowerCase().indexOf("color")>=0,n=function(a,d){var e={height:a.offsetHeight,width:a.offsetWidth}[d];if(e!==void 0)return e;e=c.style(a,d);return d=="opacity"?+e:h?e:parseFloat(e)};if("end"in g){if(!("start"in
g))g.start=n(d,e)}else g.end=n(d,e);h?(g.start=new c.Color(g.start),g.end=new c.Color(g.end)):g.start=e=="opacity"?+g.start:parseFloat(g.start)}this.curve=new i(a)});c.connect(a,"onAnimate",c.hitch(c,"style",a.node));return a};c.anim=function(a,d,e,g,i,f){return c.animateProperty({node:a,duration:e||c.Animation.prototype.duration,properties:d,easing:g,onEnd:i}).play(f||0)}})();return c.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(c){return c});(function(){var c=this;if(!c.define)c.define=function(f){c.orion=c.orion||{};c.orion.Deferred=f();delete c.define}})();
define("orion/Deferred",[],function(){function c(c){if(i)a?(d.next={notify:c,next:null},d=d.next):d=a={notify:c,next:null};else{i=!0;do{for(;c;){c();if(g)a?d.next=g:a=g,d=e;a?(g=a.next,e=d,c=a.notify,a=d=null):c=null}i=!1}while(i)}}function f(){function a(){for(;g;){var c=g;g=g.next;var h=c.deferred;if(c[e])try{var f=c[e](d);f&&typeof f.then==="function"?f.then(h.resolve,h.reject,h.update):h.resolve(f)}catch(q){h.reject(q)}else h[e](d)}g=i=null}var d,e,g,i;this.resolve=function(g){if(e)throw Error("'"+
e+"' already called");e="resolve";d=g;c(a)};this.reject=function(g){if(e)throw Error("'"+e+"' already called");e="reject";d=g;c(a)};this.update=this.progress=this.notify=function(a){for(var d=g;d;){if(d.update)try{d.update(a)}catch(c){}d=d.next}};this.then=function(d,k,p){d={resolve:d,reject:k,update:p,deferred:new f};g?i.next=d:g=d;i=d;e&&c(a);return d.deferred.promise};this.promise={then:this.then};this.state=function(){return e||"wait"};this.all=function(a,d){function c(a,d){e||(i[a]=d,--h===0&&
f.resolve(i))}function g(a,h){if(!e){if(d)try{c(a,d(h));return}catch(i){h=i}f.reject(h)}}var h=a.length,i=[],f=this;h===0?this.resolve(i):a.forEach(function(a,d){a.then(c.bind(null,d),g.bind(null,d))});return this.promise}}var a,d,g,e,i=!1;f.when=function(a,d,c,e){var g;if(!(a&&typeof a.then==="function"))g=new f,g.resolve(a),a=g.promise;return a.then(d,c,e)};return f});
define("orion/serviceregistry",["orion/Deferred"],function(c){function f(a,d,c){this.serviceId=a;this.name=d;this.properties=c}function a(a,d,c){this.serviceId=a;this.serviceReference=d;this.internalRegistry=c}function d(a,d,e,g){return function(){var i;if(a.isRegistered(d)){try{var f=e[g].apply(e,Array.prototype.slice.call(arguments));if(f&&typeof f.then==="function")return f;else i=new c,i.resolve(f)}catch(n){i=new c,i.reject(n)}return i.promise}throw Error("Service was unregistered");}}function g(a,
c,e){this.serviceId=a;this.implementation=c;this.internalRegistry=e;for(var g in c)typeof c[g]==="function"&&(this[g]=d(e,a,c,g))}function e(){this._namedlisteners={}}function i(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new e;var a=this;this.internalRegistry={isRegistered:function(d){return a._entries[d]?!0:!1},unregisterService:function(d){var c=a._entries[d];if(c){for(var e=c.reference,g=a._namedReferences[e.getName()],i=0;i<g.length;i++)if(g[i]===e){g.length===1?delete a._namedReferences[e.getName()]:
g.splice(i,1);break}a._entries[d]=null;a._serviceEventTarget.dispatchEvent("serviceRemoved",e,c.service)}},dispatchEvent:function(d,c){var e=a._entries[d];e&&e.eventTarget.dispatchEvent.apply(e.eventTarget,[c].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(d,c,e){(d=a._entries[d])&&d.eventTarget.addEventListener(c,e)},removeEventListener:function(d,c,e){(d=a._entries[d])&&d.eventTarget.removeEventListener(c,e)}}}f.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames:function(){var a=[],d;for(d in this.properties)this.properties.hasOwnProperty(d)&&a.push(d);return a},getProperty:function(a){return this.properties[a]}};f.prototype.constructor=f;a.prototype={unregister:function(){this.internalRegistry.unregisterService(this.serviceId)},dispatchEvent:function(a){this.internalRegistry.dispatchEvent.apply(this.internalRegistry,[this.serviceId,a].concat(Array.prototype.slice.call(arguments,1)))},getServiceReference:function(){return this.serviceReference}};
a.prototype.constructor=a;g.prototype={addEventListener:function(a,d){this.internalRegistry.addEventListener(this.serviceId,a,d)},removeEventListener:function(a,d){this.internalRegistry.removeEventListener(this.serviceId,a,d)}};g.prototype.constructor=g;e.prototype={dispatchEvent:function(a){var d=this._namedlisteners[a];if(d)for(var c=0;c<d.length;c++)try{var e=Array.prototype.slice.call(arguments,1);d[c].apply(null,e)}catch(g){console.log(g)}},addEventListener:function(a,d){this._namedlisteners[a]=
this._namedlisteners[a]||[];this._namedlisteners[a].push(d)},removeEventListener:function(a,d){var c=this._namedlisteners[a];if(c)for(var e=0;e<c.length;e++)if(c[e]===d){c.length===1?delete this._namedlisteners[a]:c.splice(e,1);break}}};e.prototype.constructor=e;i.prototype={getService:function(a){var d;if(typeof a==="string"){if(this._namedReferences[a])for(var c=0;c<this._namedReferences[a].length;c++)if(d=this._entries[this._namedReferences[a][c].getServiceId()].service)break}else d=this._entries[a.getServiceId()].service;
return d},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:[];for(var a=[],d=0;d<this._entries.length;d++)this._entries[d]&&a.push(this._entries[d].reference);return a},registerService:function(d,c,i){var l=this._entries.length,i=new f(l,d,i),c=new g(l,c,this.internalRegistry);this._namedReferences[d]=this._namedReferences[d]||[];this._namedReferences[d].push(i);this._entries.push({reference:i,service:c,eventTarget:new e});this._serviceEventTarget.dispatchEvent("serviceAdded",
i,c);return new a(l,i,this.internalRegistry)},addEventListener:function(a,d){this._serviceEventTarget.addEventListener(a,d)},removeEventListener:function(a,d){this._serviceEventTarget.removeEventListener(a,d)}};i.prototype.constructor=i;return{ServiceReference:f,ServiceRegistration:a,Service:g,EventTarget:e,ServiceRegistry:i}});
define("orion/xhr",["orion/Deferred"],function(c){function f(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()})}return function(a,d,g){var g=g||{},e=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,i=new c,h=g.headers||{},k=g.log||!1,j,l;typeof h["X-Requested-With"]==="undefined"&&(h["X-Requested-With"]="XMLHttpRequest");if(g.query&&typeof g.query==="object"){var m=g.query,o=Object.keys(m),n=[];for(l=0;l<o.length;l++){var p=
o[l],q=m[p];n.push(f(p)+"="+f(q))}n.length&&(m=d.split("#"),m[0]+=(m[0].indexOf("?")===-1?"?":"&")+n.join("&"),d=m.join("#"))}if(typeof g.data!=="undefined"&&(a==="POST"||a==="PUT"))j=g.data;if(typeof g.responseType==="string")e.responseType=g.responseType;e.onreadystatechange=function(){if(e.readyState===4){var a=e.status,c=typeof e.response!=="undefined"?e.response:e.responseText,c={args:g,response:c,responseText:typeof c==="string"?c:null,status:a,url:d,xhr:e};200<=a&&a<400?i.resolve(c):(k&&console&&
console.log(Error(e.statusText)),i.reject(c))}};try{e.open(a,d,!0);if(typeof g.timeout==="number")e.timeout=g.timeout,e.addEventListener("timeout",function(a){i.reject("Timeout exceeded: "+a)});var r=Object.keys(h);for(l=0;l<r.length;l++){var s=r[l];e.setRequestHeader(s,h[s])}e.send(j)}catch(u){i.reject(u)}return i}});
define("orion/es5shim",[],function(){if(!Function.prototype.bind)Function.prototype.bind=function(c){var f=this,a=Array.prototype.slice.call(arguments,1);return a.length?function(){return arguments.length?f.apply(c,a.concat(Array.prototype.slice.call(arguments))):f.apply(c,a)}:function(){return arguments.length?f.apply(c,arguments):f.call(c)}}});
define("orion/preferences",["require","orion/Deferred","orion/xhr","orion/es5shim"],function(c,f,a){function d(a,d){this._name=a;this._providers=d;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function g(a,d){return{get:function(c,e){if(d===0)return null;var g=localStorage.getItem(a+c);if(g===null)return null;g=JSON.parse(g);return e||d===-1||g._expires&&g._expires>(new Date).getTime()?(delete g._expires,g):null},set:function(c,e){if(d!==0){if(d!==-1)e._expires=(new Date).getTime()+
1E3*d;if(Object.keys(e).length===0)localStorage.removeItem(a+c);else{var g=JSON.stringify(e);localStorage.setItem(a+c,g);delete e._expires}}},remove:function(d){localStorage.removeItem(a+d)}}}function e(a){this._currentPromises={};this._cache=new g("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var d=a.getServiceReferences("orion.core.preference.provider");if(d.length>0)this._service=a.getService(d[0])}return!!this._service}}function i(a){this._location=
a;this._currentPromise=null;this._cache=new g("/orion/preferences/default",3600)}function h(){this._cache=new g("/orion/preferences/local",-1)}function k(a,d){this._userProvider=new e(a);this._localProvider=new h;d=d||"defaults.pref";d.indexOf("://")===-1&&(d=c.toUrl(d));this._defaultsProvider=new i(d);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],d=0;d<this._stores.length;++d){var c=this._stores[d];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[d].put(this._name,c))}this._dirty=[];return(new 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 d=this._stores[a],c;for(c in d)d.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
d[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,d){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==d)c[a]=d,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var d=0;d<this._stores.length;++d){var c=this._stores[d];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 d=this,c=[],e=0;e<this._providers.length;++e)c.push(this._providers[e].get(this._name,a).then(function(a){return function(c){d._stores[a]=c}}(e)));return(new f).all(c).then(function(){d._cached=null;d._getCached()})},flush:function(){this._flush()}};e.prototype={get:function(a,d){if(this._currentPromises[a])return this._currentPromises[a];var c=new f,
e=null;d?this._cache.remove(a):e=this._cache.get(a);if(e!==null)c.resolve(e);else{this._currentPromises[a]=c;var g=this;this._service.get(a).then(function(d){g._cache.set(a,d);delete g._currentPromises[a];c.resolve(d)},function(d){d.status===404?(d={},g._cache.set(a,d),delete g._currentPromises[a],c.resolve(d)):(delete g._currentPromises[a],c.resolve(g._cache.get(a,!0)||{}))})}return c},put:function(a,d){this._cache.set(a,d);return this._service.put(a,d)}};i.prototype={get:function(d,c){if(this._currentPromise)return this._currentPromise;
var e=new f,g=null;c?this._cache.remove(d):g=this._cache.get(d);if(g!==null)e.resolve(g);else{this._currentPromise=e;var h=this;a("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=JSON.parse(a.response);h._cache.set(d,a[d]||{});h._currentPromise=null;e.resolve(a[d]||{})},function(a){a.xhr.status===401||a.xhr.status===404?(h._cache.set(d,{}),h._currentPromise=null,e.resolve({})):(h._currentPromise=null,a=h._cache.get(d,!0),a!==null?e.resolve(a[d]||{}):e.resolve({}))})}return e},
put:function(){var a=new f;a.resolve();return a}};h.prototype={get:function(a){var d=new f,a=this._cache.get(a);a!==null?d.resolve(a):d.resolve({});return d},put:function(a,d){var c=new f;this._cache.set(a,d);c.resolve();return c}};k.DEFAULT_SCOPE=1;k.LOCAL_SCOPE=2;k.USER_SCOPE=4;k.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(a,c){if(!c||typeof c!=="number"||c>7||c<1)c=k.DEFAULT_SCOPE|k.LOCAL_SCOPE|
k.USER_SCOPE;var e=[];k.USER_SCOPE&c&&this._userProvider.available()&&e.push(this._userProvider);k.LOCAL_SCOPE&c&&e.push(this._localProvider);k.DEFAULT_SCOPE&c&&e.push(this._defaultsProvider);var g=new d(a,e);return g.sync().then(function(){return g})},getSetting:function(a,d,c){for(var e,g=0;g<a.length;g++)if(a[g].label===d)for(var h=0;h<a[g].data.length;h++)if(a[g].data[h].label===c){e=a[g].data[h].value;break}return e}};return{PreferencesService:k}});
define("orion/pluginregistry",["orion/Deferred","orion/serviceregistry","orion/es5shim"],function(c,f){var a=a||{};a.Plugin=function(a,g,e){function i(a,d,g){if(!m)throw Error("plugin not connected");var h=q++,i=new c;r[String(h)]=i;e.postMessage({id:h,serviceId:a,method:d,params:g},m);return i.promise}function h(a){var d={};a.methods&&a.methods.forEach(function(c){d[c]=function(){var d=Array.prototype.slice.call(arguments);return p?i(a.serviceId,c,d):l._load().then(function(){return i(a.serviceId,
c,d)})}});return d}function f(){var a=g.services;a&&a.forEach(function(a){var d=h(a);s[a.serviceId]=e.registerService(a.type,d,a.properties)})}function j(c){var h,i;try{if(c.method)if("plugin"===c.method){if(g){if(JSON.stringify(g)!==JSON.stringify(c.params[0])){for(var j in s)s.hasOwnProperty(j)&&(s[j].unregister(),delete s[j]);g=c.params[0];f();e.updatePlugin(l)}}else g=c.params[0],f();p||(p=!0,e.dispatchEvent("pluginLoaded",l),o.resolve(l));n&&(n.resolve(l),n=null)}else"dispatchEvent"===c.method?
(h=s[c.serviceId],h.dispatchEvent.apply(h,c.params)):"progress"===c.method?(i=r[String(c.requestId)],i.update.apply(i,c.params)):(p||o.reject(Error("Load timeout for plugin: "+a)),n&&(n.reject(Error("Load timeout for plugin: "+a)),n=null));else i=r[String(c.id)],delete r[String(c.id)],c.error?i.reject(c.error):i.resolve(c.result)}catch(m){console.log(m)}}var l=this,m=null,o=new c,n=null,p=!1,q=0,r={},s={};this.getLocation=function(){return a};this.getData=function(){return g};this.uninstall=function(){for(var a in s)s.hasOwnProperty(a)&&
(s[a].unregister(),delete s[a]);m&&(e.disconnect(m),m=null);e.uninstallPlugin(this)};this.getServiceReferences=function(){var a=[],d;for(d in s)s.hasOwnProperty(d)&&a.push(s[d].getServiceReference());return a};this.update=function(){if(!p)return this._load();n===null&&(n=new c,e.disconnect(m),m=e.connect(a,j));return n.promise};this._load=function(c,h){m||(m=e.connect(a,j,h),o.then(null,function(){c||(g={},e.updatePlugin(l))}));return o.promise};if(typeof a!=="string")throw Error("invalid url:"+a);
g&&f()};a.PluginRegistry=function(d,g,e){function i(a){if(a.indexOf("://")===-1){var d=document.createElement("a");d.href=a;return d.href}return a}function h(a){a.getData()._expires=(new Date).getTime()+36E5;j["plugin."+a.getLocation()]=JSON.stringify(a.getData())}function k(a){var d=null,a=i(a);l.some(function(c){if(a===c.getLocation())return d=c,!0});return d}var j=g||localStorage||{},l=[],m=[],o=new f.EventTarget;addEventListener("message",function(a){var d=a.source;m.some(function(c){if(d===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}})},!1);var n={registerService:d.registerService.bind(d),connect:function(a,d,c){function g(){d({method:"timeout"})}var h={handler:d,url:a},i=setTimeout(g,c||15E3);if(a.match(/\.js$/)&&typeof Worker!=="undefined"){var f=new Worker(a);f.onmessage=function(a){if(typeof h.useStructuredClone==="undefined")h.useStructuredClone=typeof a.data!=="string";h.handler(h.useStructuredClone?
a.data:JSON.parse(a.data))};h.target=f;h.close=function(){f.terminate()}}else{var j=document.createElement("iframe");j.id=a;j.name=a;if(!e)j.style.display="none",j.style.visibility="hidden";j.src=a;j.onload=function(){clearTimeout(i);setTimeout(g,5E3)};j.sandbox="allow-scripts allow-same-origin";document.body.appendChild(j);h.target=j.contentWindow;h.close=function(){document.body.removeChild(j)}}m.push(h);return h},disconnect:function(a){for(var d=0;d<m.length;d++)if(a===m[d]){m.splice(d,1);try{a.close()}catch(c){}break}},
uninstallPlugin:function(a){delete j["plugin."+a.getLocation()];for(var d=0;d<l.length;d++)if(a===l[d]){l.splice(d,1);o.dispatchEvent("pluginRemoved",a);break}},updatePlugin:function(a){h(a);o.dispatchEvent("pluginUpdated",a)},postMessage:function(a,d){d.target.postMessage(d.useStructuredClone?a:JSON.stringify(a),d.url)},dispatchEvent:function(a,d){try{o.dispatchEvent(a,d)}catch(c){console&&console.log(c)}}};this.startup=function(d){var e=[];d.forEach(function(d){var d=i(d),c="plugin."+d,g=j[c]?JSON.parse(j[c]):
null;g&&g._expires&&g._expires>(new Date).getTime()?k(d)===null&&(delete g._expires,l.push(new a.Plugin(d,g,n))):(j[c]="{}",d=new a.Plugin(d,{},n),l.push(d),e.push(d._load(!1,5E3)))});return(new c).all(e,function(){})};this.shutdown=function(){m.forEach(function(a){try{a.close()}catch(d){}})};this.installPlugin=function(d,e){var d=i(d),g=new c,f=k(d);if(f)if(f.getData())g.resolve(f);else{var j=function(a){a.getLocation()===d&&(g.resolve(a),o.removeEventListener("pluginAdded",j))};o.addEventListener("pluginAdded",
j)}else f=new a.Plugin(d,e,n),l.push(f),f.getData()?(h(f),o.dispatchEvent("pluginAdded",f),g.resolve(f)):f._load(!0).then(function(){h(f);o.dispatchEvent("pluginAdded",f);g.resolve(f)},function(a){g.reject(a)});return g.promise};this.getPlugins=function(){var a=[];l.forEach(function(d){d.getData()&&a.push(d)});return a};this.getPlugin=function(a){return(a=k(a))&&a.getData()?a:null};this.addEventListener=function(a,d){o.addEventListener(a,d)};this.removeEventListener=function(a,d){o.removeEventListener(a,
d)}};return a});
define("orion/bootstrap",["require","orion/Deferred","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(c,f,a,d,g){var e;return{startup:function(){if(e)return e;e=new f;var i=new a.ServiceRegistry,h=new d.PreferencesService(i),k=new g.PluginRegistry(i);return h.getPreferences("/plugins").then(function(a){for(var a=a.keys(),d=0;d<a.length;++d)a[d].indexOf("://")===-1&&(a[d]=c.toUrl(a[d]));return k.startup(a)}).then(function(){if(i.getServiceReferences("orion.core.preference.provider").length>0)return h.getPreferences("/plugins",
h.USER_SCOPE).then(function(a){for(var a=a.keys(),d=0;d<a.length;++d)a[d].indexOf("://")===-1&&(a[d]=c.toUrl(a[d]));return k.startup(a)})}).then(function(){var a=i.getService("orion.core.auth");a&&a.getUser().then(function(d){d||a.getAuthForm(window.location.href).then(function(a){window.location=a})})}).then(function(){var a={serviceRegistry:i,preferences:h,pluginRegistry:k};e.resolve(a);return a})}}});
(function(){function c(a,d,c,h,f,j){d[a]&&(c.push(a),(d[a]===!0||d[a]===1)&&h.push(f+a+"/"+j))}function f(a,d,c,h,f){d=h+d+"/"+f;require._fileExists(a.toUrl(d))&&c.push(d)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,d={};define("i18n",{version:"1.0.0",load:function(g,e,i,h){var h=h||{},k=a.exec(g),j=k[1],l=k[4],m=k[5],o=l.split("-"),n=[],p={},q,r,s="";k[5]?(j=k[1],g=j+m):(m=k[4],l=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
o=l.split("-"));if(h.isBuild){n.push(g);f(e,"root",n,j,m);for(q=0;r=o[q];q++)s+=(s?"-":"")+r,f(e,s,n,j,m);e(n,function(){i()})}else e([g],function(a){var g=[];c("root",a,g,n,j,m);for(q=0;r=o[q];q++)s+=(s?"-":"")+r,c(s,a,g,n,j,m);e(n,function(){var c,h;for(c=g.length-1;c>-1&&(r=g[c]);c--){h=a[r];if(h===!0||h===1)h=e(j+r+"/"+m);var f=p,l=void 0;for(l in h)!(l in d)&&!(l in f)&&(f[l]=h[l])}i(p)})})}})})();
define("orion/i18n",[],function(){return{load:function(c,f,a,d){var d=d||{},g=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,e=g.exec(c);if(e)if(f.defined(c))a(f(c));else if(d.isBuild||d.isTest)a({});else{var i=e[1],h=e[3]?e[2]:"",k=e[3]||e[2];f(["orion/bootstrap"],function(j){j.startup().then(function(j){var m=j.serviceRegistry,j=m.getServiceReferences("orion.i18n.message");if(h)j.some(function(d){return c===d.getProperty("name")?(m.getService(d).getMessageBundle().then(function(d){a(d)},function(){a({})}),
!0):!1})||a({});else{var o={},n;j.forEach(function(a){var c=a.getProperty("name");if((e=g.exec(c))&&i===e[1]&&k===(e[3]||e[2]))if(h=e[3]?e[2]:""){if((a=d.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&a.indexOf(h)===0)o[h]=!0,f.specified(c)||define(c,["orion/i18n!"+c],function(a){return a})}else n=a});f.specified(c)?a(o):n?m.getService(n).getMessageBundle().then(function(d){Object.keys(o).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=o[a])});define(c,
[],d);a(d)},function(){define(c,[],o);a(o)}):(define(c,[],o),a(o))}})})}else a(null)}}});define("orion/nls/messages",["orion/i18n!orion/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[a])});return f});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Repositories:"Repositories",Console:"Console","Get Plugins":"Get Plugins",Global:"Global",Editor:"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.":"Beta build I20120622-1139. Please try it out but BEWARE your data may be lost.","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"});define("dijit",["dojo"],function(c){return dijit=c._dijit||{}});
(function(){var c=["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,d=typeof location!=="undefined"&&location.href,g=d&&location.protocol&&location.protocol.replace(/\:/,""),e=d&&location.hostname,i=d&&(location.port||void 0),h=[];define("text",[],function(){var k,j,l;typeof window!=="undefined"&&window.navigator&&window.document?j=function(a,d){var c=k.createXhr();c.open("GET",a,!0);c.onreadystatechange=
function(){c.readyState===4&&d(c.responseText)};c.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(l=require.nodeRequire("fs"),j=function(a,d){var c=l.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));d(c)}):typeof Packages!=="undefined"&&(j=function(a,d){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")),g,h,i="";try{g=new java.lang.StringBuffer;
(h=c.readLine())&&h.length()&&h.charAt(0)===65279&&(h=h.substring(1));for(g.append(h);(h=c.readLine())!==null;)g.append(e),g.append(h);i=String(g.toString())}finally{c.close()}d(i)});return k={version:"1.0.7",strip:function(d){if(d){var d=d.replace(f,""),c=d.match(a);c&&(d=c[1])}else d="";return d},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,d,
e;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(d=0;d<3;d++){e=c[d];try{a=new ActiveXObject(e)}catch(g){}if(a){c=[e];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:j,parseName:function(a){var d=!1,c=a.indexOf("."),e=a.substring(0,c),a=a.substring(c+1,a.length),c=a.indexOf("!");c!==-1&&(d=a.substring(c+1,a.length),d=d==="strip",a=a.substring(0,c));return{moduleName:e,ext:a,strip:d}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,
d,c,e){var g=k.xdRegExp.exec(a),h;if(!g)return!0;a=g[2];g=g[3];g=g.split(":");h=g[1];g=g[0];return(!a||a===d)&&(!g||g===c)&&(!h&&!g||h===e)},finishLoad:function(a,d,c,e,g){c=d?k.strip(c):c;g.isBuild&&(h[a]=c);e(c)},load:function(a,c,h,f){if(f.isBuild&&!f.inlineText)h();else{var j=k.parseName(a),l=j.moduleName+"."+j.ext,s=c.toUrl(l),u=f&&f.text&&f.text.useXhr||k.useXhr;!d||u(s,g,e,i)?k.get(s,function(d){k.finishLoad(a,j.strip,d,h,f)}):c([l],function(a){k.finishLoad(j.moduleName+"."+j.ext,j.strip,a,
h,f)})}},write:function(a,d,c){if(d in h){var e=k.jsEscape(h[d]);c.asModule(a+"!"+d,"define(function () { return '"+e+"';});\n")}},writeFile:function(a,d,c,e,g){var d=k.parseName(d),h=d.moduleName+"."+d.ext,i=c.toUrl(d.moduleName+"."+d.ext)+".js";k.load(h,c,function(){var d=function(a){return e(i,a)};d.asModule=function(a,d){return e.asModule(a,i,d)};k.write(a,h,d,g)},g)}}})})();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(c,f){f.getObject("i18n",!0,f);f.i18n.getLocalization=f.i18n.getLocalization||function(a,d,g){var g=f.i18n.normalizeLocale(g),e=g.split("-"),i=[a,"nls",d].join(".");if(typeof f.global.require!=="undefined"){var h=c("i18n!"+[a.replace(/\./g,"/"),"nls",d].join("/"));(f._loadedModules[i]=f._loadedModules[i]||{})[e.join("_")]=h.root||h}if(i=f._loadedModules[i]){for(var k,h=e.length;h>0;h--){var j=e.slice(0,h).join("_");if(i[j]){k=i[j];break}}if(!k)k=i.ROOT;
if(k)return a=function(){},a.prototype=k,new a}throw Error("Bundle not found: "+d+" in "+a+" , locale="+g);};f.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():f.locale;a=="root"&&(a="ROOT");return a};f.i18n._requireLocalization=function(a,d,c,e){var c=f.i18n.normalizeLocale(c),i=[a,"nls",d].join("."),h="";if(e){for(var k=e.split(","),j=0;j<k.length;j++)c.indexOf(k[j])==0&&k[j].length>h.length&&(h=k[j]);h||(h="ROOT")}var k=e?h:c,l=f._loadedModules[i],j=null;if(l){if(f.config.localizationComplete&&
l._built)return;j=k.replace(/-/g,"_");j=f._loadedModules[i+"."+j]}if(!j){var l=f.provide(i),m=f._getModuleSymbols(a).concat("nls").join("/"),o;f.i18n._searchLocalePath(k,e,function(a){var c=a.replace(/-/g,"_"),g=i+"."+c,h=!1;f._loadedModules[g]?h=!0:(f.provide(g),g=[m],a!="ROOT"&&g.push(a),g.push(d),a=g.join("/")+".js",h=f._loadPath(a,null,function(a){var a=a.root||a,d=function(){};d.prototype=o;l[c]=new d;for(var e in a)l[c][e]=a[e]}));h&&l[c]?o=l[c]:l[c]=o;if(e)return!0})}e&&c!=h&&(l[c.replace(/-/g,
"_")]=l[h.replace(/-/g,"_")])};(function(){var a=f.config.extraLocale;if(a){!a instanceof Array&&(a=[a]);var d=f.i18n._requireLocalization;f.i18n._requireLocalization=function(c,e,i,h){d(c,e,i,h);if(!i)for(i=0;i<a.length;i++)d(c,e,a[i],h)}}})();f.i18n._searchLocalePath=function(a,d,c){for(var a=f.i18n.normalizeLocale(a),e=a.split("-"),a=[],i=e.length;i>0;i--)a.push(e.slice(0,i).join("-"));a.push(!1);d&&a.reverse();for(d=a.length-1;d>=0;d--)if(c(a[d]||"ROOT"))break};f.i18n._preloadLocalizations=function(a,
d){function c(e){e=f.i18n.normalizeLocale(e);f.i18n._searchLocalePath(e,!0,function(c){for(var e=0;e<d.length;e++)if(d[e]==c)return f.require(a+"_"+c),!0;return!1})}c();for(var e=f.config.extraLocale||[],i=0;i<e.length;i++)c(e[i])};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("dojo/window",["dojo"],function(c){c.getObject("window",!0,c);c.window.getBox=function(){var f=c.doc.compatMode=="BackCompat"?c.body():c.doc.documentElement,a=c._docScroll();return{w:f.clientWidth,h:f.clientHeight,l:a.x,t:a.y}};c.window.get=function(f){if(c.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};c.window.scrollIntoView=function(f,
a){try{var f=c.byId(f),d=f.ownerDocument||c.doc,g=d.body||c.body(),e=d.documentElement||g.parentNode,i=c.isIE,h=c.isWebKit;if((!c.isMoz&&!i&&!h&&!c.isOpera||f==g||f==e)&&typeof f.scrollIntoView!="undefined")f.scrollIntoView(!1);else{var k=d.compatMode=="BackCompat",j=i>=9&&f.ownerDocument.parentWindow.frameElement?e.clientHeight>0&&e.clientWidth>0&&(g.clientHeight==0||g.clientWidth==0||g.clientHeight>e.clientHeight||g.clientWidth>e.clientWidth)?e:g:k?g:e,d=h?g:j,l=j.clientWidth,m=j.clientHeight,o=
!c._isBodyLtr(),n=a||c.position(f),p=f.parentNode,j=function(a){return i<=6||i&&k?!1:c.style(a,"position").toLowerCase()=="fixed"};if(!j(f))for(;p;){p==g&&(p=d);var q=c.position(p),r=j(p);if(p==d){q.w=l;q.h=m;d==e&&i&&o&&(q.x+=d.offsetWidth-q.w);if(q.x<0||!i)q.x=0;if(q.y<0||!i)q.y=0}else{var s=c._getPadBorderExtents(p);q.w-=s.w;q.h-=s.h;q.x+=s.l;q.y+=s.t;var u=p.clientWidth,t=q.w-u;if(u>0&&t>0)q.w=u,q.x+=o&&(i||p.clientLeft>s.l)?t:0;u=p.clientHeight;t=q.h-u;if(u>0&&t>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>m)q.h=m-q.y;if(q.x+q.w>l)q.w=l-q.x}var v=n.x-q.x,x=n.y-Math.max(q.y,0),w=v+n.w-q.w,z=x+n.h-q.h;if(w*v>0){var B=Math[v<0?"max":"min"](v,w);if(o&&(i==8&&!k||i>=9))B=-B;n.x+=p.scrollLeft;p.scrollLeft+=B;n.x-=p.scrollLeft}z*x>0&&(n.y+=p.scrollTop,p.scrollTop+=Math[x<0?"max":"min"](x,z),n.y-=p.scrollTop);p=p!=d&&!r&&p.parentNode}}}catch(M){console.error("scrollIntoView: "+M),f.scrollIntoView(!1)}};return c.window});
define("dijit/_base/manager",["dojo","dijit"],function(c,f){c.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,d){var d=d||c.global,g=0,e;for(e in this._hash)a.call(d,this._hash[e],g++,this._hash);return this},filter:function(a,
d){var d=d||c.global,g=new f.WidgetSet,e=0,i;for(i in this._hash){var h=this._hash[i];a.call(d,h,e++,this._hash)&&g.add(h)}return g},byId:function(a){return this._hash[a]},byClass:function(a){var d=new f.WidgetSet,c,e;for(c in this._hash)e=this._hash[c],e.declaredClass==a&&d.add(e);return d},toArray:function(){var a=[],d;for(d in this._hash)a.push(this._hash[d]);return a},map:function(a,d){return c.map(this.toArray(),a,d)},every:function(a,d){var d=d||c.global,g=0,e;for(e in this._hash)if(!a.call(d,
this._hash[e],g++,this._hash))return!1;return!0},some:function(a,d){var d=d||c.global,g=0,e;for(e in this._hash)if(a.call(d,this._hash[e],g++,this._hash))return!0;return!1}});(function(){f.registry=new f.WidgetSet;var a=f.registry._hash,d=c.attr,g=c.hasAttr,e=c.style;f.byId=function(d){return typeof d=="string"?a[d]:d};var i={};f.getUniqueId=function(d){var c;do c=d+"_"+(d in i?++i[d]:i[d]=0);while(a[c]);return f._scopeName=="dijit"?c:f._scopeName+"_"+c};f.findWidgets=function(d){function c(d){for(d=
d.firstChild;d;d=d.nextSibling)if(d.nodeType==1){var g=d.getAttribute("widgetId");g?(g=a[g])&&e.push(g):c(d)}}var e=[];c(d);return e};f._destroyAll=function(){f._curFocus=null;f._prevFocus=null;f._activeStack=[];c.forEach(f.findWidgets(c.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})};c.isIE&&c.addOnWindowUnload(function(){f._destroyAll()});f.byNode=function(d){return a[d.getAttribute("widgetId")]};f.getEnclosingWidget=function(d){for(;d;){var c=
d.getAttribute&&d.getAttribute("widgetId");if(c)return a[c];d=d.parentNode}return null};var h=f._isElementShown=function(a){var c=e(a);return c.visibility!="hidden"&&c.visibility!="collapsed"&&c.display!="none"&&d(a,"type")!="hidden"};f.hasDefaultTabStop=function(a){switch(a.nodeName.toLowerCase()){case "a":return g(a,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var d;try{var c=a.contentDocument;if("designMode"in c&&c.designMode==
"on")return!0;d=c.body}catch(e){try{d=a.contentWindow.document.body}catch(h){return!1}}return d.contentEditable=="true"||d.firstChild&&d.firstChild.contentEditable=="true";default:return a.contentEditable=="true"}};var k=f.isTabNavigable=function(a){return d(a,"disabled")?!1:g(a,"tabIndex")?d(a,"tabIndex")>=0:f.hasDefaultTabStop(a)};f._getTabNavigable=function(a){function e(a){return a&&a.tagName.toLowerCase()=="input"&&a.type&&a.type.toLowerCase()=="radio"&&a.name&&a.name.toLowerCase()}var i,f,n,
p,q,r,s={},u=function(a){c.query("> *",a).forEach(function(a){if(!(c.isIE&&a.scopeName!=="HTML")&&h(a)){if(k(a)){var j=d(a,"tabIndex");if(!g(a,"tabIndex")||j==0)i||(i=a),f=a;else if(j>0){if(!n||j<p)p=j,n=a;if(!q||j>=r)r=j,q=a}j=e(a);c.attr(a,"checked")&&j&&(s[j]=a)}a.nodeName.toUpperCase()!="SELECT"&&u(a)}})};h(a)&&u(a);return{first:s[e(i)]||i,last:s[e(f)]||f,lowest:s[e(n)]||n,highest:s[e(q)]||q}};f.getFirstInTabbingOrder=function(a){a=f._getTabNavigable(c.byId(a));return a.lowest?a.lowest:a.first};
f.getLastInTabbingOrder=function(a){a=f._getTabNavigable(c.byId(a));return a.last?a.last:a.highest};f.defaultDuration=c.config.defaultDuration||200})();return f});
define("dojo/Stateful",["dojo"],function(c){c.declare("dojo.Stateful",null,{postscript:function(f){f&&c.mixin(this,f)},get:function(c){return this[c]},set:function(c,a){if(typeof c==="object"){for(var d in c)this.set(d,c[d]);return this}d=this[c];this[c]=a;this._watchCallbacks&&this._watchCallbacks(c,d,a);return this},watch:function(f,a){var d=this._watchCallbacks;if(!d)var g=this,d=this._watchCallbacks=function(a,c,e,f){var l=function(d){if(d)for(var d=d.slice(),f=0,j=d.length;f<j;f++)try{d[f].call(g,
a,c,e)}catch(l){console.error(l)}};l(d["_"+a]);f||l(d["*"])};!a&&typeof f==="function"?(a=f,f="*"):f="_"+f;var e=d[f];typeof e!=="object"&&(e=d[f]=[]);e.push(a);return{unwatch:function(){e.splice(c.indexOf(e,a),1)}}}});return c.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(c,f){(function(){c.declare("dijit._WidgetBase",c.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(c.config.blankGif||c.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,d){this.create(a,d)},create:function(a,d){this.srcNodeRef=
c.byId(d);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a)this.params=a,c._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 g=this.srcNodeRef;g&&g.parentNode&&this.domNode!==g&&g.parentNode.replaceChild(this.domNode,g)}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,d){(d.params&&a in d.params||d[a])&&d.set(a,d[a])},d;for(d in this.attributeMap)a(d,this);c.forEach(this._getSetterAttributes(),function(d){d in this.attributeMap||a(d,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var d=a._setterAttrs=[],g,e=a.prototype,i;for(i in e)c.isFunction(e[i])&&(g=i.match(/^_set([a-zA-Z]*)Attr$/))&&
g[1]&&d.push(g[1].charAt(0).toLowerCase()+g[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||c.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(c.map(a,function(a){return a+"Rtl"})));c.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 d=c.forEach,g=c.unsubscribe;d(this._connects,function(a){d(a,c.disconnect)});d(this._subscribes,function(a){g(a)});d(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?c.removeAttr(this.domNode,"widgetId"):
c.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||c.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){c.forEach(this.getChildren(),function(d){d.destroyRecursive&&d.destroyRecursive(a)})},uninitialize:function(){return!1},_setClassAttr:function(a){c.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var d=this[this.attributeMap.style||"domNode"];c.isObject(a)?c.style(d,a):d.style.cssText?
d.style.cssText+="; "+a:d.style.cssText=a;this._set("style",a)},_attrToDom:function(a,d){var g=this.attributeMap[a];c.forEach(c.isArray(g)?g:[g],function(e){var g=this[e.node||e||"domNode"];switch(e.type||"attribute"){case "attribute":c.isFunction(d)&&(d=c.hitch(this,d));e=e.attribute?e.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;c.attr(g,e,d);break;case "innerText":g.innerHTML="";g.appendChild(c.doc.createTextNode(d));break;case "innerHTML":g.innerHTML=d;break;case "class":c.replaceClass(g,
d,this[a])}},this)},get:function(a){var d=this._getAttrNames(a);return this[d.g]?this[d.g]():this[a]},set:function(a,d){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 e=this[c.s].apply(this,Array.prototype.slice.call(arguments,1));else a in this.attributeMap&&this._attrToDom(a,d),this._set(a,d);return e||this},_attrPairNames:{},_getAttrNames:function(a){var d=this._attrPairNames;if(d[a])return d[a];var c=a.charAt(0).toUpperCase()+a.substr(1);
return d[a]={n:a+"Node",s:"_set"+c+"Attr",g:"_get"+c+"Attr"}},_set:function(a,d){var c=this[a];this[a]=d;this._watchCallbacks&&this._created&&d!==c&&this._watchCallbacks(a,c,d)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?c.query("[widgetId]",this.containerNode).map(f.byNode):[]},getChildren:function(){return this.containerNode?f.findWidgets(this.containerNode):[]},connect:function(a,d,g){a=[c._connect(a,
d,this,g)];this._connects.push(a);return a},disconnect:function(a){for(var d=0;d<this._connects.length;d++)if(this._connects[d]==a){c.forEach(a,c.disconnect);this._connects.splice(d,1);break}},subscribe:function(a,d){var g=c.subscribe(a,this,d);this._subscribes.push(g);return g},unsubscribe:function(a){for(var d=0;d<this._subscribes.length;d++)if(this._subscribes[d]==a){c.unsubscribe(a);this._subscribes.splice(d,1);break}},isLeftToRight:function(){return this.dir?this.dir=="ltr":c._isBodyLtr()},placeAt:function(a,
d){a.declaredClass&&a.addChild?a.addChild(this,d):c.place(this.domNode,a,d);return this}})})();return f._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(c,f){c.mixin(f,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return f.getBookmark().isCollapsed},getBookmark:function(){var a,d,g=c.doc.selection,e=f._curFocus;if(c.global.getSelection){if(g=c.global.getSelection())if(g.isCollapsed){if(a=e?e.tagName:"")if(a=a.toLowerCase(),a=="textarea"||a=="input"&&(!e.type||e.type.toLowerCase()=="text"))return g={start:e.selectionStart,end:e.selectionEnd,node:e,pRange:!0},
{isCollapsed:g.end<=g.start,mark:g};a={isCollapsed:!0};if(g.rangeCount)a.mark=g.getRangeAt(0).cloneRange()}else d=g.getRangeAt(0),a={isCollapsed:!1,mark:d.cloneRange()}}else if(g){a=e?e.tagName:"";a=a.toLowerCase();if(e&&a&&(a=="button"||a=="textarea"||a=="input"))return g.type&&g.type.toLowerCase()=="none"?{isCollapsed:!0,mark:null}:(d=g.createRange(),{isCollapsed:d.text&&d.text.length?!1:!0,mark:{range:d,pRange:!0}});a={};try{d=g.createRange(),a.isCollapsed=!(g.type=="Text"?d.htmlText.length:d.length)}catch(i){return a.isCollapsed=
!0,a}if(g.type.toUpperCase()=="CONTROL")if(d.length){a.mark=[];g=0;for(e=d.length;g<e;)a.mark.push(d.item(g++))}else a.isCollapsed=!0,a.mark=null;else a.mark=d.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var d=c.doc;if(a=a.mark)if(c.global.getSelection)(d=c.global.getSelection())&&d.removeAllRanges?a.pRange?(d=a.node,d.selectionStart=a.start,d.selectionEnd=a.end):(d.removeAllRanges(),d.addRange(a)):console.warn("No idea how to restore selection for this browser!");
else if(d.selection&&a){var g;a.pRange?g=a.range:c.isArray(a)?(g=d.body.createControlRange(),c.forEach(a,function(a){g.addElement(a)})):(g=d.body.createTextRange(),g.moveToBookmark(a));g.select()}},getFocus:function(a,d){var g=!f._curFocus||a&&c.isDescendant(f._curFocus,a.domNode)?f._prevFocus:f._curFocus;return{node:g,bookmark:g==f._curFocus&&c.withGlobal(d||c.global,f.getBookmark),openedForWindow:d}},focus:function(a){if(a){var d="node"in a?a.node:a,g=a.bookmark,a=a.openedForWindow,e=g?g.isCollapsed:
!1;if(d){var i=d.tagName.toLowerCase()=="iframe"?d.contentWindow:d;if(i&&i.focus)try{i.focus()}catch(h){}f._onFocusNode(d)}if(g&&c.withGlobal(a||c.global,f.isCollapsed)&&!e){a&&a.focus();try{c.withGlobal(a||c.global,f.moveToBookmark,null,[g])}catch(k){}}}},_activeStack:[],registerIframe:function(a){return f.registerWin(a.contentWindow,a)},unregisterIframe:function(a){f.unregisterWin(a)},registerWin:function(a,d){var g=function(a){f._justMouseDowned=!0;setTimeout(function(){f._justMouseDowned=!1},
0);if(!c.isIE||!a||!(a.srcElement&&a.srcElement.parentNode==null))f._onTouchNode(d||a.target||a.srcElement,"mouse")},e=c.isIE?a.document.documentElement:a.document;if(e)if(c.isIE){a.document.body.attachEvent("onmousedown",g);var i=function(a){a.srcElement.tagName.toLowerCase()!="#document"&&f.isTabNavigable(a.srcElement)?f._onFocusNode(d||a.srcElement):f._onTouchNode(d||a.srcElement)};e.attachEvent("onactivate",i);var h=function(a){f._onBlurNode(d||a.srcElement)};e.attachEvent("ondeactivate",h);return function(){a.document.detachEvent("onmousedown",
g);e.detachEvent("onactivate",i);e.detachEvent("ondeactivate",h);e=null}}else{e.body.addEventListener("mousedown",g,!0);var k=function(a){f._onFocusNode(d||a.target)};e.addEventListener("focus",k,!0);var j=function(a){f._onBlurNode(d||a.target)};e.addEventListener("blur",j,!0);return function(){e.body.removeEventListener("mousedown",g,!0);e.removeEventListener("focus",k,!0);e.removeEventListener("blur",j,!0);e=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,d){f._clearActiveWidgetsTimer&&(clearTimeout(f._clearActiveWidgetsTimer),delete f._clearActiveWidgetsTimer);var g=[];try{for(;a;){var e=c.attr(a,"dijitPopupParent");if(e)a=f.byId(e).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===
c.body())break;a=c.window.get(a.ownerDocument).frameElement}else{var i=a.getAttribute&&a.getAttribute("widgetId"),h=i&&f.byId(i);h&&!(d=="mouse"&&h.get("disabled"))&&g.unshift(i);a=a.parentNode}}}catch(k){}f._setStack(g,d)},_onFocusNode:function(a){if(a&&a.nodeType!=9&&(f._onTouchNode(a),a!=f._curFocus)){if(f._curFocus)f._prevFocus=f._curFocus;f._curFocus=a;c.publish("focusNode",[a])}},_setStack:function(a,d){var g=f._activeStack;f._activeStack=a;for(var e=0;e<Math.min(g.length,a.length);e++)if(g[e]!=
a[e])break;for(var i,h=g.length-1;h>=e;h--)if(i=f.byId(g[h]))i._focused=!1,i.set("focused",!1),i._hasBeenBlurred=!0,i._onBlur&&i._onBlur(d),c.publish("widgetBlur",[i,d]);for(h=e;h<a.length;h++)if(i=f.byId(a[h]))i._focused=!0,i.set("focused",!0),i._onFocus&&i._onFocus(d),c.publish("widgetFocus",[i,d])}});c.addOnLoad(function(){var a=f.registerWin(window);c.isIE&&c.addOnWindowUnload(function(){f.unregisterWin(a);a=null})});return f});
define("dojo/AdapterRegistry",["dojo"],function(c){c.AdapterRegistry=function(c){this.pairs=[];this.returnWrappers=c||!1};c.extend(c.AdapterRegistry,{register:function(c,a,d,g,e){this.pairs[e?"unshift":"push"]([c,a,d,g])},match:function(){for(var c=0;c<this.pairs.length;c++){var a=this.pairs[c];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(c){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
c)return this.pairs.splice(a,1),!0;return!1}});return c.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(c,f){f.getViewport=function(){return c.window.getBox()};f.placeOnScreen=function(a,d,g,e){g=c.map(g,function(a){var c={corner:a,pos:{x:d.x,y:d.y}};e&&(c.pos.x+=a.charAt(1)=="L"?e.x:-e.x,c.pos.y+=a.charAt(0)=="T"?e.y:-e.y);return c});return f._place(a,g)};f._place=function(a,d,g,e){var i=c.window.getBox();(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")&&c.body().appendChild(a);var h=null;c.some(d,
function(d){var f=d.corner,k=d.pos,o=0,n={w:f.charAt(1)=="L"?i.l+i.w-k.x:k.x-i.l,h:f.charAt(1)=="T"?i.t+i.h-k.y:k.y-i.t};g&&(o=g(a,d.aroundCorner,f,n,e),o=typeof o=="undefined"?0:o);var p=a.style,q=p.display,r=p.visibility;p.visibility="hidden";p.display="";var s=c.marginBox(a);p.display=q;p.visibility=r;p=Math.max(i.l,f.charAt(1)=="L"?k.x:k.x-s.w);q=Math.max(i.t,f.charAt(0)=="T"?k.y:k.y-s.h);r=Math.min(i.l+i.w,f.charAt(1)=="L"?p+s.w:k.x);k=Math.min(i.t+i.h,f.charAt(0)=="T"?q+s.h:k.y);r-=p;k-=q;o+=
s.w-r+(s.h-k);if(h==null||o<h.overflow)h={corner:f,aroundCorner:d.aroundCorner,x:p,y:q,w:r,h:k,overflow:o,spaceAvailable:n};return!o});h.overflow&&g&&g(a,h.aroundCorner,h.corner,h.spaceAvailable,e);var d=c._isBodyLtr(),f=a.style;f.top=h.y+"px";f[d?"left":"right"]=(d?h.x:i.w-h.x-h.w)+"px";return h};f.placeOnScreenAroundNode=function(a,d,g,e){d=c.byId(d);d=c.position(d,!0);return f._placeOnScreenAroundRect(a,d.x,d.y,d.w,d.h,g,e)};f.placeOnScreenAroundRectangle=function(a,d,c,e){return f._placeOnScreenAroundRect(a,
d.x,d.y,d.width,d.height,c,e)};f._placeOnScreenAroundRect=function(a,d,c,e,i,h,k){var j=[],l;for(l in h)j.push({aroundCorner:l,corner:h[l],pos:{x:d+(l.charAt(1)=="L"?0:e),y:c+(l.charAt(0)=="T"?0:i)}});return f._place(a,j,k,{w:e,h:i})};f.placementRegistry=new c.AdapterRegistry;f.placementRegistry.register("node",function(a,d){return typeof d=="object"&&typeof d.offsetWidth!="undefined"&&typeof d.offsetHeight!="undefined"},f.placeOnScreenAroundNode);f.placementRegistry.register("rect",function(a,d){return typeof d==
"object"&&"x"in d&&"y"in d&&"width"in d&&"height"in d},f.placeOnScreenAroundRectangle);f.placeOnScreenAroundElement=function(a,d,c,e){return f.placementRegistry.match.apply(f.placementRegistry,arguments)};f.getPopupAroundAlignment=function(a,d){var g={};c.forEach(a,function(a){switch(a){case "after":g[d?"BR":"BL"]=d?"BL":"BR";break;case "before":g[d?"BL":"BR"]=d?"BR":"BL";break;case "below-alt":d=!d;case "below":g[d?"BL":"BR"]=d?"TL":"TR";g[d?"BR":"BL"]=d?"TR":"TL";break;case "above-alt":d=!d;default:g[d?
"TL":"TR"]=d?"BL":"BR",g[d?"TR":"TL"]=d?"BR":"BL"}});return g};return f});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(c,f){f.scrollIntoView=function(a,d){c.window.scrollIntoView(a,d)};return f.scrollIntoView});
define("dojo/uacss",["dojo"],function(c){(function(){var f=c.doc.documentElement,a=c.isIE,d=c.isOpera,g=Math.floor,e=c.isFF,i=c.boxModel.replace(/-/,""),a={dj_ie:a,dj_ie6:g(a)==6,dj_ie7:g(a)==7,dj_ie8:g(a)==8,dj_ie9:g(a)==9,dj_quirks:c.isQuirks,dj_iequirks:a&&c.isQuirks,dj_opera:d,dj_khtml:c.isKhtml,dj_webkit:c.isWebKit,dj_safari:c.isSafari,dj_chrome:c.isChrome,dj_gecko:c.isMozilla,dj_ff3:g(e)==3};a["dj_"+i]=!0;var h="",k;for(k in a)a[k]&&(h+=k+" ");f.className=c.trim(f.className+" "+h);c._loaders.unshift(function(){if(!c._isBodyLtr()){var a=
"dj_rtl dijitRtl "+h.replace(/ /g,"-rtl ");f.className=c.trim(f.className+" "+a)}})})();return c});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(c,f){return f});
define("dijit/_base/typematic",["dojo","dijit"],function(c,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(c.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,d,g,e,i,h,f,j){if(i!=this._obj)this.stop(),
this._initialDelay=f||500,this._subsequentDelay=h||0.9,this._minDelay=j||10,this._obj=i,this._evt=a,this._node=g,this._count=this._currentTimeout=-1,this._callback=c.hitch(d,e),this._fireEventAndReload(),this._evt=c.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,d,g,e,i,h,k){if(d.keyCode)d.charOrCode=d.keyCode,c.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0");else if(d.charCode)d.charOrCode=String.fromCharCode(d.charCode),c.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");return[c.connect(a,"onkeypress",this,function(j){j.charOrCode==d.charOrCode&&(d.ctrlKey===void 0||d.ctrlKey==j.ctrlKey)&&(d.altKey===void 0||d.altKey==j.altKey)&&(d.metaKey===void 0||d.metaKey==(j.metaKey||!1))&&(d.shiftKey===void 0||d.shiftKey==j.shiftKey)?(c.stopEvent(j),f.typematic.trigger(j,g,a,
e,d,i,h,k)):f.typematic._obj==d&&f.typematic.stop()}),c.connect(a,"onkeyup",this,function(){f.typematic._obj==d&&f.typematic.stop()})]},addMouseListener:function(a,d,g,e,i,h){var k=c.connect;return[k(a,"mousedown",this,function(j){c.stopEvent(j);f.typematic.trigger(j,d,a,g,a,e,i,h)}),k(a,"mouseup",this,function(a){c.stopEvent(a);f.typematic.stop()}),k(a,"mouseout",this,function(a){c.stopEvent(a);f.typematic.stop()}),k(a,"mousemove",this,function(a){a.preventDefault()}),k(a,"dblclick",this,function(j){c.stopEvent(j);
c.isIE&&(f.typematic.trigger(j,d,a,g,a,e,i,h),setTimeout(c.hitch(this,f.typematic.stop),50))})]},addListener:function(a,d,c,e,i,h,f,j){return this.addKeyListener(d,c,e,i,h,f,j).concat(this.addMouseListener(a,e,i,h,f,j))}};return f.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(c,f){f.wai={onload:function(){var a=c.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(c.config.blankGif||c.moduleUrl("dojo","resources/blank.gif"))+'");'}},c.body()),d=c.getComputedStyle(a);if(d){var g=d.backgroundImage;c[d.borderTopColor==d.borderRightColor||g!=null&&(g=="none"||g=="url(invalid-url:)")?"addClass":"removeClass"](c.body(),
"dijit_a11y");c.isIE?a.outerHTML="":c.body().removeChild(a)}}};(c.isIE||c.isMoz)&&c._loaders.unshift(f.wai.onload);c.mixin(f,{hasWaiRole:function(a,d){var c=this.getWaiRole(a);return d?c.indexOf(d)>-1:c.length>0},getWaiRole:function(a){return c.trim((c.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,d){c.attr(a,"role",d)},removeWaiRole:function(a,d){var g=c.attr(a,"role");g&&(d?(g=c.trim((" "+g+" ").replace(" "+d+" "," ")),c.attr(a,"role",g)):a.removeAttribute("role"))},hasWaiState:function(a,
d){return a.hasAttribute?a.hasAttribute("aria-"+d):!!a.getAttribute("aria-"+d)},getWaiState:function(a,d){return a.getAttribute("aria-"+d)||""},setWaiState:function(a,d,c){a.setAttribute("aria-"+d,c)},removeWaiState:function(a,d){a.removeAttribute("aria-"+d)}});return f});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(c,f){f.getDocumentWindow=function(a){return c.window.get(a)};return f});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(c,f){f.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var d=a.declaredClass?a._popupWrapper:a.parentNode&&c.hasClass(a.parentNode,"dijitPopup"),g=a.domNode||a;if(!d&&(d=c.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},c.body()),d.appendChild(g),g=g.style,g.display="",g.visibility="",g.position="",g.top="0px",a.declaredClass))a._popupWrapper=
d,c.connect(a,"destroy",function(){c.destroy(d);delete a._popupWrapper});return d},moveOffScreen:function(a){a=this._createWrapper(a);c.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);c.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,d=a.length-1;d>0&&a[d].parent===a[d-1].widget;d--);return a[d]},open:function(a){for(var d=this._stack,g=a.popup,e=a.orient||((a.parent?a.parent.isLeftToRight():c._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),i=a.around,h=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;d.length&&(!a.parent||!c.isDescendant(a.parent.domNode,d[d.length-1].widget.domNode));)f.popup.close(d[d.length-1].widget);var k=this._createWrapper(g);c.attr(k,{id:h,style:{zIndex:this._beginZIndex+d.length},"class":"dijitPopup "+(g.baseClass||g["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if((c.isIE||c.isMoz)&&!g.bgIframe)g.bgIframe=
new f.BackgroundIframe(k);e=i?f.placeOnScreenAroundElement(k,i,e,g.orient?c.hitch(g,"orient"):null):f.placeOnScreen(k,a,e=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);k.style.display="";k.style.visibility="visible";g.domNode.style.visibility="visible";i=[];i.push(c.connect(k,"onkeypress",this,function(d){if(d.charOrCode==c.keys.ESCAPE&&a.onCancel)c.stopEvent(d),a.onCancel();else if(d.charOrCode===c.keys.TAB&&(c.stopEvent(d),(d=this.getTopPopup())&&d.onCancel))d.onCancel()}));g.onCancel&&
i.push(c.connect(g,"onCancel",a.onCancel));i.push(c.connect(g,g.onExecute?"onExecute":"onChange",this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()}));d.push({widget:g,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:i});if(g.onOpen)g.onOpen(e);return e},close:function(a){for(var d=this._stack;a&&c.some(d,function(d){return d.widget==a})||!a&&d.length;){var g=d.pop(),e=g.widget,i=g.onClose;if(e.onClose)e.onClose();c.forEach(g.handlers,c.disconnect);
e&&e.domNode&&this.hide(e);i&&i()}}};f._frames=new function(){var a=[];this.pop=function(){var d;a.length?(d=a.pop(),d.style.display=""):(c.isIE<9?(d="<iframe src='"+(c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>",d=c.doc.createElement(d)):(d=c.create("iframe"),d.src='javascript:""',d.className="dijitBackgroundIframe",c.style(d,"opacity",0.1)),d.tabIndex=-1,f.setWaiRole(d,
"presentation"));return d};this.push=function(d){d.style.display="none";a.push(d)}};f.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(c.isIE||c.isMoz){var d=this.iframe=f._frames.pop();a.appendChild(d);c.isIE<7||c.isQuirks?(this.resize(a),this._conn=c.connect(a,"onresize",this,function(){this.resize(a)})):c.style(d,{width:"100%",height:"100%"})}};c.extend(f.BackgroundIframe,{resize:function(a){this.iframe&&c.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){if(this._conn)c.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(c,f){return f._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(c,f){c.connect(c,"_connect",function(a,d){a&&c.isFunction(a._onConnect)&&a._onConnect(d)});f._connectOnUseEventHandler=function(){};f._lastKeyDownNode=null;c.isIE?function(){var a=function(a){f._lastKeyDownNode=a.srcElement};c.doc.attachEvent("onkeydown",a);c.addOnWindowUnload(function(){c.doc.detachEvent("onkeydown",a)})}():c.doc.addEventListener("keydown",function(a){f._lastKeyDownNode=a.target},!0);(function(){c.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,d){this._deferredConnects=c.clone(this._deferredConnects);for(var g in this.attributeMap)delete this._deferredConnects[g];for(g in this._deferredConnects)this[g]!==f._connectOnUseEventHandler&&delete this._deferredConnects[g];this.inherited(arguments);if(this.domNode)for(g in this.params)this._onConnect(g)},_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&&c.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,d){c.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,d)},attr:function(a,
d){if(c.config.isDebug){var g=arguments.callee._ach||(arguments.callee._ach={}),e=(arguments.callee.caller||"unknown caller").toString();g[e]||(c.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+e,"","2.0"),g[e]=!0)}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,d,g){var e=c._connect,i=this.inherited(arguments,[a,d=="ondijitclick"?"onclick":d,g]);if(d==
"ondijitclick"&&c.indexOf(this.nodesWithKeyClick,a.nodeName.toLowerCase())==-1){var h=c.hitch(this,g);i.push(e(a,"onkeydown",this,function(d){if((d.keyCode==c.keys.ENTER||d.keyCode==c.keys.SPACE)&&!d.ctrlKey&&!d.shiftKey&&!d.altKey&&!d.metaKey)f._lastKeyDownNode=d.target,"openDropDown"in this&&a==this._buttonNode||d.preventDefault()}),e(a,"onkeyup",this,function(a){if((a.keyCode==c.keys.ENTER||a.keyCode==c.keys.SPACE)&&a.target==f._lastKeyDownNode&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey)return f._lastKeyDownNode=
null,h(a)}))}return i},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}})})();return f._Widget});
define("dojo/string",["dojo"],function(c){c.getObject("string",!0,c);c.string.rep=function(c,a){if(a<=0||!c)return"";for(var d=[];;){a&1&&d.push(c);if(!(a>>=1))break;c+=c}return d.join("")};c.string.pad=function(f,a,d,g){d||(d="0");f=String(f);a=c.string.rep(d,Math.ceil((a-f.length)/d.length));return g?f+a:a+f};c.string.substitute=function(f,a,d,g){g=g||c.global;d=d?c.hitch(g,d):function(a){return a};return f.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(e,i,h){e=c.getObject(i,!1,a);h&&
(e=c.getObject(h,!1,g).call(g,e,i));return d(e,i).toString()})};c.string.trim=String.prototype.trim?c.trim:function(c){for(var c=c.replace(/^\s+/,""),a=c.length-1;a>=0;a--)if(/\S/.test(c.charAt(a))){c=c.substring(0,a+1);break}return c};return c.string});
define("dojo/cache",["dojo"],function(c){var f={};c.cache=function(a,d,g){if(typeof a=="string")var e=c.moduleUrl(a,d);else e=a,g=d;var e=e.toString(),i=g;g!=void 0&&!c.isString(g)&&(i="value"in g?g.value:void 0);g=g&&g.sanitize?!0:!1;if(typeof i=="string")i=f[e]=g?c.cache._sanitize(i):i;else if(i===null)delete f[e];else{if(!(e in f)){i=void 0;if(c.isFunction(require)&&c.isString(a))try{var h=(a?a.replace(/\./g,"/")+"/":"")+d,i=require("text!"+h)}catch(k){}typeof i==="undefined"&&(i=c._getText(e));
f[e]=g?c.cache._sanitize(i):i}i=f[e]}return i};c.cache._sanitize=function(a){if(a){var a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""),d=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);d&&(a=d[1])}else a="";return a};return c.cache});
define("dijit/_CssStateMixin",["dojo","dijit"],function(c,f){c.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);c.forEach(["onmouseenter","onmouseleave","onmousedown"],function(a){this.connect(this.domNode,a,"_cssMouseEvent")},this);c.forEach("disabled,readOnly,checked,selected,focused,state,hovering,active".split(","),function(a){this.watch(a,c.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 d=this.connect(c.body(),"onmouseup",function(){this._mouseDown=!1;this._set("active",!1);this.disconnect(d)})}},_setStateClass:function(){function a(a){d=
d.concat(c.map(d,function(d){return d+a}),"dijit"+a)}var d=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 g=this.stateNode||this.domNode,e={};c.forEach(g.className.split(" "),function(a){e[a]=!0});"_stateClasses"in this&&c.forEach(this._stateClasses,function(a){delete e[a]});
c.forEach(d,function(a){e[a]=!0});var i=[],h;for(h in e)i.push(h);g.className=i.join(" ");this._stateClasses=d},_trackMouseState:function(a,d){function g(){var g="disabled"in f&&f.disabled||"readonly"in f&&f.readonly;c.toggleClass(a,d+"Hover",e&&!i&&!g);c.toggleClass(a,d+"Active",i&&!g);c.toggleClass(a,d+"Focused",h&&!g)}var e=!1,i=!1,h=!1,f=this,j=c.hitch(this,"connect",a);j("onmouseenter",function(){e=!0;g()});j("onmouseleave",function(){i=e=!1;g()});j("onmousedown",function(){i=!0;g()});j("onmouseup",
function(){i=!1;g()});j("onfocus",function(){h=!0;g()});j("onblur",function(){h=!1;g()});this.watch("disabled",g);this.watch("readOnly",g)}});return f._CssStateMixin});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/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/operations/nls/messages",["orion/i18n!orion/operations/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[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("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/form/_FormMixin",["dojo","dijit","dojo/window"],function(c,f){c.declare("dijit.form._FormMixin",null,{state:"",reset:function(){c.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=!1;return c.every(c.map(this.getDescendants(),function(d){d._hasBeenBlurred=!0;var g=d.disabled||!d.validate||d.validate();!g&&!a&&(c.window.scrollIntoView(d.containerNode||d.domNode),d.focus(),a=!0);return g}),function(a){return a})},setValues:function(a){c.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var d={};c.forEach(this.getDescendants(),function(a){a.name&&(d[a.name]||(d[a.name]=[])).push(a)});for(var g in d)if(d.hasOwnProperty(g)){var e=d[g],i=c.getObject(g,!1,a);i!==void 0&&(c.isArray(i)||(i=[i]),typeof e[0].checked=="boolean"?c.forEach(e,function(a){a.set("value",c.indexOf(i,a.value)!=-1)}):e[0].multiple?e[0].set("value",i):c.forEach(e,function(a,d){a.set("value",
i[d])}))}},getValues:function(){c.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};c.forEach(this.getDescendants(),function(d){var g=d.name;if(g&&!d.disabled){var e=d.get("value");typeof d.checked=="boolean"?/Radio/.test(d.declaredClass)?e!==!1?c.setObject(g,e,a):(e=c.getObject(g,!1,a),e===void 0&&c.setObject(g,null,a)):(d=c.getObject(g,!1,a),d||(d=[],c.setObject(g,d,a)),e!==!1&&d.push(e)):
(d=c.getObject(g,!1,a),typeof d!="undefined"?c.isArray(d)?d.push(e):c.setObject(g,[d,e],a):c.setObject(g,e,a))}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=c.map(this._descendants,function(a){return a.get("state")||""});return c.indexOf(a,"Error")>=0?"Error":c.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){c.forEach(this._childConnections||[],c.hitch(this,"disconnect"));c.forEach(this._childWatches||[],
function(a){a.unwatch()})},connectChildren:function(a){var d=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(a,c){d[a]=c}:c.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var g=this._childConnections=[],e=this._childWatches=[];c.forEach(c.filter(this._descendants,function(a){return a.validate}),function(a){c.forEach(["state","disabled"],function(c){e.push(a.watch(c,function(){d.set("state",d._getState())}))})});var i=function(){d._onChangeDelayTimer&&
clearTimeout(d._onChangeDelayTimer);d._onChangeDelayTimer=setTimeout(function(){delete d._onChangeDelayTimer;d._set("value",d.get("value"))},10)};c.forEach(c.filter(this._descendants,function(a){return a.onChange}),function(a){g.push(d.connect(a,"onChange",i));e.push(a.watch("disabled",i))})},startup:function(){this.inherited(arguments);this.connectChildren(!0);this.watch("state",function(a,d,c){this.onValidStateChange(c=="")})},destroy:function(){this.disconnectChildren();this.inherited(arguments)}});
return f.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(c,f){c.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});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("orion/PageUtil",[],function(){return{matchResourceParameters:function(c){var c=c||window.location.toString(),f={resource:""},a=c.indexOf("#");if(a!==-1&&(c=c.substring(a+1),c.length!==0)){c=c.split(",");f.resource=decodeURIComponent(c[0]);for(a=1;a<c.length;a++){var d=c[a].split("="),g=decodeURIComponent(d[0]),d=d.length===2?decodeURIComponent(d[1]):null;d!==null&&g!=="resource"&&(f[g]=d)}}return f}}});
define("orion/navigationUtils",["dojo"],function(c){function f(d,g,e,i){!a&&d&&(e?(d.push({domNode:g,widget:e,onClick:i}),c.attr(e,"tabIndex",-1)):(d.push({domNode:g}),c.attr(g,"tabIndex",-1),c.style(g,"outline","none")))}var a=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(a,c,e,i,h){a&&(a=a.getGridNavHolder(c,!0))&&f(a,e,i,h)},generateNavGrid:f,removeNavGrid:function(a,c){if(a)for(var e=0;e<a.length;e++)if(a[e].domNode===c){a.splice(e,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/_Container",["dojo","dijit"],function(c,f){c.declare("dijit._Container",null,{isContainer:!0,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,d){var g=this.containerNode;if(d&&typeof d=="number"){var e=this.getChildren();if(e&&e.length>=d)g=e[d-1].domNode,d="after"}c.place(a.domNode,g,d);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){c.forEach(this.getChildren(),function(d){d.destroyRecursive(a)})},_getSiblingOfChild:function(a,d){var c=a.domNode,e=d>0?"nextSibling":"previousSibling";do c=c[e];while(c&&(c.nodeType!=1||!f.byNode(c)));return c&&f.byNode(c)},getIndexOfChild:function(a){return c.indexOf(this.getChildren(),a)},startup:function(){this._started||(c.forEach(this.getChildren(),
function(a){a.startup()}),this.inherited(arguments))}});return f._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(c,f){c.declare("dijit._KeyNavContainer",f._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,d){var g=this._keyNavCodes={},e=c.hitch(this,this.focusPrev),i=c.hitch(this,this.focusNext);c.forEach(a,function(a){g[a]=e});c.forEach(d,function(a){g[a]=i});g[c.keys.HOME]=c.hitch(this,"focusFirstChild");g[c.keys.END]=c.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){c.forEach(this.getChildren(),c.hitch(this,"_startupChild"))},addChild:function(a,d){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,d){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(d?"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(),c.attr(this.domNode,"tabIndex","-1"))},_onBlur:function(a){this.tabIndex&&c.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!a.ctrlKey&&!a.altKey){var d=this._keyNavCodes[a.charOrCode];d&&(d(),c.stopEvent(a))}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
d){a&&(a=this._getSiblingOfChild(a,d));for(var c=this.getChildren(),e=0;e<c.length;e++){a||(a=c[d>0?0:c.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,d)}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(c,f){c.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)c.stopEvent(a),this._docHandler=this.connect(c.doc,"onmouseup","_onDropDownMouseUp"),this.toggleDropDown()},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var d=this.dropDown,g=!1;if(a&&this._opened){var e=c.position(this._buttonNode,!0);if(!(a.pageX>=e.x&&a.pageX<=e.x+e.w)||!(a.pageY>=e.y&&a.pageY<=e.y+e.h)){for(e=a.target;e&&!g;)c.hasClass(e,"dijitPopup")?g=!0:e=e.parentNode;if(g){e=a.target;if(d.onItemClick){for(var i;e&&!(i=f.byNode(e));)e=e.parentNode;if(i&&i.onClick&&i.getParent)i.getParent().onItemClick(i,a)}return}}}this._opened&&d.focus&&d.autoFocus!==!1&&window.setTimeout(c.hitch(d,"focus"),
1)},_onDropDownClick:function(a){this._stopClickEvents&&c.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";c.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 d=this.dropDown,g=a.target;if(d&&this._opened&&d.handleKey&&d.handleKey(a)===!1)c.stopEvent(a);else if(d&&this._opened&&a.charOrCode==c.keys.ESCAPE)this.closeDropDown(),c.stopEvent(a);else if(!this._opened&&(a.charOrCode==c.keys.DOWN_ARROW||(a.charOrCode==c.keys.ENTER||a.charOrCode==" ")&&((g.tagName||"").toLowerCase()!=="input"||g.type&&g.type.toLowerCase()!=="text")))this._toggleOnKeyUp=!0,c.stopEvent(a)}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(c.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(f._curFocus&&this.dropDown&&c.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(c.hitch(this,"openDropDown")))},openDropDown:function(){var a=
this.dropDown,d=a.domNode,g=this._aroundNode||this.domNode,e=this;if(!this._preparedNode){this._preparedNode=!0;if(d.style.width)this._explicitDDWidth=!0;if(d.style.height)this._explicitDDHeight=!0}if(this.maxHeight||this.forceWidth||this.autoWidth){var i={display:"",visibility:"hidden"};if(!this._explicitDDWidth)i.width="";if(!this._explicitDDHeight)i.height="";c.style(d,i);i=this.maxHeight;if(i==-1)var i=c.window.getBox(),h=c.position(g,!1),i=Math.floor(Math.max(h.y,i.h-(h.y+h.h)));a.startup&&!a._started&&
a.startup();f.popup.moveOffScreen(a);var h=c._getMarginSize(d),k=i&&h.h>i;c.style(d,{overflowX:"hidden",overflowY:k?"auto":"hidden"});k?(h.h=i,"w"in h&&(h.w+=16)):delete h.h;this.forceWidth?h.w=g.offsetWidth:this.autoWidth?h.w=Math.max(h.w,g.offsetWidth):delete h.w;c.isFunction(a.resize)?a.resize(h):c.marginBox(d,h)}a=f.popup.open({parent:this,popup:a,around:g,orient:f.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:["below"],this.isLeftToRight()),
onExecute:function(){e.closeDropDown(!0)},onCancel:function(){e.closeDropDown(!0)},onClose:function(){c.attr(e._popupStateNode,"popupActive",!1);c.removeClass(e._popupStateNode,"dijitHasDropDownOpen");e._opened=!1}});c.attr(this._popupStateNode,"popupActive","true");c.addClass(e._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("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/_Contained",["dojo","dijit"],function(c,f){c.declare("dijit._Contained",null,{getParent:function(){var a=f.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var d=this.domNode;do d=d[a+"Sibling"];while(d&&d.nodeType!=1);return d&&f.byNode(d)},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("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("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[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 ":"Search ","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 ":"No matches found for ","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("dojo/date",["dojo"],function(c){c.getObject("date",!0,c);c.date.getDaysInMonth=function(f){var a=f.getMonth(),d=[31,28,31,30,31,30,31,31,30,31,30,31];return a==1&&c.date.isLeapYear(f)?29:d[a]};c.date.isLeapYear=function(c){c=c.getFullYear();return!(c%400)||!(c%4)&&!!(c%100)};c.date.getTimezoneName=function(c){var a=c.toString(),d="",g=a.indexOf("(");if(g>-1)d=a.substring(++g,a.indexOf(")"));else if(g=/([A-Z\/]+) \d{4}$/,a=a.match(g))d=a[1];else if(a=c.toLocaleString(),g=/ ([A-Z\/]+)$/,a=a.match(g))d=
a[1];return d=="AM"||d=="PM"?"":d};c.date.compare=function(c,a,d){c=new Date(+c);a=new Date(+(a||new Date));d=="date"?(c.setHours(0,0,0,0),a.setHours(0,0,0,0)):d=="time"&&(c.setFullYear(0,0,0),a.setFullYear(0,0,0));return c>a?1:c<a?-1:0};c.date.add=function(c,a,d){var g=new Date(+c),e=!1,i="Date";switch(a){case "day":break;case "weekday":var h;(a=d%5)?h=parseInt(d/5):(a=d>0?5:-5,h=d>0?(d-5)/5:(d+5)/5);var k=c.getDay(),j=0;k==6&&d>0?j=1:k==0&&d<0&&(j=-1);k+=a;if(k==0||k==6)j=d>0?2:-2;d=7*h+a+j;break;
case "year":i="FullYear";e=!0;break;case "week":d*=7;break;case "quarter":d*=3;case "month":e=!0;i="Month";break;default:i="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}if(i)g["set"+i](g["get"+i]()+d);e&&g.getDate()<c.getDate()&&g.setDate(0);return g};c.date.difference=function(f,a,d){var a=a||new Date,d=d||"day",g=a.getFullYear()-f.getFullYear(),e=1;switch(d){case "quarter":f=f.getMonth();a=a.getMonth();f=Math.floor(f/3)+1;a=Math.floor(a/3)+1;a+=g*4;e=a-f;break;case "weekday":g=Math.round(c.date.difference(f,
a,"day"));d=parseInt(c.date.difference(f,a,"week"));if(g%7==0)g=d*5;else{var e=0,i=f.getDay(),h=a.getDay(),d=parseInt(g/7),a=g%7,f=new Date(f);f.setDate(f.getDate()+d*7);f=f.getDay();if(g>0)switch(!0){case i==6:e=-1;break;case i==0:e=0;break;case h==6:e=-1;break;case h==0:e=-2;break;case f+a>5:e=-2}else if(g<0)switch(!0){case i==6:e=0;break;case i==0:e=1;break;case h==6:e=2;break;case h==0:e=1;break;case f+a<0:e=2}g+=e;g-=d*2}e=g;break;case "year":e=g;break;case "month":e=a.getMonth()-f.getMonth()+
g*12;break;case "week":e=parseInt(c.date.difference(f,a,"day")/7);break;case "day":e/=24;case "hour":e/=60;case "minute":e/=60;case "second":e/=1E3;case "millisecond":e*=a.getTime()-f.getTime()}return Math.round(e)};return c.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(c){c.getObject("cldr.supplemental",!0,c);c.cldr.supplemental.getFirstDayOfWeek=function(f){f={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,sy:6,tn:6,ye:6,ar:0,as:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,il:0,"in":0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mn:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,zw:0}[c.cldr.supplemental._region(f)];return f===void 0?
1:f};c.cldr.supplemental._region=function(f){var f=c.i18n.normalizeLocale(f),f=f.split("-"),a=f[1];a?a.length==4&&(a=f[2]):a={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[f[0]];return a};c.cldr.supplemental.getWeekend=function(f){var a=c.cldr.supplemental._region(f),f={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[a],a={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,
jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[a];f===void 0&&(f=6);a===void 0&&(a=0);return{start:f,end:a}};return c.cldr.supplemental});
define("dojo/regexp",["dojo"],function(c){c.getObject("regexp",!0,c);c.regexp.escapeString=function(c,a){return c.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){return a&&a.indexOf(d)!=-1?d:"\\"+d})};c.regexp.buildGroupRE=function(f,a,d){if(!(f instanceof Array))return a(f);for(var g=[],e=0;e<f.length;e++)g.push(a(f[e]));return c.regexp.group(g.join("|"),d)};c.regexp.group=function(c,a){return"("+(a?"?:":"")+c+")"};return c.regexp});
define("dojo/cldr/nls/gregorian",{root:{"months-format-narrow":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d",eraNarrow:["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE",
"dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}",
"field-hour":"Hour","months-format-abbr":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","dateFormatItem-H":"HH","months-standAlone-abbr":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L","days-standAlone-wide":"1,2,3,4,5,6,7".split(","),"timeFormat-medium":"HH:mm:ss",
"dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":"1,2,3,4,5,6,7".split(","),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"Yesterday","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}",
"field-day":"Day","days-format-wide":"1,2,3,4,5,6,7".split(","),"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"1,2,3,4,5,6,7".split(","),eraNames:["BCE","CE"],"days-format-narrow":"1,2,3,4,5,6,7".split(","),"days-standAlone-narrow":"1,2,3,4,5,6,7".split(","),
"dateFormatItem-MMM":"LLL","field-month":"Month","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"y MMM d","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}",
"dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a"},ar:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,"en-au":!0,"en-ca":!0,"en-gb":!0,es:!0,fi:!0,fr:!0,"fr-ch":!0,he:!0,hu:!0,it:!0,ja:!0,ko:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-pt":!0,ro:!0,ru:!0,sk:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-hant":!0,"zh-hk":!0,"zh-tw":!0});
define("dojo/cldr/nls/en/gregorian",{"dateFormatItem-yM":"M/y","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q y","dayPeriods-format-wide-pm":"PM","field-minute":"Minute",eraNames:["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-day-relative+-1":"Yesterday","field-weekday":"Day of the Week","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
"dateFormatItem-MMM":"LLL","months-standAlone-narrow":"J,F,M,A,M,J,J,A,S,O,N,D".split(","),"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dayPeriods-format-wide-am":"AM","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),"dateFormatItem-yMMM":"MMM y","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","days-standAlone-narrow":"S,M,T,W,T,F,S".split(","),
eraAbbr:["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"HH:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":"January,February,March,April,May,June,July,August,September,October,November,December".split(","),
"dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),"dayPeriods-format-wide-noon":"noon","timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),"dateFormatItem-M":"L","days-format-narrow":"S,M,T,W,T,F,S".split(","),"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":"J,F,M,A,M,J,J,A,S,O,N,D".split(","),
"dateFormatItem-hm":"h:mm a","days-standAlone-abbr":"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/y","months-format-wide":"January,February,March,April,May,June,July,August,September,October,November,December".split(","),"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
eraNarrow:["B","A"]});
define("dojo/date/locale","dojo,dojo/date,dojo/cldr/supplemental,dojo/regexp,dojo/string,dojo/i18n,i18n!dojo/cldr/nls/gregorian".split(","),function(c){c.getObject("date.locale",!0,c);(function(){function f(a,d,i,h){return h.replace(/([a-z])\1*/ig,function(f){var j,l,m=f.charAt(0),f=f.length,o=["abbr","wide","narrow"];switch(m){case "G":j=d[f<4?"eraAbbr":"eraNames"][a.getFullYear()<0?0:1];break;case "y":j=a.getFullYear();switch(f){case 1:break;case 2:if(!i.fullYear){j=String(j);j=j.substr(j.length-
2);break}default:l=!0}break;case "Q":case "q":j=Math.ceil((a.getMonth()+1)/3);l=!0;break;case "M":j=a.getMonth();f<3?(j+=1,l=!0):(m=["months-format",o[f-3]].join("-"),j=d[m][j]);break;case "w":j=c.date.locale._getWeekOfYear(a,0);l=!0;break;case "d":j=a.getDate();l=!0;break;case "D":j=c.date.locale._getDayOfYear(a);l=!0;break;case "E":j=a.getDay();f<3?(j+=1,l=!0):(m=["days-format",o[f-3]].join("-"),j=d[m][j]);break;case "a":j=a.getHours()<12?"am":"pm";j=i[j]||d["dayPeriods-format-wide-"+j];break;case "h":case "H":case "K":case "k":l=
a.getHours();switch(m){case "h":j=l%12||12;break;case "H":j=l;break;case "K":j=l%12;break;case "k":j=l||24}l=!0;break;case "m":j=a.getMinutes();l=!0;break;case "s":j=a.getSeconds();l=!0;break;case "S":j=Math.round(a.getMilliseconds()*Math.pow(10,f-3));l=!0;break;case "v":case "z":if(j=c.date.locale._getZone(a,!0,i))break;f=4;case "Z":j=c.date.locale._getZone(a,!1,i);j=[j<=0?"+":"-",c.string.pad(Math.floor(Math.abs(j)/60),2),c.string.pad(Math.abs(j)%60,2)];f==4&&(j.splice(0,0,"GMT"),j.splice(3,0,":"));
j=j.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+h);}l&&(j=c.string.pad(j,f));return j})}function a(a,d,i,h){var f=function(a){return a},d=d||f,i=i||f,h=h||f,j=a.match(/(''|[^'])+/g),l=a.charAt(0)=="'";c.forEach(j,function(a,c){a?(j[c]=(l?i:d)(a.replace(/''/g,"'")),l=!l):j[c]=""});return h(j.join(""))}function d(a,d,i,h){h=c.regexp.escapeString(h);i.strict||(h=h.replace(" a"," ?a"));return h.replace(/([a-z])\1*/ig,function(c){var h;h=c.charAt(0);var f=c.length,
m="",o="";i.strict?(f>1&&(m="0{"+(f-1)+"}"),f>2&&(o="0{"+(f-2)+"}")):(m="0?",o="0{0,2}");switch(h){case "y":h="\\d{2,4}";break;case "M":h=f>2?"\\S+?":"1[0-2]|"+m+"[1-9]";break;case "D":h="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+o+"[1-9][0-9]|"+m+"[1-9]";break;case "d":h="3[01]|[12]\\d|"+m+"[1-9]";break;case "w":h="[1-4][0-9]|5[0-3]|"+m+"[1-9]";break;case "E":h="\\S+";break;case "h":h="1[0-2]|"+m+"[1-9]";break;case "k":h="1[01]|"+m+"\\d";break;case "H":h="1\\d|2[0-3]|"+m+"\\d";break;case "K":h="1\\d|2[0-4]|"+
m+"[1-9]";break;case "m":case "s":h="[0-5]\\d";break;case "S":h="\\d{"+f+"}";break;case "a":f=i.am||d["dayPeriods-format-wide-am"];m=i.pm||d["dayPeriods-format-wide-pm"];h=f+"|"+m;i.strict||(f!=f.toLowerCase()&&(h+="|"+f.toLowerCase()),m!=m.toLowerCase()&&(h+="|"+m.toLowerCase()),h.indexOf(".")!=-1&&(h+="|"+h.replace(/\./g,"")));h=h.replace(/\./g,"\\.");break;default:h=".*"}a&&a.push(c);return"("+h+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}c.date.locale._getZone=function(a,d){return d?c.date.getTimezoneName(a):
a.getTimezoneOffset()};c.date.locale.format=function(d,e){var e=e||{},i=c.i18n.normalizeLocale(e.locale),h=e.formatLength||"short",i=c.date.locale._getGregorianBundle(i),k=[],j=c.hitch(this,f,d,i,e);if(e.selector=="year")return a(i["dateFormatItem-yyyy"]||"yyyy",j);var l;e.selector!="date"&&(l=e.timePattern||i["timeFormat-"+h])&&k.push(a(l,j));e.selector!="time"&&(l=e.datePattern||i["dateFormat-"+h])&&k.push(a(l,j));return k.length==1?k[0]:i["dateTimeFormat-"+h].replace(/\{(\d+)\}/g,function(a,d){return k[d]})};
c.date.locale.regexp=function(a){return c.date.locale._parseInfo(a).regexp};c.date.locale._parseInfo=function(g){var g=g||{},e=c.i18n.normalizeLocale(g.locale),e=c.date.locale._getGregorianBundle(e),i=g.formatLength||"short",h=g.datePattern||e["dateFormat-"+i],f=g.timePattern||e["timeFormat-"+i],i=g.selector=="date"?h:g.selector=="time"?f:e["dateTimeFormat-"+i].replace(/\{(\d+)\}/g,function(a,d){return[f,h][d]}),j=[];return{regexp:a(i,c.hitch(this,d,j,e,g)),tokens:j,bundle:e}};c.date.locale.parse=
function(a,d){var i=/[\u200E\u200F\u202A\u202E]/g,h=c.date.locale._parseInfo(d),f=h.tokens,j=h.bundle,i=RegExp("^"+h.regexp.replace(i,"")+"$",h.strict?"":"i").exec(a&&a.replace(i,""));if(!i)return null;var l=["abbr","wide","narrow"],m=[1970,0,1,0,0,0,0],o="",i=c.every(i,function(a,g){if(!g)return!0;var h=f[g-1],i=h.length;switch(h.charAt(0)){case "y":if(i!=2&&d.strict)m[0]=a;else if(a<100)a=Number(a),i=""+(new Date).getFullYear(),h=i.substring(0,2)*100,i=Math.min(Number(i.substring(2,4))+20,99),m[0]=
a<i?h+a:h-100+a;else{if(d.strict)return!1;m[0]=a}break;case "M":if(i>2){if(h=j["months-format-"+l[i-3]].concat(),d.strict||(a=a.replace(".","").toLowerCase(),h=c.map(h,function(a){return a.replace(".","").toLowerCase()})),a=c.indexOf(h,a),a==-1)return!1}else a--;m[1]=a;break;case "E":case "e":h=j["days-format-"+l[i-3]].concat();d.strict||(a=a.toLowerCase(),h=c.map(h,function(a){return a.toLowerCase()}));a=c.indexOf(h,a);if(a==-1)return!1;break;case "D":m[1]=0;case "d":m[2]=a;break;case "a":h=d.am||
j["dayPeriods-format-wide-am"];i=d.pm||j["dayPeriods-format-wide-pm"];if(!d.strict)var n=/\./g,a=a.replace(n,"").toLowerCase(),h=h.replace(n,"").toLowerCase(),i=i.replace(n,"").toLowerCase();if(d.strict&&a!=h&&a!=i)return!1;o=a==i?"p":a==h?"a":"";break;case "K":a==24&&(a=0);case "h":case "H":case "k":if(a>23)return!1;m[3]=a;break;case "m":m[4]=a;break;case "s":m[5]=a;break;case "S":m[6]=a}return!0}),h=+m[3];o==="p"&&h<12?m[3]=h+12:o==="a"&&h==12&&(m[3]=0);h=new Date(m[0],m[1],m[2],m[3],m[4],m[5],
m[6]);d.strict&&h.setFullYear(m[0]);var n=f.join(""),p=n.indexOf("d")!=-1,n=n.indexOf("M")!=-1;if(!i||n&&h.getMonth()>m[1]||p&&h.getDate()>m[2])return null;if(n&&h.getMonth()<m[1]||p&&h.getDate()<m[2])h=c.date.add(h,"hour",1);return h}})();(function(){var f=[];c.date.locale.addCustomFormats=function(a,d){f.push({pkg:a,name:d})};c.date.locale._getGregorianBundle=function(a){var d={};c.forEach(f,function(g){g=c.i18n.getLocalization(g.pkg,g.name,a);d=c.mixin(d,g)},this);return d}})();c.date.locale.addCustomFormats("dojo.cldr",
"gregorian");c.date.locale.getNames=function(f,a,d,g){var e,g=c.date.locale._getGregorianBundle(g),f=[f,d,a];d=="standAlone"&&(d=f.join("-"),e=g[d],e[0]==1&&(e=void 0));f[1]="format";return(e||g[f.join("-")]).concat()};c.date.locale.isWeekend=function(f,a){var d=c.cldr.supplemental.getWeekend(a),g=(f||new Date).getDay();d.end<d.start&&(d.end+=7,g<d.start&&(g+=7));return g>=d.start&&g<=d.end};c.date.locale._getDayOfYear=function(f){return c.date.difference(new Date(f.getFullYear(),0,1,f.getHours()),
f)+1};c.date.locale._getWeekOfYear=function(f,a){arguments.length==1&&(a=0);var d=(new Date(f.getFullYear(),0,1)).getDay(),g=Math.floor((c.date.locale._getDayOfYear(f)+(d-a+7)%7-1)/7);d==a&&g++;return g};return c.date.locale});define("text!orion/widgets/templates/LoginDialog.html",[],function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="width: 300px; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0.45em">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="dialog"\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 style="text-align: left; vertical-align: top;">\n\t\t\t\t\t\t<h2 dojoAttachPoint="emptyListInfo" class="LoginWindowLeft">No authentication required.</h2>\n\t\t\t\t\t\t<table dojoAttachPoint="authenticated" style="display: none; width: 100%;">\n\t\t\t\t\t\t\t<tbody dojoAttachPoint="authenticatedList">\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table dojoAttachPoint="otherUnauthenticated" style="display: none; width: 100%;">\n\t\t\t\t\t\t\t<tbody dojoAttachPoint="otherUnauthenticatedList">\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="text-align: right; vertical-align: top; padding-right: 2px; margin: 0">\n\t\t\t\t\t\t<span dojoAttachPoint="closeLink" role="button" title="Close"></span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[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 or Zip here":"Drag a File or Zip here","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","Sorry, the Console is not supported on your browser.":"Sorry, the Console is not supported on your browser."});
define("orion/editor/regex",[],function(){return{escape:function(c){return c.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(c){return(c=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(c))?{pattern:c[1],flags:c[2]}:null}}});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[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","could not find toolbar ":"could not find toolbar ","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",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","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 ":"Importing from ","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location","Exporting from ":"Exporting from ","Copy to":"Copy to","Move to":"Move to","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"});
define("orion/commonHTMLFragments",["i18n!orion/nls/messages","require"],function(c,f){function a(a){return'<div id="'+a+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+a+'pageParameterArea" class="slide"><span id="'+a+'pageCommandParameters" class="layoutLeft parameters"></span><span id="'+a+'pageCommandDismiss" class="layoutRight parametersDismiss"></span></span></div>'}var d='<header role="banner"><div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+
f.toUrl("navigate/table.html")+'" aria-label="'+c["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" placeholder="Search" title="'+c["Type a keyword or wild card to search in root"]+'" class="layoutLeft spacingLeft searchbox" role="search"><div id="userMenu" class="spacingLeft layoutLeft"></div></div></div><div id="titleArea" class="layoutBlock titleArea"><div class="layoutLeft pageTitle"></div><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="'+
c["Add this page to the favorites list"]+'" class="spacingLeft layoutLeft imageSprite core-sprite-favorite_sml"></span></div></div></header>',g='<footer id="footerContent" class="layoutBlock" role="contentinfo"><div class="footerBlock">'+c["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">'+c.FAQ+'</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=0.5" target="_blank">'+
c["Report a Bug"]+'</a> | <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">'+c["Privacy Policy"]+'</a> | <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">'+c["Terms of Use"]+'</a> | <a href="http://www.eclipse.org/legal/copyright.php" target="_blank">'+c["Copyright Agent"]+"</a></div></footer>",e='<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="'+c["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>'+
a("mainToolbar");return{topHTMLFragment:d,bottomHTMLFragment:g,toolbarHTMLFragment:e,slideoutHTMLFragment:a}});
define("orion/i18nUtil",["require","orion/Deferred"],function(c,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 d={};return{getMessageBundle:function(g){function e(){c(["i18n!"+g],function(a){if(a){var d=g;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+d,JSON.stringify(a));delete a._expires}i.resolve(a)})}if(d[g])return d[g];var i=new f;d[g]=
i;var h=a(g);if(h)return i.resolve(h),i;try{c([g],e)}catch(k){c(["orion/i18n!"+g],e)}return i},formatMessage:function(a){var d=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return d[(c<<0)+1]})}}});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(c){c.getObject("dnd",!0,c);c.dnd.getCopyKeyState=c.isCopyKey;c.dnd._uniqueId=0;c.dnd.getUniqueId=function(){var f;do f=c._scopeName+"Unique"+ ++c.dnd._uniqueId;while(c.byId(f));return f};c.dnd._empty={};c.dnd.isFormElement=function(c){c=c.target;if(c.nodeType==3)c=c.parentNode;return" button textarea input select option ".indexOf(" "+c.tagName.toLowerCase()+" ")>=0};return c.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(c){c.getObject("dnd",!0,c);c.dnd.getViewport=c.window.getBox;c.dnd.V_TRIGGER_AUTOSCROLL=32;c.dnd.H_TRIGGER_AUTOSCROLL=32;c.dnd.V_AUTOSCROLL_VALUE=16;c.dnd.H_AUTOSCROLL_VALUE=16;c.dnd.autoScroll=function(f){var a=c.window.getBox(),d=0,g=0;if(f.clientX<c.dnd.H_TRIGGER_AUTOSCROLL)d=-c.dnd.H_AUTOSCROLL_VALUE;else if(f.clientX>a.w-c.dnd.H_TRIGGER_AUTOSCROLL)d=c.dnd.H_AUTOSCROLL_VALUE;if(f.clientY<c.dnd.V_TRIGGER_AUTOSCROLL)g=-c.dnd.V_AUTOSCROLL_VALUE;
else if(f.clientY>a.h-c.dnd.V_TRIGGER_AUTOSCROLL)g=c.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(d,g)};c.dnd._validNodes={div:1,p:1,td:1};c.dnd._validOverflow={auto:1,scroll:1};c.dnd.autoScrollNodes=function(f){for(var a=f.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in c.dnd._validNodes){var d=c.getComputedStyle(a);if(d.overflow.toLowerCase()in c.dnd._validOverflow){var g=c._getContentBox(a,d),d=c.position(a,!0),e=Math.min(c.dnd.H_TRIGGER_AUTOSCROLL,g.w/2),i=Math.min(c.dnd.V_TRIGGER_AUTOSCROLL,
g.h/2),h=f.pageX-d.x,k=f.pageY-d.y,j=d=0;if(c.isWebKit||c.isOpera)h+=c.body().scrollLeft,k+=c.body().scrollTop;h>0&&h<g.w&&(h<e?d=-e:h>g.w-e&&(d=e));k>0&&k<g.h&&(k<i?j=-i:k>g.h-i&&(j=i));g=a.scrollLeft;e=a.scrollTop;a.scrollLeft+=d;a.scrollTop+=j;if(g!=a.scrollLeft||e!=a.scrollTop)return}}try{a=a.parentNode}catch(l){a=null}}c.dnd.autoScroll(f)};return c.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(c){c.declare("dojo.dnd.Mover",null,{constructor:function(f,a,d){this.node=c.byId(f);var g=a.touches?a.touches[0]:a;this.marginBox={l:g.pageX,t:g.pageY};this.mouseButton=a.button;a=this.host=d;f=f.ownerDocument;this.events=[c.connect(f,"onmousemove",this,"onFirstMove"),c.connect(f,"ontouchmove",this,"onFirstMove"),c.connect(f,"onmousemove",this,"onMouseMove"),c.connect(f,"ontouchmove",this,"onMouseMove"),c.connect(f,
"onmouseup",this,"onMouseUp"),c.connect(f,"ontouchend",this,"onMouseUp"),c.connect(f,"ondragstart",c.stopEvent),c.connect(f.body,"onselectstart",c.stopEvent)];if(a&&a.onMoveStart)a.onMoveStart(this)},onMouseMove:function(f){c.dnd.autoScroll(f);var a=this.marginBox,d=f.touches?f.touches[0]:f;this.host.onMove(this,{l:a.l+d.pageX,t:a.t+d.pageY},f);c.stopEvent(f)},onMouseUp:function(f){(c.isWebKit&&c.isMac&&this.mouseButton==2?f.button==0:this.mouseButton==f.button)&&this.destroy();c.stopEvent(f)},onFirstMove:function(f){var a=
this.node.style,d,g=this.host;switch(a.position){case "relative":case "absolute":d=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=c.marginBox(this.node);d=c.doc.body;var e=c.getComputedStyle(d),i=c._getMarginBox(d,e),e=c._getContentBox(d,e);d=a.l-(e.l-i.l);a=a.t-(e.t-i.t)}this.marginBox.l=d-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;if(g&&g.onFirstMove)g.onFirstMove(this,f);c.disconnect(this.events.shift());c.disconnect(this.events.shift())},
destroy:function(){c.forEach(this.events,c.disconnect);var f=this.host;if(f&&f.onMoveStop)f.onMoveStop(this);this.events=this.node=this.host=null}});return c.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(c){c.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:!1,constructor:function(f,a){this.node=c.byId(f);a||(a={});this.handle=a.handle?c.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:c.dnd.Mover;this.events=[c.connect(this.handle,"onmousedown",this,"onMouseDown"),c.connect(this.handle,"ontouchstart",this,"onMouseDown"),c.connect(this.handle,"ondragstart",
this,"onSelectStart"),c.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(f,a){return new c.dnd.Moveable(a,f)},destroy:function(){c.forEach(this.events,c.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(f){if(!this.skip||!c.dnd.isFormElement(f)){if(this.delay){this.events.push(c.connect(this.handle,"onmousemove",this,"onMouseMove"),c.connect(this.handle,"ontouchmove",this,"onMouseMove"),c.connect(this.handle,"onmouseup",this,"onMouseUp"),c.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);c.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);c.stopEvent(f)},onMouseUp:function(f){for(var a=0;a<2;++a)c.disconnect(this.events.pop());c.stopEvent(f)},onSelectStart:function(f){(!this.skip||!c.dnd.isFormElement(f))&&
c.stopEvent(f)},onDragDetected:function(c){new this.mover(this.node,c,this)},onMoveStart:function(f){c.publish("/dnd/move/start",[f]);c.addClass(c.body(),"dojoMove");c.addClass(this.node,"dojoMoveItem")},onMoveStop:function(f){c.publish("/dnd/move/stop",[f]);c.removeClass(c.body(),"dojoMove");c.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(c,a){this.onMoving(c,a);var d=c.node.style;d.left=a.l+"px";d.top=a.t+"px";this.onMoved(c,a)},onMoving:function(){},onMoved:function(){}});
return c.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(c){c.declare("dojo.dnd.move.constrainedMoveable",c.dnd.Moveable,{constraints:function(){},within:!1,markupFactory:function(f,a){return new c.dnd.move.constrainedMoveable(a,f)},constructor:function(c,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=c._getMarginSize(f.node),a.r-=f.w,a.b-=
f.h)},onMove:function(c,a){var d=this.constraintBox,g=c.node.style;this.onMoving(c,a);a.l=a.l<d.l?d.l:d.r<a.l?d.r:a.l;a.t=a.t<d.t?d.t:d.b<a.t?d.b:a.t;g.left=a.l+"px";g.top=a.t+"px";this.onMoved(c,a)}});c.declare("dojo.dnd.move.boxConstrainedMoveable",c.dnd.move.constrainedMoveable,{box:{},markupFactory:function(f,a){return new c.dnd.move.boxConstrainedMoveable(a,f)},constructor:function(c,a){var d=a&&a.box;this.constraints=function(){return d}}});c.declare("dojo.dnd.move.parentConstrainedMoveable",
c.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(f,a){return new c.dnd.move.parentConstrainedMoveable(a,f)},constructor:function(f,a){var d=a&&a.area;this.constraints=function(){var a=this.node.parentNode,e=c.getComputedStyle(a),i=c._getMarginBox(a,e);if(d=="margin")return i;var h=c._getMarginExtents(a,e);i.l+=h.l;i.t+=h.t;i.w-=h.w;i.h-=h.h;if(d=="border")return i;h=c._getBorderExtents(a,e);i.l+=h.l;i.t+=h.t;i.w-=h.w;i.h-=h.h;if(d=="padding")return i;h=c._getPadExtents(a,e);i.l+=
h.l;i.t+=h.t;i.w-=h.w;i.h-=h.h;return i}}});c.dnd.constrainedMover=c.dnd.move.constrainedMover;c.dnd.boxConstrainedMover=c.dnd.move.boxConstrainedMover;c.dnd.parentConstrainedMover=c.dnd.move.parentConstrainedMover;return c.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(c){(function(){var f=c.dnd.Moveable.prototype.onMove;c.declare("dojo.dnd.TimedMoveable",c.dnd.Moveable,{timeout:40,constructor:function(a,d){d||(d={});if(d.timeout&&typeof d.timeout=="number"&&d.timeout>=0)this.timeout=d.timeout},markupFactory:function(a,d){return new c.dnd.TimedMoveable(d,a)},onMoveStop:function(a){a._timer&&(clearTimeout(a._timer),f.call(this,a,a._leftTop));c.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,d){a._leftTop=d;if(!a._timer){var c=this;a._timer=setTimeout(function(){a._timer=null;f.call(c,a,a._leftTop)},this.timeout)}}})})();return c.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(c){c.declare("dojo.fx.Toggler",null,{node:null,showFunc:c.fadeIn,hideFunc:c.fadeOut,showDuration:200,hideDuration:200,constructor:function(f){c.mixin(this,f);this.node=f.node;this._showArgs=c.mixin({},f);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=c.mixin({},f);this._hideArgs.node=this.node;this._hideArgs.duration=this.hideDuration;this.hideAnim=this.hideFunc(this._hideArgs);
c.connect(this.showAnim,"beforeBegin",c.hitch(this.hideAnim,"stop",!0));c.connect(this.hideAnim,"beforeBegin",c.hitch(this.showAnim,"stop",!0))},show:function(c){return this.showAnim.play(c||0)},hide:function(c){return this.hideAnim.play(c||0)}});return c.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(c){(function(){var f={_fire:function(a,d){this[a]&&this[a].apply(this,d||[]);return this}},a=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;c.forEach(this._animations,function(a){this.duration+=a.duration;a.delay&&(this.duration+=a.delay)},this)};c.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){c.disconnect(this._onAnimateCtx);c.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=c.connect(this._current,"onAnimate",this,"_onAnimate"),this._onEndCtx=c.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 i=c.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),
h=c.connect(this._current,"onBegin",this,function(a){this._fire("onBegin",arguments)}),f=c.connect(this._current,"onPlay",this,function(a){this._fire("onPlay",arguments);c.disconnect(i);c.disconnect(h);c.disconnect(f)});this._onAnimateCtx&&c.disconnect(this._onAnimateCtx);this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&c.disconnect(this._onEndCtx);this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);
return this},pause:function(){if(this._current){var a=c.connect(this._current,"onPause",this,function(d){this._fire("onPause",arguments);c.disconnect(a)});this._current.pause()}return this},gotoPercent:function(a,d){this.pause();var i=this.duration*a;this._current=null;c.some(this._animations,function(a){if(a.duration<=i)return this._current=a,!0;i-=a.duration;return!1});this._current&&this._current.gotoPercent(i/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=c.connect(this._current,"onStop",this,function(a){this._fire("onStop",arguments);c.disconnect(d)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&c.disconnect(this._onAnimateCtx);this._onEndCtx&&c.disconnect(this._onEndCtx)}});c.extend(a,f);c.fx.chain=function(d){return new a(d)};
var d=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;c.forEach(a,function(a){var d=a.duration;a.delay&&(d+=a.delay);if(this.duration<d)this.duration=d;this._connects.push(c.connect(a,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new c.Animation({curve:[0,1],duration:this.duration});var d=this;c.forEach("beforeBegin,onBegin,onPlay,onAnimate,onPause,onStop,onEnd".split(","),function(a){d._connects.push(c.connect(d._pseudoAnimation,a,function(){d._fire(a,arguments)}))})};
c.extend(d,{_doAction:function(a,d){c.forEach(this._animations,function(c){c[a].apply(c,d)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,d){var c=this._pseudoAnimation;c[a].apply(c,d)},play:function(a,d){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 i=this.duration*
a;c.forEach(this._animations,function(a){a.gotoPercent(a.duration<i?1:i/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(){c.forEach(this._connects,c.disconnect)}});c.extend(d,f);c.fx.combine=function(a){return new d(a)};c.fx.wipeIn=function(a){var d=a.node=c.byId(a.node),i=d.style,h,a=c.animateProperty(c.mixin({properties:{height:{start:function(){h=
i.overflow;i.overflow="hidden";if(i.visibility=="hidden"||i.display=="none")return i.height="1px",i.display="",i.visibility="",1;else{var a=c.style(d,"height");return Math.max(a,1)}},end:function(){return d.scrollHeight}}}},a));c.connect(a,"onEnd",function(){i.height="auto";i.overflow=h});return a};c.fx.wipeOut=function(a){var d=(a.node=c.byId(a.node)).style,i,a=c.animateProperty(c.mixin({properties:{height:{end:1}}},a));c.connect(a,"beforeBegin",function(){i=d.overflow;d.overflow="hidden";d.display=
""});c.connect(a,"onEnd",function(){d.overflow=i;d.height="auto";d.display="none"});return a};c.fx.slideTo=function(a){var d=null,i=null,h=function(a){return function(){var g=c.getComputedStyle(a),h=g.position;d=h=="absolute"?a.offsetTop:parseInt(g.top)||0;i=h=="absolute"?a.offsetLeft:parseInt(g.left)||0;if(h!="absolute"&&h!="relative")g=c.position(a,!0),d=g.y,i=g.x,a.style.position="absolute",a.style.top=d+"px",a.style.left=i+"px"}}(a.node=c.byId(a.node));h();a=c.animateProperty(c.mixin({properties:{top:a.top||
0,left:a.left||0}},a));c.connect(a,"beforeBegin",a,h);return a}})();return c.fx});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("text!dijit/form/templates/CheckBox.html",[],function(){return'<div class="dijit dijitReset dijitInline" role="presentation"\n\t><input\n\t \t${!nameAttrSetting} type="${type}" ${checkedAttrSetting}\n\t\tclass="dijitReset dijitCheckBoxInput"\n\t\tdojoAttachPoint="focusNode"\n\t \tdojoAttachEvent="onclick:_onClick"\n/></div>'});
define("dijit/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(c,f){c.declare("dijit.layout._LayoutWidget",[f._Widget,f._Container,f._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,buildRendering:function(){this.inherited(arguments);c.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(c.isIE?
this.domNode:c.global,"onresize",function(){this.resize()})}},resize:function(a,d){var g=this.domNode;if(a){c.marginBox(g,a);if(a.t)g.style.top=a.t+"px";if(a.l)g.style.left=a.l+"px"}var e=d||{};c.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=c.mixin(c.marginBox(g),e);var i=c.getComputedStyle(g),h=c._getMarginExtents(g,i),f=c._getBorderExtents(g,i),e=this._borderBox={w:e.w-(h.w+f.w),h:e.h-(h.h+f.h)},h=c._getPadExtents(g,i);this._contentBox={l:c._toPixelValue(g,i.paddingLeft),t:c._toPixelValue(g,i.paddingTop),
w:e.w-h.w,h:e.h-h.h};this.layout()},layout:function(){},_setupChild:function(a){c.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a,d){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){c.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});f.layout.marginBox2contentBox=function(a,d){var g=c.getComputedStyle(a),e=c._getMarginExtents(a,
g),i=c._getPadBorderExtents(a,g);return{l:c._toPixelValue(a,g.paddingLeft),t:c._toPixelValue(a,g.paddingTop),w:d.w-(e.w+i.w),h:d.h-(e.h+i.h)}};(function(){var a=function(a,g){var e=a.resize?a.resize(g):c.marginBox(a.domNode,g);e?c.mixin(a,e):(c.mixin(a,c.marginBox(a.domNode)),c.mixin(a,g))};f.layout.layoutChildren=function(d,g,e,i,h){g=c.mixin({},g);c.addClass(d,"dijitLayoutContainer");e=c.filter(e,function(a){return a.region!="center"&&a.layoutAlign!="client"}).concat(c.filter(e,function(a){return a.region==
"center"||a.layoutAlign=="client"}));c.forEach(e,function(d){var e=d.domNode,f=d.region||d.layoutAlign,m=e.style;m.left=g.l+"px";m.top=g.t+"px";m.position="absolute";c.addClass(e,"dijitAlign"+(f.substring(0,1).toUpperCase()+f.substring(1)));e={};i&&i==d.id&&(e[d.region=="top"||d.region=="bottom"?"h":"w"]=h);f=="top"||f=="bottom"?(e.w=g.w,a(d,e),g.h-=d.h,f=="top"?g.t+=d.h:m.top=g.t+g.h+"px"):f=="left"||f=="right"?(e.h=g.h,a(d,e),g.w-=d.w,f=="left"?g.l+=d.w:m.left=g.l+g.w+"px"):(f=="client"||f=="center")&&
a(d,g)})}})();return f.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(c,f){c.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isContainer:!0,isLayoutContainer:!0,_startChildren:function(){c.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(c.isIE?this.domNode:c.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=c.query("> *",this.containerNode).filter(function(a){return a.tagName!=="SCRIPT"}),d=a.filter(function(a){return c.hasAttr(a,"data-dojo-type")||c.hasAttr(a,"dojoType")||c.hasAttr(a,"widgetId")}),g=c.filter(d.map(f.byNode),function(a){return a&&
a.domNode&&a.resize});a.length==d.length&&g.length==1?this._singleChild=g[0]:delete this._singleChild;c.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,d){!this._wasShown&&this.open!==!1&&this._onShow();this._resizeCalled=!0;this._scheduleLayout(a,d)},_scheduleLayout:function(a,d){this._isShown()?this._layout(a,d):(this._needLayout=!0,this._changeSize=a,this._resultSize=d)},_layout:function(a,d){a&&c.marginBox(this.domNode,a);var g=this.containerNode;
if(g===this.domNode){var e=d||{};c.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=c.mixin(c.marginBox(g),e);this._contentBox=f.layout.marginBox2contentBox(g,e)}else this._contentBox=c.contentBox(g);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||c.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else c.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,d=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!c.hasClass(a,"dijitHidden")&&d&&d.style&&d.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/data/util/filter",["dojo"],function(c){c.getObject("data.util.filter",!0,c);c.data.util.filter.patternToRegExp=function(c,a){for(var d="^",g=null,e=0;e<c.length;e++)switch(g=c.charAt(e),g){case "\\":d+=g;e++;d+=c.charAt(e);break;case "*":d+=".*";break;case "?":d+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":d+="\\";default:d+=g}d+="$";return a?RegExp(d,"mi"):RegExp(d,"m")};return c.data.util.filter});
define("dojo/data/util/sorter",["dojo"],function(c){c.getObject("data.util.sorter",!0,c);c.data.util.sorter.basicComparator=function(c,a){var d=-1;c===null&&(c=void 0);a===null&&(a=void 0);if(c==a)d=0;else if(c>a||c==null)d=1;return d};c.data.util.sorter.createSortFunction=function(f,a){function d(a,d,c,e){return function(g,h){var i=e.getValue(g,a),f=e.getValue(h,a);return d*c(i,f)}}for(var g=[],e,i=a.comparatorMap,h=c.data.util.sorter.basicComparator,k=0;k<f.length;k++){e=f[k];var j=e.attribute;
if(j){e=e.descending?-1:1;var l=h;i&&(typeof j!=="string"&&"toString"in j&&(j=j.toString()),l=i[j]||h);g.push(d(j,e,l,a))}}return function(a,d){for(var c=0;c<g.length;){var e=g[c++](a,d);if(e!==0)return e}return 0}};return c.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(c){c.getObject("data.util.simpleFetch",!0,c);c.data.util.simpleFetch.fetch=function(f){f=f||{};if(!f.store)f.store=this;var a=this;this._fetchItems(f,function(d,g){var e=g.abort||null,i=!1,h=g.start?g.start:0,f=g.count&&g.count!==Infinity?h+g.count:d.length;g.abort=function(){i=!0;e&&e.call(g)};var j=g.scope||c.global;if(!g.store)g.store=a;g.onBegin&&g.onBegin.call(j,d.length,g);g.sort&&d.sort(c.data.util.sorter.createSortFunction(g.sort,
a));if(g.onItem)for(var l=h;l<d.length&&l<f;++l){var m=d[l];i||g.onItem.call(j,m,g)}g.onComplete&&!i&&(l=null,g.onItem||(l=d.slice(h,f)),g.onComplete.call(j,l,g))},function(a,g){g.onError&&g.onError.call(g.scope||c.global,a,g)});return f};return c.data.util.simpleFetch});
define("dojo/date/stamp",["dojo"],function(c){c.getObject("date.stamp",!0,c);c.date.stamp.fromISOString=function(f,a){if(!c.date.stamp._isoRegExp)c.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var d=c.date.stamp._isoRegExp.exec(f),g=null;if(d){d.shift();d[1]&&d[1]--;d[6]&&(d[6]*=1E3);a&&(a=new Date(a),c.forEach(c.map("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds".split(","),function(d){return a["get"+
d]()}),function(a,c){d[c]=d[c]||a}));g=new Date(d[0]||1970,d[1]||0,d[2]||1,d[3]||0,d[4]||0,d[5]||0,d[6]||0);d[0]<100&&g.setFullYear(d[0]||1970);var e=0,i=d[7]&&d[7].charAt(0);i!="Z"&&(e=(d[8]||0)*60+(Number(d[9])||0),i!="-"&&(e*=-1));i&&(e-=g.getTimezoneOffset());e&&g.setTime(g.getTime()+e*6E4)}return g};c.date.stamp.toISOString=function(c,a){var d=function(a){return a<10?"0"+a:a},a=a||{},g=[],e=a.zulu?"getUTC":"get",i="";a.selector!="time"&&(i=c[e+"FullYear"](),i=["0000".substr((i+"").length)+i,
d(c[e+"Month"]()+1),d(c[e+"Date"]())].join("-"));g.push(i);if(a.selector!="date"){i=[d(c[e+"Hours"]()),d(c[e+"Minutes"]()),d(c[e+"Seconds"]())].join(":");e=c[e+"Milliseconds"]();a.milliseconds&&(i+="."+(e<100?"0":"")+d(e));if(a.zulu)i+="Z";else if(a.selector!="time"){var e=c.getTimezoneOffset(),h=Math.abs(e);i+=(e>0?"-":"+")+d(Math.floor(h/60))+":"+d(h%60)}g.push(i)}return g.join("T")};return c.date.stamp});
define("dojo/data/ItemFileReadStore",["dojo","dojo/data/util/filter","dojo/data/util/simpleFetch","dojo/date/stamp"],function(c){c.declare("dojo.data.ItemFileReadStore",null,{constructor:function(f){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=!1;this.url=this._ccUrl=this._jsonFileUrl=f.url;this._jsonData=f.data;this.data=null;this._datatypeMap=f.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return c.date.stamp.fromISOString(a)}});
this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=!1;this._queuedFetches=[];if(f.urlPreventCache!==void 0)this.urlPreventCache=f.urlPreventCache?!0:!1;if(f.hierarchical!==void 0)this.hierarchical=f.hierarchical?!0:!1;if(f.clearOnClose)this.clearOnClose=!0;if("failOk"in f)this.failOk=f.failOk?!0:!1},url:"",_ccUrl:"",data:null,
typeMap:null,clearOnClose:!1,urlPreventCache:!1,failOk:!1,hierarchical:!0,_assertIsItem:function(c){if(!this.isItem(c))throw Error("dojo.data.ItemFileReadStore: Invalid item argument.");},_assertIsAttribute:function(c){if(typeof c!=="string")throw Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");},getValue:function(c,a,d){c=this.getValues(c,a);return c.length>0?c[0]:d},getValues:function(c,a){this._assertIsItem(c);this._assertIsAttribute(a);return(c[a]||[]).slice(0)},getAttributes:function(c){this._assertIsItem(c);
var a=[],d;for(d in c)d!==this._storeRefPropName&&d!==this._itemNumPropName&&d!==this._rootItemPropName&&d!==this._reverseRefMap&&a.push(d);return a},hasAttribute:function(c,a){this._assertIsItem(c);this._assertIsAttribute(a);return a in c},containsValue:function(f,a,d){var g=void 0;typeof d==="string"&&(g=c.data.util.filter.patternToRegExp(d,!1));return this._containsValue(f,a,d,g)},_containsValue:function(f,a,d,g){return c.some(this.getValues(f,a),function(a){if(a!==null&&!c.isObject(a)&&g){if(a.toString().match(g))return!0}else if(d===
a)return!0})},isItem:function(c){return c&&c[this._storeRefPropName]===this&&this._arrayOfAllItems[c[this._itemNumPropName]]===c?!0:!1},isItemLoaded:function(c){return this.isItem(c)},loadItem:function(c){this._assertIsItem(c.item)},getFeatures:function(){return this._features},getLabel:function(c){if(this._labelAttr&&this.isItem(c))return this.getValue(c,this._labelAttr)},getLabelAttributes:function(){return this._labelAttr?[this._labelAttr]:null},_fetchItems:function(f,a,d){var g=this,e=function(d,
e){var h=[],i,f;if(d.query){var k;i=d.queryOptions?d.queryOptions.ignoreCase:!1;var q={};for(f in d.query)k=d.query[f],typeof k==="string"?q[f]=c.data.util.filter.patternToRegExp(k,i):k instanceof RegExp&&(q[f]=k);for(i=0;i<e.length;++i){var r=!0,s=e[i];if(s===null)r=!1;else for(f in d.query)k=d.query[f],g._containsValue(s,f,k,q[f])||(r=!1);r&&h.push(s)}}else for(i=0;i<e.length;++i)f=e[i],f!==null&&h.push(f);a(h,d)};if(this._loadFinished)e(f,this._getItemsArray(f.queryOptions));else{if(this._jsonFileUrl!==
this._ccUrl)c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl;else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null)this._jsonData=this.data,this.data=null;if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:f,filter:e});else{this._loadInProgress=!0;var i=c.xhrGet({url:g._jsonFileUrl,handleAs:"json-comment-optional",
preventCache:this.urlPreventCache,failOk:this.failOk});i.addCallback(function(a){try{g._getItemsFromLoadedData(a),g._loadFinished=!0,g._loadInProgress=!1,e(f,g._getItemsArray(f.queryOptions)),g._handleQueuedFetches()}catch(c){g._loadFinished=!0,g._loadInProgress=!1,d(c,f)}});i.addErrback(function(a){g._loadInProgress=!1;d(a,f)});var h=null;if(f.abort)h=f.abort;f.abort=function(){i&&i.fired===-1&&i.cancel();h&&h.call(f)}}else if(this._jsonData)try{this._loadFinished=!0,this._getItemsFromLoadedData(this._jsonData),
this._jsonData=null,e(f,this._getItemsArray(f.queryOptions))}catch(k){d(k,f)}else d(Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),f)}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var c=0;c<this._queuedFetches.length;c++){var a=this._queuedFetches[c],d=a.args;(a=a.filter)?a(d,this._getItemsArray(d.queryOptions)):this.fetchItemByIdentity(d)}this._queuedFetches=[]}},_getItemsArray:function(c){return c&&c.deep?
this._arrayOfAllItems:this._arrayOfTopLevelItems},close:function(){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress)(this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null)&&this.data==null&&console.debug("dojo.data.ItemFileReadStore: WARNING!  Data reload  information has not been provided.  Please set 'url' or 'data' to the appropriate value before the next fetch"),this._arrayOfAllItems=[],this._arrayOfTopLevelItems=[],this._loadFinished=!1,this._itemsByIdentity=
null,this._loadInProgress=!1,this._queuedFetches=[]},_getItemsFromLoadedData:function(f){function a(a){return a!==null&&typeof a==="object"&&(!c.isArray(a)||g)&&!c.isFunction(a)&&(a.constructor==Object||c.isArray(a))&&typeof a._reference==="undefined"&&typeof a._type==="undefined"&&typeof a._value==="undefined"&&e.hierarchical}function d(g){e._arrayOfAllItems.push(g);for(var h in g){var i=g[h];if(i)if(c.isArray(i))for(var f=0;f<i.length;++f){var j=i[f];a(j)&&d(j)}else a(i)&&d(i)}}var g=!1,e=this;
this._labelAttr=f.label;var i,h;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=f.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i)h=this._arrayOfTopLevelItems[i],c.isArray(h)&&(g=!0),d(h),h[this._rootItemPropName]=!0;var k={},j;for(i=0;i<this._arrayOfAllItems.length;++i)for(j in h=this._arrayOfAllItems[i],h){if(j!==this._rootItemPropName){var l=h[j];l!==null?c.isArray(l)||(h[j]=[l]):h[j]=[null]}k[j]=j}for(;k[this._storeRefPropName];)this._storeRefPropName+="_";for(;k[this._itemNumPropName];)this._itemNumPropName+=
"_";for(;k[this._reverseRefMap];)this._reverseRefMap+="_";if(k=f.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=k;for(i=0;i<this._arrayOfAllItems.length;++i)if(h=this._arrayOfAllItems[i],f=h[k],f=f[0],Object.hasOwnProperty.call(this._itemsByIdentity,f))if(this._jsonFileUrl)throw Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+k+"].  Value collided: ["+f+"]");else{if(this._jsonData)throw Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+
k+"].  Value collided: ["+f+"]");}else this._itemsByIdentity[f]=h}else this._features["dojo.data.api.Identity"]=Number;for(i=0;i<this._arrayOfAllItems.length;++i)h=this._arrayOfAllItems[i],h[this._storeRefPropName]=this,h[this._itemNumPropName]=i;for(i=0;i<this._arrayOfAllItems.length;++i)for(j in h=this._arrayOfAllItems[i],h){f=h[j];for(k=0;k<f.length;++k)if(l=f[k],l!==null&&typeof l=="object"){if("_type"in l&&"_value"in l){var m=l._type,o=this._datatypeMap[m];if(o)if(c.isFunction(o))f[k]=new o(l._value);
else if(c.isFunction(o.deserialize))f[k]=o.deserialize(l._value);else throw Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");else throw Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+m+"'");}if(l._reference){l=l._reference;if(c.isObject(l))for(m=0;m<this._arrayOfAllItems.length;++m){var o=this._arrayOfAllItems[m],n=!0,p;for(p in l)o[p]!=l[p]&&
(n=!1);n&&(f[k]=o)}else f[k]=this._getItemByIdentity(l);this.referenceIntegrity&&(l=f[k],this.isItem(l)&&this._addReferenceToMap(l,h,j))}else this.isItem(l)&&this.referenceIntegrity&&this._addReferenceToMap(l,h,j)}}},_addReferenceToMap:function(){},getIdentity:function(c){var a=this._features["dojo.data.api.Identity"];if(a===Number)return c[this._itemNumPropName];else if(c=c[a])return c[0];return null},fetchItemByIdentity:function(f){var a,d;if(this._loadFinished)a=this._getItemByIdentity(f.identity),
f.onItem&&(d=f.scope?f.scope:c.global,f.onItem.call(d,a));else{var g=this;if(this._jsonFileUrl!==this._ccUrl)c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl;else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null&&this._jsonData==null)this._jsonData=this.data,this.data=null;if(this._jsonFileUrl)this._loadInProgress?
this._queuedFetches.push({args:f}):(this._loadInProgress=!0,d=c.xhrGet({url:g._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk}),d.addCallback(function(d){var i=f.scope?f.scope:c.global;try{g._getItemsFromLoadedData(d),g._loadFinished=!0,g._loadInProgress=!1,a=g._getItemByIdentity(f.identity),f.onItem&&f.onItem.call(i,a),g._handleQueuedFetches()}catch(h){g._loadInProgress=!1,f.onError&&f.onError.call(i,h)}}),d.addErrback(function(a){g._loadInProgress=
!1;f.onError&&f.onError.call(f.scope?f.scope:c.global,a)}));else if(this._jsonData)g._getItemsFromLoadedData(g._jsonData),g._jsonData=null,g._loadFinished=!0,a=g._getItemByIdentity(f.identity),f.onItem&&(d=f.scope?f.scope:c.global,f.onItem.call(d,a))}},_getItemByIdentity:function(c){var a=null;this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,c)?a=this._itemsByIdentity[c]:Object.hasOwnProperty.call(this._arrayOfAllItems,c)&&(a=this._arrayOfAllItems[c]);a===void 0&&(a=null);return a},
getIdentityAttributes:function(){var c=this._features["dojo.data.api.Identity"];return c===Number?null:[c]},_forceLoad:function(){var f=this;if(this._jsonFileUrl!==this._ccUrl)c.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl;else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null)this._jsonData=this.data,this.data=
null;if(this._jsonFileUrl){var a=c.xhrGet({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:!0});a.addCallback(function(a){try{if(f._loadInProgress!==!0&&!f._loadFinished)f._getItemsFromLoadedData(a),f._loadFinished=!0;else if(f._loadInProgress)throw Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");}catch(c){throw console.log(c),c;}});a.addErrback(function(a){throw a;})}else if(this._jsonData)f._getItemsFromLoadedData(f._jsonData),
f._jsonData=null,f._loadFinished=!0}});c.extend(c.data.ItemFileReadStore,c.data.util.simpleFetch);return c.data.ItemFileReadStore});
define("orion/widgets/_OrionDialogMixin",["i18n!orion/widgets/nls/messages","dojo","dijit"],function(c,f,a){f.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||c["Information Needed"];this.buttonCancel=c.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/NewItemDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t<div style="display: table">\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 dojoAttachPoint="itemNameLabel" for="${id}_itemName" style="padding-right: 10">${itemNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 30em; text-align: left;">\n\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="itemName" id="${id}_itemName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: none;" dojoAttachPoint="itemAdvancedInfo">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="itemURLLabel" for="itemURL" style="padding-right: 10">Server Path:</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; width: 40em; text-align: left; padding:5;">\n\t\t\t\t\t<input dojoAttachPoint="itemURL" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: none;" dojoAttachPoint="itemAdvancedInfo1">\n\t\t\t\t<div style="display: table-cell;"></div>\n\t\t\t\t<div style="display: table-cell;">\n\t\t\t\t\t<input dojoAttachPoint="createCheckbox" id="${id}_createCheckbox" dojoType="dijit.form.CheckBox" checked="checked" value="on" type="checkbox">\n\t\t\t\t\t<label dojoAttachPoint="createCheckboxLabel" for="${id}_createCheckbox">Create if doesn\'t exist</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"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="newItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("text!dijit/templates/TreeNode.html",[],function(){return'<div class="dijitTreeNode" role="presentation"\n\t><div dojoAttachPoint="rowNode" class="dijitTreeRow" role="presentation" dojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick"\n\t\t><img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" role="presentation"\n\t\t/><span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" role="presentation"\n\t\t></span\n\t\t><span dojoAttachPoint="contentNode"\n\t\t\tclass="dijitTreeContent" role="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" role="presentation"\n\t\t\t/><span dojoAttachPoint="labelNode" class="dijitTreeLabel" role="treeitem" tabindex="-1" aria-selected="false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer" role="presentation" style="display: none;"></div>\n</div>'});
define("text!dijit/templates/Tree.html",[],function(){return'<div class="dijitTree dijitTreeContainer" role="tree"\n\tdojoAttachEvent="onkeypress:_onKeyPress">\n\t<div class="dijitInline dijitTreeIndent" style="position: absolute; top: -9999px" dojoAttachPoint="indentDetector"></div>\n</div>'});
define("dojo/DeferredList",["dojo"],function(c){c.DeferredList=function(f,a,d,g){var e=[];c.Deferred.call(this);var i=this;f.length===0&&!a&&this.resolve([0,[]]);var h=0;c.forEach(f,function(c,j){function l(a,d){e[j]=[a,d];h++;h===f.length&&i.resolve(e)}c.then(function(d){a?i.resolve([j,d]):l(!0,d)},function(a){d?i.reject(a):l(!1,a);if(g)return null;throw a;})})};c.DeferredList.prototype=new c.Deferred;c.DeferredList.prototype.gatherResults=function(f){f=new c.DeferredList(f,!1,!0,!1);f.addCallback(function(a){var d=
[];c.forEach(a,function(a){d.push(a[1])});return d});return f};return c.DeferredList});
define("dojo/cookie",["dojo","dojo/regexp"],function(c){c.cookie=function(f,a,d){var g=document.cookie;if(arguments.length==1){var e=g.match(RegExp("(?:^|; )"+c.regexp.escapeString(f)+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}else{d=d||{};g=d.expires;if(typeof g=="number"){var i=new Date;i.setTime(i.getTime()+g*864E5);g=d.expires=i}if(g&&g.toUTCString)d.expires=g.toUTCString();a=encodeURIComponent(a);g=f+"="+a;for(e in d)g+="; "+e,i=d[e],i!==!0&&(g+="="+i);document.cookie=g}};c.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 c.cookie});
define("dijit/tree/TreeStoreModel",["dojo","dijit"],function(c,f){c.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(a){c.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.Tree: store must support dojo.data.Identity");if(a.getFeatures()["dojo.data.api.Notification"])this.connects=this.connects.concat([c.connect(a,
"onNew",this,"onNewItem"),c.connect(a,"onDelete",this,"onDeleteItem"),c.connect(a,"onSet",this,"onSetItem")])},destroy:function(){c.forEach(this.connects,c.disconnect)},getRoot:function(a,d){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:c.hitch(this,function(d){if(d.length!=1)throw Error(this.declaredClass+": query "+c.toJson(this.query)+" returned "+d.length+" items, but must return exactly one item");this.root=d[0];a(this.root)}),onError:d})},mayHaveChildren:function(a){return c.some(this.childrenAttrs,
function(d){return this.store.hasAttribute(a,d)},this)},getChildren:function(a,d,g){var e=this.store;if(e.isItemLoaded(a)){for(var i=[],h=0;h<this.childrenAttrs.length;h++)var f=e.getValues(a,this.childrenAttrs[h]),i=i.concat(f);var j=0;this.deferItemLoadingUntilExpand||c.forEach(i,function(a){e.isItemLoaded(a)||j++});j==0?d(i):c.forEach(i,function(a,c){e.isItemLoaded(a)||e.loadItem({item:a,onItem:function(a){i[c]=a;--j==0&&d(i)},onError:g})})}else{var l=c.hitch(this,arguments.callee);e.loadItem({item:a,
onItem:function(a){l(a,d,g)},onError:g})}},isItem:function(a){return this.store.isItem(a)},fetchItemByIdentity:function(a){this.store.fetchItemByIdentity(a)},getIdentity:function(a){return this.store.getIdentity(a)},getLabel:function(a){return this.labelAttr?this.store.getValue(a,this.labelAttr):this.store.getLabel(a)},newItem:function(a,d,c){var e={parent:d,attribute:this.childrenAttrs[0]},i;this.newItemIdAttr&&a[this.newItemIdAttr]?this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(h){h?this.pasteItem(h,null,d,!0,c):(i=this.store.newItem(a,e))&&c!=void 0&&this.pasteItem(i,d,d,!1,c)}}):(i=this.store.newItem(a,e))&&c!=void 0&&this.pasteItem(i,d,d,!1,c)},pasteItem:function(a,d,g,e,i){var h=this.store,f=this.childrenAttrs[0];d&&c.forEach(this.childrenAttrs,function(g){if(h.containsValue(d,g,a)){if(!e){var i=c.filter(h.getValues(d,g),function(d){return d!=a});h.setValues(d,g,i)}f=g}});if(g)if(typeof i=="number"){var j=h.getValues(g,f).slice();j.splice(i,0,a);h.setValues(g,
f,j)}else h.setValues(g,f,h.getValues(g,f).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,d){d&&this.getChildren(d.item,c.hitch(this,function(a){this.onChildrenChange(d.item,a)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,d){if(c.indexOf(this.childrenAttrs,d)!=-1)this.getChildren(a,c.hitch(this,function(d){this.onChildrenChange(a,d)}));else this.onChange(a)}});return f.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(c,f){c.declare("dijit.tree.ForestStoreModel",f.tree.TreeStoreModel,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(a){this.root={store:this,root:!0,id:a.rootId,label:a.rootLabel,children:a.rootChildren}},mayHaveChildren:function(a){return a===this.root||this.inherited(arguments)},getChildren:function(a,d,g){a===this.root?this.root.children?d(this.root.children):this.store.fetch({query:this.query,
onComplete:c.hitch(this,function(a){this.root.children=a;d(a)}),onError:g}):this.inherited(arguments)},isItem:function(a){return a===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(a){if(a.identity==this.root.id){var d=a.scope?a.scope:c.global;a.onItem&&a.onItem.call(d,this.root)}else this.inherited(arguments)},getIdentity:function(a){return a===this.root?this.root.id:this.inherited(arguments)},getLabel:function(a){return a===this.root?this.root.label:this.inherited(arguments)},
newItem:function(a,d,c){return d===this.root?(this.onNewRootItem(a),this.store.newItem(a)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,d,c,e,i){if(d===this.root&&!e)this.onLeaveRoot(a);f.tree.TreeStoreModel.prototype.pasteItem.call(this,a,d===this.root?null:d,c===this.root?null:c,e,i);if(c===this.root)this.onAddToRoot(a)},onAddToRoot:function(a){console.log(this,": item ",a," added to root")},onLeaveRoot:function(a){console.log(this,": item ",a," removed from root")},
_requeryTop:function(){var a=this.root.children||[];this.store.fetch({query:this.query,onComplete:c.hitch(this,function(d){this.root.children=d;if(a.length!=d.length||c.some(a,function(a,c){return d[c]!=a}))this.onChildrenChange(this.root,d)})})},onNewItem:function(a,d){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){c.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(a,d,c,e){this._requeryTop();this.inherited(arguments)}});
return f.tree.ForestStoreModel});define("text!orion/widgets/templates/_ExplorerTreeNode.html",[],function(){return'<div class="dijitTreeNode" waiRole="presentation">\n\t<div dojoAttachPoint="rowNode" class="dijitTreeRow"\n\t\twaiRole="presentation"\n\t\tdojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick">\n\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" waiRole="presentation" />\n\t\t<span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" waiRole="presentation"></span>\n\t\t<span dojoAttachPoint="contentNode" class="dijitTreeContent" waiRole="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" waiRole="presentation" />\n\t\t\t<\!-- labelNode\'s innerText will be label string --\>\n\t\t\t<span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t\t<a href="" dojoAttachPoint="followLink"><img src="${_blankGif}" alt="" dojoAttachPoint="followNode" class="dijitIcon dijitTreeIcon follow" waiRole="link"></a>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer"\n\t\twaiRole="presentation" style="display: none;">\n\t</div>\n</div>'});
define("text!orion/widgets/templates/DirectoryPrompterDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="messageCell">\n\t\t\t\t\t<div style="display: table-cell;"><div style="width: 25em; padding-bottom: 5px;">${message}</div></div>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseDirectoryExplorerTree" class="explorerTreeClass" id="${id}_browseDirectoryExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div> \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="directoryBrowserButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <\!-- end table --\>\n\t</div> <\!-- content pane --\>\n</div>'});
define("dojox",["dojo"],function(c){return dojox=c._dojox||{}});define("text!dijit/templates/ProgressBar.html",[],function(){return'<div class="dijitProgressBar dijitProgressBarEmpty" role="progressbar"\n\t><div  dojoAttachPoint="internalProgress" class="dijitProgressBarFull"\n\t\t><div class="dijitProgressBarTile" role="presentation"></div\n\t\t><span style="visibility:hidden">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint="labelNode" class="dijitProgressBarLabel" id="${id}_label"></div\n\t><img dojoAttachPoint="indeterminateHighContrastImage" class="dijitProgressBarIndeterminateHighContrastImage" alt=""\n/></div>'});
define("dojo/cldr/nls/number",{root:{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]",infinity:"\u221e",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",nativeZeroDigit:"0",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]",currencyFormat:"\u00a4\u00a0#,##0.00",
perMille:"\u2030",group:",",percentFormat:"#,##0%",decimalFormat:"#,##0.###",decimal:".",patternDigit:"#","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},ar:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,"en-au":!0,"en-gb":!0,es:!0,fi:!0,fr:!0,"fr-ch":!0,he:!0,hu:!0,it:!0,ja:!0,ko:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-pt":!0,ro:!0,ru:!0,sk:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-hant":!0,"zh-hk":!0});
define("dojo/cldr/nls/en/number",{group:",",percentSign:"%",exponential:"E",scientificFormat:"#E0",percentFormat:"#,##0%",list:";",infinity:"\u221e",patternDigit:"#",minusSign:"-",decimal:".",nan:"NaN",nativeZeroDigit:"0",perMille:"\u2030",decimalFormat:"#,##0.###",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)",plusSign:"+","decimalFormat-short":"000T"});
define("dojo/number",["dojo","dojo/i18n","i18n!dojo/cldr/nls/number","dojo/string","dojo/regexp"],function(c){c.getObject("number",!0,c);c.number.format=function(f,a){var a=c.mixin({},a||{}),d=c.i18n.normalizeLocale(a.locale),d=c.i18n.getLocalization("dojo.cldr","number",d);a.customs=d;d=a.pattern||d[(a.type||"decimal")+"Format"];return isNaN(f)||Math.abs(f)==Infinity?null:c.number._applyPattern(f,d,a)};c.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;c.number._applyPattern=function(f,a,d){var d=
d||{},g=d.customs.group,e=d.customs.decimal,a=a.split(";"),i=a[0],a=a[f<0?1:0]||"-"+i;if(a.indexOf("%")!=-1)f*=100;else if(a.indexOf("\u2030")!=-1)f*=1E3;else if(a.indexOf("\u00a4")!=-1)g=d.customs.currencyGroup||g,e=d.customs.currencyDecimal||e,a=a.replace(/\u00a4{1,3}/,function(a){return d[["symbol","currency","displayName"][a.length-1]]||d.currency||""});else if(a.indexOf("E")!=-1)throw Error("exponential notation not supported");var h=c.number._numberPatternRE,i=i.match(h);if(!i)throw Error("unable to find a number expression in pattern: "+
a);if(d.fractional===!1)d.places=0;return a.replace(h,c.number._formatAbsolute(f,i[0],{decimal:e,group:g,places:d.places,round:d.round}))};c.number.round=function(c,a,d){d=10/(d||10);return(d*+c).toFixed(a)/d};(0.9).toFixed()==0&&function(){var f=c.number.round;c.number.round=function(a,d,c){var e=Math.pow(10,-d||0),i=Math.abs(a);if(!a||i>=e||i*Math.pow(10,d+1)<5)e=0;return f(a,d,c)+(a>0?e:-e)}}();c.number._formatAbsolute=function(f,a,d){d=d||{};if(d.places===!0)d.places=0;if(d.places===Infinity)d.places=
6;var a=a.split("."),g=typeof d.places=="string"&&d.places.indexOf(","),e=d.places;if(g)e=d.places.substring(g+1);else if(!(e>=0))e=(a[1]||[]).length;d.round<0||(f=c.number.round(f,e,d.round));var f=String(Math.abs(f)).split("."),i=f[1]||"";if(a[1]||d.places){if(g)d.places=d.places.substring(0,g);g=d.places!==void 0?d.places:a[1]&&a[1].lastIndexOf("0")+1;g>i.length&&(f[1]=c.string.pad(i,g,"0",!0));e<i.length&&(f[1]=i.substr(0,e))}else f[1]&&f.pop();e=a[0].replace(",","");g=e.indexOf("0");g!=-1&&(g=
e.length-g,g>f[0].length&&(f[0]=c.string.pad(f[0],g)),e.indexOf("#")==-1&&(f[0]=f[0].substr(f[0].length-g)));var e=a[0].lastIndexOf(","),h,k;e!=-1&&(h=a[0].length-e-1,a=a[0].substr(0,e),e=a.lastIndexOf(","),e!=-1&&(k=a.length-e-1));a=[];for(e=f[0];e;)g=e.length-h,a.push(g>0?e.substr(g):e),e=g>0?e.slice(0,g):"",k&&(h=k,delete k);f[0]=a.reverse().join(d.group||",");return f.join(d.decimal||".")};c.number.regexp=function(f){return c.number._parseInfo(f).regexp};c.number._parseInfo=function(f){var f=
f||{},a=c.i18n.normalizeLocale(f.locale),a=c.i18n.getLocalization("dojo.cldr","number",a),d=f.pattern||a[(f.type||"decimal")+"Format"],g=a.group,e=a.decimal,i=1;if(d.indexOf("%")!=-1)i/=100;else if(d.indexOf("\u2030")!=-1)i/=1E3;else{var h=d.indexOf("\u00a4")!=-1;h&&(g=a.currencyGroup||g,e=a.currencyDecimal||e)}a=d.split(";");a.length==1&&a.push("-"+a[0]);a=c.regexp.buildGroupRE(a,function(a){a="(?:"+c.regexp.escapeString(a,".")+")";return a.replace(c.number._numberPatternRE,function(a){var d={signed:!1,
separator:f.strict?g:[g,""],fractional:f.fractional,decimal:e,exponent:!1},a=a.split("."),h=f.places;a.length==1&&i!=1&&(a[1]="###");if(a.length==1||h===0)d.fractional=!1;else{h===void 0&&(h=f.pattern?a[1].lastIndexOf("0")+1:Infinity);if(h&&f.fractional==void 0)d.fractional=!0;!f.places&&h<a[1].length&&(h+=","+a[1].length);d.places=h}a=a[0].split(",");if(a.length>1&&(d.groupSize=a.pop().length,a.length>1))d.groupSize2=a.pop().length;return"("+c.number._realNumberRegexp(d)+")"})},!0);h&&(a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,
function(a,d,e,g){a=c.regexp.escapeString(f[["symbol","currency","displayName"][e.length-1]]||f.currency||"");d=d?"[\\s\\xa0]":"";g=g?"[\\s\\xa0]":"";return!f.strict?(d&&(d+="*"),g&&(g+="*"),"(?:"+d+a+g+")?"):d+a+g}));return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:g,decimal:e,factor:i}};c.number.parse=function(f,a){var d=c.number._parseInfo(a),g=RegExp("^"+d.regexp+"$").exec(f);if(!g)return NaN;var e=g[1];if(!g[1]){if(!g[2])return NaN;e=g[2];d.factor*=-1}e=e.replace(RegExp("["+d.group+"\\s\\xa0]",
"g"),"").replace(d.decimal,".");return e*d.factor};c.number._realNumberRegexp=function(f){f=f||{};if(!("places"in f))f.places=Infinity;if(typeof f.decimal!="string")f.decimal=".";if(!("fractional"in f)||/^0/.test(f.places))f.fractional=[!0,!1];if(!("exponent"in f))f.exponent=[!0,!1];if(!("eSigned"in f))f.eSigned=[!0,!1];var a=c.number._integerRegexp(f),d=c.regexp.buildGroupRE(f.fractional,function(a){var d="";a&&f.places!==0&&(d="\\"+f.decimal,f.places==Infinity?d="(?:"+d+"\\d+)?":d+="\\d{"+f.places+
"}");return d},!0),g=c.regexp.buildGroupRE(f.exponent,function(a){return a?"([eE]"+c.number._integerRegexp({signed:f.eSigned})+")":""});a+=d;d&&(a="(?:(?:"+a+")|(?:"+d+"))");return a+g};c.number._integerRegexp=function(f){f=f||{};if(!("signed"in f))f.signed=[!0,!1];if("separator"in f){if(!("groupSize"in f))f.groupSize=3}else f.separator="";var a=c.regexp.buildGroupRE(f.signed,function(a){return a?"[-+]":""},!0),d=c.regexp.buildGroupRE(f.separator,function(a){if(!a)return"(?:\\d+)";a=c.regexp.escapeString(a);
a==" "?a="\\s":a=="\u00a0"&&(a="\\s\\xa0");var d=f.groupSize,i=f.groupSize2;return i?(a="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+a+"]\\d{"+i+"})*["+a+"]\\d{"+d+"})",d-i>0?"(?:"+a+"|(?:0|[1-9]\\d{0,"+(d-1)+"}))":a):"(?:0|[1-9]\\d{0,"+(d-1)+"}(?:["+a+"]\\d{"+d+"})*)"},!0);return a+d};return c.number});define("text!orion/widgets/templates/ImportDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\n\t\t<form method="post" id="importDialog.myForm"\n\t\t\tenctype="multipart/form-data" >\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\tFile:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: top;">\n\t\t\t\t\t\t\t<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="importDialog.uploader"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input name="uploadedfile" multiple="false" type="file" id="importDialog.uploader" force="iframe"\n\t\t\t\t\t\t\t\tdojoType="dojox.form.Uploader" style="height: 20px" label="Browse..." >\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\t\tstyle="padding: 20 0 10 0; float: right; clear: both;"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\t\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("dojo/io/iframe",["dojo"],function(c){c.getObject("io",!0,c);c.io.iframe={create:function(f,a,d){if(window[f])return window[f];if(window.frames[f])return window.frames[f];var g=null;d||(c.config.useXDomain&&!c.config.dojoBlankHtmlUrl&&console.warn("dojo.io.iframe.create: 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=c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html"));
g=c.place('<iframe id="'+f+'" name="'+f+'" src="'+d+'" onload="'+a+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',c.body());return window[f]=g},setSrc:function(f,a,d){try{if(d){var g;(g=c.isIE||c.isWebKit?f.contentWindow.document:f.contentWindow)?g.location.replace(a):f.location=a}else c.isWebKit?f.location=a:frames[f.name].location=a}catch(e){console.log("dojo.io.iframe.setSrc: ",e)}},doc:function(f){return f.contentDocument||f.name&&f.document&&
c.doc.getElementsByTagName("iframe")[f.name].contentWindow&&c.doc.getElementsByTagName("iframe")[f.name].contentWindow.document||f.name&&c.doc.frames[f.name]&&c.doc.frames[f.name].document||null},send:function(f){if(!this._frame)this._frame=this.create(this._iframeName,c._scopeName+".io.iframe._iframeOnload();");f=c._ioSetArgs(f,function(a){a.canceled=!0;a.ioArgs._callNext()},function(a){var d=null;try{var g=a.ioArgs,e=c.io.iframe,i=e.doc(e._frame),h=g.handleAs,d=i;if(h!="html")if(h=="xml"){if(c.isIE<
9||c.isIE&&c.isQuirks){c.query("a",e._frame.contentWindow.document.documentElement).orphan();var f=e._frame.contentWindow.document.documentElement.innerText,f=f.replace(/>\s+</g,"><"),f=c.trim(f),d=c._contentHandlers.xml({responseText:f})}}else d=i.getElementsByTagName("textarea")[0].value,h=="json"?d=c.fromJson(d):h=="javascript"&&(d=c.eval(d))}catch(j){d=j}finally{g._callNext()}return d},function(a,d){d.ioArgs._hasError=!0;d.ioArgs._callNext();return a});f.ioArgs._callNext=function(){if(!this._calledNext)this._calledNext=
!0,c.io.iframe._currentDfd=null,c.io.iframe._fireNextRequest()};this._dfdQueue.push(f);this._fireNextRequest();c._ioWatch(f,function(a){return!a.ioArgs._hasError},function(a){return!!a.ioArgs._finished},function(a){a.ioArgs._finished?a.callback(a):a.errback(Error("Invalid dojo.io.iframe request state"))});return f},_currentDfd:null,_dfdQueue:[],_iframeName:c._scopeName+"IoIframe",_fireNextRequest:function(){try{if(!(this._currentDfd||this._dfdQueue.length==0)){do var f=this._currentDfd=this._dfdQueue.shift();
while(f&&f.canceled&&this._dfdQueue.length);if(!f||f.canceled)this._currentDfd=null;else{var a=f.ioArgs,d=a.args;a._contentToClean=[];var g=c.byId(d.form),e=d.content||{};if(g){if(e){var i=function(d,e){c.create("input",{type:"hidden",name:d,value:e},g);a._contentToClean.push(d)},h;for(h in e){var k=e[h];if(c.isArray(k)&&k.length>1){var j;for(j=0;j<k.length;j++)i(h,k[j])}else g[h]?g[h].value=k:i(h,k)}}var l=g.getAttributeNode("action"),m=g.getAttributeNode("method"),o=g.getAttributeNode("target");
if(d.url)a._originalAction=l?l.value:null,l?l.value=d.url:g.setAttribute("action",d.url);if(!m||!m.value)m?m.value=d.method?d.method:"post":g.setAttribute("method",d.method?d.method:"post");a._originalTarget=o?o.value:null;o?o.value=this._iframeName:g.setAttribute("target",this._iframeName);g.target=this._iframeName;c._ioNotifyStart(f);g.submit()}else i=d.url+(d.url.indexOf("?")>-1?"&":"?")+a.query,c._ioNotifyStart(f),this.setSrc(this._frame,i,!0)}}}catch(n){f.errback(n)}},_iframeOnload:function(){var f=
this._currentDfd;if(f){var f=f.ioArgs,a=c.byId(f.args.form);if(a){for(var d=f._contentToClean,g=0;g<d.length;g++)for(var e=d[g],i=0;i<a.childNodes.length;i++){var h=a.childNodes[i];if(h.name==e){c.destroy(h);break}}f._originalAction&&a.setAttribute("action",f._originalAction);if(f._originalTarget)a.setAttribute("target",f._originalTarget),a.target=f._originalTarget}f._finished=!0}else this._fireNextRequest()}};return c.io.iframe});define("text!dijit/form/templates/DropDownBox.html",[],function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}"\n\trole="combobox"\n\t><div class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdojoAttachPoint="_buttonNode, _popupStateNode" role="presentation"\n\t\t><input class="dijitReset dijitInputField dijitArrowButtonInner" value="&#9660; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t${_buttonInputDisabled}\n\t/></div\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\' ${!nameAttrSetting} type="text" autocomplete="off"\n\t\t\tdojoAttachPoint="textbox,focusNode" role="textbox" aria-haspopup="true"\n\t/></div\n></div>'});
define("dijit/form/nls/ComboBox",{root:{previousMessage:"Previous choices",nextMessage:"More choices"},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("text!orion/widgets/templates/SFTPConnectionDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoType="dojo.data.ItemFileReadStore" data="sftpConnectionStoreData" jsId="sftpConnectionStore">\n\t</div>\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<\!-- Actual content here --\>\n\t\t<div style="display: table">\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 dojoAttachPoint="locationLabel" for="${id}_sftpPath" style="padding-right: 10">${locationLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<div dojoType="dijit.form.ComboBox" store="sftpConnectionStore" style="display: inline-block; width: 88%;" dojoAttachPoint="sftpConnectionList" searchAttr="name">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div dojoType="dijit.form.DropDownButton">\n\t\t\t\t\t    <span>New</span>\n\t\t\t    \t\t<div dojoType="dijit.TooltipDialog">\n\t\t\t\t\t\t\t<div style="display: table">\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpHostLabel" for="${id}_sftpHost" style="padding-right: 10">${sftpHostLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpHost" id="${id}_sftpHost" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpPathLabel" for="${id}_sftpPath" style="padding-right: 10">${sftpPathLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpPath" id="${id}_sftpPath" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpUserLabel" for="${id}_sftpUser" style="padding-right: 10">${sftpUserLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpUser" id="${id}_sftpUser" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<button dojoAttachPoint="addSFTPConnection" type="submit" dojoType="dijit.form.Button" style="padding: 20 0 10 0; float: right; clear: both;">Add</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div><\!-- End inner table--\>\n\t\t\t    \t\t</div><\!-- End TooltipDialog --\>\n\t\t\t    \t</div><\!-- End DropDownButton --\>\n\t\t\t\t</div><\!-- End table cell --\>\n\t\t\t</div><\!-- End table row --\>\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 dojoAttachPoint="sftpPasswordLabel" for="${id}_sftpPassword" style="padding-right: 10">${sftpPasswordLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="sftpPassword" id="${id}_sftpPassword" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<p>If the same file exists in both the source and destination:</p>\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteCancel" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteCancel" checked value="overwriteCancel" />\n\t\t\t\t    <label for="radioOne">Cancel the transfer</label>\n\t\t\t\t    <br />\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteAll" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteAll"/>\n\t\t\t\t    <label for="radioOne">Always overwrite destination</label>\n\t\t\t\t    <br />\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteOlder" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteOlder"/>\n\t\t\t\t    <label for="radioOne">Overwrite if source is newer</label>\n\t\t\t\t</div>\n\t\t\t</div><\!-- End table row --\>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="sftpConnectionButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div><\!-- End table row --\>\n\t\t</div><\!-- End table --\>\n\t</div><\!-- End dijitDialogPaneContent --\>\n</div>'});
define("orion/textview/keyBinding",[],function(){function c(a,d,c,e,i){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=c!==void 0&&c!==null?c:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=i!==void 0&&i!==null?i:!1}var f=window.navigator.platform.indexOf("Mac")!==-1;c.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:c}});
define("orion/URITemplate",[],function(){function c(a){this._text=a}function f(a,d){if(d==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(d==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(d==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+d);}function a(a,d,c){for(var e=[],g=0;g<a.length;g++)typeof a[g]!=="undefined"&&
e.push(f(a[g],d));return e.join(c)}function d(a,d,c,e){for(var g=Object.keys(a),h=[],i=0;i<g.length;i++)typeof a[g[i]]!=="undefined"&&h.push(f(g[i],d)+c+f(a[g[i]],d));return h.join(e)}function g(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=i[a[0]])?a=a.substring(1):this._operator=i.NUL;for(var d=[],c=a.split(","),e=0;e<c.length;e++){var g=c[e].match(h);if(g===null)throw Error("Bad VarSpec: "+a);d.push({name:g[1],explode:!!g[2],prefix:g[3]?parseInt(g[3],
10):-1})}this._varSpecList=d}function e(a){for(var d=[],e=0,h=a.indexOf("{",e);h!==-1;){d.push(new c(a.substring(e,h)));e=a.indexOf("}",h+1);if(e===-1)throw Error("Invalid template: "+a);d.push(new g(a.substring(h+1,e)));e+=1;h=a.indexOf("{",e)}d.push(new c(a.substring(e)));this._templateComponents=d}var i={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]+))?$/;c.prototype={expand:function(){return encodeURI(this._text)}};g.prototype={expand:function(c){for(var e=[],g=
0;g<this._varSpecList.length;g++){var h=this._varSpecList[g],i=h.name,n=c[i],p=typeof n;if(p!=="undefined"&&n!==null){var q=e.length===0?this._operator.first:this._operator.sep;if(p==="string")this._operator.named&&(q+=f(i,"U+R"),q+=n.length===0?this._operator.ifemp:"="),h.prefix!==-1&&h.prefix<n.length&&(n=n.substring(0,h.prefix)),q+=f(n,this._operator.allow);else if(Array.isArray(n))h.explode?q+=a(n,this._operator.allow,this._operator.sep):(this._operator.named&&(q+=f(i,"U+R"),q+=n.length===0?this._operator.ifemp:
"="),q+=a(n,this._operator.allow,","));else if(p==="object")h.explode?q+=d(n,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(q+=f(i,"U+R"),q+=Object.keys(n).length===0?this._operator.ifemp:"="),q+=d(n,this._operator.allow,",",","));else throw Error("bad param type: "+i+" : "+p);e.push(q)}}return e.join("")}};e.prototype={expand:function(a){for(var d=[],c=0;c<this._templateComponents.length;c++)d.push(this._templateComponents[c].expand(a));return d.join("")}};return e});
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:30em;">\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("git/nls/gitmessages",["orion/i18n!git/nls/gitmessages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[a])});return f});
define("git/nls/root/gitmessages",{Compare:"Compare","View the side-by-side compare":"View the side-by-side compare","Working Directory Version":"Working Directory Version","View the working directory version of the file":"View the working directory version of the file","Loading...":"Loading...",Repositories:"Repositories","0 on 1 - Git":"${0} on ${1} - Git",Git:"Git","Show in eclipse.org":"Show in eclipse.org","Show this repository at eclipse.org":"Show this repository at eclipse.org","Show in GitHub":"Show in GitHub",
"Show this repository at GitHub":"Show this repository at GitHub","Commit Details":"Commit Details","No Commits":"No Commits","commit: 0":"commit: ${0}","parent: 0":"parent: ${0}","authored by 0 (1) on 2":"authored by ${0} (${1}) on ${2}","committed by 0 (1)":"committed by ${0} (${1})","Tags:":"Tags:","No Tags":"No Tags",Diffs:"Changes",More:"More","Loading git log...":"Loading git log...",local:"local",remote:"remote","Git Log for ${0} branch ${1} on ":"Git Log for ${0} branch ${1} on ","Git Log for ${0} branch ${1}":"Git Log for ${0} branch ${1}",
"Log for branch ${0} - Git":"Log for branch ${0} - Git","Log for ${0} on ${1} - Git":"Log for ${0} on ${1} - Git","View All":"View All","Error ${0}: ":"Error ${0}: ","Loading ":"Loading ",Message:"Message",Author:"Author",Date:"Date",Actions:"Actions",Branches:"Branches",Tags:"Tags",Stage:"Stage","Unstaged removal":"Unstaged removal",Unstage:"Unstage","Staged removal":"Staged removal","Unstaged change":"Unstaged change","Staged change":"Staged change","Unstaged add":"Unstaged add","Staged add":"Staged add",
"Resolve Conflict":"Resolve Conflict",Conflicting:"Conflicting","Commit message":"Commit message","Record changes in the active branch":"Record changes in the active branch",Commit:"Commit","Amend last commit":"Amend last commit"," Amend":" Amend","Rebase in progress. Choose action:":"Rebase in progress. Choose action:","Committer name:":"Committer name:","email:":"email:","Author name: ":"Author name: ","Select a file on the left to compare...":"Select a file on the left to compare...",Unstaged:"Unstaged",
Staged:"Staged","Recent commits on":"Recent commits on","Git Status":"Git Status","Go to Git Status":"Go to Git Status","Recent commits on ${0}":"Recent commits on ${0}","Status for ${0} - Git":"Status for ${0} - Git","Status (${0})":"Status (${0})","Getting git incoming changes...":"Getting git incoming changes...","Loading recent commits...":"Loading recent commits...","Show the side-by-side compare":"Show the side-by-side compare","Change Committer or Author":"Change Committer or Author","Use Default Committer and Author":"Use Default Committer and Author",
Checkout:"Checkout","Checkout the file, discarding the unstaged change":"Checkout the file, discarding the unstaged change","Your changes to the file will be lost. Are you sure you want to checkout?":"Your changes to the file will be lost. Are you sure you want to checkout?","Checking out...":"Checking out...","Stage the change":"Stage the change","Stage the selected changes":"Stage the selected changes","Staging...":"Staging...","Checkout all the selected files, discarding all changes":"Checkout all the selected files, discarding all changes",
"Your changes to all the selected files will be lost. Are you sure you want to checkout?":"Your changes to all the selected files will be lost. Are you sure you want to checkout?","Save Patch":"Save Patch","Save workspace changes as a patch":"Save workspace changes as a patch","Unstage the change":"Unstage the change","Unstaging...":"Unstaging...",Reset:"Reset","Reset the branch, discarding all staged and unstaged changes":"Reset the branch, discarding all staged and unstaged changes","All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.":"All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.",
"Are you sure you want to continue?":"Are you sure you want to continue?","Resetting local changes...":"Resetting local changes...","Continue rebase...":"Continue rebase...","Skipping patch...":"Skipping patch...","Aborting rebase...":"Aborting rebase...","Complete log":"Complete log","local VS index":"local VS index","index VS HEAD":"index VS HEAD","Compare(${0} : ${1})":"Compare(${0} : ${1})","Loading status...":"Loading status...","Committing...":"Committing...","The committer name is required.":"The committer name is required.",
"The committer mail is required.":"The committer mail is required.","The author name is required.":"The author name is required.","The author mail is required.":"The author mail is required.",". Repository still contains conflicts.":". Repository still contains conflicts.",". Repository contains unmerged paths. Resolve conflicts first.":". Repository contains unmerged paths. Resolve conflicts first.","Rendering ${0}":"Rendering ${0}",Configuration:"Configuration"," - Git":" - Git","Repositories - Git":"Repositories - Git",
Repository:"Repository","Repository Not Found":"Repository Not Found","No Repositories":"No Repositories","Loading repository":"Loading repository","Loading repositories":"Loading repositories","(no remote)":"(no remote)","location: ":"location: ","${0} file(s) to stage and ${1} file(s) to commit.":"${0} file(s) to stage and ${1} file(s) to commit.","Nothing to commit.":"Nothing to commit.","Nothing to push.":"Nothing to push."," commit(s) to push.":" commit(s) to push.","You have no changes to commit.":"You have no changes to commit.",
"You have changes to commit in your workspace!":"You have changes to commit in your workspace!","View all local and remote tracking branches":"View all local and remote tracking branches","tracks no branch, ":"tracks no branch, ","tracks ${0}, ":"tracks ${0}, ","last modified ${0} by ${1}":"last modified ${0} by ${1}","No Remote Branches":"No Remote Branches","Rendering branches":"Rendering branches",Commits:"Commits","Getting current branch":"Getting current branch","See Full Log":"See Full Log",
'Getting commits for "${0}" branch':'Getting commits for "${0}" branch',"Rendering commits":"Rendering commits","Getting outgoing commits":"Getting outgoing commits","The branch is up to date.":"The branch is up to date.","You have no outgoing or incoming commits.":"You have no outgoing or incoming commits.",") by ":") by "," (SHA ":" (SHA ","Getting tags":"Getting tags","View all tags":"View all tags"," on ":" on "," by ":" by ",Remotes:"Remotes","Rendering remotes":"Rendering remotes","No Remotes":"No Remotes",
"Getting confituration":"Getting confituration","View all configuration entries":"View all configuration entries","Unstaged addition":"Unstaged addition","Staged addition":"Staged addition"," (Rebase in Progress)":" (Rebase in Progress)",Status:"Status","Status for ${0} - Git ":"Status for ${0} - Git ","No Unstaged Changes":"No Unstaged Changes","No Staged Changes":"No Staged Changes",'Commits for "${0}" branch':'Commits for "${0}" branch',"Add Remote":"Add Remote","Remote Name:":"Remote Name:","Remote URI:":"Remote URI:",
"Apply Patch":"Apply Patch","Git Repository":"Git Repository","Go to the git repository":"Go to the git repository","Clone Git Repository":"Clone Git Repository","Repository URL:":"Repository URL:","Existing directory:":"Existing directory:","New folder:":"New folder:","Choose a Folder":"Choose a Folder","Commit Changes":"Commit Changes","Message:":"Message:","Amend:":"Amend:","Committer Name:":"Committer Name:","Committer Email:":"Committer Email:","Author Name:":"Author Name:","Author Email:":"Author Email:",
"The commit message is required.":"The commit message is required.","Git Credentials":"Git Credentials","Username:":"Username:","Ssh password:":"Ssh password:","Private key:":"Private key:","Passphrase (optional):":"Passphrase (optional):"," commit: ":" commit: ","parent: ":"parent: "," authored by ${0} {${1}) on ${2}":" authored by ${0} {${1}) on ${2}",Content:"Content","Go to ${0} section":"Go to ${0} section","Find Commit":"Find Commit","Type the commit name (sha1):":"Type the commit name (sha1):",
Search:"Search","Searching&#x2026;":"Searching&#x2026;","Looking for the commit":"Looking for the commit"," authored by ${0} (${1})) on ${2}":" authored by ${0} (${1})) on ${2}","New Branch:":"New Branch:",OK:"OK"," [New branch]":" [New branch]","Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.":"Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.","Link Repository":"Link Repository","Folder name:":"Folder name:","Repository was linked to ":"Repository was linked to ",
"Checkout the current tag, creating a local branch based on its contents.":"Checkout the current tag, creating a local branch based on its contents.","Checking out tag ${0}":"Checking out tag ${0}","Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.":"Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.",
"Checking out branch...":"Checking out branch...","Checking out branch ${0}...":"Checking out branch ${0}...","Branch checked out.":"Branch checked out.","New Branch":"New Branch","Add a new local branch to the repository":"Add a new local branch to the repository","Branch name":"Branch name",Delete:"Delete","Delete the local branch from the repository":"Delete the local branch from the repository","Are you sure you want to delete branch ${0}?":"Are you sure you want to delete branch ${0}?","Delete the remote tracking branch from the repository":"Delete the remote tracking branch from the repository",
"Are you sure?":"Are you sure?","You're going to delete remote branch ${0} and push the change.":"You're going to delete remote branch ${0} and push the change.","Removing remote branch: ":"Removing remote branch: ","Delete Remote Branch":"Delete Remote Branch","New Remote":"New Remote","Git Remote":"Git Remote","Go to Git Remote":"Go to Git Remote","Add a new remote to the repository":"Add a new remote to the repository","Delete the remote from the repository":"Delete the remote from the repository",
"Are you sure you want to delete remote ${0}?":"Are you sure you want to delete remote ${0}?",Pull:"Pull","Pull from the repository":"Pull from the repository","Pulling : ":"Pulling : ","Pull Git Repository":"Pull Git Repository","Git Log":"Git Log","Go to Git Log":"Go to Git Log","Open the log for the branch":"Open the log for the branch","Open the log for the repository":"Open the log for the repository","Open the status for the repository":"Open the status for the repository","Show in Navigator":"Show in Navigator",
"Show the repository folder in the file navigator":"Show the repository folder in the file navigator","Compare With Each Other":"Compare With Each Other","Compare With Working Tree":"Compare With Working Tree",Open:"Open",Fetch:"Fetch","Fetch from the remote":"Fetch from the remote","SSH Password:":"SSH Password:","SSH User Name:":"SSH User Name:","Fetching remote: ":"Fetching remote: ","Force Fetch":"Force Fetch","Fetch from the remote branch into your remote tracking branch overriding its current content":"Fetch from the remote branch into your remote tracking branch overriding its current content",
"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.":"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.",Merge:"Merge","Merge the content from the branch to your active branch":"Merge the content from the branch to your active branch",". Go to ${0}.":". Go to ${0}.","Git Status page":"Git Status page",Rebase:"Rebase","Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ":"Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ",
"Rebase on top of ":"Rebase on top of ",". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing":". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing",". Repository state is invalid (i.e. already during rebasing)":". Repository state is invalid (i.e. already during rebasing)",". Repository contains unmerged paths":". Repository contains unmerged paths",". Repository contains pending changes. Please commit or stash them":". Repository contains pending changes. Please commit or stash them",
"Rebase your commits by removing them from the active branch, ":"Rebase your commits by removing them from the active branch, ","starting the active branch again based on the latest state of '":"starting the active branch again based on the latest state of '","and applying each commit again to the updated active branch.":"and applying each commit again to the updated active branch.","Push All":"Push All","Push commits and tags from your local branch into the remote branch":"Push commits and tags from your local branch into the remote branch",
"Pushing remote: ":"Pushing remote: ","Choose Branch":"Choose Branch","Force Push All":"Force Push All","Push commits and tags from your local branch into the remote branch overriding its current content":"Push commits and tags from your local branch into the remote branch overriding its current content","You're going to override content of the remote branch. This can cause the remote repository to lose commits.":"You're going to override content of the remote branch. This can cause the remote repository to lose commits.",
"< Previous Page":"< Previous Page","Show previous page of git log":"Show previous page of git log","Next Page >":"Next Page >","Show next page of git log":"Show next page of git log","Push to...":"Push to...","Push from your local branch into the selected remote branch":"Push from your local branch into the selected remote branch","Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.":"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",
"The content of your active branch will be replaced with ":"The content of your active branch will be replaced with ","All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?":"All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?","Resetting index...":"Resetting index...","Name:":"Name:",Tag:"Tag","Create a tag for the commit":"Create a tag for the commit","Tag name":"Tag name","Delete the tag from the repository":"Delete the tag from the repository",
"Are you sure you want to delete tag ${0}?":"Are you sure you want to delete tag ${0}?","Cherry-Pick":"Cherry-Pick","Apply the change introduced by the commit to your active branch":"Apply the change introduced by the commit to your active branch","Nothing changed.":"Nothing changed.",". Some conflicts occurred":". Some conflicts occurred","Fetch from the remote branch into your remote tracking branch":"Fetch from the remote branch into your remote tracking branch","Fetch Git Repository":"Fetch Git Repository",
Push:"Push","Push from your local branch into the remote branch":"Push from your local branch into the remote branch","Push Git Repository":"Push Git Repository","Key:":"Key:","Value:":"Value:","New Configuration Entry":"New Configuration Entry",Edit:"Edit","Edit the configuration entry":"Edit the configuration entry","Delete the configuration entry":"Delete the configuration entry","Are you sure you want to delete ${0}?":"Are you sure you want to delete ${0}?","Clone Repository":"Clone Repository",
"Clone an existing Git repository to a folder":"Clone an existing Git repository to a folder","Cloning repository: ":"Cloning repository: ","Init Repository":"Init Repository","Create a new Git repository in a new folder":"Create a new Git repository in a new folder","Initializing repository: ":"Initializing repository: ","Init Git Repository":"Init Git Repository","Delete the repository":"Delete the repository","Are you sure you want do delete ${0} repositories?":"Are you sure you want do delete ${0} repositories?",
"Apply a patch on the selected repository":"Apply a patch on the selected repository","Show content":"Show content","Commit name:":"Commit name:","Open Commit":"Open Commit","Open the commit with the given name":"Open the commit with the given name","No commits found":"No commits found","Staging changes":"Staging changes","Commit message:":"Commit message:","Committing changes":"Committing changes","Resetting local changes":"Resetting local changes","Checkout files, discarding all changes":"Checkout files, discarding all changes",
"Show Patch":"Show Patch","Show workspace changes as a patch":"Show workspace changes as a patch",Continue:"Continue","Contibue Rebase":"Contibue Rebase","Skip Patch":"Skip Patch",Abort:"Abort","Abort Rebase":"Abort Rebase","Your changes to the selected files will be discarded and cannot be recovered.":"Your changes to the selected files will be discarded and cannot be recovered.","Active Branch Log":"Git Log (Active Branch)","Show the log for the active local branch":"Show the log for the active local branch",
"Remote Branch Log":"Git Log (Remote Branch)","Show the log for the corresponding remote tracking branch":"Show the log for the corresponding remote tracking branch"});
define("orion/compare/diff-parser",[],function(){var c=c||{};c.DiffParser=function(){function c(d,g){this._lineDelimiter=d?d:a?"\r\n":"\n";this._diffLineDelimiter=g?g:this._lineDelimiter;this._DEBUG=!1}var a=navigator.platform.indexOf("Win")!==-1;c.prototype={_init:function(){this._oFileContents=[];this._diffContents=[];this._oBlocks=[];this._nBlocks=[];this._hunkRanges=[];this._lastToken=" ";this._deltaMap=[];this._nFileContents=[];this._nNewLineAtEnd=this._oNewLineAtEnd=!0;this._diffContentIndex=
1},setLineDelim:function(a){this._diffLineDelimiter=this._lineDelimiter=a},getDiffArray:function(){return{array:this._diffContents,index:this._diffContentIndex}},parse:function(a,c,e,i){this._init();if(c==="")return{outPutFile:a,mapper:[]};this._oFileContents=a===""?[]:a.split(this._lineDelimiter);this._diffContents=c.split(this._diffLineDelimiter);c=this._diffContents.length;this._hunkRanges=[];for(var h=0;h<c;h++){var f=this._parseHunkRange(h);f&&this._hunkRanges.push(f)}if(0===this._hunkRanges.length)return{outPutFile:a,
mapper:[]};if(this._DEBUG){console.log("***Diff contents: \n");for(a=0;a<this._diffContents.length;a++)console.log(this._diffContents[a]);console.log("***Hunk ranges: \n");console.log(JSON.stringify(this._hunkRanges))}for(a=0;a<this._hunkRanges.length;a++)this._parseHunkBlock(a);this._DEBUG&&(console.log("***Original Hunk range blocks: \n"),console.log(JSON.stringify(this._oBlocks)),console.log("***New Hunk range blocks: \n"),console.log(JSON.stringify(this._nBlocks)));this._buildMap(e);this._DEBUG&&
(console.log("***New Line at end of file(original): \n"),console.log(JSON.stringify(this._oNewLineAtEnd)),console.log("***New Line at end of file(new): \n"),console.log(JSON.stringify(this._nNewLineAtEnd)),console.log("***Mapper: \n"),this._logMap(),console.log("***Total line number in original file: "+this._oFileContents.length));(i===void 0||!i)&&this._buildNewFile();return{outPutFile:this._nFileContents.join(this._diffLineDelimiter),mapper:this._deltaMap}},_logMap:function(){for(var a=0;a<this._deltaMap.length;a++)if(console.log(JSON.stringify(this._deltaMap[a])),
this._deltaMap[a][2]>0){console.log("    **Diff content on change/add: \n");for(var c=0;c<this._deltaMap[a][0];c++)console.log("    "+this._diffContents[this._deltaMap[a][2]+c-1])}},_logNewFile:function(){for(var a=0;a<this._nFileContents.length;a++)console.log(this._nFileContents[a])},_createBlock:function(a,c,e,i){i===e&&a===" "||(e=[e,i-e,"s"],a==="-"?e[2]="r":a==="+"?e[2]="a":a==="c"&&(e[2]="c"),c.push(e))},_createMinusBlock:function(a,c,e){var i=this._oBlocks.length;i===0||a!==this._oBlocks[i-
1][0]?(this._oBlocks.push([a===0?1:a,e]),this._nBlocks.push([c,0,-2])):this._oBlocks[i-1][1]+=e},_createPlusBlock:function(a,c,e,i){var h=this._nBlocks.length;h===0||c!==this._nBlocks[h-1][0]?(this._oBlocks.push([a===0?1:a,0]),this._nBlocks.push([c,e,i])):(this._nBlocks[h-1][1]+=e,this._nBlocks[h-1][2]=i)},_parseHunkBlock:function(a){for(var c=" ",e=this._hunkRanges[a][0]+1,i=a===this._hunkRanges.length-1?this._diffContents.length:this._hunkRanges[a+1][0],h=0,f=0,j=this._hunkRanges[a][1],l=this._hunkRanges[a][3],
m=e,o=e;o<i;o++)if(0!==this._diffContents[o].length){var n=this._diffContents[o][0];if(n==="\\"&&("\\ No newline at end of file"===this._diffContents[o].substring(0,this._diffContents[o].length-1)||"\\ No newline at end of file"===this._diffContents[o]))c==="-"?this._oNewLineAtEnd=!1:c===" "?this._oNewLineAtEnd=this._nNewLineAtEnd=!1:this._nNewLineAtEnd=!1,o>e&&this._diffContents[o-1][this._diffContents[o-1].length-1]==="\r"&&(this._diffContents[o-1]=this._diffContents[o-1].substring(0,this._diffContents[o-
1].length-1));else{switch(n){case "-":case "+":case " ":break;default:continue}if(c!==n){n==="+"&&(m=o);switch(c){case " ":j=this._hunkRanges[a][1]+h;l=this._hunkRanges[a][3]+f;break;case "-":this._createMinusBlock(j,l,this._hunkRanges[a][1]+h-j);break;case "+":this._createPlusBlock(j,l,this._hunkRanges[a][3]+f-l,m)}c=n}switch(n){case "-":h++;break;case "+":f++;break;case " ":h++,f++}}}switch(c){case "-":this._createMinusBlock(j,l,this._hunkRanges[a][1]+h-j);break;case "+":this._createPlusBlock(j,
l,this._hunkRanges[a][3]+f-l,m)}},_detectConflictes:function(a,c){if(a<0)return!1;for(var e=a+c,i=a;i<e;i++){var h=this._diffContents[i];if(h.indexOf("<<<<<")>-1||h.indexOf(">>>>>")>-1)return!0}return!1},_buildMap:function(a){for(var c=this._oBlocks.length,e=this._oFileContents.length,i=0,h=1,f=0;f<c;f++)h=this._oBlocks[f][0]-h,h>0&&(this._deltaMap.push([h,h,0]),i+=h),a&&this._detectConflictes(this._nBlocks[f][2],this._nBlocks[f][1])?this._deltaMap.push([this._nBlocks[f][1],this._oBlocks[f][1],this._nBlocks[f][2]+
1,1]):this._deltaMap.push([this._nBlocks[f][1],this._oBlocks[f][1],this._nBlocks[f][2]+1]),i+=this._oBlocks[f][1],h=this._oBlocks[f][0]+this._oBlocks[f][1];0<e-h&&(this._deltaMap.push([e-h+1,e-h+1,0]),i+=e-h+1);i<e&&(h=e-i,a=this._deltaMap[this._deltaMap.length-1],a[2]===0?(a[0]+=h,a[1]+=h):a[2]===-1?this._deltaMap.push([h,h,0]):this._nNewLineAtEnd===this._oNewLineAtEnd?this._deltaMap.push([h,h,0]):(this._nNewLineAtEnd&&(a[0]+=h),this._oNewLineAtEnd&&(a[1]+=h)))},_buildNewFile:function(){for(var a=
1,c=!1,e=this._deltaMap.length,i=0;i<e;i++){c=!1;if(this._deltaMap[i][2]===0){for(var h=0;h<this._deltaMap[i][0];h++)this._nFileContents.push(this._oFileContents[a+h-1]);c=!0}else if(this._deltaMap[i][2]>0)for(h=0;h<this._deltaMap[i][0];h++)this._nFileContents.push(this._diffContents[this._deltaMap[i][2]+h-1].substring(1));a+=this._deltaMap[i][1]}this._nNewLineAtEnd&&!c&&this._nFileContents.push("")},_parseHRangeBody:function(a,c){if(0<a.indexOf(",")){var e=a.split(","),i=parseInt(e[0]),e=parseInt(e[1]);
c.push(i>=0?i:1);c.push(e>=0?e:1)}else i=parseInt(a),c.push(i>=0?i:1),c.push(1)},_parseHunkRange:function(a){var c=this._diffContents[a];if(!(8>c.length)&&"@@"===c.substring(0,2)){var c=c.substring(2),e=c.indexOf("@@");if(!(e<0)){var c=c.substring(0,e),e=c.indexOf("-"),i=c.indexOf("+");if(!(e<0||i<0))return a=[a],e<i?(c=c.substring(e+1).split("+"),this._parseHRangeBody(c[0],a),this._parseHRangeBody(c[1],a)):(c=c.substring(i+1).split("-"),this._parseHRangeBody(c[1],a),this._parseHRangeBody(c[0],a)),
a}}}};return c}();return c});define("orion/compare/nls/messages",["orion/i18n!orion/compare/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[a])});return f});
define("orion/compare/nls/root/messages",{"Copy current change from right to left":"Copy current change from right to left","Switch to unified diff":"Switch to unified diff",Unified:"Unified","Switch to side by side diff":"Switch to side by side diff","Side by side":"Side by side","Generate link of the current diff":"Generate link of the current diff","Generate Link":"Generate Link","Next diff block":"Next diff block","Previous diff block":"Previous diff block","Next diff change":"Next diff change",
"Previous diff change":"Previous diff change","Copy the link URL:":"Copy the link URL:",Compare:"Compare","Open the compare page":"Open the compare page","fetching...":"fetching...","There are unsaved changes.":"There are unsaved changes.","ERROR: ":"ERROR: ","Compare...":"Compare...","Line 0 : Col 0":"Line 0 : Col 0","No Matching DiffService for location:":"No Matching DiffService for location:"});
define("orion/textview/eventTarget",[],function(){function c(){}c.addMixin=function(f){var a=c.prototype,d;for(d in a)a.hasOwnProperty(d)&&(f[d]=a[d])};c.prototype={addEventListener:function(c,a,d){if(!this._eventTypes)this._eventTypes={};var g=this._eventTypes[c];g||(g=this._eventTypes[c]={level:0,listeners:[]});g.listeners.push({listener:a,useCapture:d})},dispatchEvent:function(c){if(this._eventTypes){var a=c.type,d=this._eventTypes[a];if(d){var g=d.listeners;try{if(d.level++,g)for(var e=0,i=g.length;e<
i;e++)if(g[e]){var h=g[e].listener;typeof h==="function"?h.call(this,c):h.handleEvent&&typeof h.handleEvent==="function"&&h.handleEvent(c)}}finally{if(d.level--,d.compact&&d.level===0){for(c=g.length-1;c>=0;c--)g[c]||g.splice(c,1);g.length===0&&delete this._eventTypes[a];d.compact=!1}}}}},isListening:function(c){return!this._eventTypes?!1:this._eventTypes[c]!==void 0},removeEventListener:function(c,a,d){if(this._eventTypes){var g=this._eventTypes[c];if(g){for(var e=g.listeners,i=0,h=e.length;i<h;i++){var k=
e[i];if(k&&k.listener===a&&k.useCapture===d){g.level!==0?(e[i]=null,g.compact=!0):e.splice(i,1);break}}e.length===0&&delete this._eventTypes[c]}}}};return{EventTarget:c}});define("orion/textview/i18n",{load:function(c,f,a){f.specified("orion/bootstrap")?f(["orion/i18n!"+c],function(d){a(d)}):a({})}});define("orion/editor/nls/messages",["orion/textview/i18n!orion/editor/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[a])});return f});
define("orion/editor/nls/root/messages",{Comment:"Comment",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",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/editor/contentAssist",["i18n!orion/editor/nls/messages","orion/textview/keyBinding","orion/textview/eventTarget"],function(c,f,a){var d,g,e;function i(a){this.textView=a;this.state=d;this.providers=[];var h=this;this.contentAssistListener={onModelChanging:function(a){h.isDeactivatingChange(a)?h.setState(d):h.state===g&&h.setState(e)},onScroll:function(){h.setState(d)},onSelection:function(){var a=h.state;if(a===g||a===e)h.computeProposals(),h.setState(e)}};var i=navigator.platform.indexOf("Mac")!==
-1;a.setKeyBinding(i?new f.KeyBinding(" ",!1,!1,!1,!0):new f.KeyBinding(" ",!0),"contentAssist");a.setAction("contentAssist",function(){h.activate();return!0},{name:c.contentAssist})}function h(a,d){this.contentAssist=a;this.widget=d;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,d){this.contentAssist=a;this.parentNode=typeof d==="string"?document.getElementById(d):
d;this.textView=this.contentAssist.getTextView();this.textViewListenerAdded=!1;var c=this;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})}var j=function(){function a(){}a.prototype.then=function(a){this.callback=a;if(this.result){var d=this;setTimeout(function(){d.callback(d.result)},0)}};a.prototype.done=function(a){this.result=a;this.callback&&this.callback(this.result)};return a}();d=1;g=2;e=3;i.prototype={apply:function(a){if(!a)return!1;
var c=this.textView.getCaretOffset(),e={proposal:a,start:c,end:c};this.setState(d);this.textView.setText(a.proposal||a,c,c);this.dispatchEvent({type:"ProposalApplied",data:e});return!0},activate:function(){this.state===d&&this.setState(g)},deactivate:function(){this.setState(d)},getTextView:function(){return this.textView},isActive:function(){return this.state===g||this.state===e},isDeactivatingChange:function(a){var d=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||d&&c},setState:function(a){var c;a===g?c="Activating":a===d&&(c="Deactivating");c&&this.dispatchEvent({type:c});this.state=a;this.onStateChange(a)},onStateChange:function(a){if(a===d){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===g){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(d){a.dispatchEvent({type:"ProposalsComputed",
data:{proposals:d}})})},getPrefixStart:function(a){for(;a>0&&/[A-Za-z0-9_]/.test(this.textView.getText(a-1,a));)a--;return a},_computeProposals:function(a){function d(a){a&&(e=e.concat(a));++g===i.length&&h.done(e)}function c(){++g===i.length&&h.done(e)}for(var e=[],g=0,h=new j,i=this.providers,f=this.textView,k=f.getModel(),t=f.getText(),f={line:k.getLine(k.getLineAtOffset(a)),prefix:f.getText(this.getPrefixStart(a),a),selection:f.getSelection()},k=0;k<i.length;k++){var v=i[k],x=v.getProposals;if(typeof v.computeProposals===
"function")x=v.computeProposals;(v=x.apply(v,[t,a,f]))&&v.then?v.then(d,c):d(v)}return h},setProviders:function(a){this.providers=a.slice(0)}};a.EventTarget.addMixin(i.prototype);h.prototype={cancel:function(){this.getContentAssist().deactivate()},getContentAssist:function(){return this.contentAssist},isActive:function(){return this.getContentAssist().isActive()},lineUp:function(){this.selectedIndex=this.selectedIndex===0?this.proposals.length-1:this.selectedIndex-1;this.widget&&this.widget.setSelectedIndex(this.selectedIndex);
return!0},lineDown:function(){this.selectedIndex=this.selectedIndex===this.proposals.length-1?0:this.selectedIndex+1;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,
d,c,e){var g=document.createElement("div");g.id="contentoption"+e;g.setAttribute("role","option");if(d)g.className="selected",this.parentNode.setAttribute("aria-activedescendant",g.id);a=document.createTextNode(a);g.appendChild(a,g);c.appendChild(g)},createAccessible:function(a){this._isAccessible||this.parentNode.addEventListener("keydown",function(d){d.preventDefault();if(d.keyCode===27)return a.cancel();else if(d.keyCode===38)return a.lineUp();else if(d.keyCode===40)return a.lineDown();else if(d.keyCode===
13)return a.enter();return!1});this._isAccessible=!0},getDisplayString:function(a){return typeof a==="string"?a:a.description&&typeof a.description==="string"?a.description:a.proposal},getProposal:function(a){for(var d=0,c=this.parentNode.firstChild;c!==null;c=c.nextSibling){if(c===a)return this.proposals[d]||null;d++}return null},setSelectedIndex:function(a){this.selectedIndex=a;this.selectNode(this.parentNode.childNodes[this.selectedIndex])},selectNode:function(a){for(var d=this.parentNode.childNodes,
c=0;c<d.length;c++){var e=d[c];if(e.className==="selected")e.className="";if(e===a)e.className="selected",this.parentNode.setAttribute("aria-activedescendant",e.id),e.focus(),e.offsetTop<this.parentNode.scrollTop?e.scrollIntoView(!0):e.offsetTop+e.offsetHeight>this.parentNode.scrollTop+this.parentNode.clientHeight&&e.scrollIntoView(!1)}},setProposals:function(a){this.proposals=a},show:function(){if(this.proposals.length===0)this.hide();else{var a=this.textView.getLocationAtOffset(this.textView.getCaretOffset());
a.y+=this.textView.getLineHeight();this.parentNode.innerHTML="";for(var d=0;d<this.proposals.length;d++)this.createDiv(this.getDisplayString(this.proposals[d]),d===0,this.parentNode,d);this.textView.convert(a,"document","page");this.parentNode.style.position="absolute";this.parentNode.style.left=a.x+"px";this.parentNode.style.top=a.y+"px";this.parentNode.style.display="block";this.parentNode.scrollTop=0;d=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>d)this.parentNode.style.left=d-this.parentNode.offsetWidth+"px";this.parentNode.onclick=this.onClick.bind(this)}},hide:function(){document.activeElement===this.parentNode&&this.textView.focus();this.parentNode.style.display="none";this.parentNode.onclick=null}};return{ContentAssist:i,ContentAssistMode:h,ContentAssistWidget:k}});
define("orion/textview/undoStack",[],function(){function c(a,c,e){this.offset=a;this.text=c;this.previousText=e}function f(){this.changes=[]}function a(a,c){this.view=a;this.size=c!==void 0?c:100;this.reset();var e=a.getModel();e.getBaseModel&&(e=e.getBaseModel());this.model=e;var i=this;this._listener={onChanging:function(a){i._onChanging(a)},onDestroy:function(a){i._onDestroy(a)}};e.addEventListener("Changing",this._listener.onChanging);a.addEventListener("Destroy",this._listener.onDestroy)}c.prototype=
{undo:function(a,c){this._doUndoRedo(this.offset,this.previousText,this.text,a,c)},redo:function(a,c){this._doUndoRedo(this.offset,this.text,this.previousText,a,c)},_doUndoRedo:function(a,c,e,i,h){var f=i.getModel();if(f.mapOffset&&i.annotationModel){var j=f.mapOffset(a,!0);if(j<0)for(var l=i.annotationModel.getAnnotations(a,a+1);l.hasNext();){var m=l.next();if(m.type==="orion.annotation.folding"){m.expand();j=f.mapOffset(a,!0);break}}if(j<0)return;a=j}i.setText(c,a,a+e.length);h&&i.setSelection(a,
a+c.length)}};f.prototype={add:function(a){this.changes.push(a)},end:function(a){this.endSelection=a.getSelection();this.endCaret=a.getCaretOffset()},undo:function(a,c){for(var e=this.changes.length-1;e>=0;e--)this.changes[e].undo(a,!1);if(c){var e=this.startSelection.start,i=this.startSelection.end;a.setSelection(this.startCaret?e:i,this.startCaret?i:e)}},redo:function(a,c){for(var e=0;e<this.changes.length;e++)this.changes[e].redo(a,!1);if(c){var e=this.endSelection.start,i=this.endSelection.end;
a.setSelection(this.endCaret?e:i,this.endCaret?i:e)}},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,c=this.stack.length;this._undoStart!==void 0&&a++;return{undo:a,redo:c-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 c(this._undoStart,"",this._undoText)):this.add(new c(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 g=a.text,e=a.start,i=a.removedCharCount,a=a.addedCharCount;if(!this._ignoreUndo){this._undoStart!==void 0&&!(a===1&&i===0&&this._undoType===
1&&e===this._undoStart+this._undoText.length||a===0&&i===1&&this._undoType===-1&&(e+1===this._undoStart||e===this._undoStart))&&this._commitUndo();if(!this.compoundChange)if(a===1&&i===0){if(this._undoStart===void 0)this._undoStart=e;this._undoText+=g;this._undoType=1;return}else if(a===0&&i===1){g=this._undoText.length>0&&this._undoStart===e;this._undoStart=e;this._undoType=-1;g?this._undoText+=this.model.getText(e,e+i):this._undoText=this.model.getText(e,e+i)+this._undoText;return}this.add(new c(e,
g,this.model.getText(e,e+i)))}}};return{UndoStack:a}});define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[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"});
define("orion/textview/nls/messages",["orion/textview/i18n!orion/textview/nls/messages"],function(c){var f={root:!0};Object.keys(c).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=c[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(c,f){function a(a,c,d){this.start=a;this.end=c;this._projectionModel=d;this.html=this._expandedHTML;this.style=this._expandedStyle;this.expanded=!0}function d(){}function g(a,e){var g=a.lastIndexOf("."),g=a.substring(g+1),h={title:c[g],style:{styleClass:"annotation "+g},html:"<div class='annotationHTML "+g+"'></div>",overviewStyle:{styleClass:"annotationOverview "+g}};e?h.lineStyle={styleClass:"annotationLine "+
g}:h.rangeStyle={styleClass:"annotationRange "+g};d.registerType(a,h)}function e(){}function i(a){this._annotations=[];var c=this;this._listener={onChanged:function(a){c._onChanged(a)}};this.setTextModel(a)}function h(a,c){this._view=a;this._annotationModel=c;var d=this;this._listener={onDestroy:function(a){d._onDestroy(a)},onLineStyle:function(a){d._onLineStyle(a)},onChanged:function(a){d._onAnnotationModelChanged(a)}};a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("LineStyle",
this._listener.onLineStyle);c.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,c=a.getBaseModel();this._projection=
{start:c.getLineStart(c.getLineAtOffset(this.start)+1),end:c.getLineEnd(c.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)}};d.ANNOTATION_ERROR="orion.annotation.error";d.ANNOTATION_WARNING="orion.annotation.warning";d.ANNOTATION_TASK="orion.annotation.task";d.ANNOTATION_BREAKPOINT="orion.annotation.breakpoint";
d.ANNOTATION_BOOKMARK="orion.annotation.bookmark";d.ANNOTATION_FOLDING="orion.annotation.folding";d.ANNOTATION_CURRENT_BRACKET="orion.annotation.currentBracket";d.ANNOTATION_MATCHING_BRACKET="orion.annotation.matchingBracket";d.ANNOTATION_CURRENT_LINE="orion.annotation.currentLine";d.ANNOTATION_CURRENT_SEARCH="orion.annotation.currentSearch";d.ANNOTATION_MATCHING_SEARCH="orion.annotation.matchingSearch";var k={};d.registerType=function(a,c){var d=c;if(typeof d!=="function")d=function(a,c,d){this.start=
a;this.end=c;if(d)this.title=d},d.prototype=c;d.prototype.type=a;k[a]=d;return a};d.createAnnotation=function(a,c,d,e){return new (this.getType(a))(c,d,e)};d.getType=function(a){return k[a]};g(d.ANNOTATION_ERROR);g(d.ANNOTATION_WARNING);g(d.ANNOTATION_TASK);g(d.ANNOTATION_BREAKPOINT);g(d.ANNOTATION_BOOKMARK);g(d.ANNOTATION_CURRENT_BRACKET);g(d.ANNOTATION_MATCHING_BRACKET);g(d.ANNOTATION_CURRENT_SEARCH);g(d.ANNOTATION_MATCHING_SEARCH);g(d.ANNOTATION_CURRENT_LINE,!0);d.registerType(d.ANNOTATION_FOLDING,
a);e.addMixin=function(a){var c=e.prototype,d;for(d in c)c.hasOwnProperty(d)&&(a[d]=c[d])};e.prototype={addAnnotationType:function(a){if(!this._annotationTypes)this._annotationTypes=[];this._annotationTypes.push(a)},getAnnotationTypePriority:function(a){if(this._annotationTypes)for(var c=0;c<this._annotationTypes.length;c++)if(this._annotationTypes[c]===a)return c+1;return 0},getAnnotationsByType:function(a,c,d){a=a.getAnnotations(c,d);for(d=[];a.hasNext();)c=a.next(),this.getAnnotationTypePriority(c.type)!==
0&&d.push(c);var e=this;d.sort(function(a,c){return e.getAnnotationTypePriority(a.type)-e.getAnnotationTypePriority(c.type)});return d},isAnnotationTypeVisible:function(a){return this.getAnnotationTypePriority(a)!==0},removeAnnotationType:function(a){if(this._annotationTypes)for(var c=0;c<this._annotationTypes.length;c++)if(this._annotationTypes[c]===a){this._annotationTypes.splice(c,1);break}}};i.prototype={addAnnotation:function(a){if(a){var c=this._annotations,d=this._binarySearch(c,a.start);c.splice(d,
0,a);this.onChanged({type:"Changed",added:[a],removed:[],changed:[]})}},getTextModel:function(){return this._model},getAnnotations:function(a,c){var d=this._annotations,e,g=0,h=function(){for(;g<d.length;){var e=d[g++];if(a===e.start||(a>e.start?a<e.end:e.start<c))return e;if(e.start>=c)break}return null};e=h();return{next:function(){var a=e;a&&(e=h());return a},hasNext:function(){return e!==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 c=this._annotations,d,e;if(a){d=[];for(e=c.length-1;e>=0;e--){var g=c[e];g.type===a&&c.splice(e,1);d.splice(0,0,g)}}else d=c;this.onChanged({type:"Changed",removed:d,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,
c){var d=this._annotations,e,g,h,i=[];if(a)for(e=a.length-1;e>=0;e--)h=a[e],g=this._getAnnotationIndex(h),g<0||(d.splice(g,1),i.splice(0,0,h));c||(c=[]);for(e=0;e<c.length;e++)h=c[e],g=this._binarySearch(d,h.start),d.splice(g,0,h);this.onChanged({type:"Changed",removed:i,added:c,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,
c){for(var d=a.length,e=-1,g;d-e>1;)g=Math.floor((d+e)/2),c<=a[g].start?d=g:e=g;return d},_getAnnotationIndex:function(a){for(var c=this._annotations,d=this._binarySearch(c,a.start);d<c.length&&c[d].start===a.start;){if(c[d]===a)return d;d++}return-1},_onChanged:function(a){var c=a.start,d=a.removedCharCount,e=this._annotations,g=c+d;if(0<e.length){for(var h={type:"Changed",added:[],removed:[],changed:[],textModelChangedEvent:a},a=a.addedCharCount-d,d=0;d<e.length;d++){var i=e[d];i.start>=g?(i.start+=
a,i.end+=a,h.changed.push(i)):i.end<=c||(i.start<c&&g<i.end?(i.end+=a,h.changed.push(i)):(e.splice(d,1),h.removed.push(i),d--))}if(h.added.length>0||h.removed.length>0||h.changed.length>0)this.onChanged(h)}}};f.EventTarget.addMixin(i.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,c){if(c){a||(a={});a.styleClass&&c.styleClass&&a.styleClass!==c.styleClass?a.styleClass+=" "+c.styleClass:a.styleClass=c.styleClass;var d;if(c.style){if(!a.style)a.style={};for(d in c.style)a.style[d]||(a.style[d]=c.style[d])}if(c.attributes){if(!a.attributes)a.attributes={};for(d in c.attributes)a.attributes[d]||(a.attributes[d]=c.attributes[d])}}return a},_mergeStyleRanges:function(a,c){a||(a=[]);var d,e;for(e=0;e<a.length&&c;e++){var g=a[e];if(c.end<=g.start)break;if(!(c.start>=
g.end)){d=this._mergeStyle({},g.style);d=this._mergeStyle(d,c.style);var h=[];h.push(e,1);c.start<g.start&&h.push({start:c.start,end:g.start,style:c.style});c.start>g.start&&h.push({start:g.start,end:c.start,style:g.style});h.push({start:Math.max(g.start,c.start),end:Math.min(g.end,c.end),style:d});c.end<g.end&&h.push({start:c.end,end:g.end,style:g.style});c=c.end>g.end?{start:g.end,end:c.end,style:c.style}:null;Array.prototype.splice.apply(a,h)}}c&&(d=this._mergeStyle({},c.style),a.splice(e,0,{start:c.start,
end:c.end,style:d}));return a},_onAnnotationModelChanged:function(a){function c(a){for(var h=0;h<a.length;h++)if(e.isAnnotationTypeVisible(a[h].type)){var i=a[h].start,f=a[h].end;g.getBaseModel&&(i=g.mapOffset(i,!0),f=g.mapOffset(f,!0));i!==-1&&f!==-1&&d.redrawRange(i,f)}}if(!a.textModelChangedEvent){var d=this._view;if(d){var e=this,g=d.getModel();c(a.added);c(a.removed);c(a.changed)}}},_onDestroy:function(){this.destroy()},_onLineStyle:function(a){var c=this._annotationModel,d=a.textView.getModel(),
e=c.getTextModel(),g=a.lineStart,h=a.lineStart+a.lineText.length;e!==d&&(g=d.mapOffset(g),h=d.mapOffset(h));for(c=c.getAnnotations(g,h);c.hasNext();)if(g=c.next(),this.isAnnotationTypeVisible(g.type)){if(g.rangeStyle){var h=g.start,i=g.end;e!==d&&(h=d.mapOffset(h,!0),i=d.mapOffset(i,!0));a.ranges=this._mergeStyleRanges(a.ranges,{start:h,end:i,style:g.rangeStyle})}if(g.lineStyle)a.style=this._mergeStyle({},a.style),a.style=this._mergeStyle(a.style,g.lineStyle)}}};e.addMixin(h.prototype);return{FoldingAnnotation:a,
AnnotationType:d,AnnotationTypeList:e,AnnotationModel:i,AnnotationStyler:h}});define("orion/textview/i18nUtil",[],function(){return{formatMessage:function(c){var f=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(a,c){return f[(c<<0)+1]})}}});
define("orion/textview/textDND",[],function(){function c(c,a){this._view=c;this._undoStack=a;this._dragSelection=null;this._dropOffset=-1;this._dropText=null;var d=this;this._listener={onDragStart:function(a){d._onDragStart(a)},onDragEnd:function(a){d._onDragEnd(a)},onDragEnter:function(a){d._onDragEnter(a)},onDragOver:function(a){d._onDragOver(a)},onDrop:function(a){d._onDrop(a)},onDestroy:function(a){d._onDestroy(a)}};c.addEventListener("DragStart",this._listener.onDragStart);c.addEventListener("DragEnd",
this._listener.onDragEnd);c.addEventListener("DragEnter",this._listener.onDragEnter);c.addEventListener("DragOver",this._listener.onDragOver);c.addEventListener("Drop",this._listener.onDrop);c.addEventListener("Destroy",this._listener.onDestroy)}c.prototype={destroy:function(){var c=this._view;if(c)c.removeEventListener("DragStart",this._listener.onDragStart),c.removeEventListener("DragEnd",this._listener.onDragEnd),c.removeEventListener("DragEnter",this._listener.onDragEnter),c.removeEventListener("DragOver",
this._listener.onDragOver),c.removeEventListener("Drop",this._listener.onDrop),c.removeEventListener("Destroy",this._listener.onDestroy),this._view=null},_onDestroy:function(){this.destroy()},_onDragStart:function(c){var a=this._view,d=a.getSelection(),a=a.getModel();if(a.getBaseModel)d.start=a.mapOffset(d.start),d.end=a.mapOffset(d.end),a=a.getBaseModel();if(a=a.getText(d.start,d.end))this._dragSelection=d,c.event.dataTransfer.effectAllowed="copyMove",c.event.dataTransfer.setData("Text",a)},_onDragEnd:function(c){var a=
this._view;if(this._dragSelection){this._undoStack&&this._undoStack.startCompoundChange();(c=c.event.dataTransfer.dropEffect==="move")&&a.setText("",this._dragSelection.start,this._dragSelection.end);if(this._dropText){var d=this._dropText,g=this._dropOffset;if(c)if(g>=this._dragSelection.end)g-=this._dragSelection.end-this._dragSelection.start;else if(g>=this._dragSelection.start)g=this._dragSelection.start;a.setText(d,g,g);a.setSelection(g,g+d.length);this._dropText=null;this._dropOffset=-1}this._undoStack&&
this._undoStack.endCompoundChange()}this._dragSelection=null},_onDragEnter:function(c){this._onDragOver(c)},_onDragOver:function(c){var a=c.event.dataTransfer.types;if(a&&!(a.contains?a.contains("text/plain"):a.indexOf("text/plain")!==-1))c.event.dataTransfer.dropEffect="none"},_onDrop:function(c){var a=this._view,d=c.event.dataTransfer.getData("Text");if(d)c=a.getOffsetAtLocation(c.x,c.y),this._dragSelection?(this._dropOffset=c,this._dropText=d):(a.setText(d,c,c),a.setSelection(c,c+d.length))}};
return{TextDND:c}});
define("orion/textview/textModel",["orion/textview/eventTarget"],function(c){function f(a,c){this._lastLineIndex=-1;this._text=[""];this._lineOffsets=[0];this.setText(a);this.setLineDelimiter(c)}var a=window.navigator.platform.indexOf("Win")!==-1;f.prototype={find:function(a){if(this._text.length>1)this._text=[this._text.join("")];var c=a.string,e=c;!a.regex&&c&&(e=c.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"));var i=null,h;if(e){var c=a.reverse,f=a.wrap,j=a.wholeWord,l=a.caseInsensitive,m=a.start||
0,o=a.end,a=a.end!==void 0,n="";n.indexOf("g")===-1&&(n+="g");l&&n.indexOf("i")===-1&&(n+="i");j&&(e="\\b"+e+"\\b");var p=this._text[0],q,r,s=0;a&&(p=p.substring(m,o),s=m);var u=RegExp(e,n);if(c)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<m)){if(!f||a)break;m=p.length}a={start:q.index+s,end:u.lastIndex+s}}else break}if(a)m=a.start;return a};else{if(!a)u.lastIndex=m;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&&f))break}return null}}i=h()}return{next:function(){var a=i;a&&(i=h());return a},hasNext:function(){return i!==null}}},getCharCount:function(){for(var a=0,c=0;c<this._text.length;c++)a+=this._text[c].length;return a},getLine:function(a,c){var e=this.getLineCount();if(!(0<=a&&a<e))return null;var i=this._lineOffsets[a];if(a+1<e){e=this.getText(i,this._lineOffsets[a+1]);if(c)return e;for(var i=e.length,h;(h=e.charCodeAt(i-1))===10||h===13;)i--;
return e.substring(0,i)}else return this.getText(i)},getLineAtOffset:function(a){var c=this.getCharCount();if(!(0<=a&&a<=c))return-1;var e=this.getLineCount();if(a===c)return e-1;var i,h,f=this._lastLineIndex;if(0<=f&&f<e&&(i=this._lineOffsets[f],h=f+1<e?this._lineOffsets[f+1]:c,i<=a&&a<h))return f;for(var j=e,l=-1;j-l>1;)if(f=Math.floor((j+l)/2),i=this._lineOffsets[f],h=f+1<e?this._lineOffsets[f+1]:c,a<=i)j=f;else if(a<h){j=f;break}else l=f;return this._lastLineIndex=j},getLineCount:function(){return this._lineOffsets.length},
getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(a,c){var e=this.getLineCount();if(!(0<=a&&a<e))return-1;if(a+1<e){e=this._lineOffsets[a+1];if(c)return e;for(var i=this.getText(Math.max(this._lineOffsets[a],e-2),e),h=i.length,f;(f=i.charCodeAt(h-1))===10||f===13;)h--;return e-(i.length-h)}else return this.getCharCount()},getLineStart:function(a){return!(0<=a&&a<this.getLineCount())?-1:this._lineOffsets[a]},getText:function(a,c){a===void 0&&(a=0);c===void 0&&(c=this.getCharCount());
if(a===c)return"";for(var e=0,i=0,h;i<this._text.length;){h=this._text[i].length;if(a<=e+h)break;e+=h;i++}for(var f=e,j=i;i<this._text.length;){h=this._text[i].length;if(c<=e+h)break;e+=h;i++}if(j===i)return this._text[j].substring(a-f,c-e);f=this._text[j].substring(a-f);e=this._text[i].substring(0,c-e);return f+this._text.slice(j+1,i).join("")+e},onChanging:function(a){return this.dispatchEvent(a)},onChanged:function(a){return this.dispatchEvent(a)},setLineDelimiter:function(c){c==="auto"&&(c=void 0,
this.getLineCount()>1&&(c=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0))));this._lineDelimiter=c?c:a?"\r\n":"\n"},setText:function(a,c,e){a===void 0&&(a="");c===void 0&&(c=0);e===void 0&&(e=this.getCharCount());if(!(c===e&&a==="")){for(var i=this.getLineAtOffset(c),h=this.getLineAtOffset(e),f=c,j=e-c,l=h-i,m=a.length,o=0,n=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(c+r);o++}this.onChanging({type:"Changing",text:a,start:f,removedCharCount:j,addedCharCount:m,removedLineCount:l,addedLineCount:o});s.length===0&&(p=this.getLineStart(i),h=h+1<n?this.getLineStart(h+1):this.getCharCount(),c!==p&&(a=this.getText(p,c)+a,c=p),e!==h&&(a+=this.getText(e,h),e=h));h=m-j;for(p=i+l+1;p<n;p++)this._lineOffsets[p]+=h;i=[i+1,l].concat(s);Array.prototype.splice.apply(this._lineOffsets,i);for(h=s=0;h<this._text.length;){p=this._text[h].length;if(c<=
s+p)break;s+=p;h++}n=s;for(i=h;h<this._text.length;){p=this._text[h].length;if(e<=s+p)break;s+=p;h++}p=this._text[h];c=this._text[i].substring(0,c-n);e=p.substring(e-s);i=[i,h-i+1];c&&i.push(c);a&&i.push(a);e&&i.push(e);Array.prototype.splice.apply(this._text,i);if(this._text.length===0)this._text=[""];this.onChanged({type:"Changed",start:f,removedCharCount:j,addedCharCount:m,removedLineCount:l,addedLineCount:o})}}};c.EventTarget.addMixin(f.prototype);return{TextModel:f}});
define("orion/textview/projectionTextModel",["orion/textview/textModel","orion/textview/eventTarget"],function(c,f){function a(a){this._model=a;this._projections=[]}a.prototype={addProjection:function(a){if(a){var g=this._model,e=this._projections;a._lineIndex=g.getLineAtOffset(a.start);a._lineCount=g.getLineAtOffset(a.end)-a._lineIndex;var i=a.text;i||(i="");a._model=typeof i==="string"?new c.TextModel(i,g.getLineDelimiter()):i;var g=this.mapOffset(a.start,!0),i=a.end-a.start,h=a._lineCount,f=a._model.getCharCount(),
j=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:a._model.getText(),start:g,removedCharCount:i,addedCharCount:f,removedLineCount:h,addedLineCount:j});var l=this._binarySearch(e,a.start);e.splice(l,0,a);this.onChanged({type:"Changed",start:g,removedCharCount:i,addedCharCount:f,removedLineCount:h,addedLineCount:j})}},getProjections:function(){return this._projections.slice(0)},getBaseModel:function(){return this._model},mapOffset:function(a,c){var e=this._projections,i=0,h,f;if(c){for(h=
0;h<e.length;h++){f=e[h];if(f.start>a)break;if(f.end>a)return-1;i+=f._model.getCharCount()-(f.end-f.start)}return a+i}for(h=0;h<e.length;h++){f=e[h];if(f.start>a-i)break;var j=f._model.getCharCount();if(f.start+j>a-i)return-1;i+=j-(f.end-f.start)}return a-i},removeProjection:function(a){var c,e=0;for(c=0;c<this._projections.length;c++){var i=this._projections[c];if(i===a){a=i;break}e+=i._model.getCharCount()-(i.end-i.start)}if(c<this._projections.length){var i=this._model,e=a.start+e,h=a.end-a.start,
f=a._lineCount,j=a._model.getCharCount(),l=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:i.getText(a.start,a.end),start:e,removedCharCount:j,addedCharCount:h,removedLineCount:l,addedLineCount:f});this._projections.splice(c,1);this.onChanged({type:"Changed",start:e,removedCharCount:j,addedCharCount:h,removedLineCount:l,addedLineCount:f})}},_binarySearch:function(a,c){for(var e=a.length,i=-1,h;e-i>1;)h=Math.floor((e+i)/2),c<=a[h].start?e=h:i=h;return e},getCharCount:function(){for(var a=
this._model.getCharCount(),c=this._projections,e=0;e<c.length;e++){var i=c[e];a+=i._model.getCharCount()-(i.end-i.start)}return a},getLine:function(a,c){if(a<0)return null;var e=this._model,i=this._projections,h=0,f=[],j=0,l,m,o;for(l=0;l<i.length;l++){o=i[l];if(o._lineIndex>=a-h)break;m=o._model.getLineCount()-1;if(o._lineIndex+m>=a-h)if(j=a-(o._lineIndex+h),j<m)return o._model.getLine(j,c);else f.push(o._model.getLine(m));j=o.end;h+=m-o._lineCount}for(j=Math.max(j,e.getLineStart(a-h));l<i.length;l++){o=
i[l];if(o._lineIndex>a-h)break;f.push(e.getText(j,o.start));m=o._model.getLineCount()-1;if(o._lineIndex+m>a-h)return f.push(o._model.getLine(0,c)),f.join("");f.push(o._model.getText());j=o.end;h+=m-o._lineCount}i=e.getLineEnd(a-h,c);j<i&&f.push(e.getText(j,i));return f.join("")},getLineAtOffset:function(a){for(var c=this._model,e=this._projections,i=0,h=0,f=0;f<e.length;f++){var j=e[f];if(j.start>a-i)break;var l=j._model.getCharCount();if(j.start+l>a-i){e=a-(j.start+i);h+=j._model.getLineAtOffset(e);
i+=e;break}h+=j._model.getLineCount()-1-j._lineCount;i+=l-(j.end-j.start)}return c.getLineAtOffset(a-i)+h},getLineCount:function(){for(var a=this._projections,c=this._model.getLineCount(),e=0;e<a.length;e++){var i=a[e];c+=i._model.getLineCount()-1-i._lineCount}return c},getLineDelimiter:function(){return this._model.getLineDelimiter()},getLineEnd:function(a,c){if(a<0)return-1;for(var e=this._model,i=this._projections,h=0,f=0,j=0;j<i.length;j++){var l=i[j];if(l._lineIndex>a-h)break;var m=l._model.getLineCount()-
1;if(l._lineIndex+m>a-h)return l._model.getLineEnd(a-(l._lineIndex+h),c)+l.start+f;f+=l._model.getCharCount()-(l.end-l.start);h+=m-l._lineCount}return e.getLineEnd(a-h,c)+f},getLineStart:function(a){if(a<0)return-1;for(var c=this._model,e=this._projections,i=0,h=0,f=0;f<e.length;f++){var j=e[f];if(j._lineIndex>=a-i)break;var l=j._model.getLineCount()-1;if(j._lineIndex+l>=a-i)return j._model.getLineStart(a-(j._lineIndex+i))+j.start+h;h+=j._model.getCharCount()-(j.end-j.start);i+=l-j._lineCount}return c.getLineStart(a-
i)+h},getText:function(a,c){a===void 0&&(a=0);var e=this._model,i=this._projections,h=0,f=[],j,l,m;for(j=0;j<i.length;j++){l=i[j];if(l.start>a-h)break;m=l._model.getCharCount();if(l.start+m>a-h)if(c!==void 0&&l.start+m>c-h)return l._model.getText(a-(l.start+h),c-(l.start+h));else f.push(l._model.getText(a-(l.start+h))),a=l.end+h+m-(l.end-l.start);h+=m-(l.end-l.start)}var o=a-h;if(c!==void 0){for(;j<i.length;j++){l=i[j];if(l.start>c-h)break;f.push(e.getText(o,l.start));m=l._model.getCharCount();if(l.start+
m>c-h)return f.push(l._model.getText(0,c-(l.start+h))),f.join("");f.push(l._model.getText());o=l.end;h+=m-(l.end-l.start)}f.push(e.getText(o,c-h))}else{for(;j<i.length;j++)l=i[j],f.push(e.getText(o,l.start)),f.push(l._model.getText()),o=l.end;f.push(e.getText(o))}return f.join("")},_onChanging:function(a,c,e,i,h,f){for(var j=this._model,l=this._projections,m,o=0,n,p=c+e;m<l.length;m++){e=l[m];if(e.start>c)break;o+=e._model.getCharCount()-(e.end-e.start)}c+=o;for(var q=m;m<l.length;m++){e=l[m];if(e.start>
p)break;o+=e._model.getCharCount()-(e.end-e.start);n+=e._model.getLineCount()-1-e._lineCount}e=p+o;o=m;this.onChanging(c,e-c,i,h+n,f);l.splice(l,o-q);for(a=a.length-(e-c);m<l.length;m++)e=l[m],e.start+=a,e.end+=a,e._lineIndex=j.getLineAtOffset(e.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,c,e){a===void 0&&(a="");c===void 0&&(c=0);var i=c,h=e,f=this._model,
j=this._projections,l=0,m=0,o,n,p,q,r,s=0;for(o=0;o<j.length;o++){n=j[o];if(n.start>c-l)break;p=n._model.getCharCount();if(n.start+p>c-l)if(e!==void 0&&n.start+p>e-l){n._model.setText(a,c-(n.start+l),e-(n.start+l));return}else s=n._model.getLineCount()-1-n._model.getLineAtOffset(c-(n.start+l)),q={projection:n,start:c-(n.start+l)},c=n.end+l+p-(n.end-n.start);m+=n._model.getLineCount()-1-n._lineCount;l+=p-(n.end-n.start)}c-=l;var u=o,s=f.getLineAtOffset(c)+m-s;if(e!==void 0)for(;o<j.length;o++){n=j[o];
if(n.start>e-l)break;p=n._model.getCharCount();if(n.start+p>e-l){m+=n._model.getLineAtOffset(e-(n.start+l));p=e-(n.start+l);e=n.end+l;r={projection:n,end:p};break}m+=n._model.getLineCount()-1-n._lineCount;l+=p-(n.end-n.start)}else{for(;o<j.length;o++)n=j[o],m+=n._model.getLineCount()-1-n._lineCount,l+=n._model.getCharCount()-(n.end-n.start);e=h=f.getCharCount()+l}e-=l;n=f.getLineAtOffset(e)+m;h-=i;for(var m=n-s,s=a.length,t=p=n=l=0;;){n!==-1&&n<=t&&(n=a.indexOf("\r",t));p!==-1&&p<=t&&(p=a.indexOf("\n",
t));if(p===-1&&n===-1)break;t=n!==-1&&p!==-1?n+1===p?p+1:(n<p?n:p)+1:n!==-1?n+1:p+1;l++}this.onChanging({type:"Changing",text:a,start:i,removedCharCount:h,addedCharCount:s,removedLineCount:m,addedLineCount:l});f.setText(a,c,e);if(q)n=q.projection,n._model.setText("",q.start);if(r)n=r.projection,n._model.setText("",0,r.end),n.start=n.end,n._lineCount=0;j.splice(u,o-u);for(a=a.length-(e-c);o<j.length;o++)n=j[o],n.start+=a,n.end+=a,n._lineIndex=f.getLineAtOffset(n.start);this.onChanged({type:"Changed",
start:i,removedCharCount:h,addedCharCount:s,removedLineCount:m,addedLineCount:l})}};f.EventTarget.addMixin(a.prototype);return{ProjectionTextModel:a}});
define("orion/textview/textView",["orion/textview/textModel","orion/textview/keyBinding","orion/textview/eventTarget"],function(c,f,a){function d(a,c,d,e){typeof a.addEventListener==="function"?a.addEventListener(c,d,e===!0):a.attachEvent("on"+c,d)}function g(a,c,d){this.start=a;this.end=c;this.caret=d}function e(a){this._init(a)}var i=navigator.userAgent,h;document.selection&&window.ActiveXObject&&/MSIE/.test(i)&&(h=document.documentMode?document.documentMode:7);var k=parseFloat(i.split("Firefox/")[1]||
i.split("Minefield/")[1])||void 0,j=i.indexOf("Opera")!==-1,l=i.indexOf("Chrome")!==-1,m=i.indexOf("Safari")!==-1&&!l,o=i.indexOf("WebKit")!==-1,n=i.indexOf("iPad")!==-1,p=navigator.platform.indexOf("Mac")!==-1,q=navigator.platform.indexOf("Win")!==-1,r=navigator.platform.indexOf("Linux")!==-1,s=typeof window.document.documentElement.addEventListener==="function",u=(!h||h>=9)&&typeof window.document.createRange().getBoundingClientRect==="function",t=q?"\r\n":"\n";g.prototype={clone:function(){return new g(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}};e.prototype={addRuler:function(a,c){a.setView(this);var d=this._rulers;if(c!==void 0){var e,g;for(e=0,g=0;e<d.length&&g<c;e++)a.getLocation()===d[e].getLocation()&&g++;d.splice(g,0,a);c=g}else d.push(a);this._createRuler(a,c);this._updatePage()},computeSize:function(){var a=0,c=0,d=this._model,e=this._clientDiv;if(!e)return{width:a,height:c};var g=e.style.width;if(o)e.style.width=(524287).toString()+
"px";for(var h=d.getLineCount(),i=0;i<h;i++){var f=this._getLineNode(i),j=null;if(!f||f.lineChanged||f.lineRemoved)f=j=this._createLine(e,null,document,i,d);f=this._getLineBoundingClientRect(f);a=Math.max(a,f.right-f.left);c+=f.bottom-f.top;j&&e.removeChild(j)}if(o)e.style.width=g;d=this._getViewPadding();a+=d.right+d.left;c+=d.bottom+d.top;return{width:a,height:c}},convert:function(a,c,d){if(this._clientDiv){var e=this._getScroll(),g=this._getViewPadding(),h=this._viewDiv.getBoundingClientRect();
c==="document"&&(a.x!==void 0&&(a.x+=-e.x+h.left+g.left),a.y!==void 0&&(a.y+=-e.y+h.top+g.top));d==="document"&&(a.x!==void 0&&(a.x+=e.x-h.left-g.left),a.y!==void 0&&(a.y+=e.y-h.top-g.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(),
j&&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 c=[],d=this._actions,e;for(e in d)d.hasOwnProperty(e)&&(a||!d[e].defaultHandler)&&c.push(e);return c},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 c=[],d=this._keyBindings,e=0;e<d.length;e++)d[e].actionID===a&&c.push(d[e].keyBinding);return c},getLineHeight:function(){return!this._clientDiv?
0:this._getLineHeight()},getLinePixel:function(a){if(!this._clientDiv)return 0;a=Math.min(Math.max(0,a),this._model.getLineCount());return this._getLineHeight()*a},getLocationAtOffset:function(a){if(!this._clientDiv)return{x:0,y:0};var c=this._model,a=Math.min(Math.max(0,a),c.getCharCount()),c=c.getLineAtOffset(a),d=this._getScroll(),e=this._viewDiv.getBoundingClientRect(),g=this._getViewPadding(),a=this._getOffsetToX(a)+d.x-e.left-g.left,c=this.getLinePixel(c);return{x:a,y:c}},getOptions:function(){var a;
if(arguments.length===0)a=this._defaultOptions();else if(arguments.length===1){if(a=arguments[0],typeof a==="string")return this._clone(this["_"+a])}else{a={};for(var c in arguments)arguments.hasOwnProperty(c)&&(a[arguments[c]]=void 0)}for(var d in a)a.hasOwnProperty(d)&&(a[d]=this._clone(this["_"+d]));return a},getModel:function(){return this._model},getOffsetAtLocation:function(a,c){if(!this._clientDiv)return 0;var d=this._getScroll(),e=this._viewDiv.getBoundingClientRect(),g=this._getViewPadding(),
h=this._getYToLine(c-d.y+e.top+g.top);a+=-d.x+e.left+g.left;return this._getXToOffset(h,a)},getRulers:function(){return this._rulers.slice(0)},getSelection:function(){var a=this._getSelection();return{start:a.start,end:a.end}},getText:function(a,c){return this._model.getText(a,c)},getTopIndex:function(a){return!this._clientDiv?0:this._getTopIndex(a)},getTopPixel:function(){return!this._clientDiv?0:this._getScroll().y},invokeAction:function(a,c){if(this._clientDiv){var d=this._actions[a];if(d){if(!c&&
d.handler&&d.handler())return;if(d.defaultHandler)return d.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)){for(var a=this._model.getLineCount(),c=this.getRulers(),d=0;d<c.length;d++)this.redrawLines(0,a,c[d]);this.redrawLines(0,a)}},redrawLines:function(a,
c,d){if(!(this._redrawCount>0)&&(a===void 0&&(a=0),c===void 0&&(c=this._model.getLineCount()),a!==c)){var e=this._clientDiv;if(e){if(d)for(var g=(d.getLocation()==="left"?this._leftDiv:this._rightDiv).firstChild.rows[0].cells,h=0;h<g.length;h++)if(g[h].firstChild._ruler===d){e=g[h].firstChild;break}if(d)e.rulerChanged=!0;if(!d||d.getOverview()==="page")for(e=e.firstChild;e;){g=e.lineIndex;if(a<=g&&g<c)e.lineChanged=!0;e=e.nextSibling}if(!d&&a<=this._maxLineIndex&&this._maxLineIndex<c)this._checkMaxLineIndex=
this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._queueUpdatePage()}}},redrawRange:function(a,c){if(!(this._redrawCount>0)){var d=this._model;a===void 0&&(a=0);c===void 0&&(c=d.getCharCount());var e=d.getLineAtOffset(a),d=d.getLineAtOffset(Math.max(a,c-1))+1;this.redrawLines(e,d)}},removeRuler:function(a){for(var c=this._rulers,d=0;d<c.length;d++)if(c[d]===a){c.splice(d,1);a.setView(null);this._destroyRuler(a);this._updatePage();break}},resize:function(){this._clientDiv&&this._handleResize(null)},
setAction:function(a,c,d){if(a){var e=this._actions,g=e[a];g||(g=e[a]={});g.handler=c;g.actionDescription=d}},setKeyBinding:function(a,c){for(var d=this._keyBindings,e=0;e<d.length;e++){var g=d[e];if(g.keyBinding.equals(a)){c?g.actionID=c:g.predefined?g.actionID=null:d.splice(e,1);return}}c&&d.push({keyBinding:a,actionID:c})},setCaretOffset:function(a,c){var d=this._model.getCharCount(),a=Math.max(0,Math.min(a,d));this._setSelection(new g(a,a,!1),c===void 0||c)},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("Changing",this._modelListener.onChanging);this._model.removeEventListener("Changed",this._modelListener.onChanged);var c=this._model.getLineCount(),d=this._model.getCharCount(),e=a.getLineCount(),g=a.getCharCount(),h={type:"ModelChanging",text:a.getText(),start:0,removedCharCount:d,
addedCharCount:g,removedLineCount:c,addedLineCount:e};this.onModelChanging(h);this._model=a;h={type:"ModelChanged",start:0,removedCharCount:d,addedCharCount:g,removedLineCount:c,addedLineCount:e};this.onModelChanged(h);this._model.addEventListener("Changing",this._modelListener.onChanging);this._model.addEventListener("Changed",this._modelListener.onChanged);this._reset();this._updatePage()}},setOptions:function(a){var c=this._defaultOptions(),d;for(d in a)if(a.hasOwnProperty(d)){var e=a[d];if(!this._compare(this["_"+
d],e)){var g=c[d]?c[d].update:null;g?g.call(this,e):this["_"+d]=this._clone(e)}}},setSelection:function(a,c,d){var e=a>c;if(e)var h=a,a=c,c=h;h=this._model.getCharCount();a=Math.max(0,Math.min(a,h));c=Math.max(0,Math.min(c,h));this._setSelection(new g(a,c,e),d===void 0||d)},setText:function(a,c,d){var e=c===void 0&&d===void 0;c===void 0&&(c=0);d===void 0&&(d=this._model.getCharCount());this._modifyContent({text:a,start:c,end:d,_code:!0},!e);if(e)this._columnX=-1,this._setSelection(new g(0,0,!1),!0),
k&&this._fixCaret()},setTopIndex:function(a){if(this._clientDiv){var c=this._model;if(c.getCharCount()!==0){var c=c.getLineCount(),d=this._getLineHeight(),e=Math.max(1,Math.min(c,Math.floor(this._getClientHeight()/d)));a<0?a=0:a>c-e&&(a=c-e);this._scrollView(0,a*d-this._getScroll().y)}}},setTopPixel:function(a){if(this._clientDiv){var c=this._getLineHeight(),d=this._getClientHeight(),e=this._model.getLineCount(),a=Math.min(Math.max(0,a),c*e-d);this._scrollView(0,a-this._getScroll().y)}},showSelection:function(){return this._showCaret(!0)},
update:function(a,c){this._clientDiv&&(a&&this._updateStyle(),c===void 0||c?this._updatePage():this._queueUpdatePage())},_handleRootMouseDown:function(a){if(!a)a=window.event;if(k&&a.which===1)this._clientDiv.contentEditable=!1,this._ignoreBlur=(this._overlayDiv||this._clientDiv).draggable=!0;var c=this._overlayDiv||this._clientDiv;if(h<9)c=this._viewDiv;for(var d=a.target?a.target:a.srcElement;d;){if(c===d)return;d=d.parentNode}a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
if(!s){var e=this;setTimeout(function(){e._clientDiv.focus()},0)}},_handleRootMouseUp:function(a){if(!a)a=window.event;if(k&&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(h<9&&!this._getSelection().isEmpty()){var a=document.createElement("DIV"),c=this._rootDiv;c.appendChild(a);c.removeChild(a)}if((k||h)&&this._selDiv1)this._selDiv1.style.background=
"transparent",this._selDiv2.style.background="transparent",this._selDiv3.style.background="transparent",window.getSelection&&(a=window.getSelection(),a.rangeCount>0&&a.removeAllRanges());if(!this._ignoreFocus)this.onBlur({type:"Blur"})}},_handleContextMenu:function(a){if(!a)a=window.event;h&&this._lastMouseButton===3&&this._updateDOMSelection();if(this.isListening("ContextMenu")){var c=this._createMouseEvent("ContextMenu",a);c.screenX=a.screenX;c.screenY=a.screenY;this.onContextMenu(c)}a.preventDefault&&
a.preventDefault();return!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(k){var c=this;setTimeout(function(){c._clientDiv.contentEditable=!0;c._clientDiv.draggable=!1;c._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));k&&(this._fixCaret(),a.dataTransfer.dropEffect==="none"&&!a.dataTransfer.mozUserCancelled&&this._fixCaret())},_handleDragEnter:function(a){if(!a)a=window.event;var c=!0;this._dropTarget=!0;this.isListening("DragEnter")&&(c=!1,this.onDragEnter(this._createMouseEvent("DragEnter",a)));if(o||c)return a.preventDefault&&a.preventDefault(),!1},_handleDragOver:function(a){if(!a)a=
window.event;var c=!0;this.isListening("DragOver")&&(c=!1,this.onDragOver(this._createMouseEvent("DragOver",a)));if(o||c){if(c)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;n&&this._lastTouchOffset!==void 0?(this.setCaretOffset(this._lastTouchOffset,!0),this._lastTouchOffset=void 0):this._updateDOMSelection();if((k||h)&&this._selDiv1){var a=this._hightlightRGB;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 c=!1;switch(a.keyCode){case 16:case 17:case 18:case 91:c=
!0;break;default:this._setLinksVisible(!1)}if(a.keyCode===229){if(this._readonly)return a.preventDefault&&a.preventDefault(),!1;c=!0;m&&p&&a.ctrlKey&&(c=!1);c&&this._startIME()}else c||this._commitIME();if((p||r)&&k<4||j)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(p&&o&&(63232<=a.keyCode&&a.keyCode<=63487||a.keyCode===13||
a.keyCode===8))return a.preventDefault&&a.preventDefault(),!1;if(((p||r)&&k<4||j)&&this._doAction(this._keyDownEvent))return a.preventDefault&&a.preventDefault(),!1;var c=p?a.metaKey:a.ctrlKey;if(a.charCode!==void 0&&c)switch(a.charCode){case 99:case 118:case 120:return!0}c=!1;if(p){if(a.ctrlKey||a.metaKey)c=!0}else if(k){if(a.ctrlKey||a.altKey)c=!0}else a.ctrlKey^a.altKey&&(c=!0);if(!c&&(c=j?a.which:a.charCode!==void 0?a.charCode:a.keyCode,c>31))return this._doContent(String.fromCharCode(c)),a.preventDefault&&
a.preventDefault(),!1},_handleKeyUp:function(a){if(!a)a=window.event;(p?a.metaKey:a.ctrlKey)||this._setLinksVisible(!1);a.keyCode===13&&this._commitIME()},_handleLinkClick:function(a){if(!a)a=window.event;if(!(p?a.metaKey:a.ctrlKey))return a.preventDefault&&a.preventDefault(),!1},_handleMouse:function(a){var c=!0,d=window;if(h||k&&!this._overlayDiv)d=this._clientDiv;if(this._overlayDiv){if(this._hasFocus)this._ignoreFocus=!0;var e=this;setTimeout(function(){e.focus();e._ignoreFocus=!1},0)}this._clickCount===
1?(c=this._setSelectionTo(a.clientX,a.clientY,a.shiftKey,!j&&this.isListening("DragStart")))&&this._setGrab(d):(s&&this._setGrab(d),this._doubleClickSelection=null,this._setSelectionTo(a.clientX,a.clientY,a.shiftKey),this._doubleClickSelection=this._getSelection());return c},_handleMouseDown:function(a){if(!a)a=window.event;if(this.isListening("MouseDown"))this.onMouseDown(this._createMouseEvent("MouseDown",a));if(this._linksVisible)if((a.target||a.srcElement).tagName!=="A")this._setLinksVisible(!1);
else return;this._commitIME();var c=a.which;c||(a.button===4&&(c=2),a.button===2&&(c=3),a.button===1&&(c=1));var d=c!==2&&a.timeStamp?a.timeStamp:(new Date).getTime(),e=d-this._lastMouseTime,g=Math.abs(this._lastMouseX-a.clientX),i=Math.abs(this._lastMouseY-a.clientY),f=this._lastMouseButton===c;this._lastMouseX=a.clientX;this._lastMouseY=a.clientY;this._lastMouseTime=d;this._lastMouseButton=c;if(c===1&&(this._isMouseDown=!0,f&&e<=this._clickTime&&g<=this._clickDist&&i<=this._clickDist?this._clickCount++:
this._clickCount=1,this._handleMouse(a)&&(h>=9||j||l||k&&!this._overlayDiv)))this._hasFocus||this.focus(),a.preventDefault();k&&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 c=this._isClientDiv(a);if(this.isListening("MouseMove")&&c)this.onMouseMove(this._createMouseEvent("MouseMove",a));if(!this._dropTarget){var d=this._linksVisible||this._lastMouseMoveX!==a.clientX||this._lastMouseMoveY!==a.clientY;this._lastMouseMoveX=a.clientX;this._lastMouseMoveY=a.clientY;this._setLinksVisible(d&&!this._isMouseDown&&(p?a.metaKey:a.ctrlKey));if(!s){if(a.button===0)return this._setGrab(null),!0;if(!this._isMouseDown&&a.button===1&&(this._clickCount&1)!==0&&c)return this._clickCount=
2,this._handleMouse(a,this._clickCount)}if(this._isMouseDown&&this._dragOffset===-1){var c=a.clientX,a=a.clientY,e=this._getViewPadding(),g=this._viewDiv.getBoundingClientRect(),h=this._getClientWidth(),i=this._getClientHeight(),d=g.left+e.left,f=g.top+e.top,h=g.left+e.left+h,e=g.top+e.top+i,g=this._model,i=g.getLineAtOffset(this._getSelection().getCaret());a<f&&i!==0?this._doAutoScroll("up",c,a-f):a>e&&i!==g.getLineCount()-1?this._doAutoScroll("down",c,a-e):c<d?this._doAutoScroll("left",c-d,a):c>
h?this._doAutoScroll("right",c-h,a):(this._endAutoScroll(),this._setSelectionTo(c,a,!0))}}},_isClientDiv:function(a){for(var c=this._overlayDiv||this._clientDiv,a=a.target?a.target:a.srcElement;a;){if(c===a)return!0;a=a.parentNode}return!1},_createMouseEvent:function(a,c){var d=this._getScroll(),e=this._viewDiv.getBoundingClientRect(),g=this._getViewPadding();return{type:a,event:c,x:c.clientX+d.x-e.left-g.left,y:c.clientY+d.y-e.top-g.top}},_handleMouseUp:function(a){if(!a)a=window.event;var c=a.which?
a.button===0:a.button===1;if(this.isListening("MouseUp")&&(this._isClientDiv(a)||c&&this._isMouseDown))this.onMouseUp(this._createMouseEvent("MouseUp",a));if(!this._linksVisible&&c&&this._isMouseDown){if(this._dragOffset!==-1)c=this._getSelection(),c.extend(this._dragOffset),c.collapse(),this._setSelection(c,!0,!0),this._dragOffset=-1;this._isMouseDown=!1;this._endAutoScroll();s&&this._setGrab(null);k&&a.preventDefault()}},_handleMouseWheel:function(a){if(!a)a=window.event;var c=this._getLineHeight(),
d=0,e=0;h||j?e=-a.wheelDelta/40*c:k?(c=p?a.detail*3:Math.max(-256,Math.min(256,a.detail))*c,a.axis===a.HORIZONTAL_AXIS?d=c:e=c):p?(e=d=40,a.wheelDeltaX%120!==0&&(d=1),a.wheelDeltaY%120!==0&&(e=1),d=-a.wheelDeltaX/d,-1<d&&d<0&&(d=-1),0<d&&d<1&&(d=1),e=-a.wheelDeltaY/e,-1<e&&e<0&&(e=-1),0<e&&e<1&&(e=1)):(d=-a.wheelDeltaX,e=-a.wheelDeltaY/120*8*c);if(m){for(c=a.target;c&&c.lineIndex===void 0;)c=c.parentNode;this._mouseWheelLine=c}c=this._getScroll();this._scrollView(d,e);d=this._getScroll();if(c.x!==
d.x||c.y!==d.y)return a.preventDefault&&a.preventDefault(),!1},_handlePaste:function(a){if(!this._ignorePaste){if(!a)a=window.event;if(this._doPaste(a)){if(h){var c=this;this._ignoreFocus=!0;setTimeout(function(){c._updateDOMSelection();this._ignoreFocus=!1},0)}a.preventDefault&&a.preventDefault();return!1}}},_handleResize:function(){var a=this._parent.clientWidth,c=this._parent.clientHeight;if(this._parentWidth!==a||this._parentHeight!==c)this._parentWidth=a,this._parentHeight=c,h<9?this._queueUpdatePage():
this._updatePage()},_handleRulerEvent:function(a){if(!a)a=window.event;for(var c=a.target?a.target:a.srcElement,d=c.lineIndex;c&&!c._ruler;){if(d===void 0&&c.lineIndex!==void 0)d=c.lineIndex;c=c.parentNode}c=c?c._ruler:null;if(d===void 0&&c&&c.getOverview()==="document"){var d=this._getClientHeight(),e=this._model.getLineCount(),g=this._getViewPadding(),h=this._viewDiv.getBoundingClientRect(),d=Math.floor((a.clientY-h.top-this._metrics.scrollWidth)*e/(d+g.top+g.bottom-2*this._metrics.scrollWidth));
0<=d&&d<e||(d=void 0)}if(c)switch(a.type){case "click":if(c.onClick)c.onClick(d,a);break;case "dblclick":if(c.onDblClick)c.onDblClick(d,a);break;case "mousemove":if(c.onMouseMove)c.onMouseMove(d,a);break;case "mouseover":if(c.onMouseOver)c.onMouseOver(d,a);break;case "mouseout":if(c.onMouseOut)c.onMouseOut(d,a)}},_handleScroll:function(){var a=this._getScroll(),c=this._hScroll,d=this._vScroll;if(c!==a.x||d!==a.y)this._hScroll=a.x,this._vScroll=a.y,this._commitIME(),this._updatePage(d===a.y),this.onScroll({type:"Scroll",
oldValue:{x:c,y:d},newValue:a})},_handleSelectStart:function(a){if(!a)a=window.event;if(this._ignoreSelect)return a&&a.preventDefault&&a.preventDefault(),!1},_getModelOffset:function(a,c){if(a){var d;d=a.tagName==="DIV"?a:a.parentNode.parentNode;var e=0,g=d.lineIndex;if(a.tagName!=="DIV")for(d=d.firstChild;d;){var h=d.firstChild;if(h===a){d.ignoreChars&&(e-=d.ignoreChars);e+=c;break}d.ignoreChars&&(e-=d.ignoreChars);e+=h.data.length;d=d.nextSibling}return Math.max(0,e)+this._model.getLineStart(g)}},
_handleSelectionChange:function(){var a=window.getSelection(),c=this._getModelOffset(a.anchorNode,a.anchorOffset),a=this._getModelOffset(a.focusNode,a.focusOffset);c===void 0||a===void 0||this._setSelection(new g(c,a),!1,!1,!1)},_handleTouchStart:function(a){if(this._touchScrollTimer)this._vScrollDiv.style.display="none",this._hScrollDiv.style.display="none",clearInterval(this._touchScrollTimer),this._touchScrollTimer=null;var c=a.touches;if(c.length===1)c=c[0],this._touchStartX=c.clientX,this._touchStartY=
c.clientY,this._lastTouchOffset=this._getXToOffset(this._getYToLine(c.clientY),c.clientX),this._touchStartTime=a.timeStamp,this._touching=!0},_handleTouchMove:function(a){var c=a.touches;if(c.length===1){c=c[0];this._touchCurrentX=c.clientX;this._touchCurrentY=c.clientY;if(!this._touchScrollTimer&&a.timeStamp-this._touchStartTime<200){this._vScrollDiv.style.display="block";this._hScrollDiv.style.display="block";var d=this;this._touchScrollTimer=setInterval(function(){var a=0,c=0;if(d._touching)a=
d._touchStartX-d._touchCurrentX,c=d._touchStartY-d._touchCurrentY,d._touchSpeedX=a/10,d._touchSpeedY=c/10,d._touchStartX=d._touchCurrentX,d._touchStartY=d._touchCurrentY;else if(Math.abs(d._touchSpeedX)<0.1&&Math.abs(d._touchSpeedY)<0.1){d._vScrollDiv.style.display="none";d._hScrollDiv.style.display="none";clearInterval(d._touchScrollTimer);d._touchScrollTimer=null;return}else a=d._touchSpeedX*10,c=d._touchSpeedY*10,d._touchSpeedX*=0.95,d._touchSpeedY*=0.95;d._scrollView(a,c)},10)}this._touchScrollTimer&&
a.preventDefault()}},_handleTouchEnd:function(a){if(a.touches.length===0)this._touching=!1},_doAction:function(a){for(var c=this._keyBindings,d=0;d<c.length;d++){var e=c[d];if(e.keyBinding.match(a)){if(e.actionID&&(a=this._actions[e.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 c=this._getSelection();if(c.isEmpty()){var d=
this._model,e=c.getCaret(),g=d.getLineAtOffset(e),h=d.getLineStart(g);e===h?g>0&&c.extend(d.getLineEnd(g-1)):(g=!1,this._expandTab&&a.unit==="character"&&(e-h)%this._tabSize===0&&(g=!/[^ ]/.test(d.getText(h,e))),g?c.extend(e-this._tabSize):c.extend(this._getOffset(e,a.unit,-1)))}this._modifyContent({text:"",start:c.start,end:c.end},!0);return!0},_doContent:function(a){var c=this._getSelection();this._modifyContent({text:a,start:c.start,end:c.end,_ignoreDOMSelection:!0},!0)},_doCopy:function(a){var c=
this._getSelection();return!c.isEmpty()?this._setClipboardText(this._getBaseText(c.start,c.end),a):!0},_doCursorNext:function(a){if(!a.select&&this._clearSelection("next"))return!0;var c=this._model,d=this._getSelection(),e=d.getCaret(),g=c.getLineAtOffset(e);e===c.getLineEnd(g)?g+1<c.getLineCount()&&d.extend(c.getLineStart(g+1)):d.extend(this._getOffset(e,a.unit,1));a.select||d.collapse();this._setSelection(d,!0);return!0},_doCursorPrevious:function(a){if(!a.select&&this._clearSelection("previous"))return!0;
var c=this._model,d=this._getSelection(),e=d.getCaret(),g=c.getLineAtOffset(e);e===c.getLineStart(g)?g>0&&d.extend(c.getLineEnd(g-1)):d.extend(this._getOffset(e,a.unit,-1));a.select||d.collapse();this._setSelection(d,!0);return!0},_doCut:function(a){var c=this._getSelection();return!c.isEmpty()?(c=this._getBaseText(c.start,c.end),this._doContent(""),this._setClipboardText(c,a)):!0},_doDelete:function(a){var c=this._getSelection();if(c.isEmpty()){var d=this._model,e=c.getCaret(),g=d.getLineAtOffset(e);
e===d.getLineEnd(g)?g+1<d.getLineCount()&&c.extend(d.getLineStart(g+1)):c.extend(this._getOffset(e,a.unit,1))}this._modifyContent({text:"",start:c.start,end:c.end},!0);return!0},_doEnd:function(a){var c=this._getSelection(),d=this._model;if(a.ctrl)c.extend(d.getCharCount());else{var e=d.getLineAtOffset(c.getCaret());c.extend(d.getLineEnd(e))}a.select||c.collapse();this._setSelection(c,!0);return!0},_doEnter:function(a){var c=this._model,d=this._getSelection();this._doContent(c.getLineDelimiter());
if(a&&a.noCursor)d.end=d.start,this._setSelection(d);return!0},_doHome:function(a){var c=this._getSelection(),d=this._model;if(a.ctrl)c.extend(0);else{var e=d.getLineAtOffset(c.getCaret());c.extend(d.getLineStart(e))}a.select||c.collapse();this._setSelection(c,!0);return!0},_doLineDown:function(a){var c=this._model,d=this._getSelection(),e=d.getCaret(),g=c.getLineAtOffset(e),i=this._columnX,f=this._getScroll().x;if(i===-1||a.wholeLine||a.select&&h)i=this._getOffsetToX(a.wholeLine?c.getLineEnd(g+1):
e)+f;g+1<c.getLineCount()?(d.extend(this._getXToOffset(g+1,i-f)),a.select||d.collapse(),this._setSelection(d,!0,!0)):a.select&&(d.extend(c.getCharCount()),this._setSelection(d,!0,!0));this._columnX=i;return!0},_doLineUp:function(a){var c=this._model,d=this._getSelection(),e=d.getCaret(),g=c.getLineAtOffset(e),i=this._columnX,f=this._getScroll().x;if(i===-1||a.wholeLine||a.select&&h)i=this._getOffsetToX(a.wholeLine?c.getLineStart(g-1):e)+f;g>0?(d.extend(this._getXToOffset(g-1,i-f)),a.select||d.collapse(),
this._setSelection(d,!0,!0)):a.select&&(d.extend(0),this._setSelection(d,!0,!0));this._columnX=i;return!0},_doPageDown:function(a){var c=this._model,d=this._getSelection(),e=d.getCaret(),g=c.getLineAtOffset(e),i=c.getLineCount();if(g<i-1){var c=this._getScroll(),f=this._getClientHeight(),j=this._getLineHeight(),l=Math.min(i-g-1,Math.floor(f/j)),l=Math.max(1,l),k=this._columnX;if(k===-1||a.select&&h)k=this._getOffsetToX(e)+c.x;d.extend(this._getXToOffset(g+l,k-c.x));a.select||d.collapse();a=i*j;e=
c.y+l*j;e+f>a&&(e=a-f);this._setSelection(d,!0,!0,e-c.y);this._columnX=k}return!0},_doPageUp:function(a){var c=this._model,d=this._getSelection(),e=d.getCaret(),g=c.getLineAtOffset(e);if(g>0){var c=this._getScroll(),i=this._getClientHeight(),f=this._getLineHeight(),j=Math.max(1,Math.min(g,Math.floor(i/f))),i=this._columnX;if(i===-1||a.select&&h)i=this._getOffsetToX(e)+c.x;d.extend(this._getXToOffset(g-j,i-c.x));a.select||d.collapse();a=Math.max(0,c.y-j*f);this._setSelection(d,!0,!0,a-c.y);this._columnX=
i}return!0},_doPaste:function(a){var c=this;return this._getClipboardText(a,function(a){a&&(r&&c._lastMouseButton===2&&(new Date).getTime()-c._lastMouseTime<=c._clickTime&&c._setSelectionTo(c._lastMouseX,c._lastMouseY),c._doContent(a))})!==null},_doScroll:function(a){var c=a.type,d=this._model,e=d.getLineCount(),a=this._getClientHeight(),g=this._getLineHeight();e*=g;var h=this._getScroll().y,i;switch(c){case "textStart":i=0;break;case "textEnd":i=e-a;break;case "pageDown":i=h+a;break;case "pageUp":i=
h-a;break;case "centerLine":c=this._getSelection(),i=d.getLineAtOffset(c.start),d=(d.getLineAtOffset(c.end)-i+1)*g,i=i*g-a/2+d/2}i!==void 0&&(i=Math.min(Math.max(0,i),e-a),this._scrollView(0,i-h));return!0},_doSelectAll:function(){var a=this._model,c=this._getSelection();c.setCaret(0);c.extend(a.getCharCount());this._setSelection(c,!1);return!0},_doTab:function(){if(this._tabMode&&!this._readonly){var a="\t";if(this._expandTab)var c=this._model,a=this._getSelection().getCaret(),d=c.getLineAtOffset(a),
c=c.getLineStart(d),a=Array(this._tabSize-(a-c)%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},_applyStyle:function(a,c,d){if(d){c.className="";for(var d=c.attributes,e=d.length;e-- >0;)d[e].specified&&c.removeAttributeNode(d[e])}if(a){if(a.styleClass)c.className=a.styleClass;if(d=a.style)for(var g in d)d.hasOwnProperty(g)&&(c.style[g]=d[g]);if(a=a.attributes)for(var h in a)a.hasOwnProperty(h)&&
c.setAttribute(h,a[h])}},_autoScroll:function(){var a=this._getSelection(),c,d=this._autoScrollX;if(this._autoScrollDir==="up"||this._autoScrollDir==="down"){var e=this._autoScrollY/this._getLineHeight(),e=e<0?Math.floor(e):Math.ceil(e);c=this._model.getLineAtOffset(a.getCaret());c=Math.max(0,Math.min(this._model.getLineCount()-1,c+e))}else if(this._autoScrollDir==="left"||this._autoScrollDir==="right")c=this._getYToLine(this._autoScrollY),d+=this._getOffsetToX(a.getCaret());a.extend(this._getXToOffset(c,
d));this._setSelection(a,!0)},_autoScrollTimer:function(){this._autoScroll();var a=this;this._autoScrollTimerID=setTimeout(function(){a._autoScrollTimer()},this._AUTO_SCROLL_RATE)},_calculateMetrics:function(){var a=this._clientDiv,c=document.createElement("DIV");c.style.lineHeight="normal";var d={type:"LineStyle",textView:this,0:0,lineText:this._model.getLine(0),lineStart:0};this.onLineStyle(d);this._applyStyle(d.style,c);c.style.position="fixed";c.style.left="-1000px";var e=document.createElement("SPAN");
e.appendChild(document.createTextNode(" "));c.appendChild(e);var g=document.createElement("SPAN");g.style.fontStyle="italic";g.appendChild(document.createTextNode(" "));c.appendChild(g);var h=document.createElement("SPAN");h.style.fontWeight="bold";h.appendChild(document.createTextNode(" "));c.appendChild(h);var i=document.createElement("SPAN");i.style.fontWeight="bold";i.style.fontStyle="italic";i.appendChild(document.createTextNode(" "));c.appendChild(i);a.appendChild(c);var d=c.getBoundingClientRect(),
e=e.getBoundingClientRect(),g=g.getBoundingClientRect(),h=h.getBoundingClientRect(),f=i.getBoundingClientRect(),i=e.bottom-e.top,e=g.bottom-g.top,g=h.bottom-h.top,h=f.bottom-f.top,f=0,d=Math.max(1,d.bottom-d.top);e>i&&(f=1);g>e&&(f=2);h>g&&(f=3);var j;if(f!==0){j={style:{}};if((f&1)!==0)j.style.fontStyle="italic";if((f&2)!==0)j.style.fontWeight="bold"}i=this._getLineTrim(c);a.removeChild(c);e=this._getPadding(this._viewDiv);c=document.createElement("DIV");c.style.position="fixed";c.style.left="-1000px";
c.style.paddingLeft=e.left+"px";c.style.paddingTop=e.top+"px";c.style.paddingRight=e.right+"px";c.style.paddingBottom=e.bottom+"px";c.style.width="100px";c.style.height="100px";h=document.createElement("DIV");h.style.width="100%";h.style.height="100%";c.appendChild(h);a.appendChild(c);e=c.getBoundingClientRect();g=h.getBoundingClientRect();c.style.overflow="hidden";h.style.height="200px";h=c.clientWidth;c.style.overflow="scroll";f=c.clientWidth;a.removeChild(c);e={left:g.left-e.left,top:g.top-e.top,
right:e.right-g.right,bottom:e.bottom-g.bottom};return{lineHeight:d,largestFontStyle:j,lineTrim:i,viewPadding:e,scrollWidth:h-f}},_clearSelection:function(a){var c=this._getSelection();if(c.isEmpty())return!1;a==="next"?c.start=c.end:c.end=c.start;this._setSelection(c,!0);return!0},_clone:function(a){return a instanceof Array?a.slice(0):a},_compare:function(a,c){if(a===c)return!0;if(a&&!c||!a&&c)return!1;if(a&&a.constructor===String||c&&c.constructor===String)return!1;if(a instanceof Array||c instanceof
Array){if(!(a instanceof Array&&c instanceof Array))return!1;if(a.length!==c.length)return!1;for(var d=0;d<a.length;d++)if(!this._compare(a[d],c[d]))return!1;return!0}if(!(a instanceof Object)||!(c instanceof Object))return!1;for(d in a)if(a.hasOwnProperty(d)){if(!c.hasOwnProperty(d))return!1;if(!this._compare(a[d],c[d]))return!1}for(d in c)if(!a.hasOwnProperty(d))return!1;return!0},_commitIME:function(){if(this._imeOffset!==-1){this._scrollDiv.focus();this._clientDiv.focus();var a=this._model,c=
a.getLineAtOffset(this._imeOffset),d=a.getLineStart(c),e=this._getDOMText(c),a=a.getLine(c),d=this._imeOffset-d,a=d+e.length-a.length;d!==a&&this._doContent(e.substring(d,a));this._imeOffset=-1}},_convertDelimiter:function(a,c,d){for(var e=0,g=0,h=0,i=a.length;h<i;){e!==-1&&e<=h&&(e=a.indexOf("\r",h));g!==-1&&g<=h&&(g=a.indexOf("\n",h));var f=h,j;if(g===-1&&e===-1){c(a.substring(h));break}e!==-1&&g!==-1?e+1===g?(j=e,h=g+1):(j=e<g?e:g,h=(e<g?e:g)+1):e!==-1?(j=e,h=e+1):(j=g,h=g+1);c(a.substring(f,j));
d()}},_createActions:function(){var a=f.KeyBinding,c=this._keyBindings=[];c.push({actionID:"lineUp",keyBinding:new a(38),predefined:!0});c.push({actionID:"lineDown",keyBinding:new a(40),predefined:!0});c.push({actionID:"charPrevious",keyBinding:new a(37),predefined:!0});c.push({actionID:"charNext",keyBinding:new a(39),predefined:!0});p?(c.push({actionID:"scrollPageUp",keyBinding:new a(33),predefined:!0}),c.push({actionID:"scrollPageDown",keyBinding:new a(34),predefined:!0}),c.push({actionID:"pageUp",
keyBinding:new a(33,null,null,!0),predefined:!0}),c.push({actionID:"pageDown",keyBinding:new a(34,null,null,!0),predefined:!0}),c.push({actionID:"lineStart",keyBinding:new a(37,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(39,!0),predefined:!0}),c.push({actionID:"wordPrevious",keyBinding:new a(37,null,null,!0),predefined:!0}),c.push({actionID:"wordNext",keyBinding:new a(39,null,null,!0),predefined:!0}),c.push({actionID:"scrollTextStart",keyBinding:new a(36),predefined:!0}),c.push({actionID:"scrollTextEnd",
keyBinding:new a(35),predefined:!0}),c.push({actionID:"textStart",keyBinding:new a(38,!0),predefined:!0}),c.push({actionID:"textEnd",keyBinding:new a(40,!0),predefined:!0}),c.push({actionID:"scrollPageUp",keyBinding:new a(38,null,null,null,!0),predefined:!0}),c.push({actionID:"scrollPageDown",keyBinding:new a(40,null,null,null,!0),predefined:!0}),c.push({actionID:"lineStart",keyBinding:new a(37,null,null,null,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(39,null,null,null,!0),predefined:!0}),
c.push({actionID:"lineStart",keyBinding:new a(38,null,null,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(40,null,null,!0),predefined:!0})):(c.push({actionID:"pageUp",keyBinding:new a(33),predefined:!0}),c.push({actionID:"pageDown",keyBinding:new a(34),predefined:!0}),c.push({actionID:"lineStart",keyBinding:new a(36),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(35),predefined:!0}),c.push({actionID:"wordPrevious",keyBinding:new a(37,!0),predefined:!0}),c.push({actionID:"wordNext",
keyBinding:new a(39,!0),predefined:!0}),c.push({actionID:"textStart",keyBinding:new a(36,!0),predefined:!0}),c.push({actionID:"textEnd",keyBinding:new a(35,!0),predefined:!0}));k&&r&&(c.push({actionID:"lineUp",keyBinding:new a(38,!0),predefined:!0}),c.push({actionID:"lineDown",keyBinding:new a(40,!0),predefined:!0}));c.push({actionID:"selectLineUp",keyBinding:new a(38,null,!0),predefined:!0});c.push({actionID:"selectLineDown",keyBinding:new a(40,null,!0),predefined:!0});c.push({actionID:"selectCharPrevious",
keyBinding:new a(37,null,!0),predefined:!0});c.push({actionID:"selectCharNext",keyBinding:new a(39,null,!0),predefined:!0});c.push({actionID:"selectPageUp",keyBinding:new a(33,null,!0),predefined:!0});c.push({actionID:"selectPageDown",keyBinding:new a(34,null,!0),predefined:!0});p?(c.push({actionID:"selectLineStart",keyBinding:new a(37,!0,!0),predefined:!0}),c.push({actionID:"selectLineEnd",keyBinding:new a(39,!0,!0),predefined:!0}),c.push({actionID:"selectWordPrevious",keyBinding:new a(37,null,!0,
!0),predefined:!0}),c.push({actionID:"selectWordNext",keyBinding:new a(39,null,!0,!0),predefined:!0}),c.push({actionID:"selectTextStart",keyBinding:new a(36,null,!0),predefined:!0}),c.push({actionID:"selectTextEnd",keyBinding:new a(35,null,!0),predefined:!0}),c.push({actionID:"selectTextStart",keyBinding:new a(38,!0,!0),predefined:!0}),c.push({actionID:"selectTextEnd",keyBinding:new a(40,!0,!0),predefined:!0}),c.push({actionID:"selectLineStart",keyBinding:new a(37,null,!0,null,!0),predefined:!0}),
c.push({actionID:"selectLineEnd",keyBinding:new a(39,null,!0,null,!0),predefined:!0}),c.push({actionID:"selectLineStart",keyBinding:new a(38,null,!0,!0),predefined:!0}),c.push({actionID:"selectLineEnd",keyBinding:new a(40,null,!0,!0),predefined:!0})):(r&&(c.push({actionID:"selectWholeLineUp",keyBinding:new a(38,!0,!0),predefined:!0}),c.push({actionID:"selectWholeLineDown",keyBinding:new a(40,!0,!0),predefined:!0})),c.push({actionID:"selectLineStart",keyBinding:new a(36,null,!0),predefined:!0}),c.push({actionID:"selectLineEnd",
keyBinding:new a(35,null,!0),predefined:!0}),c.push({actionID:"selectWordPrevious",keyBinding:new a(37,!0,!0),predefined:!0}),c.push({actionID:"selectWordNext",keyBinding:new a(39,!0,!0),predefined:!0}),c.push({actionID:"selectTextStart",keyBinding:new a(36,!0,!0),predefined:!0}),c.push({actionID:"selectTextEnd",keyBinding:new a(35,!0,!0),predefined:!0}));c.push({actionID:"deletePrevious",keyBinding:new a(8),predefined:!0});c.push({actionID:"deletePrevious",keyBinding:new a(8,null,!0),predefined:!0});
c.push({actionID:"deleteNext",keyBinding:new a(46),predefined:!0});c.push({actionID:"deleteWordPrevious",keyBinding:new a(8,!0),predefined:!0});c.push({actionID:"deleteWordPrevious",keyBinding:new a(8,!0,!0),predefined:!0});c.push({actionID:"deleteWordNext",keyBinding:new a(46,!0),predefined:!0});c.push({actionID:"tab",keyBinding:new a(9),predefined:!0});c.push({actionID:"shiftTab",keyBinding:new a(9,null,!0),predefined:!0});c.push({actionID:"enter",keyBinding:new a(13),predefined:!0});c.push({actionID:"enter",
keyBinding:new a(13,null,!0),predefined:!0});c.push({actionID:"selectAll",keyBinding:new a("a",!0),predefined:!0});c.push({actionID:"toggleTabMode",keyBinding:new a("m",!0),predefined:!0});p&&(c.push({actionID:"deleteNext",keyBinding:new a(46,null,!0),predefined:!0}),c.push({actionID:"deleteWordPrevious",keyBinding:new a(8,null,null,!0),predefined:!0}),c.push({actionID:"deleteWordNext",keyBinding:new a(46,null,null,!0),predefined:!0}));if(!k){var d=p&&l;c.push({actionID:null,keyBinding:new a("u",
!d,!1,!1,d),predefined:!0});c.push({actionID:null,keyBinding:new a("i",!d,!1,!1,d),predefined:!0});c.push({actionID:null,keyBinding:new a("b",!d,!1,!1,d),predefined:!0})}k&&(c.push({actionID:"copy",keyBinding:new a(45,!0),predefined:!0}),c.push({actionID:"paste",keyBinding:new a(45,null,!0),predefined:!0}),c.push({actionID:"cut",keyBinding:new a(46,null,!0),predefined:!0}));p&&(c.push({actionID:"lineStart",keyBinding:new a("a",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a("e",
!1,!1,!1,!0),predefined:!0}),c.push({actionID:"lineUp",keyBinding:new a("p",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"lineDown",keyBinding:new a("n",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"charPrevious",keyBinding:new a("b",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"charNext",keyBinding:new a("f",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deletePrevious",keyBinding:new a("h",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deleteNext",keyBinding:new a("d",!1,!1,!1,!0),predefined:!0}),
c.push({actionID:"deleteLineEnd",keyBinding:new a("k",!1,!1,!1,!0),predefined:!0}),k?(c.push({actionID:"scrollPageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deleteLineStart",keyBinding:new a("u",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deleteWordPrevious",keyBinding:new a("w",!1,!1,!1,!0),predefined:!0})):(c.push({actionID:"pageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"centerLine",keyBinding:new a("l",!1,!1,!1,!0),predefined:!0}),
c.push({actionID:"enterNoCursor",keyBinding:new a("o",!1,!1,!1,!0),predefined:!0})));var e=this;this._actions={lineUp:{defaultHandler:function(){return e._doLineUp({select:!1})}},lineDown:{defaultHandler:function(){return e._doLineDown({select:!1})}},lineStart:{defaultHandler:function(){return e._doHome({select:!1,ctrl:!1})}},lineEnd:{defaultHandler:function(){return e._doEnd({select:!1,ctrl:!1})}},charPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!1,unit:"character"})}},
charNext:{defaultHandler:function(){return e._doCursorNext({select:!1,unit:"character"})}},pageUp:{defaultHandler:function(){return e._doPageUp({select:!1})}},pageDown:{defaultHandler:function(){return e._doPageDown({select:!1})}},scrollPageUp:{defaultHandler:function(){return e._doScroll({type:"pageUp"})}},scrollPageDown:{defaultHandler:function(){return e._doScroll({type:"pageDown"})}},wordPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!1,unit:"word"})}},wordNext:{defaultHandler:function(){return e._doCursorNext({select:!1,
unit:"word"})}},textStart:{defaultHandler:function(){return e._doHome({select:!1,ctrl:!0})}},textEnd:{defaultHandler:function(){return e._doEnd({select:!1,ctrl:!0})}},scrollTextStart:{defaultHandler:function(){return e._doScroll({type:"textStart"})}},scrollTextEnd:{defaultHandler:function(){return e._doScroll({type:"textEnd"})}},centerLine:{defaultHandler:function(){return e._doScroll({type:"centerLine"})}},selectLineUp:{defaultHandler:function(){return e._doLineUp({select:!0})}},selectLineDown:{defaultHandler:function(){return e._doLineDown({select:!0})}},
selectWholeLineUp:{defaultHandler:function(){return e._doLineUp({select:!0,wholeLine:!0})}},selectWholeLineDown:{defaultHandler:function(){return e._doLineDown({select:!0,wholeLine:!0})}},selectLineStart:{defaultHandler:function(){return e._doHome({select:!0,ctrl:!1})}},selectLineEnd:{defaultHandler:function(){return e._doEnd({select:!0,ctrl:!1})}},selectCharPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!0,unit:"character"})}},selectCharNext:{defaultHandler:function(){return e._doCursorNext({select:!0,
unit:"character"})}},selectPageUp:{defaultHandler:function(){return e._doPageUp({select:!0})}},selectPageDown:{defaultHandler:function(){return e._doPageDown({select:!0})}},selectWordPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!0,unit:"word"})}},selectWordNext:{defaultHandler:function(){return e._doCursorNext({select:!0,unit:"word"})}},selectTextStart:{defaultHandler:function(){return e._doHome({select:!0,ctrl:!0})}},selectTextEnd:{defaultHandler:function(){return e._doEnd({select:!0,
ctrl:!0})}},deletePrevious:{defaultHandler:function(){return e._doBackspace({unit:"character"})}},deleteNext:{defaultHandler:function(){return e._doDelete({unit:"character"})}},deleteWordPrevious:{defaultHandler:function(){return e._doBackspace({unit:"word"})}},deleteWordNext:{defaultHandler:function(){return e._doDelete({unit:"word"})}},deleteLineStart:{defaultHandler:function(){return e._doBackspace({unit:"line"})}},deleteLineEnd:{defaultHandler:function(){return e._doDelete({unit:"line"})}},tab:{defaultHandler:function(){return e._doTab()}},
shiftTab:{defaultHandler:function(){return e._doShiftTab()}},enter:{defaultHandler:function(){return e._doEnter()}},enterNoCursor:{defaultHandler:function(){return e._doEnter({noCursor:!0})}},selectAll:{defaultHandler:function(){return e._doSelectAll()}},copy:{defaultHandler:function(){return e._doCopy()}},cut:{defaultHandler:function(){return e._doCut()}},paste:{defaultHandler:function(){return e._doPaste()}},toggleTabMode:{defaultHandler:function(){return e._doTabMode()}}}},_createLine:function(a,
c,d,e,g){var i=g.getLine(e),f=g.getLineStart(e),j={type:"LineStyle",textView:this,lineIndex:e,lineText:i,lineStart:f};this.onLineStyle(j);g=c||d.createElement("DIV");if(!c||!this._compare(c.viewStyle,j.style)){this._applyStyle(j.style,g,c);if(c)c._trim=null;g.viewStyle=j.style;g.setAttribute("role","presentation")}g.lineIndex=e;e=[];this._createRanges(j.ranges,i,0,i.length,f,{tabOffset:0,ranges:e});i=" ";!this._fullSelection&&h<9&&(i="\ufeff");o&&(i="\u200c");e.push({text:i,style:this._metrics.largestFontStyle,
ignoreChars:1});var l,k,m,n,p,t,j=i=0,q,s;if(c){if(m=c.modelChangedEvent)m.removedLineCount===0&&m.addedLineCount===0?(s=m.start-f,q=m.addedCharCount-m.removedCharCount):s=-1,c.modelChangedEvent=void 0;m=c.firstChild}for(f=0;f<e.length;f++){l=e[f];p=l.text;i+=p.length;k=l.style;if(m)if(t=m.firstChild.data,n=m.viewStyle,t===p&&this._compare(k,n)){j+=t.length;m._rectsCache=void 0;l=m=m.nextSibling;continue}else for(;m;){if(s!==-1){n=i;n>=s&&(n-=q);t=(t=m.firstChild.data)?t.length:0;if(j+t>n)break;j+=
t}n=m.nextSibling;g.removeChild(m);m=n}l=this._createSpan(g,d,p,k,l.ignoreChars);m?g.insertBefore(l,m):g.appendChild(l);if(c)c.lineWidth=void 0}if(c)for(a=l?l.nextSibling:null;a;)n=a.nextSibling,c.removeChild(a),a=n;else a.appendChild(g);return g},_createRanges:function(a,c,d,e,g,h){if(!(d>=e)){if(a)for(var i=0;i<a.length;i++){var f=a[i];if(!(f.end<=g+d)){var j=Math.max(g+d,f.start)-g;if(j>=e)break;var l=Math.min(g+e,f.end)-g;if(j<l){j=Math.max(d,j);l=Math.min(e,l);for(d<j&&this._createRange(c,d,
j,null,h);i+1<a.length&&a[i+1].start-g===l&&this._compare(f.style,a[i+1].style);)f=a[i+1],l=Math.min(g+e,f.end)-g,i++;this._createRange(c,j,l,f.style,h);d=l}}}d<e&&this._createRange(c,d,e,null,h)}},_createRange:function(a,c,d,e,g){if(!(c>=d)){var h=this._customTabSize;if(h&&h!==8)for(var i=a.indexOf("\t",c);i!==-1&&i<d;){c<i&&(c={text:a.substring(c,i),style:e},g.ranges.push(c),g.tabOffset+=c.text.length);c=h-g.tabOffset%h;if(c>0){for(var f="\u00a0",j=1;j<c;j++)f+=" ";c={text:f,style:e,ignoreChars:c-
1};g.ranges.push(c);g.tabOffset+=c.text.length}c=i+1;i=a.indexOf("\t",c)}c<d&&(c={text:a.substring(c,d),style:e},g.ranges.push(c),g.tabOffset+=c.text.length)}},_createSpan:function(a,c,e,g,h){var i=g&&g.tagName==="A";if(i)a.hasLink=!0;a=i&&this._linksVisible?"A":"SPAN";i=c.createElement(a);i.appendChild(c.createTextNode(e));this._applyStyle(g,i);if(a==="A"){var f=this;d(i,"click",function(a){return f._handleLinkClick(a)},!1)}i.viewStyle=g;if(h)i.ignoreChars=h;return i},_createRuler:function(a,c){if(this._clientDiv){var d=
a.getLocation()==="left"?this._leftDiv:this._rightDiv,e=document.createElement("DIV");e._ruler=a;e.rulerChanged=!0;e.style.position="relative";var d=d.firstChild.rows[0],g=d.cells.length,d=d.insertCell(c===void 0||c<0||c>g?g:c);d.vAlign="top";d.appendChild(e)}},_createView:function(){if(!this._clientDiv){for(var a=this._parent;a.hasChildNodes();)a.removeChild(a.lastChild);var c=document.createElement("DIV");this._rootDiv=c;c.tabIndex=-1;c.style.position="absolute";c.style.overflow="hidden";c.setAttribute("role",
"application");a.appendChild(c);var d=document.createElement("DIV");d.className="textviewLeftRuler";this._leftDiv=d;d.tabIndex=-1;d.style.overflow="hidden";d.style.MozUserSelect="none";d.style.WebkitUserSelect="none";d.style.position="absolute";d.style.cursor="default";d.setAttribute("aria-hidden","true");a=document.createElement("TABLE");d.appendChild(a);a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);c.appendChild(d);d=document.createElement("DIV");d.className="textview";this._viewDiv=
d;d.tabIndex=-1;d.style.overflow="auto";d.style.position="absolute";d.style.top="0px";d.style.borderWidth="0px";d.style.margin="0px";d.style.outline="none";c.appendChild(d);var e=document.createElement("DIV");e.className="textviewRightRuler";this._rightDiv=e;e.tabIndex=-1;e.style.overflow="hidden";e.style.MozUserSelect="none";e.style.WebkitUserSelect="none";e.style.position="absolute";e.style.cursor="default";e.setAttribute("aria-hidden","true");a=document.createElement("TABLE");e.appendChild(a);
a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);c.appendChild(e);this._scrollDiv=a=document.createElement("DIV");a.style.margin="0px";a.style.borderWidth="0px";a.style.padding="0px";d.appendChild(a);if(k)this._clipboardDiv=a=document.createElement("DIV"),a.style.position="fixed",a.style.whiteSpace="pre",a.style.left="-1000px",c.appendChild(a),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",c.appendChild(a),this._clipScrollDiv=d=document.createElement("DIV"),d.style.position="absolute",d.style.height="1px",d.style.top="-1000px",a.appendChild(d);this._setFullSelection(this._fullSelection,!0);a=document.createElement("DIV");a.className="textviewContent";this._clientDiv=a;a.style.whiteSpace="pre";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(n)a.style.WebkitTapHighlightColor="transparent";(this._clipDiv||c).appendChild(a);if(n)this._vScrollDiv=d=document.createElement("DIV"),d.style.position="absolute",d.style.borderWidth="1px",d.style.borderColor="white",d.style.borderStyle="solid",d.style.borderRadius="4px",d.style.backgroundColor="black",d.style.opacity="0.5",d.style.margin="0px",d.style.padding="0px",d.style.outline="none",d.style.zIndex="3",d.style.width="8px",d.style.display="none",
c.appendChild(d),this._hScrollDiv=d=document.createElement("DIV"),d.style.position="absolute",d.style.borderWidth="1px",d.style.borderColor="white",d.style.borderStyle="solid",d.style.borderRadius="4px",d.style.backgroundColor="black",d.style.opacity="0.5",d.style.margin="0px",d.style.padding="0px",d.style.outline="none",d.style.zIndex="3",d.style.height="8px",d.style.display="none",c.appendChild(d);if(k&&!a.setCapture)this._overlayDiv=d=document.createElement("DIV"),d.style.position=a.style.position,
d.style.borderWidth=a.style.borderWidth,d.style.margin=a.style.margin,d.style.padding=a.style.padding,d.style.cursor="text",d.style.zIndex="2",(this._clipDiv||c).appendChild(d);a.contentEditable="true";a.setAttribute("role","textbox");a.setAttribute("aria-multiline","true");this._setReadOnly(this._readonly);this._setThemeClass(this._themeClass,!0);this._setTabSize(this._tabSize,!0);this._hookEvents();c=this._rulers;for(a=0;a<c.length;a++)this._createRuler(c[a]);this._updatePage()}},_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},themeClass:{value:void 0,update:this._setThemeClass}}},_destroyRuler:function(a){var c=a.getLocation()==="left"?this._leftDiv:this._rightDiv;if(c){for(var c=c.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)}},_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;this._insertedSelRule=!1}},_doAutoScroll:function(a,c,d){this._autoScrollDir=a;this._autoScrollX=c;this._autoScrollY=d;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 c=this._hasFocus;this._ignoreFocus=!0;c&&a.blur();
a.contentEditable=!1;a.contentEditable=!0;c&&a.focus();this._ignoreFocus=!1}},_getBaseText:function(a,c){var d=this._model;d.getBaseModel&&(a=d.mapOffset(a),c=d.mapOffset(c),d=d.getBaseModel());return d.getText(a,c)},_getBorder:function(a){var c,d,e,g;if(window.getComputedStyle)a=window.getComputedStyle(a,null),c=a.getPropertyValue("border-left-width"),d=a.getPropertyValue("border-top-width"),e=a.getPropertyValue("border-right-width"),g=a.getPropertyValue("border-bottom-width");else if(a.currentStyle)c=
a.currentStyle.borderLeftWidth,d=a.currentStyle.borderTopWidth,e=a.currentStyle.borderRightWidth,g=a.currentStyle.borderBottomWidth;return{left:parseInt(c,10)||0,top:parseInt(d,10)||0,right:parseInt(e,10)||0,bottom:parseInt(g,10)||0}},_getBoundsAtOffset:function(a){var c=this._model,d=this._clientDiv,e=c.getLineAtOffset(a),g,i=this._getLineNode(e);i||(i=g=this._createLine(d,null,document,e,c));var f=null;if(a<c.getLineEnd(e)){c=c.getLineStart(e);for(e=i.firstChild;e;){var j=e.firstChild,l=j.length;
e.ignoreChars&&(l-=e.ignoreChars);if(c+l>a){f=a-c;if(u)c=document.createRange(),c.setStart(j,f),c.setEnd(j,f+1),f=c.getBoundingClientRect();else if(h)c=document.body.createTextRange(),c.moveToElementText(e),c.collapse(),c.moveEnd("character",f+1),c.moveStart("character",f),f=c.getBoundingClientRect();else{a=j.data;e.removeChild(j);e.appendChild(document.createTextNode(a.substring(0,f)));var k=document.createElement("SPAN");k.appendChild(document.createTextNode(a.substring(f,f+1)));e.appendChild(k);
e.appendChild(document.createTextNode(a.substring(f+1)));f=k.getBoundingClientRect();e.innerHTML="";e.appendChild(j);g||(e=this._getSelection(),(c<=e.start&&e.start<c+l||c<=e.end&&e.end<c+l)&&this._updateDOMSelection())}if(h)c=window.screen.logicalXDPI,e=window.screen.deviceXDPI,f.left=f.left*c/e,f.right=f.right*c/e;break}c+=l;e=e.nextSibling}}f||(i=this._getLineBoundingClientRect(i),f={left:i.right,right:i.right});g&&d.removeChild(g);return f},_getBottomIndex:function(a){var c=this._bottomChild;
if(a&&this._getClientHeight()>this._getLineHeight()){var a=c.getBoundingClientRect(),d=this._clientDiv.getBoundingClientRect();a.bottom>d.bottom&&(c=this._getLinePrevious(c)||c)}return c.lineIndex},_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,c){var d=this._model.getLineDelimiter(),
e,g;if(window.clipboardData)return e=[],g=window.clipboardData.getData("Text"),this._convertDelimiter(g,function(a){e.push(a)},function(){e.push(d)}),g=e.join(""),c&&c(g),g;if(k){this._ignoreFocus=!0;var h=this._clipboardDiv;h.innerHTML="<pre contenteditable=''></pre>";h.firstChild.focus();var i=this,f=function(){var a=i._getTextFromElement(h);h.innerHTML="";e=[];i._convertDelimiter(a,function(a){e.push(a)},function(){e.push(d)});return e.join("")},j=!1;this._ignorePaste=!0;if(!r||this._lastMouseButton!==
2)try{j=document.execCommand("paste",!1,null)}catch(l){j=h.childNodes.length>1||h.firstChild&&h.firstChild.childNodes.length>0}this._ignorePaste=!1;if(!j)return a?(setTimeout(function(){i.focus();(g=f())&&c&&c(g);i._ignoreFocus=!1},0),null):(this.focus(),this._ignoreFocus=!1,"");this.focus();this._ignoreFocus=!1;(g=f())&&c&&c(g);return g}return a&&a.clipboardData?(e=[],g=a.clipboardData.getData("text/plain"),this._convertDelimiter(g,function(a){e.push(a)},function(){e.push(d)}),(g=e.join(""))&&c&&
c(g),g):""},_getDOMText:function(a){for(var a=this._getLineNode(a).firstChild,c="";a;){for(var d=a.firstChild;d;){if(a.ignoreChars)for(var e=0;e<d.length;e++){var g=d.data.substring(e,e+1);g!==" "&&(c+=g)}else c+=d.data;d=d.nextSibling}a=a.nextSibling}return c},_getTextFromElement:function(a){var c=a.ownerDocument,d=c.defaultView;if(!d.getSelection)return a.innerText||a.textContent;c=c.createRange();c.selectNode(a);var a=d.getSelection(),d=[],e;for(e=0;e<a.rangeCount;e++)d.push(a.getRangeAt(e));this._ignoreSelect=
!0;a.removeAllRanges();a.addRange(c);c=a.toString();a.removeAllRanges();for(e=0;e<d.length;e++)a.addRange(d[e]);this._ignoreSelect=!1;return c},_getViewPadding:function(){return this._metrics.viewPadding},_getLineTrim:function(a){var c=a._trim;if(!c){var c=this._getPadding(a),d=this._getBorder(a);c.left+=d.left;c.top+=d.top;c.right+=d.right;c.bottom+=d.bottom;a._trim=c}return c},_getLineBoundingClientRect:function(a,c){for(var d=a.getBoundingClientRect(),d={left:d.left,top:d.top,right:d.left,bottom:d.bottom},
e=a.lastChild;e&&e.ignoreChars===e.firstChild.length;)e=e.previousSibling;if(e)e=e.getBoundingClientRect(),d.right=e.right+this._getLineTrim(a).right;c&&(e=this._getLineTrim(a),d.left+=e.left,d.right-=e.right);return d},_getLineHeight:function(){return this._metrics.lineHeight},_getLineNode:function(a){for(var c=this._clientDiv.firstChild;c;){if(a===c.lineIndex)return c;c=c.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},_getOffset:function(a,c,d){return c==="line"?(c=this._model,a=c.getLineAtOffset(a),d>0?c.getLineEnd(a):c.getLineStart(a)):c==="wordend"?this._getOffset_W3C(a,c,d):h?this._getOffset_IE(a,c,d):this._getOffset_W3C(a,c,d)},_getOffset_W3C:function(a,c,d){function e(a){return 33<=a&&a<=47||58<=a&&a<=64||91<=a&&a<=94||a===96||123<=a&&a<=126}if(c==="word"||c==="wordend"){var g=
this._model,h=g.getLineAtOffset(a),i=g.getLine(h),f=g.getLineStart(h),h=g.getLineEnd(h),g=i.length;a-=f;var j,l;if(d>0){if(a===g)return h;j=i.charCodeAt(a);l=e(j);d=!l&&!(j===32||j===9);for(a++;a<g;){j=i.charCodeAt(a);h=e(j);if(c==="wordend"){if(!h&&l)break}else if(h&&!l)break;j=!h&&!(j===32||j===9);if(c==="wordend"){if(!j&&d)break}else if(j&&!d)break;d=j;l=h;a++}}else{if(a===0)return f;a--;j=i.charCodeAt(a);l=e(j);for(d=!l&&!(j===32||j===9);0<a;){j=i.charCodeAt(a-1);h=e(j);if(c==="wordend"){if(h&&
!l)break}else if(!h&&l)break;j=!h&&!(j===32||j===9);if(c==="wordend"){if(j&&!d)break}else if(!j&&d)break;d=j;l=h;a--}}return f+a}return a+d},_getOffset_IE:function(a,c,d){var e=this._model,g=e.getLineAtOffset(a),h=this._clientDiv,i,f=this._getLineNode(g);f||(f=i=this._createLine(h,null,document,g,e));var j=0,l;l=e.getLineStart(g);if(a===e.getLineEnd(g))j=document.body.createTextRange(),j.moveToElementText(f.lastChild),l=j.text.length,j.moveEnd(c,d),j=a+j.text.length-l;else if(a===l&&d<0)j=l;else for(f=
f.firstChild;f;){e=f.firstChild.length;f.ignoreChars&&(e-=f.ignoreChars);if(l+e>a){j=document.body.createTextRange();a===l&&d<0?j.moveToElementText(f.previousSibling):(j.moveToElementText(f),j.collapse(),j.moveEnd("character",a-l));l=j.text.length;j.moveEnd(c,d);j=a+j.text.length-l;break}l=e+l;f=f.nextSibling}i&&h.removeChild(i);return j},_getOffsetToX:function(a){return this._getBoundsAtOffset(a).left},_getPadding:function(a){var c,d,e,g;if(window.getComputedStyle)a=window.getComputedStyle(a,null),
c=a.getPropertyValue("padding-left"),d=a.getPropertyValue("padding-top"),e=a.getPropertyValue("padding-right"),g=a.getPropertyValue("padding-bottom");else if(a.currentStyle)c=a.currentStyle.paddingLeft,d=a.currentStyle.paddingTop,e=a.currentStyle.paddingRight,g=a.currentStyle.paddingBottom;return{left:parseInt(c,10)||0,top:parseInt(d,10)||0,right:parseInt(e,10)||0,bottom:parseInt(g,10)||0}},_getScroll:function(){var a=this._viewDiv;return{x:a.scrollLeft,y:a.scrollTop}},_getSelection:function(){return this._selection.clone()},
_getTopIndex:function(a){var c=this._topChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=c.getBoundingClientRect(),d=this._getViewPadding(),e=this._viewDiv.getBoundingClientRect();a.top<e.top+d.top&&(c=this._getLineNext(c)||c)}return c.lineIndex},_getXToOffset:function(a,c){function d(a){var c,e,g,h;if(!a._rectsCache){c=a.getClientRects();e=[c.length];for(g=0;g<c.length;g++)h=c[g],e[g]={left:h.left-k+p,top:h.top,right:h.right-k+p,bottom:h.bottom};a._rectsCache=e}c=a._rectsCache;e=
[c.length];for(g=0;g<c.length;g++)h=c[g],e[g]={left:h.left-p,top:h.top,right:h.right-p,bottom:h.bottom};return e}var e=this._model,g=e.getLineStart(a),i=e.getLineEnd(a);if(g===i)return g;var f=this._clientDiv,j,l=this._getLineNode(a);l||(l=j=this._createLine(f,null,document,a,e));e=this._getLineBoundingClientRect(l,!0);if(c<e.left)c=e.left;if(c>e.right)c=e.right;var k=0,m;if(h<9){m=l.getClientRects();for(var n=m[0].left,o=1;o<m.length;o++)n=Math.min(m[o].left,n);k=n-e.left-this._getLineTrim(l).left}var p=
this._getScroll().x,t=h?window.screen.logicalXDPI:1,q=h?window.screen.deviceXDPI:1,e=g,n=l.firstChild;a:for(;n;){o=n.firstChild;l=o.length;n.ignoreChars&&(l-=n.ignoreChars);m=d(n);for(var s=0;s<m.length;s++){var r=m[s];if(r.left<=c&&c<r.right){if(h||u){for(var s=u?document.createRange():document.body.createTextRange(),D=l,L=-1;D-L>1;){var P=Math.floor((D+L)/2);m=L+1;r=P===l-1&&n.ignoreChars?o.length:P+1;u?(s.setStart(o,m),s.setEnd(o,r)):(s.moveToElementText(n),s.move("character",m),s.moveEnd("character",
r-m));m=s.getClientRects();for(var T=!1,R=0;R<m.length;R++){var r=m[R],U=r.right*t/q-k;if(r.left*t/q-k<=c&&c<U){T=!0;break}}T?D=P:L=P}e+=D;m=D;r=D===l-1&&n.ignoreChars?o.length:Math.min(D+1,o.length);u?(s.setStart(o,m),s.setEnd(o,r)):(s.moveToElementText(n),s.move("character",m),s.moveEnd("character",r-m));r=s.getClientRects()[0];c>r.left*t/q-k+(r.right-r.left)*t/q/2&&e++}else{m=[];for(t=0;t<l;t++)m.push("<span>"),t===l-1?m.push(o.data.substring(t)):m.push(o.data.substring(t,t+1)),m.push("</span>");
n.innerHTML=m.join("");for(m=n.firstChild;m;){r=m.getBoundingClientRect();if(r.left<=c&&c<r.right){c>r.left+(r.right-r.left)/2&&e++;break}e++;m=m.nextSibling}if(!j)n.innerHTML="",n.appendChild(o),n=this._getSelection(),(e<=n.start&&n.start<e+l||e<=n.end&&n.end<e+l)&&this._updateDOMSelection()}break a}}e+=l;n=n.nextSibling}j&&f.removeChild(j);return Math.min(i,Math.max(g,e))},_getYToLine:function(a){var c=this._getViewPadding(),d=this._viewDiv.getBoundingClientRect();a-=d.top+c.top;c=this._getLineHeight();
a=Math.floor((a+this._getScroll().y)/c);c=this._model.getLineCount();return Math.max(0,Math.min(c-1,a))},_hookEvents:function(){var a=this;this._modelListener={onChanging:function(c){a._onModelChanging(c)},onChanged:function(c){a._onModelChanged(c)}};this._model.addEventListener("Changing",this._modelListener.onChanging);this._model.addEventListener("Changed",this._modelListener.onChanged);var c=this._handlers=[],e=this._clientDiv,g=this._viewDiv,i=this._rootDiv,f=this._overlayDiv||e,j=h?document:
window;c.push({target:window,type:"resize",handler:function(c){return a._handleResize(c)}});c.push({target:e,type:"blur",handler:function(c){return a._handleBlur(c)}});c.push({target:e,type:"focus",handler:function(c){return a._handleFocus(c)}});c.push({target:g,type:"focus",handler:function(){e.focus()}});c.push({target:g,type:"scroll",handler:function(c){return a._handleScroll(c)}});c.push({target:e,type:"keydown",handler:function(c){return a._handleKeyDown(c)}});c.push({target:e,type:"keypress",
handler:function(c){return a._handleKeyPress(c)}});c.push({target:e,type:"keyup",handler:function(c){return a._handleKeyUp(c)}});c.push({target:e,type:"selectstart",handler:function(c){return a._handleSelectStart(c)}});c.push({target:e,type:"contextmenu",handler:function(c){return a._handleContextMenu(c)}});c.push({target:e,type:"copy",handler:function(c){return a._handleCopy(c)}});c.push({target:e,type:"cut",handler:function(c){return a._handleCut(c)}});c.push({target:e,type:"paste",handler:function(c){return a._handlePaste(c)}});
if(n)c.push({target:document,type:"selectionchange",handler:function(c){return a._handleSelectionChange(c)}}),c.push({target:e,type:"touchstart",handler:function(c){return a._handleTouchStart(c)}}),c.push({target:e,type:"touchmove",handler:function(c){return a._handleTouchMove(c)}}),c.push({target:e,type:"touchend",handler:function(c){return a._handleTouchEnd(c)}});else{c.push({target:e,type:"mousedown",handler:function(c){return a._handleMouseDown(c)}});c.push({target:e,type:"mouseover",handler:function(c){return a._handleMouseOver(c)}});
c.push({target:e,type:"mouseout",handler:function(c){return a._handleMouseOut(c)}});c.push({target:j,type:"mouseup",handler:function(c){return a._handleMouseUp(c)}});c.push({target:j,type:"mousemove",handler:function(c){return a._handleMouseMove(c)}});c.push({target:i,type:"mousedown",handler:function(c){return a._handleRootMouseDown(c)}});c.push({target:i,type:"mouseup",handler:function(c){return a._handleRootMouseUp(c)}});c.push({target:f,type:"dragstart",handler:function(c){return a._handleDragStart(c)}});
c.push({target:f,type:"drag",handler:function(c){return a._handleDrag(c)}});c.push({target:f,type:"dragend",handler:function(c){return a._handleDragEnd(c)}});c.push({target:f,type:"dragenter",handler:function(c){return a._handleDragEnter(c)}});c.push({target:f,type:"dragover",handler:function(c){return a._handleDragOver(c)}});c.push({target:f,type:"dragleave",handler:function(c){return a._handleDragLeave(c)}});c.push({target:f,type:"drop",handler:function(c){return a._handleDrop(c)}});c.push({target:this._clientDiv,
type:k?"DOMMouseScroll":"mousewheel",handler:function(c){return a._handleMouseWheel(c)}});if(k&&!q)(g=window.MutationObserver||window.MozMutationObserver)?(this._mutationObserver=new g(function(c){a._handleDataModified(c)}),this._mutationObserver.observe(e,{subtree:!0,characterData:!0})):c.push({target:this._clientDiv,type:"DOMCharacterDataModified",handler:function(c){return a._handleDataModified(c)}});this._overlayDiv&&(c.push({target:this._overlayDiv,type:"mousedown",handler:function(c){return a._handleMouseDown(c)}}),
c.push({target:this._overlayDiv,type:"mouseover",handler:function(c){return a._handleMouseOver(c)}}),c.push({target:this._overlayDiv,type:"mouseout",handler:function(c){return a._handleMouseOut(c)}}),c.push({target:this._overlayDiv,type:"contextmenu",handler:function(c){return a._handleContextMenu(c)}}));s||c.push({target:this._clientDiv,type:"dblclick",handler:function(c){return a._handleDblclick(c)}})}g=this._leftDiv;i=this._rightDiv;h&&c.push({target:g,type:"selectstart",handler:function(){return!1}});
c.push({target:g,type:k?"DOMMouseScroll":"mousewheel",handler:function(c){return a._handleMouseWheel(c)}});c.push({target:g,type:"click",handler:function(c){a._handleRulerEvent(c)}});c.push({target:g,type:"dblclick",handler:function(c){a._handleRulerEvent(c)}});c.push({target:g,type:"mousemove",handler:function(c){a._handleRulerEvent(c)}});c.push({target:g,type:"mouseover",handler:function(c){a._handleRulerEvent(c)}});c.push({target:g,type:"mouseout",handler:function(c){a._handleRulerEvent(c)}});
h&&c.push({target:i,type:"selectstart",handler:function(){return!1}});c.push({target:i,type:k?"DOMMouseScroll":"mousewheel",handler:function(c){return a._handleMouseWheel(c)}});c.push({target:i,type:"click",handler:function(c){a._handleRulerEvent(c)}});c.push({target:i,type:"dblclick",handler:function(c){a._handleRulerEvent(c)}});c.push({target:i,type:"mousemove",handler:function(c){a._handleRulerEvent(c)}});c.push({target:i,type:"mouseover",handler:function(c){a._handleRulerEvent(c)}});c.push({target:i,
type:"mouseout",handler:function(c){a._handleRulerEvent(c)}});for(g=0;g<c.length;g++)i=c[g],d(i.target,i.type,i.handler,i.capture)},_init:function(a){var d=a.parent;typeof d==="string"&&(d=window.document.getElementById(d));if(!d)throw"no parent";a.parent=d;a.model=a.model||new c.TextModel;var d=this._defaultOptions(),e;for(e in d)d.hasOwnProperty(e)&&(this["_"+e]=a[e]!==void 0?a[e]:d[e].value);this._rulers=[];this._selection=new g(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()},_isLinkURL:function(a){return a.toLowerCase().lastIndexOf(".css")===a.length-4},_modifyContent:function(a,c){if(!this._readonly||a._code)if(a.type="Verify",this.onVerify(a),!(a.text===null||a.text===void 0)){var d=this._model;try{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!0;d.setText(a.text,a.start,a.end)}finally{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!1}c&&(d=this._getSelection(),d.setCaret(a.start+a.text.length),this._setSelection(d,!0));this.onModify({type:"Modify"})}},
_onModelChanged:function(a){a.type="ModelChanged";this.onModelChanged(a);a.type="Changed";var c=a.start,d=a.addedCharCount,e=a.removedCharCount,g=a.addedLineCount,h=a.removedLineCount,i=this._getSelection();i.end>c&&(i.end>c&&i.start<c+e?i.setCaret(c+d):(i.start+=d-e,i.end+=d-e),this._setSelection(i,!1,!1));c=this._model.getLineAtOffset(c);for(d=this._getLineNext();d;){e=d.lineIndex;if(c<=e&&e<=c+h)c===e&&!d.modelChangedEvent&&!d.lineRemoved?(d.modelChangedEvent=a,d.lineChanged=!0):(d.lineRemoved=
!0,d.lineChanged=!1,d.modelChangedEvent=null);if(e>c+h)d.lineIndex=e+g-h;d=this._getLineNext(d)}if(c<=this._maxLineIndex&&this._maxLineIndex<=c+h)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._updatePage()},_onModelChanging:function(a){a.type="ModelChanging";this.onModelChanging(a);a.type="Changing"},_queueUpdatePage:function(){if(!this._updateTimer){var a=this;this._updateTimer=setTimeout(function(){a._updateTimer=null;a._updatePage()},0)}},_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._partialY=0;this._setSelection(new g(0,0,!1),!1,!1);if(this._viewDiv)this._viewDiv.scrollLeft=0,this._viewDiv.scrollTop=0;var a=this._clientDiv;if(a){for(var c=a.firstChild;c;)c.lineRemoved=!0,c=c.nextSibling;if(k)this._ignoreFocus=!1,(c=this._hasFocus)&&a.blur(),a.contentEditable=!1,a.contentEditable=
!0,c&&a.focus(),this._ignoreFocus=!1}},_scrollView:function(a,c){this._ensureCaretVisible=!1;var d=this._viewDiv;a&&(d.scrollLeft+=a);c&&(d.scrollTop+=c)},_setClipboardText:function(a,c){var d;if(window.clipboardData)return d=[],this._convertDelimiter(a,function(a){d.push(a)},function(){d.push(t)}),window.clipboardData.setData("Text",d.join(""));if(c&&c.clipboardData&&(d=[],this._convertDelimiter(a,function(a){d.push(a)},function(){d.push(t)}),c.clipboardData.setData("text/plain",d.join(""))))return!0;
var e=document.createElement("PRE");e.style.position="fixed";e.style.left="-1000px";this._convertDelimiter(a,function(a){e.appendChild(document.createTextNode(a))},function(){e.appendChild(document.createElement("BR"))});e.appendChild(document.createTextNode(" "));this._clientDiv.appendChild(e);var g=document.createRange();g.setStart(e.firstChild,0);g.setEndBefore(e.lastChild);var h=window.getSelection();h.rangeCount>0&&h.removeAllRanges();h.addRange(g);var i=this,g=function(){e&&e.parentNode===i._clientDiv&&
i._clientDiv.removeChild(e);i._updateDOMSelection()},h=!1;this._ignoreCopy=!0;try{h=document.execCommand("copy",!1,null)}catch(f){}this._ignoreCopy=!1;if(!h&&c)return setTimeout(g,0),!1;g();return!0},_setDOMSelection:function(a,c,d,e){for(var g,h,i,f,j=0,l=a.firstChild,k,m,n=this._model.getLine(a.lineIndex).length;l;){k=l.firstChild;m=k.length;l.ignoreChars&&(m-=l.ignoreChars);if(j+m>c||j+m>=n){g=k;h=c-j;l.ignoreChars&&m>0&&h===m&&(h+=l.ignoreChars);break}j+=m;l=l.nextSibling}for(var j=0,l=d.firstChild,
o=this._model.getLine(d.lineIndex).length;l;){k=l.firstChild;m=k.length;l.ignoreChars&&(m-=l.ignoreChars);if(m+j>e||j+m>=o){i=k;f=e-j;l.ignoreChars&&m>0&&f===m&&(f+=l.ignoreChars);break}j+=m;l=l.nextSibling}this._setDOMFullSelection(a,c,n,d,e,o);if(window.getSelection)a=document.createRange(),a.setStart(g,h),a.setEnd(i,f),i=window.getSelection(),this._ignoreSelect=!1,i.rangeCount>0&&i.removeAllRanges(),i.addRange(a),this._ignoreSelect=!0;else if(document.selection)c=document.body,a=document.createElement("DIV"),
c.appendChild(a),c.removeChild(a),a=c.createTextRange(),a.moveToElementText(g.parentNode),a.moveStart("character",h),g=c.createTextRange(),g.moveToElementText(i.parentNode),g.moveStart("character",f),a.setEndPoint("EndToStart",g),this._ignoreSelect=!1,a.select(),this._ignoreSelect=!0},_setDOMFullSelection:function(a,c,d,e,g,h){if(this._selDiv1){var i=this._selDiv1;i.style.width="0px";i.style.height="0px";i=this._selDiv2;i.style.width="0px";i.style.height="0px";i=this._selDiv3;i.style.width="0px";
i.style.height="0px";if(!(a===e&&c===g)){var f=this._model,j=this._getViewPadding(),l=this._clientDiv.getBoundingClientRect(),k=this._viewDiv.getBoundingClientRect(),i=k.left+j.left,m=l.right,j=k.top+j.top,n=l.bottom,k=l=0;this._clipDiv?(k=this._clipDiv.getBoundingClientRect(),l=k.left-this._clipDiv.scrollLeft):(k=this._rootDiv.getBoundingClientRect(),l=k.left);var k=k.top,o;o=this._getLineBoundingClientRect(a);c===0?d=o.left:c>=d?d=o.right:(this._ignoreDOMSelection=!0,d=this._getBoundsAtOffset(f.getLineStart(a.lineIndex)+
c).left,this._ignoreDOMSelection=!1);c=this._getLineBoundingClientRect(e);g===0?h=c.left:g>=h?h=c.right:(this._ignoreDOMSelection=!0,h=this._getBoundsAtOffset(f.getLineStart(e.lineIndex)+g).left,this._ignoreDOMSelection=!1);var f=this._selDiv1,d=Math.min(m,Math.max(i,d)),p=Math.min(n,Math.max(j,o.top)),t=m,g=Math.min(n,Math.max(j,o.bottom));f.style.left=d-l+"px";f.style.top=p-k+"px";f.style.width=Math.max(0,t-d)+"px";f.style.height=Math.max(0,g-p)+"px";if(a===e)t=Math.min(h,m),f.style.width=Math.max(0,
t-d)+"px";else if(a=Math.min(n,Math.max(j,c.top)),e=Math.min(m,Math.max(i,h)),j=Math.min(n,Math.max(j,c.bottom)),n=this._selDiv3,n.style.left=i-l+"px",n.style.top=a-k+"px",n.style.width=Math.max(0,e-i)+"px",n.style.height=Math.max(0,j-a)+"px",a-g>0)e=this._selDiv2,e.style.left=i-l+"px",e.style.top=g-k+"px",e.style.width=Math.max(0,m-i)+"px",e.style.height=Math.max(0,a-g)+"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(h&&a)this._hadFocus=this._hasFocus;var c=this._clientDiv;c.contentEditable=!a;this._hadFocus&&!a&&c.focus();if(this._overlayDiv)this._overlayDiv.style.zIndex=a?"-1":"1";for(a=this._getLineNext();a;){if(a.hasLink)for(c=a.firstChild;c;){var d=c.nextSibling,e=c.viewStyle;e&&e.tagName==="A"&&a.replaceChild(this._createSpan(a,document,c.firstChild.data,e),c);c=d}a=
this._getLineNext(a)}}},_setSelection:function(a,c,d,e){if(a){this._columnX=-1;d===void 0&&(d=!0);var g=this._selection;if(!g.equals(a))this._selection=a,this.onSelection({type:"Selection",oldValue:{start:g.start,end:g.end},newValue:{start:a.start,end:a.end}});c&&(d=!this._showCaret(!1,e));d&&this._updateDOMSelection()}},_setSelectionTo:function(a,c,d,e){var g=this._model,h=this._getSelection(),c=this._getYToLine(c);if(this._clickCount===1){g=this._getXToOffset(c,a);if(e&&!d&&h.start<=g&&g<h.end)return this._dragOffset=
g,!1;h.extend(g);d||h.collapse()}else(this._clickCount&1)===0?(g=this._getXToOffset(c,a),this._doubleClickSelection?g>=this._doubleClickSelection.start?(d=this._doubleClickSelection.start,g=this._getOffset(g,"wordend",1)):(d=this._getOffset(g,"word",-1),g=this._doubleClickSelection.end):(d=this._getOffset(g,"word",-1),g=this._getOffset(d,"wordend",1))):this._doubleClickSelection?(e=g.getLineAtOffset(this._doubleClickSelection.start),c>=e?(d=g.getLineStart(e),g=g.getLineEnd(c)):(d=g.getLineStart(c),
g=g.getLineEnd(e))):(d=g.getLineStart(c),g=g.getLineEnd(c)),h.setCaret(d),h.extend(g);this._setSelection(h,!0,!0);return!0},_setFullSelection:function(a,c){this._fullSelection=a;if(o)this._fullSelection=!0;var d=this._clipDiv||this._rootDiv;if(d)if(this._fullSelection){if(!this._selDiv1&&this._fullSelection&&!o){this._hightlightRGB="Highlight";var e=document.createElement("DIV");this._selDiv1=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._hightlightRGB;e.style.width="0px";e.style.height="0px";e.style.zIndex="0";d.appendChild(e);var g=document.createElement("DIV");this._selDiv2=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._hightlightRGB;g.style.width="0px";g.style.height="0px";g.style.zIndex="0";d.appendChild(g);var h=document.createElement("DIV");this._selDiv3=h;h.style.position="absolute";h.style.borderWidth=
"0px";h.style.margin="0px";h.style.padding="0px";h.style.outline="none";h.style.background=this._hightlightRGB;h.style.width="0px";h.style.height="0px";h.style.zIndex="0";d.appendChild(h);if(k&&p){d=window.getComputedStyle(h,null).getPropertyValue("background-color");switch(d){case "rgb(119, 141, 168)":d="rgb(199, 208, 218)";break;case "rgb(127, 127, 127)":d="rgb(198, 198, 198)";break;case "rgb(255, 193, 31)":d="rgb(250, 236, 115)";break;case "rgb(243, 70, 72)":d="rgb(255, 176, 139)";break;case "rgb(255, 138, 34)":d=
"rgb(255, 209, 129)";break;case "rgb(102, 197, 71)":d="rgb(194, 249, 144)";break;case "rgb(140, 78, 184)":d="rgb(232, 184, 255)";break;default:d="rgb(180, 213, 255)"}this._hightlightRGB=d;e.style.background=d;g.style.background=d;h.style.background=d;if(!this._insertedSelRule)e=document.createElement("STYLE"),g=document.getElementsByTagName("HEAD")[0]||document.documentElement,e.appendChild(document.createTextNode("::-moz-selection {background: "+d+"; }")),g.insertBefore(e,g.firstChild),this._insertedSelRule=
!0}c||this._updateDOMSelection()}}else{if(this._selDiv1)d.removeChild(this._selDiv1),this._selDiv1=null;if(this._selDiv2)d.removeChild(this._selDiv2),this._selDiv2=null;if(this._selDiv3)d.removeChild(this._selDiv3),this._selDiv3=null}},_setReadOnly:function(a){this._readonly=a;this._clientDiv.setAttribute("aria-readonly",a?"true":"false")},_setTabSize:function(a,c){this._tabSize=a;this._customTabSize=void 0;var d=this._clientDiv;if(j){if(d)d.style.OTabSize=this._tabSize+""}else if(k>=4){if(d)d.style.MozTabSize=
this._tabSize+""}else if(this._tabSize!==8)this._customTabSize=this._tabSize;c||(this.redrawLines(),this._resetLineWidth())},_setThemeClass:function(a,c){this._themeClass=a;var d="textviewContainer";this._themeClass&&(d+=" "+this._themeClass);this._rootDiv.className=d;this._updateStyle(c)},_showCaret:function(a,c){if(this._clientDiv){var d=this._model,e=this._getSelection(),g=this._getScroll(),h=e.getCaret(),i=e.start,f=e.end,j=d.getLineAtOffset(i),l=d.getLineAtOffset(f),k=Math.max(Math.max(i,d.getLineStart(l)),
f-1),m=this._getViewPadding(),n=this._getClientWidth(),o=m.left,m=m.left+n,p=this._getBoundsAtOffset(h===i?i:k),t=p.left,q=p.right,s=n/4;if(a&&!e.isEmpty()&&j===l&&(p=this._getBoundsAtOffset(h===f?i:k),n-s>(h===i?p.right-t:q-p.left))){if(t>p.left)t=p.left;if(q<p.right)q=p.right}e=this._viewDiv.getBoundingClientRect();t-=e.left;q-=e.left;e=0;t<o&&(e=Math.min(t-o,-s));q>m&&(e=Math.min(this._scrollDiv.scrollWidth-g.x-n,Math.max(q-m,s)));o=0;t=this._getTopIndex(!0);q=this._getBottomIndex(!0);d=d.getLineAtOffset(h);
m=this._getClientHeight();t<=d&&d<=q||(t=this._getLineHeight(),j=a?(l-j)*t:0,o=d*t,o-=g.y,o+t>m?(o-=m-t,h===i&&i!==f&&(o+=Math.min(m-t,j))):h===f&&(o-=Math.min(m-t,j)),c&&(c>0?o>0&&(o=Math.max(o,c)):o<0&&(o=Math.min(o,c))));return e!==0||o!==0?(this._scrollView(e,o),m!==this._getClientHeight()||n!==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("Changing",this._modelListener.onChanging);this._model.removeEventListener("Changed",this._modelListener.onChanged);this._modelListener=null;for(var a=0;a<this._handlers.length;a++){var c=this._handlers[a],d=c.target,e=c.type,c=c.handler;typeof d.removeEventListener==="function"?d.removeEventListener(e,c,!1):d.detachEvent("on"+e,c)}this._handlers=null;if(this._mutationObserver)this._mutationObserver.disconnect(),
this._mutationObserver=null},_updateDOMSelection:function(){if(!this._ignoreDOMSelection&&this._clientDiv&&this._hasFocus){var a=this._getSelection(),c=this._model,d=c.getLineAtOffset(a.start),e=c.getLineAtOffset(a.end),g=this._getLineNext();if(g){var h=this._getLinePrevious(),i;d<g.lineIndex?(i=g,d=0):d>h.lineIndex?(i=h,d=0):(i=this._getLineNode(d),d=a.start-c.getLineStart(d));e<g.lineIndex?a=0:e>h.lineIndex?(g=h,a=0):(g=this._getLineNode(e),a=a.end-c.getLineStart(e));this._setDOMSelection(i,d,g,
a)}}},_updatePage:function(a){var v;if(!(this._redrawCount>0)){if(this._updateTimer)clearTimeout(this._updateTimer),this._updateTimer=null,a=!1;var c=this._clientDiv;if(c){var d=this._model,e=this._getScroll(),g=this._getViewPadding(),i=d.getLineCount(),f=this._getLineHeight(),j=Math.max(0,e.y)/f,l=Math.floor(j),k=Math.max(0,l-1),m=Math.round((j-k)*f),n=this._partialY=Math.round((j-l)*f),j=i*f,p;if(a)d=this._getClientWidth(),p=this._getClientHeight(),i=this._leftDiv?this._leftDiv.scrollWidth:0,l=
Math.max(this._maxLineWidth,d);else{var t=this._parent;p=this._rootDiv;var e=t.clientWidth,q=t.clientHeight;p.style.width=e+"px";p.style.height=q+"px";t=this._viewDiv;t.style.height=Math.max(0,q-g.top-g.bottom)+"px";p=this._getClientHeight();for(var f=Math.min(l+Math.floor((p+n)/f),i-1),s=Math.min(f+1,i-1),q=c.firstChild;q;){var n=q.lineIndex,r=q.nextSibling;if(!(k<=n&&n<=s)||q.lineRemoved||q.lineIndex===-1)this._mouseWheelLine===q?(q.style.display="none",q.lineIndex=-1):c.removeChild(q);q=r}q=this._getLineNext();
r=document.createDocumentFragment();for(n=k;n<=s;n++)if(!q||q.lineIndex>n)this._createLine(r,null,document,n,d);else{r.firstChild&&(c.insertBefore(r,q),r=document.createDocumentFragment());if(q&&q.lineChanged)q=this._createLine(r,q,document,n,d),q.lineChanged=!1;q=this._getLineNext(q)}r.firstChild&&c.insertBefore(r,q);if(o)c.style.width=(524287).toString()+"px";for(q=this._getLineNext();q;){k=q.lineWidth;if(k===void 0)k=this._getLineBoundingClientRect(q),v=q.lineWidth=Math.ceil(k.right-k.left),k=
v;if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=q.lineIndex;if(q.lineIndex===l)this._topChild=q;if(q.lineIndex===f)this._bottomChild=q;if(this._checkMaxLineIndex===q.lineIndex)this._checkMaxLineIndex=-1;q=this._getLineNext(q)}if(this._checkMaxLineIndex!==-1&&(n=this._checkMaxLineIndex,this._checkMaxLineIndex=-1,0<=n&&n<i)){d=this._createLine(c,null,document,n,d);k=this._getLineBoundingClientRect(d);k=k.right-k.left;if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=
n;c.removeChild(d)}this._updateRuler(this._leftDiv,l,f);this._updateRuler(this._rightDiv,l,f);i=this._leftDiv?this._leftDiv.scrollWidth:0;l=this._rightDiv?this._rightDiv.scrollWidth:0;t.style.left=i+"px";t.style.width=Math.max(0,e-i-l-g.left-g.right)+"px";if(this._rightDiv)this._rightDiv.style.left=e-l+"px";e=this._scrollDiv;e.style.height=j+"px";d=this._getClientWidth();l=t=Math.max(this._maxLineWidth,d);if(!h||h>=9)t+=g.right;e.style.width=t+"px";if(this._clipScrollDiv)this._clipScrollDiv.style.width=
t+"px";e=this._getScroll();t=p+g.top+g.bottom;this._updateRulerSize(this._leftDiv,t);this._updateRulerSize(this._rightDiv,t)}if(this._vScrollDiv)t=p-8,k=Math.max(15,Math.ceil(Math.min(1,t/(j+g.top+g.bottom))*t)),this._vScrollDiv.style.left=i+d-8+"px",this._vScrollDiv.style.top=Math.floor(Math.max(0,e.y*t/j))+"px",this._vScrollDiv.style.height=k+"px";if(this._hScrollDiv)t=d-8,k=Math.max(15,Math.ceil(Math.min(1,t/(this._maxLineWidth+g.left+g.right))*t)),this._hScrollDiv.style.left=i+Math.floor(Math.max(0,
Math.floor(e.x*t/this._maxLineWidth)))+"px",this._hScrollDiv.style.top=p-9+"px",this._hScrollDiv.style.width=k+"px";q=e.x;n=this._clipDiv;t=this._overlayDiv;if(n){n.scrollLeft=q;k=i+g.left;f=g.top;a=d;i=p;q=0;s=-m;if(e.x===0)k-=g.left,a+=g.left,q=g.left;e.x+d===l&&(a+=g.right);e.y===0&&(f-=g.top,i+=g.top,s+=g.top);e.y+p===j&&(i+=g.bottom);n.style.left=k+"px";n.style.top=f+"px";n.style.width=a+"px";n.style.height=i+"px";c.style.left=q+"px";c.style.top=s+"px";c.style.width=l+"px";c.style.height=p+m+
"px";if(t)t.style.left=c.style.left,t.style.top=c.style.top,t.style.width=c.style.width,t.style.height=c.style.height}else{k=q;f=m;n=q+d;s=m+p;k===0&&(k-=g.left);f===0&&(f-=g.top);n===l&&(n+=g.right);e.y+p===j&&(s+=g.bottom);c.style.clip="rect("+f+"px,"+n+"px,"+s+"px,"+k+"px)";c.style.left=-q+i+g.left+"px";c.style.width=(o?l:d+q)+"px";if(!a)c.style.top=-m+g.top+"px",c.style.height=p+m+"px";if(t&&(t.style.clip=c.style.clip,t.style.left=c.style.left,t.style.width=c.style.width,!a))t.style.top=c.style.top,
t.style.height=c.style.height}this._updateDOMSelection();c=this._ensureCaretVisible;this._ensureCaretVisible=!1;p!==this._getClientHeight()&&(this._updatePage(),c&&this._showCaret())}}},_updateRulerSize:function(a,c){if(a){for(var d=this._partialY,e=this._getLineHeight(),g=a.firstChild.rows[0].cells,h=0;h<g.length;h++){var i=g[h].firstChild,f=e;i._ruler.getOverview()==="page"&&(f+=d);i.style.top=-f+"px";i.style.height=c+f+"px"}a.style.height=c+"px"}},_updateRuler:function(a,c,d){if(a)for(var a=a.firstChild.rows[0].cells,
e=this._getLineHeight(),g=this._getViewPadding(),h=0;h<a.length;h++){var i=a[h].firstChild,f=i._ruler;i.rulerChanged&&this._applyStyle(f.getRulerStyle(),i);var j,l=i.firstChild;l?(j=l,l=l.nextSibling):(j=document.createElement("DIV"),j.style.visibility="hidden",i.appendChild(j));var k,m;if(i.rulerChanged&&j){k=-1;if(m=f.getWidestAnnotation())if(this._applyStyle(m.style,j),m.html)j.innerHTML=m.html;j.lineIndex=k;j.style.height=e+g.top+"px"}var n,o;if(f.getOverview()==="page"){for(f=f.getAnnotations(c,
d+1);l;)k=l.lineIndex,m=l.nextSibling,(!(c<=k&&k<=d)||l.lineChanged)&&i.removeChild(l),l=m;l=i.firstChild.nextSibling;o=document.createDocumentFragment();for(k=c;k<=d;k++)if(!l||l.lineIndex>k){n=document.createElement("DIV");if(m=f[k]){this._applyStyle(m.style,n);if(m.html)n.innerHTML=m.html;n.annotation=m}n.lineIndex=k;n.style.height=e+"px";o.appendChild(n)}else if(o.firstChild&&(i.insertBefore(o,l),o=document.createDocumentFragment()),l)l=l.nextSibling;o.firstChild&&i.insertBefore(o,l)}else{m=this._getClientHeight();
k=this._model.getLineCount();l=m+g.top+g.bottom-2*this._metrics.scrollWidth;j=e*k<l?e:l/k;if(i.rulerChanged){for(m=i.childNodes.length;m>1;)i.removeChild(i.lastChild),m--;f=f.getAnnotations(0,k);o=document.createDocumentFragment();for(var t in f)if(k=t>>>0,!(k<0)){n=document.createElement("DIV");m=f[t];this._applyStyle(m.style,n);n.style.position="absolute";n.style.top=this._metrics.scrollWidth+e+Math.floor(k*j)+"px";if(m.html)n.innerHTML=m.html;n.annotation=m;n.lineIndex=k;o.appendChild(n)}i.appendChild(o)}else if(i._oldTrackHeight!==
l)for(n=i.firstChild?i.firstChild.nextSibling:null;n;)n.style.top=this._metrics.scrollWidth+e+Math.floor(n.lineIndex*j)+"px",n=n.nextSibling;i._oldTrackHeight=l}i.rulerChanged=!1}},_updateStyle:function(a){if(!a&&h)this._rootDiv.style.lineHeight="normal";var c=this._metrics=this._calculateMetrics();this._rootDiv.style.lineHeight=h?c.lineHeight-(c.lineTrim.top+c.lineTrim.bottom)+"px":"normal";a||(this.redraw(),this._resetLineWidth())}};a.EventTarget.addMixin(e.prototype);return{TextView:e}});
define("orion/textview/tooltip",["i18n!orion/textview/nls/messages","orion/textview/textView","orion/textview/textModel","orion/textview/projectionTextModel"],function(c,f,a,d){function g(a){this._view=a;this._create(a.getOptions("parent").ownerDocument);a.addEventListener("Destroy",this,this.destroy)}g.getTooltip=function(a){if(!a._tooltip)a._tooltip=new g(a);return a._tooltip};g.prototype={_create:function(a){if(!this._tooltipDiv){var c=this._tooltipDiv=a.createElement("DIV");c.className="textviewTooltip";
c.setAttribute("aria-live","assertive");c.setAttribute("aria-atomic","true");var d=this._tooltipContents=a.createElement("DIV");c.appendChild(d);a.body.appendChild(c);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,c){if(this.target!==a&&(this._target=a,this.hide(),a)){var d=this;c===0?d.show(!0):d._showTimeout=setTimeout(function(){d.show(!0)},c?c:500)}},show:function(a){if(this._target){var c=
this._target.getTooltipInfo();if(c){var g=this._tooltipDiv,k=this._tooltipContents;g.style.left=g.style.right=g.style.width=g.style.height=k.style.width=k.style.height="auto";var j=c.contents;j instanceof Array&&(j=this._getAnnotationContents(j));if(typeof j==="string")k.innerHTML=j;else if(this._isNode(j))k.appendChild(j);else if(j instanceof d.ProjectionTextModel){var l=this._view,m=l.getOptions();m.parent=k;var o=m.themeClass;o?((o=o.replace("tooltip",""))&&(o=" "+o),o="tooltip"+o):o="tooltip";
m.themeClass=o;m=this._contentsView=new f.TextView(m);m._clientDiv.contentEditable=!1;m.addEventListener("LineStyle",function(a){l.onLineStyle(a)});m.setModel(j);j=m.computeSize();k.style.width=j.width+20+"px";k.style.height=j.height+"px";m.resize()}else return;k=g.ownerDocument.documentElement;c.anchor==="right"?(j=k.clientWidth-c.x,g.style.right=j+"px"):(j=parseInt(this._getNodeStyle(g,"padding-left","0"),10),j+=parseInt(this._getNodeStyle(g,"border-left-width","0"),10),j=c.x-j,g.style.left=j+"px");
g.style.maxWidth=k.clientWidth-j-10+"px";j=parseInt(this._getNodeStyle(g,"padding-top","0"),10);j+=parseInt(this._getNodeStyle(g,"border-top-width","0"),10);j=c.y-j;g.style.top=j+"px";g.style.maxHeight=k.clientHeight-j-10+"px";g.style.opacity="1";g.style.visibility="visible";if(a){var n=this;n._hideTimeout=setTimeout(function(){var a=parseFloat(n._getNodeStyle(g,"opacity","1"));n._fadeTimeout=setInterval(function(){g.style.visibility==="visible"&&a>0?(a-=0.1,g.style.opacity=a):n.hide()},50)},5E3)}}}},
_getAnnotationContents:function(a){function g(a){var c=a.title;if(c==="")return null;var d="<div>";a.html&&(d+=a.html+"&nbsp;");if(!c)c=a.end,a=f.getLineStart(f.getLineAtOffset(a.start)),c=f.getLineEnd(f.getLineAtOffset(c),!0),c=f.getText(a,c);c=c.replace(/</g,"&lt;").replace(/>/g,"&gt;");d+="<span style='vertical-align:middle;'>"+c+"</span><div>";return d}if(a.length===0)return null;var h=this._view.getModel(),f=h.getBaseModel?h.getBaseModel():h;if(a.length===1)if(h=a[0],h.title!==void 0)return g(h);
else{var a=new d.ProjectionTextModel(f),j=f.getLineStart(f.getLineAtOffset(h.start)),l=f.getCharCount();h.end!==l&&a.addProjection({start:h.end,end:l});j>0&&a.addProjection({start:0,end:j});return a}else{j="<div><em>"+c.multipleAnnotations+"</em></div>";for(l=0;l<a.length;l++)h=a[l],(h=g(h))&&(j+=h);return j}},_getNodeStyle:function(a,c,d){var g;if(a&&(g=a.style[c],!g))if(a.currentStyle){for(g=0;(g=c.indexOf("-",g))!==-1;)c=c.substring(0,g)+c.substring(g+1,g+2).toUpperCase()+c.substring(g+2);g=a.currentStyle[c]}else g=
(a=a.ownerDocument.defaultView.getComputedStyle(a,null))?a.getPropertyValue(c):null;return g||d},_isNode:function(a){return typeof Node==="object"?a instanceof Node:a&&typeof a==="object"&&typeof a.nodeType==="number"&&typeof a.nodeName==="string"}};return{Tooltip:g}});
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(c,f,a,d,g,e){function i(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 c=this,d=Array.prototype.slice.call(arguments,1);return d.length?function(){return arguments.length?c.apply(a,d.concat(Array.prototype.slice.call(arguments))):
c.apply(a,d)}:function(){return arguments.length?c.apply(a,arguments):c.call(a)}}var k;i.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 c=this._textView;a?c.addRuler(this._annotationRuler,0):c.removeRuler(this._annotationRuler)}},setFoldingRulerVisible:function(a){if(this._foldingRulerVisible!==a&&(this._foldingRulerVisible=a,this._foldingRuler)){var c=
this._textView;c.getModel().getBaseModel&&(a?c.addRuler(this._foldingRuler,100):c.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 c=this._textView;a?c.addRuler(this._lineNumberRuler,1):c.removeRuler(this._lineNumberRuler)}},setOverviewRulerVisible:function(a){if(this._overviewRulerVisible!==
a&&(this._overviewRulerVisible=a,this._overviewRuler)){var c=this._textView;a?c.addRuler(this._overviewRuler):c.removeRuler(this._overviewRuler)}},mapOffset:function(a,c){var d=this._textView.getModel();d.getBaseModel&&(a=d.mapOffset(a,c));return a},getCaretOffset:function(){return this.mapOffset(this._textView.getCaretOffset())},getSelection:function(){var a=this._textView,c=a.getSelection(),a=a.getModel();if(a.getBaseModel)c.start=a.mapOffset(c.start),c.end=a.mapOffset(c.end);return c},getText:function(a,
c){var d=this._textView.getModel();d.getBaseModel&&(d=d.getBaseModel());return d.getText(a,c)},_expandOffset:function(a){var c=this._textView.getModel(),d=this._annotationModel;if(d&&c.getBaseModel)for(a=d.getAnnotations(a,a+1);a.hasNext();)c=a.next(),c.type===g.AnnotationType.ANNOTATION_FOLDING&&c.expand&&(c.expand(),d.modifyAnnotation(c))},setCaretOffset:function(a){var c=this._textView,d=c.getModel();d.getBaseModel&&(this._expandOffset(a),a=d.mapOffset(a,!0));c.setCaretOffset(a)},setText:function(a,
c,d){var e=this._textView,g=e.getModel();g.getBaseModel&&(c!==void 0&&(this._expandOffset(c),c=g.mapOffset(c,!0)),d!==void 0&&(this._expandOffset(d),d=g.mapOffset(d,!0)));e.setText(a,c,d)},setFoldingEnabled:function(a){this.setFoldingRulerVisible(a)},setSelection:function(a,c,d){var e=this._textView,g=e.getModel();g.getBaseModel&&(this._expandOffset(a),this._expandOffset(c),a=g.mapOffset(a,!0),c=g.mapOffset(c,!0));e.setSelection(a,c,d)},moveSelection:function(a,c,d,e){var g=this._textView;this.setSelection(a,
c||a,!1);var c=g.getTopPixel(),h=g.getBottomPixel(),a=this.getModel().getLineAtOffset(a),a=g.getLinePixel(a);a<c||a>h?(h=Math.max(0,a-Math.floor((a<c?3:1)*(h-c)/4)),(new k({node:g,duration:300,curve:[c,h],onAnimate:function(a){g.setTopPixel(Math.floor(a))},onEnd:function(){g.showSelection();(e===void 0||e)&&g.focus();d&&d()}})).play()):(g.showSelection(),(e===void 0||e)&&g.focus(),d&&d())},checkDirty:function(){this.setDirty(!this._undoStack.isClean())},reportStatus:function(a,c,d){this._statusReporter?
this._statusReporter(a,c,d):window.alert(c==="error"?"ERROR: "+a:a)},_getTooltipInfo:function(a,c){var d=this._textView,e=this.getAnnotationModel();if(!e)return null;var g=this._annotationStyler;if(!g)return null;var h=d.getOffsetAtLocation(a,c);if(h===-1)return null;h=this.mapOffset(h);g=g.getAnnotationsByType(e,h,h+1);e=[];for(h=0;h<g.length;h++)g[h].rangeStyle&&e.push(g[h]);if(e.length===0)return null;d=d.convert({x:a,y:c},"document","page");return{contents:e,anchor:"left",x:d.x+10,y:d.y+20}},
_highlightCurrentLine:function(a,c){var d=this._annotationModel;if(d){var e=this._textView.getModel(),h=c?e.getLineAtOffset(c.start):-1,i=e.getLineAtOffset(a.start),f=a.start===a.end,k=!c||c.start===c.end;if(!(h===i&&k&&f)){h=this._currentLineAnnotation?[this._currentLineAnnotation]:null;this._currentLineAnnotation=null;var s;if(f)f=e.getLineStart(i),i=e.getLineEnd(i),e.getBaseModel&&(f=e.mapOffset(f),i=e.mapOffset(i)),this._currentLineAnnotation=g.AnnotationType.createAnnotation(g.AnnotationType.ANNOTATION_CURRENT_LINE,
f,i),s=[this._currentLineAnnotation];d.replaceAnnotations(h,s)}}},highlightAnnotations:function(){if(this._annotationStyler)this._annotationStyler.destroy(),this._annotationStyler=null;if(this._annotationFactory)this._annotationStyler=this._annotationFactory.createAnnotationStyler(this.getTextView(),this._annotationModel),this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_CURRENT_SEARCH),this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_MATCHING_SEARCH),this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_ERROR),
this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_WARNING),this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_MATCHING_BRACKET),this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_CURRENT_BRACKET),this._annotationStyler.addAnnotationType(g.AnnotationType.ANNOTATION_CURRENT_LINE),this._annotationStyler.addAnnotationType("orion.annotation.highlightError")},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 e=this,h=this._textView,i=this;this._listener={onModelChanged:function(){i.checkDirty()},onMouseOver:function(a){i._listener.onMouseMove(a)},onMouseMove:function(a){var c=d.Tooltip.getTooltip(h);c&&c.setTarget({x:a.x,
y:a.y,getTooltipInfo:function(){return i._getTooltipInfo(this.x,this.y)}})},onMouseOut:function(){var a=d.Tooltip.getTooltip(h);a&&a.setTarget(null)},onSelection:function(a){i._updateCursorStatus();i._highlightCurrentLine(a.newValue,a.oldValue)}};h.addEventListener("ModelChanged",this._listener.onModelChanged);h.addEventListener("Selection",this._listener.onSelection);h.addEventListener("MouseOver",this._listener.onMouseOver);h.addEventListener("MouseOut",this._listener.onMouseOut);h.addEventListener("MouseMove",
this._listener.onMouseMove);this._keyBindingFactory&&this._keyBindingFactory(this,this._keyModes,this._undoStack,this._contentAssist);h.setKeyBinding(new f.KeyBinding(27),"cancelMode");h.setAction("cancelMode",function(){for(var a=!1,c=0;c<this._keyModes.length;c++)this._keyModes[c].isActive()&&(a=this._keyModes[c].cancel()||a);return a}.bind(this),{name:c.cancelMode});h.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));h.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));h.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));if(this._annotationFactory){a=h.getModel();a.getBaseModel&&(a=a.getBaseModel());this._annotationModel=this._annotationFactory.createAnnotationModel(a);h.annotationModel=
this._annotationModel;var a=this._annotationFactory.createAnnotationRulers(this._annotationModel),k=this._annotationRuler=a.annotationRuler;if(k)k.onClick=function(a){if(a!==void 0&&a!==-1)for(var c=h.getModel(),d=this.getAnnotationModel(),g=e.mapOffset(c.getLineStart(a)),a=e.mapOffset(c.getLineEnd(a)),a=d.getAnnotations(g,a);a.hasNext();)if(d=a.next(),this.isAnnotationTypeVisible(d.type)){a=e.getModel();e.onGotoLine(a.getLineAtOffset(g),d.start-g,d.end-g);break}},k.setMultiAnnotationOverlay({html:"<div class='annotationHTML overlay'></div>"}),
k.addAnnotationType(g.AnnotationType.ANNOTATION_ERROR),k.addAnnotationType(g.AnnotationType.ANNOTATION_WARNING),k.addAnnotationType(g.AnnotationType.ANNOTATION_TASK);this.setAnnotationRulerVisible(!0);if(k=this._overviewRuler=a.overviewRuler)k.onClick=function(a){a!==void 0&&(a=h.getModel().getLineStart(a),e.moveSelection(e.mapOffset(a)))},k.addAnnotationType(g.AnnotationType.ANNOTATION_CURRENT_SEARCH),k.addAnnotationType(g.AnnotationType.ANNOTATION_MATCHING_SEARCH),k.addAnnotationType(g.AnnotationType.ANNOTATION_ERROR),
k.addAnnotationType(g.AnnotationType.ANNOTATION_WARNING),k.addAnnotationType(g.AnnotationType.ANNOTATION_TASK),k.addAnnotationType(g.AnnotationType.ANNOTATION_MATCHING_BRACKET),k.addAnnotationType(g.AnnotationType.ANNOTATION_CURRENT_BRACKET),k.addAnnotationType(g.AnnotationType.ANNOTATION_CURRENT_LINE);this.setOverviewRulerVisible(!0)}if(this._lineNumberRulerFactory)this._lineNumberRuler=this._lineNumberRulerFactory.createLineNumberRuler(this._annotationModel),this.setLineNumberRulerVisible(!0);if(this._foldingRulerFactory)this._foldingRuler=
this._foldingRulerFactory.createFoldingRuler(this._annotationModel),this._foldingRuler.addAnnotationType(g.AnnotationType.ANNOTATION_FOLDING),this.setFoldingRulerVisible(!1);this.dispatchEvent({type:"TextViewInstalled",textView:h})},_updateCursorStatus:function(){var a=this.getModel(),d=this.getCaretOffset(),g=a.getLineAtOffset(d),a=a.getLineStart(g);d-=a;for(a=0;a<this._keyModes.length;a++){var h=this._keyModes[a];if(h.isActive()&&h.isStatusActive&&h.isStatusActive())return}this.reportStatus(e.formatMessage(c.lineColumn,
g+1,d+1))},showProblems:function(a){var c=this._annotationModel;if(c){for(var d=[],e=[],h=c.getTextModel(),i=c.getAnnotations(0,h.getCharCount()),f;i.hasNext();)f=i.next(),(f.type===g.AnnotationType.ANNOTATION_ERROR||f.type===g.AnnotationType.ANNOTATION_WARNING)&&d.push(f);if(a)for(i=0;i<a.length;i++)if(f=a[i]){var k=f.description.replace(/'/g,"&#39;").replace(/"/g,"&#34;"),s=h.getLineStart(f.line-1);f=g.AnnotationType.createAnnotation(f.severity==="error"?g.AnnotationType.ANNOTATION_ERROR:g.AnnotationType.ANNOTATION_WARNING,
s+f.start-1,s+f.end,k);e.push(f)}c.replaceAnnotations(d,e)}},showSelection:function(a,c,d,e,g){typeof a==="number"?(typeof c!=="number"&&(c=a),this.moveSelection(a,c)):typeof d==="number"&&(a=this.getModel().getLineStart(d-1),typeof e==="number"&&(a+=e),typeof g!=="number"&&(g=0),this.moveSelection(a,a+g))},setInput:function(a,c,d,e){this._title=a;this._textView&&(e?(this._undoStack.markClean(),this.checkDirty()):(c?this._textView.setText(c):d!==null&&d!==void 0&&(this._textView.setText(d),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:c,contents:d,contentsSaved:e})},onInputChanged:function(a){return this.dispatchEvent(a)},onGotoLine:function(a,c,d){if(this._textView){var e=this.getModel(),g=e.getLineStart(a),h=0;d===void 0&&(d=0);typeof c==="string"?(a=e.getLine(a).indexOf(c),a!==-1&&(h=a,d=h+c.length)):(h=c,c=e.getLineEnd(a)-g,h=Math.min(h,c),d=Math.min(d,
c));this.moveSelection(g+h,g+d)}},onDirtyChanged:function(a){return this.dispatchEvent(a)}};a.EventTarget.addMixin(i.prototype);k=function(){function a(c){this.options=c}a.prototype.play=function(){var a=typeof this.options.duration==="number"?this.options.duration:350,c=this.options.easing||this.defaultEasing,d=this.options.onAnimate||function(){},e=this.options.onEnd||function(){},g=this.options.curve[0],h=this.options.curve[1]-g,i,f,j=-1;f=setInterval(function(){j=j===-1?(new Date).getTime():j;
var k=((new Date).getTime()-j)/a;k<1?(k=c(k),i=g+k*h,d(i)):(clearInterval(f),e())},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:i,util:{bind:h}}});
define("orion/textview/rulers",["i18n!orion/textview/nls/messages","orion/textview/annotations","orion/textview/tooltip","orion/textview/i18nUtil"],function(c,f,a,d){function g(a,c,d,e){this._location=c||"left";this._overview=d||"page";this._rulerStyle=e;this._view=null;var g=this;this._listener={onTextModelChanged:function(a){g._onTextModelChanged(a)},onAnnotationModelChanged:function(a){g._onAnnotationModelChanged(a)}};this.setAnnotationModel(a)}function e(a,c,d,e,h){g.call(this,a,c,"page",d);this._oddStyle=
e||{style:{backgroundColor:"white"}};this._evenStyle=h||{style:{backgroundColor:"white"}};this._numOfDigits=0}function i(a,c,d){g.call(this,a,c,"page",d)}function h(a,c,d){g.call(this,a,c,"document",d)}function k(a,c,d){i.call(this,a,c,d)}g.prototype={getAnnotations:function(a,c){var d=this._annotationModel;if(!d)return[];var e=this._view.getModel(),g=e.getLineStart(a),h=e.getLineEnd(c-1),i=e;e.getBaseModel&&(i=e.getBaseModel(),g=e.mapOffset(g),h=e.mapOffset(h));for(var f=[],d=this.getAnnotationsByType(d,
g,h),g=0;g<d.length;g++)for(var h=d[g],k=i.getLineAtOffset(h.start),u=i.getLineAtOffset(Math.max(h.start,h.end-1)),t=k;t<=u;t++){var v=t;if(e!==i){v=i.getLineStart(t);v=e.mapOffset(v,!0);if(v===-1)continue;v=e.getLineAtOffset(v)}if(a<=v&&v<c){var x=this._mergeAnnotation(f[v],h,t-k,u-k+1);x&&(f[v]=x)}}if(!this._multiAnnotation&&this._multiAnnotationOverlay)for(var w in f)f[w]._multiple&&(f[w].html+=this._multiAnnotationOverlay.html);return f},getAnnotationModel:function(){return this._annotationModel},
getLocation:function(){return this._location},getOverview:function(){return this._overview},getRulerStyle:function(){return this._rulerStyle},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(c,d){var e=a.Tooltip.getTooltip(this._view);if(e&&!(e.isVisible()&&this._tooltipLineIndex===c)){this._tooltipLineIndex=
c;var g=this;e.setTarget({y:d.clientY,getTooltipInfo:function(){return g._getTooltipInfo(g._tooltipLineIndex,this.y)}})}},onMouseOver:function(a,c){this.onMouseMove(a,c)},onMouseOut:function(){var c=a.Tooltip.getTooltip(this._view);c&&c.setTarget(null)},_getTooltipInfo:function(a,c){if(a!==void 0){var d=this._view,e=d.getModel(),g=this._annotationModel,h=[];if(g){var h=e.getLineStart(a),i=e.getLineEnd(a);e.getBaseModel&&(h=e.mapOffset(h),i=e.mapOffset(i));h=this.getAnnotationsByType(g,h,i)}g=this._getTooltipContents(a,
h);if(!g)return null;g={contents:g,anchor:this.getLocation()};h=d.getClientArea();h.y=this.getOverview()==="document"?d.convert({y:c},"view","document").y:d.getLocationAtOffset(e.getLineStart(a)).y;d.convert(h,"document","page");g.x=h.x;g.y=h.y;g.anchor==="right"&&(g.x+=h.width);return g}},_getTooltipContents:function(a,c){return c},_onAnnotationModelChanged:function(a){function c(a){for(var h=0;h<a.length;h++)if(g.isAnnotationTypeVisible(a[h].type)){var i=a[h].start,f=a[h].end;e.getBaseModel&&(i=
e.mapOffset(i,!0),f=e.mapOffset(f,!0));i!==-1&&f!==-1&&d.redrawLines(e.getLineAtOffset(i),e.getLineAtOffset(Math.max(i,f-1))+1,g)}}var d=this._view;if(d){var e=d.getModel(),g=this,h=e.getLineCount();a.textModelChangedEvent?(a=a.textModelChangedEvent.start,e.getBaseModel&&(a=e.mapOffset(a,!0)),a=e.getLineAtOffset(a),d.redrawLines(a,h,g)):(c(a.added),c(a.removed),c(a.changed))}},_mergeAnnotation:function(a,c,d){a||(a={});if(d===0)if(a.html&&c.html){if(c.html!==a.html&&!a._multiple&&this._multiAnnotation)a.html=
this._multiAnnotation.html;a._multiple=!0}else a.html=c.html;a.style=this._mergeStyle(a.style,c.style);return a},_mergeStyle:function(a,c){if(c){a||(a={});a.styleClass&&c.styleClass&&a.styleClass!==c.styleClass?a.styleClass+=" "+c.styleClass:a.styleClass=c.styleClass;var d;if(c.style){if(!a.style)a.style={};for(d in c.style)a.style[d]||(a.style[d]=c.style[d])}if(c.attributes){if(!a.attributes)a.attributes={};for(d in c.attributes)a.attributes[d]||(a.attributes[d]=c.attributes[d])}}return a}};f.AnnotationTypeList.addMixin(g.prototype);
e.prototype=new g;e.prototype.getAnnotations=function(a,c){for(var d=g.prototype.getAnnotations.call(this,a,c),e=this._view.getModel(),h=a;h<c;h++){var i=h&1?this._oddStyle:this._evenStyle,f=h;e.getBaseModel&&(f=e.getLineStart(f),f=e.getBaseModel().getLineAtOffset(e.mapOffset(f)));d[h]||(d[h]={});d[h].html=f+1+"";if(!d[h].style)d[h].style=i}return d};e.prototype.getWidestAnnotation=function(){var a=this._view.getModel().getLineCount();return this.getAnnotations(a-1,a)[a-1]};e.prototype._onTextModelChanged=
function(a){var a=a.start,c=this._view.getModel(),d=((c.getBaseModel?c.getBaseModel().getLineCount():c.getLineCount())+"").length;if(this._numOfDigits!==d)this._numOfDigits=d,this._view.redrawLines(c.getLineAtOffset(a),c.getLineCount(),this)};i.prototype=new g;h.prototype=new g;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,e){if(e.length===0){var h=this._view.getModel(),i=a;h.getBaseModel&&(i=h.getLineStart(i),i=h.getBaseModel().getLineAtOffset(h.mapOffset(i)));return d.formatMessage(c.line,i+1)}return g.prototype._getTooltipContents.call(this,a,e)};h.prototype._mergeAnnotation=function(a,c,d,e){if(d===0){if(!a)a={html:"&nbsp;",style:{style:{height:3*e+"px"}}},a.style=this._mergeStyle(a.style,c.overviewStyle);return a}};k.prototype=new i;k.prototype.onClick=function(c){if(c!==void 0){var d=this._annotationModel;
if(d){var e=this._view.getModel(),g=e.getLineStart(c),c=e.getLineEnd(c,!0);e.getBaseModel&&(g=e.mapOffset(g),c=e.mapOffset(c),e=e.getBaseModel());for(var h,d=d.getAnnotations(g,c);!h&&d.hasNext();)c=d.next(),this.isAnnotationTypeVisible(c.type)&&(h=c);h&&e.getLineAtOffset(h.start)===e.getLineAtOffset(g)&&((e=a.Tooltip.getTooltip(this._view))&&e.setTarget(null),h.expanded?h.collapse():h.expand(),this._annotationModel.modifyAnnotation(h))}}};k.prototype._getTooltipContents=function(a,c){return c.length===
1&&c[0].expanded?null:i.prototype._getTooltipContents.call(this,a,c)};k.prototype._onAnnotationModelChanged=function(a){function c(a){for(h=0;h<a.length;h++)if(g.isAnnotationTypeVisible(a[h].type)){var d=a[h].start;e.getBaseModel&&(d=e.mapOffset(d,!0));d!==-1&&(k=Math.min(k,e.getLineAtOffset(d)))}}if(a.textModelChangedEvent)i.prototype._onAnnotationModelChanged.call(this,a);else{var d=this._view;if(d){var e=d.getModel(),g=this,h,f=e.getLineCount(),k=f;c(a.added);c(a.removed);c(a.changed);a=d.getRulers();
for(h=0;h<a.length;h++)d.redrawLines(k,f,a[h])}}};return{Ruler:g,AnnotationRuler:i,LineNumberRuler:e,OverviewRuler:h,FoldingRuler:k}});
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(c,f,a,d,g,e,i,h,k){function j(){}function l(){}function m(){}function o(){}function n(){}function p(a,c,d){this.editor=a;this.textView=a.getTextView();this.undoStack=c;this._incrementalFindActive=!1;this._incrementalFindSuccess=
!0;this._incrementalFindIgnoreSelection=!1;this._incrementalFindPrefix="";this._searcher=d;this._lastEditLocation=null;this.init()}function q(a,c,d,e){this.editor=a;this.textView=a.getTextView();this.undoStack=c;this.contentAssist=d;this.linkedMode=e;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 c=!1,d=0,e=0;e<this.linkedModePositions.length;++e){var g=this.linkedModePositions[e];if(c)g.offset+=d;else if(a.start>=g.offset&&a.end<=g.offset+g.length)c=g.length,g.length=a.start-g.offset+a.text.length+(g.offset+g.length-a.end),d=g.length-c,c=!0}c?this.linkedModeEscapePosition+=d:this.cancel()}.bind(this)}}j.prototype={createUndoStack:function(d){var d=d.getTextView(),e=new f.UndoStack(d,200);d.setKeyBinding(new a.KeyBinding("z",
!0),"undo");d.setAction("undo",function(){e.undo();return!0},{name:c.undo});var g=navigator.platform.indexOf("Mac")!==-1;d.setKeyBinding(g?new a.KeyBinding("z",!0,!0):new a.KeyBinding("y",!0),"redo");d.setAction("redo",function(){e.redo();return!0},{name:c.redo});return e}};l.prototype={createLineNumberRuler:function(a){return new d.LineNumberRuler(a,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"})}};m.prototype={createFoldingRuler:function(a){return new d.FoldingRuler(a,
"left",{styleClass:"ruler folding"})}};o.prototype={createAnnotationModel:function(a){return new g.AnnotationModel(a)},createAnnotationStyler:function(a,c){return new g.AnnotationStyler(a,c)},createAnnotationRulers:function(a){var c=new d.AnnotationRuler(a,"left",{styleClass:"ruler annotations"}),a=new d.OverviewRuler(a,"right",{styleClass:"ruler overview"});return{annotationRuler:c,overviewRuler:a}}};n.prototype={createTextDND:function(a,c){return new i.TextDND(a.getTextView(),c)}};p.prototype={init:function(){var d=
this;this._incrementalFindListener={onVerify:function(a){var e=d.editor,g=e.getModel(),i=e.mapOffset(a.start),f=e.mapOffset(a.end),i=g.getText(i,f),g=d._incrementalFindPrefix;if((g=g.match(RegExp("^"+h.escape(i),"i")))&&g.length>0)g=d._incrementalFindPrefix+=a.text,d.editor.reportStatus(k.formatMessage(c.incrementalFind,g)),i=e.getSelection().start,(i=e.getModel().find({string:g,start:i,caseInsensitive:g.toLowerCase()===g}).next())?(d._incrementalFindSuccess=!0,d._incrementalFindIgnoreSelection=!0,
e.moveSelection(i.start,i.end),d._incrementalFindIgnoreSelection=!1):(e.reportStatus(k.formatMessage(c.incrementalFindNotFound,g),"error"),d._incrementalFindSuccess=!1),a.text=null},onSelection:function(){d._incrementalFindIgnoreSelection||d.toggleIncrementalFind()}};this._lastEditListener={onModelChanged:function(a){if(d.editor.isDirty())d._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:c.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:c.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 d=this._incrementalFindPrefix;if(d.length!==0){var e;e=0;this._incrementalFindSuccess&&(e=a.getSelection().start+1);(e=a.getModel().find({string:d,start:e,caseInsensitive:d.toLowerCase()===
d}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1,a.reportStatus(k.formatMessage(c.incrementalFind,d))):(a.reportStatus(k.formatMessage(c.incrementalFindNotFound,d),"error"),this._incrementalFindSuccess=!1)}}else a.setCaretOffset(a.getCaretOffset()),this.toggleIncrementalFind();return!0}.bind(this),{name:c.incrementalFindKey});this.textView.setAction("deletePrevious",function(){if(this._incrementalFindActive){var a=
this.editor,d=this._incrementalFindPrefix,d=this._incrementalFindPrefix=d.substring(0,d.length-1);if(d.length===0)return this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.setCaretOffset(a.getSelection().start),this._incrementalFindIgnoreSelection=!1,this.toggleIncrementalFind(),!0;a.reportStatus(k.formatMessage(c.incrementalFind,d));var e=a.getModel().find({string:d,start:a.getCaretOffset()-d.length-1,reverse:!0,caseInsensitive:d.toLowerCase()===d}).next();e?(this._incrementalFindIgnoreSelection=
this._incrementalFindSuccess=!0,a.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1):a.reportStatus(k.formatMessage(c.incrementalFindNotFound,d),"error");return!0}return!1}.bind(this));this.textView.setAction("tab",function(){if(this.textView.getOptions("tabMode")){var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start),g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end);if(e!==g){var h=[];h.push("");for(var i=e;i<=g;i++)h.push(c.getLine(i,!0));var i=c.getLineStart(e),
c=c.getLineEnd(g,!0),f=this.textView.getOptions("tabSize","expandTab"),f=f.expandTab?Array(f.tabSize+1).join(" "):"\t";a.setText(h.join(f),i,c);a.setSelection(i===d.start?d.start:d.start+f.length,d.end+(g-e+1)*f.length);return!0}a=a.getKeyModes();for(d=0;d<a.length;d++)if(a[d].isActive())return a[d].tab();return!1}}.bind(this));this.textView.setAction("shiftTab",function(){if(this.textView.getOptions("tabMode")){for(var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start),
g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),h=this.textView.getOptions("tabSize"),i=Array(h+1).join(" "),f=[],j=0,k=0,l=e;l<=g;l++){var n=c.getLine(l,!0);if(c.getLineStart(l)!==c.getLineEnd(l))if(n.indexOf("\t")===0)n=n.substring(1),j++;else if(n.indexOf(i)===0)n=n.substring(h),j+=h;else return!0;l===e&&(k=j);f.push(n)}e=c.getLineStart(e);h=c.getLineEnd(g,!0);c=c.getLineStart(g);a.setText(f.join(""),e,h);a.setSelection(e===d.start?d.start:d.start-k,d.end-j+(d.end===c+1?1:0));return!0}}.bind(this),
{name:c.unindentLines});this.textView.setKeyBinding(new a.KeyBinding(38,!1,!1,!0),"moveLinesUp");this.textView.setAction("moveLinesUp",function(){var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start);if(e===0)return!0;var g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),h=c.getLineCount(),d=c.getLineStart(e-1),i=c.getLineStart(e),f=c.getLineEnd(g,!0),j=c.getText(i,f),k=0;g===h-1&&(g=c.getLineEnd(e-1),e=c.getLineEnd(e-1,!0),j+=c.getText(g,e),i=g,k=e-g);this.startUndo();a.setText("",
i,f);a.setText(j,d,d);a.setSelection(d,d+j.length-k);this.endUndo();return!0}.bind(this),{name:c.moveLinesUp});this.textView.setKeyBinding(new a.KeyBinding(40,!1,!1,!0),"moveLinesDown");this.textView.setAction("moveLinesDown",function(){var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start),g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),h=c.getLineCount();if(g===h-1)return!0;var e=c.getLineStart(e),d=c.getLineEnd(g,!0),i=c.getLineEnd(g+1,!0)-(d-e),f=0;g!==h-2?c=c.getText(e,
d):(g=c.getLineEnd(g),c=c.getText(g,d)+c.getText(e,g),f+=d-g);this.startUndo();a.setText("",e,d);a.setText(c,i,i);a.setSelection(i+f,i+f+c.length);this.endUndo();return!0}.bind(this),{name:c.moveLinesDown});this.textView.setKeyBinding(new a.KeyBinding(38,!0,!1,!0),"copyLinesUp");this.textView.setAction("copyLinesUp",function(){var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start),d=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),e=c.getLineStart(e),g=c.getLineEnd(d,!0),h=
c.getLineCount(),i="",g=c.getText(e,g);d===h-1&&(g+=i=c.getLineDelimiter());a.setText(g,e,e);a.setSelection(e,e+g.length-i.length);return!0}.bind(this),{name:c.copyLinesUp});this.textView.setKeyBinding(new a.KeyBinding(40,!0,!1,!0),"copyLinesDown");this.textView.setAction("copyLinesDown",function(){var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start),d=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),g=c.getLineStart(e),e=c.getLineEnd(d,!0),h=c.getLineCount(),i="",g=c.getText(g,
e);d===h-1&&(g=(i=c.getLineDelimiter())+g);a.setText(g,e,e);a.setSelection(e+i.length,e+g.length);return!0}.bind(this),{name:c.copyLinesDown});this.textView.setKeyBinding(new a.KeyBinding("d",!0,!1,!1),"deleteLines");this.textView.setAction("deleteLines",function(){var a=this.editor,c=a.getSelection(),d=a.getModel(),e=d.getLineAtOffset(c.start),c=d.getLineAtOffset(c.end>c.start?c.end-1:c.end),e=d.getLineStart(e),d=d.getLineEnd(c,!0);a.setText("",e,d);return!0}.bind(this),{name:c.deleteLines});this.textView.setKeyBinding(new a.KeyBinding("l",
!0),"gotoLine");this.textView.setAction("gotoLine",function(){var a=this.editor,d=a.getModel().getLineAtOffset(a.getCaretOffset());if(d=prompt(c.gotoLinePrompty,d+1))d=parseInt(d,10),a.onGotoLine(d-1,0);return!0}.bind(this),{name:c.gotoLine});this.textView.setKeyBinding(new a.KeyBinding(190,!0),"nextAnnotation");this.textView.setAction("nextAnnotation",function(){var a=this.editor,c=a.getAnnotationModel();if(!c)return!0;for(var d=a.getModel(),h=a.getCaretOffset(),c=c.getAnnotations(h,d.getCharCount());c.hasNext();){var i=
c.next();if(!(i.start<=h)&&!(i.type!==g.AnnotationType.ANNOTATION_ERROR&&i.type!==g.AnnotationType.ANNOTATION_WARNING&&i.type!==g.AnnotationType.ANNOTATION_TASK)){var f=e.Tooltip.getTooltip(this.textView);if(!f){a.moveSelection(i.start);break}var j=d.getLineAtOffset(i.start),k=this.textView;a.moveSelection(i.start,i.start,function(){setTimeout(function(){f.setTarget({getTooltipInfo:function(){var a=k.convert({x:k.getLocationAtOffset(i.start).x,y:k.getLocationAtOffset(d.getLineStart(j)).y},"document",
"page");return{contents:[i],x:a.x,y:a.y+Math.floor(k.getLineHeight(j)*1.33)}}},0)},0)});break}}return!0}.bind(this),{name:c.nextAnnotation});this.textView.setKeyBinding(new a.KeyBinding(188,!0),"previousAnnotation");this.textView.setAction("previousAnnotation",function(){var a=this.editor,c=a.getAnnotationModel();if(!c)return!0;for(var d=a.getModel(),h=a.getCaretOffset(),c=c.getAnnotations(0,h),i=null;c.hasNext();){var f=c.next();f.start>=h||f.type!==g.AnnotationType.ANNOTATION_ERROR&&f.type!==g.AnnotationType.ANNOTATION_WARNING&&
f.type!==g.AnnotationType.ANNOTATION_TASK||(i=f)}if(i){var j=d.getLineAtOffset(i.start),k=e.Tooltip.getTooltip(this.textView);if(!k)return a.moveSelection(i.start),!0;var l=this.textView;a.moveSelection(i.start,i.start,function(){setTimeout(function(){k.setTarget({getTooltipInfo:function(){var a=l.convert({x:l.getLocationAtOffset(i.start).x,y:l.getLocationAtOffset(d.getLineStart(j)).y},"document","page");return{contents:[i],x:a.x,y:a.y+Math.floor(l.getLineHeight(j)*1.33)}}},0)},0)})}return!0}.bind(this),
{name:c.prevAnnotation});var i=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding("q",!i,!1,!1,i),"lastEdit");this.textView.setAction("lastEdit",function(){typeof this._lastEditLocation==="number"&&this.editor.showSelection(this._lastEditLocation);return!0}.bind(this),{name:c.lastEdit})},toggleIncrementalFind:function(){(this._incrementalFindActive=!this._incrementalFindActive)?(this.editor.reportStatus(k.formatMessage(c.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 d=this.editor,e=d.getModel(),e=this._incrementalFindSuccess?d.getCaretOffset()-a.length-1:e.getCharCount()-1;(e=d.getModel().find({string:a,start:e,reverse:!0,
caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,d.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1,d.reportStatus(k.formatMessage(c.incrementalFind,a))):(d.reportStatus(k.formatMessage(c.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 d=this.editor,e=0;this._incrementalFindSuccess&&
(e=d.getSelection().start+1);(e=d.getModel().find({string:a,start:e,caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,d.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1,d.reportStatus(k.formatMessage(c.incrementalFind,a))):(d.reportStatus(k.formatMessage(c.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 d(a,c,e){var g=a.getLineAtOffset(c),h=a.getLineAtOffset(e),i,f,j,k,l,n;for(i=g;i>=0;i--)if(f=a.getLine(i),j=i===g?c-a.getLineStart(g):f.length,k=f.lastIndexOf("/*",j),f=f.lastIndexOf("*/",j),f>k)break;else if(k!==-1){l=a.getLineStart(i)+k;break}for(i=h;i<a.getLineCount();i++)if(f=a.getLine(i),j=i===h?e-a.getLineStart(h):0,k=f.indexOf("/*",j),f=f.indexOf("*/",j),k!==
-1&&k<f)break;else if(f!==-1){n=a.getLineStart(i)+f;break}return{commentStart:l,commentEnd:n}}this.textView.setAction("lineStart",function(){for(var a=this.editor,c=a.getModel(),d=a.getCaretOffset(),e=c.getLineAtOffset(d),g=c.getLineStart(e),c=c.getLine(e),e=0;e<c.length;e++){var h=c.charCodeAt(e);if(!(h===32||h===9))break}e+=g;return d!==e?(a.setSelection(e,e),!0):!1}.bind(this));this.textView.setKeyBinding(new a.KeyBinding(191,!0),"toggleLineComment");this.textView.setAction("toggleLineComment",
function(){for(var a=this.editor,c=a.getModel(),d=a.getSelection(),e=c.getLineAtOffset(d.start),g=c.getLineAtOffset(d.end>d.start?d.end-1:d.end),h=!0,i=[],f,j,k=e;k<=g;k++)if(f=c.getLine(k,!0),i.push(f),!h||(j=f.indexOf("//"))===-1)h=!1;else if(j!==0){var l;for(l=0;l<j;l++)if(h=f.charCodeAt(l),!(h===32||h===9))break;h=l===j}k=c.getLineStart(e);l=c.getLineEnd(g,!0);if(h){for(h=0;h<i.length;h++)f=i[h],j=f.indexOf("//"),i[h]=f.substring(0,j)+f.substring(j+2);i=i.join("");f=c.getLineStart(g);c=k===d.start?
d.start:d.start-2;d=d.end-2*(g-e+1)+(d.end===f+1?2:0)}else i.splice(0,0,""),i=i.join("//"),c=k===d.start?d.start:d.start+2,d=d.end+2*(g-e+1);a.setText(i,k,l);a.setSelection(c,d);return!0}.bind(this),{name:c.toggleLineComment});var e=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding(191,!0,!e,!1,e),"addBlockComment");this.textView.setAction("addBlockComment",function(){var a=this.editor,c=a.getModel(),e=a.getSelection(),g=RegExp("/\\*|\\*/","g"),h=d(c,e.start,e.end);
if(h.commentStart!==void 0&&h.commentEnd!==void 0)return!0;c=c.getText(e.start,e.end);if(c.length===0)return!0;h=c.length;c=c.replace(g,"");g=c.length;a.setText("/*"+c+"*/",e.start,e.end);a.setSelection(e.start+2,e.end+2+(g-h));return!0}.bind(this),{name:c.addBlockComment});this.textView.setKeyBinding(new a.KeyBinding(220,!0,!e,!1,e),"removeBlockComment");this.textView.setAction("removeBlockComment",function(){var a=this.editor,c=a.getModel(),e=a.getSelection(),g=c.getText(e.start,e.end),h,i,f;for(f=
0;f<g.length;f++)if(g.substring(f,f+2)==="/*"){h=e.start+f;break}for(;f<g.length;f++)if(g.substring(f,f+2)==="*/"){i=e.start+f;break}if(h!==void 0&&i!==void 0)a.setText(c.getText(h+2,i),h,i+2),a.setSelection(h,i);else{g=d(c,e.start,e.end);if(g.commentStart===void 0||g.commentEnd===void 0)return!0;c=c.getText(g.commentStart+2,g.commentEnd);a.setText(c,g.commentStart,g.commentEnd+2);a.setSelection(e.start-2,e.end-2)}return!0}.bind(this),{name:c.removeBlockComment})},contentAssistProposalApplied:function(a){a=
a.data.proposal;if(a.positions&&this.linkedMode){for(var c=[],d=0;d<a.positions.length;++d)c[d]={positions:[{offset:a.positions[d].offset,length:a.positions[d].length}]};this.linkedMode.enterLinkedMode({groups:c,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,c=a.getSelection();if(c.start===c.end){for(var d=a.getModel(),e=d.getLineAtOffset(c.start),g=d.getLine(e,!0),h=d.getLineStart(e),e=0,h=c.start-h,i;e<h&&((i=g.charCodeAt(e))===32||i===9);)e++;if(e>0){for(var f=g.substring(0,e),e=h;e<g.length&&((i=g.charCodeAt(e++))===32||i===9);)c.end++;a.setText(d.getLineDelimiter()+f,c.start,c.end);return!0}}return!1},tab:function(){return!1}};r.prototype={enterLinkedMode:function(d){if(!this.linkedModeActive){this.linkedModeActive=!0;this.linkedModePositions=
[];for(var e=0;e<d.groups.length;++e){var g=d.groups[e];this.linkedModePositions[e]={offset:g.positions[0].offset,length:g.positions[0].length}}this.linkedModeEscapePosition=d.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(c.linkedModeEntered,null,!0)}},isActive:function(){return this.linkedModeActive},isStatusActive:function(){return this.linkedModeActive},enter:function(){this.cancel();return!0},cancel:function(){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"),this.textView.setCaretOffset(this.linkedModeEscapePosition,!1),this.editor.reportStatus(c.linkedModeExited,null,!0)},selectTextForLinkedModePosition:function(a){this.textView.setSelection(a.offset,a.offset+a.length)}};return{UndoFactory:j,LineNumberRulerFactory:l,FoldingRulerFactory:m,AnnotationFactory:o,TextDNDFactory:n,TextActions:p,SourceCodeActions:q,LinkedMode:r}});
var JsDiff=function(){function c(a){for(var c=[],d=0;d<a.length;d++)a[d]&&c.push(a[d]);return c}function f(a){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");return a=a.replace(/"/g,"&quot;")}var a=function(a){this.ignoreWhitespace=a};a.prototype={diff:function(a,c){if(c==a)return[{value:c}];if(!c)return[{value:a,removed:!0}];if(!a)return[{value:c,added:!0}];var c=this.tokenize(c),a=this.tokenize(a),d=c.length,e=a.length,g=d+e,i=[{newPos:-1,components:[]}],f=this.extractCommon(i[0],
c,a,0);if(i[0].newPos+1>=d&&f+1>=e)return i[0].components;for(var p=1;p<=g;p++)for(var q=-1*p;q<=p;q+=2){var r;r=i[q-1];var s=i[q+1],f=(s?s.newPos:0)-q;r&&(i[q-1]=void 0);var u=r&&r.newPos+1<d,t=s&&0<=f&&f<e;if(!u&&!t)i[q]=void 0;else if(!u||t&&r.newPos<s.newPos?(r={newPos:s.newPos,components:s.components.slice(0)},this.pushComponent(r.components,a[f],void 0,!0)):(r={newPos:r.newPos,components:r.components.slice(0)},r.newPos++,this.pushComponent(r.components,c[r.newPos],!0,void 0)),f=this.extractCommon(r,
c,a,q),r.newPos+1>=d&&f+1>=e)return r.components;else i[q]=r}},pushComponent:function(a,c,d,e){var g=a[a.length-1];g&&g.added===d&&g.removed===e?a[a.length-1]={value:this.join(g.value,c),added:d,removed:e}:a.push({value:c,added:d,removed:e})},extractCommon:function(a,c,d,e){for(var g=c.length,i=d.length,f=a.newPos,e=f-e;f+1<g&&e+1<i&&this.equals(c[f+1],d[e+1]);)f++,e++,this.pushComponent(a.components,c[f],void 0,void 0);a.newPos=f;return e},equals:function(a,c){var d=/\S/;return this.ignoreWhitespace&&
!d.test(a)&&!d.test(c)?!0:a==c},join:function(a,c){return a+c},tokenize:function(a){return a}};var d=new a,g=new a(!1);g.tokenize=function(a){return c(a.split(/(\s+|\b)/))};var e=new a(!0);e.tokenize=function(a){return c(a.split(/([{}:;,]|\s+)/))};var i=new a;i.tokenize=function(a){return a.split(/^/m)};return{diffChars:function(a,c){return d.diff(a,c)},diffWords:function(a,c){return g.diff(a,c)},diffLines:function(a,c){return i.diff(a,c)},diffCss:function(a,c){return e.diff(a,c)},createPatch:function(a,
c,d,e,g){var f=[];f.push("Index: "+a);f.push("===================================================================");f.push("--- "+a+"\t"+e);f.push("+++ "+a+"\t"+g);a=i.diff(c,d);a.push({value:"",lines:[]});for(var d=c=0,e=[],n=g=1,p=0;p<a.length;p++){var q=a[p],r=q.lines||q.value.replace(/\n$/,"").split("\n");q.lines=r;if(q.added||q.removed){if(!c){var s=a[p-1],c=g,d=n;s&&(e.push.apply(e,s.lines.slice(-4).map(function(a){return" "+a})),c-=4,d-=4)}e.push.apply(e,r.map(function(a){return(q.added?"+":
"-")+a}));q.added?n+=r.length:g+=r.length}else c&&(r.length<=8&&p<a.length-1?e.push.apply(e,r.map(function(a){return" "+a})):(s=Math.min(r.length,4),f.push("@@ -"+c+","+(g-c+s)+" +"+d+","+(n-d+s)+" @@"),f.push.apply(f,e),f.push.apply(f,r.slice(0,s).map(function(a){return" "+a})),d=c=0,e=[])),g+=r.length,n+=r.length}a.length>1&&!/\n$/.test(a[a.length-2].value)&&f.push("\\ No newline at end of file\n");return f.join("\n")},convertChangesToXML:function(a){for(var c=[],d=0;d<a.length;d++){var e=a[d];
e.added?c.push("<ins>"):e.removed&&c.push("<del>");c.push(f(e.value));e.added?c.push("</ins>"):e.removed&&c.push("</del>")}return c.join("")}}}();if(typeof module!=="undefined")module.exports=JsDiff;typeof define==="function"&&define.amd&&define("jsdiff/diff",[],function(){return JsDiff});
define("orion/compare/jsdiffAdapter",["jsdiff/diff"],function(c){var f=f||{};f.JSDiffAdapter=function(){function a(){}a.prototype={adapt:function(a,g){for(var e=a.split("\n"),i=g.split("\n"),h=e[e.length-1]==="",i=i[i.length-1]==="",f=c.diffLines(a,g),j=[],l=[],m=0,o=0,n=-1,p=0,q=!0,r=0;r<f.length;r++){var s=f[r],u=s.lines||s.value.split("\n"),t=u.length,v=0;u.length>1&&u[u.length-1]===""&&t--;t>1&&!q&&u[0]===""&&(t--,v++);s.lines=u;if(!s.added&&!s.removed){if(m||o)j.push([m,o,n]),o=m=0,n=-1,p+=o;
j.push([t,t,0]);p+=t}else if(s.added){n===-1&&(n=l.length+1);m+=t;for(q=v;q<t+v;q++)l.push(s.lines[q])}else o+=t;q=!1;u.length>1&&u[u.length-1]===""&&(q=!0)}if(m||o)j.push([m,o,n]),p+=o;p<e.length&&e.length>1&&(e=j[j.length-1],e[2]===0?(e[0]+=1,e[1]+=1):e[2]===-1?j.push([1,1,0]):h===i?j.push([1,1,0]):(i&&(e[0]+=1),h&&(e[1]+=1)));return{mapper:j,changContents:{array:l,index:0}}},adaptCharDiff:function(a,g,e){for(var a=e?c.diffWords(a,g):c.diffChars(a,g),g=[],i=e=0,h=0,f=0,j=0;j<a.length;j++){var l=
a[j];if(!l.added&&!l.removed){if(h>0||f>0)g.push([i,i+h,e,e+f]),i+=h,e+=f,f=h=0;i+=l.value.length;e+=l.value.length}else l.added?h+=l.value.length:f+=l.value.length}(h>0||f>0)&&g.push([i,i+h,e,e+f]);return g}};return a}();return f});
define("examples/textview/textStyler",["orion/textview/annotations"],function(c){function f(a,c){this.keywords=a;this.whitespacesVisible=c;this.setText("")}function a(){f.call(this,null,!0)}function d(a){f.call(this,null,a)}function g(){f.call(this,null,!1)}function e(c,e,j){this.commentStart="/*";this.commentEnd="*/";var l=[];switch(e){case "java":l=h;break;case "js":l=i;break;case "css":l=k}this.whitespacesVisible=!1;this.detectHyperlinks=!0;this.highlightCaretLine=!1;this.detectTasks=this.foldingEnabled=
!0;this._scanner=new f(l,this.whitespacesVisible);this._firstScanner=new g;this._commentScanner=new d(this.whitespacesVisible);this._whitespaceScanner=new a;if(e==="css")this._scanner.isCSS=!0,this._firstScanner.isCSS=!0;this.view=c;this.annotationModel=j;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)},onSelection:function(a){n._onSelection(a)}};e=c.getModel();e.getBaseModel?
e.getBaseModel().addEventListener("Changed",this._listener.onChanged):c.addEventListener("ModelChanged",this._listener.onChanged);c.addEventListener("Selection",this._listener.onSelection);c.addEventListener("Destroy",this._listener.onDestroy);c.addEventListener("LineStyle",this._listener.onLineStyle);this._computeComments();this._computeFolding();c.redrawLines()}var i="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(","),k="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(","),
j={styleClass:"token_singleline_comment"},l={styleClass:"token_multiline_comment"},m={styleClass:"token_doc_comment"},o={styleClass:"token_doc_html_markup"},n={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"},t={styleClass:"token_tab"},v={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 c=this.isCSS,d=this.offset-1;if(48<=a&&a<=57){var e=c=!1,g=!1,h=a;do if(a=this._read(),a===46&&!c)c=!0;else if(a===101&&!e)c=e=!0,a=this._read(),a!==45&&this._unread(a);else if(a===
120&&h===48&&this.offset-d===2)c=e=g=!0;else if(!(48<=a&&a<=57||g&&(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&&c){do a=this._read();while(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57||45===a&&c);this._unread(a);a=this.keywords;if(a.length>0){d=this.text.substring(d,this.offset);for(c=0;c<a.length;c++)if(this.keywords[c]===d)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(),c;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();c=7;for(a===42&&(c=8);;){for(;a===42;)if(a=this._read(),a===47)return c;if(a===-1)return this._unread(a),c;a=this._read()}}this._unread(a);return 1;case 39:for(c=4;;)switch(a=this._read(),a){case 39:return c;
case 13:case 10:case -1:return this._unread(a),c;case 92:switch(a=this._read(),a){case 10:c=5;break;case 13:c=5,a=this._read(),a!==10&&this._unread(a)}}break;case 34:for(c=4;;)switch(a=this._read(),a){case 34:return c;case 13:case 10:case -1:return this._unread(a),c;case 92:switch(a=this._read(),a){case 10:c=5;break;case 13:c=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}}};d.prototype=new f(null);d.prototype.setType=function(a){this._type=a};d.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}}};g.prototype=new f(null);g.prototype._default=function(a){for(;;)switch(a=this._read(),a){case 47:case 34:case 39:case -1:return this._unread(a),1}};e.prototype={getClassNameForToken:function(a){switch(a){case "singleLineComment":return j.styleClass;case "multiLineComment":return l.styleClass;case "docComment":return m.styleClass;case "docHtmlComment":return o.styleClass;case "tasktag":return n.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 t.styleClass;case "caretLine":return v.styleClass}return null},destroy:function(){var a=this.view;if(a){var c=a.getModel();c.getBaseModel?c.getBaseModel().removeEventListener("Changed",this._listener.onChanged):a.removeEventListener("ModelChanged",this._listener.onChanged);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,c,d,e,g){var h;
e===void 0&&(e=-1);if(g===void 0)g=a.length;for(;g-e>1;)if(h=Math.floor((g+e)/2),c<=a[h].start)g=h;else if(d&&c<a[h].end){g=h;break}else e=h;return g},_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 d=this.annotationModel;if(d){d.removeAnnotations(c.AnnotationType.ANNOTATION_FOLDING);for(var e=[],g=a.getBaseModel(),
h=this.comments,i=0;i<h.length;i++){var f=h[i];(f=this._createFoldingAnnotation(a,g,f.start,f.end))&&e.push(f)}d.replaceAnnotations(null,e)}}}},_createFoldingAnnotation:function(a,d,e,g){var h=d.getLineAtOffset(e),d=d.getLineAtOffset(g);return h===d?null:new (c.AnnotationType.getType(c.AnnotationType.ANNOTATION_FOLDING))(e,g,a)},_computeTasks:function(a,d,e){if(this.detectTasks){var g=this.annotationModel;if(g){var h=this.view.getModel(),i=h;h.getBaseModel&&(i=h.getBaseModel());for(var f=g.getAnnotations(d,
e),h=[],j=c.AnnotationType.ANNOTATION_TASK;f.hasNext();){var k=f.next();k.type===j&&h.push(k)}f=[];k=this._commentScanner;k.setText(i.getText(d,e));for(var l;l=k.nextToken();){var n=k.getStartOffset()+d;l===14&&(l=i.getLineEnd(i.getLineAtOffset(n)),a!==6&&(l=Math.min(l,e-this.commentEnd.length)),f.push(c.AnnotationType.createAnnotation(j,n,l,i.getText(n,l))))}g.replaceAnnotations(h,f)}}},_getLineStyle:function(a){if(this.highlightCaretLine){var c=this.view,d=c.getModel(),c=c.getSelection();if(c.start===
c.end&&d.getLineAtOffset(c.start)===a)return v}return null},_getStyles:function(a,c,d){a.getBaseModel&&(d=a.mapOffset(d));for(var e=d+c.length,g=[],h=d,i=this.comments,f=this._binarySearch(i,d,!0);f<i.length;f++){if(i[f].start>=e)break;var j=i[f].start,k=i[f].end;h<j&&this._parse(c.substring(h-d,j-d),h,g);var n=i[f].type,o;switch(n){case 8:o=m;break;case 7:o=l;break;case 5:o=q}h=Math.max(h,j);j=Math.min(e,k);(n===8||n===7)&&(this.whitespacesVisible||this.detectHyperlinks)?this._parseComment(c.substring(h-
d,j-d),h,g,o,n):n===5&&this.whitespacesVisible?this._parseString(c.substring(h-d,j-d),h,g,q):g.push({start:h,end:j,style:o});h=k}h<e&&this._parse(c.substring(h-d,e-d),h,g);if(a.getBaseModel)for(c=0;c<g.length;c++)d=g[c].end-g[c].start,g[c].start=a.mapOffset(g[c].start,!0),g[c].end=g[c].start+d;return g},_parse:function(a,c,d){var e=this._scanner;for(e.setText(a);a=e.nextToken();){var g=e.getStartOffset()+c,h=null;switch(a){case 2:h=s;break;case 3:h=r;break;case 5:case 4:if(this.whitespacesVisible){this._parseString(e.getData(),
g,d,q);continue}else h=q;break;case 8:this._parseComment(e.getData(),g,d,m,a);continue;case 6:this._parseComment(e.getData(),g,d,j,a);continue;case 7:this._parseComment(e.getData(),g,d,l,a);continue;case 10:this.whitespacesVisible&&(h=t);break;case 11:this.whitespacesVisible&&(h=u)}d.push({start:g,end:e.getOffset()+c,style:h})}},_parseComment:function(a,c,d,e,g){var h=this._commentScanner;h.setText(a);for(h.setType(g);a=h.nextToken();){var g=h.getStartOffset()+c,i=e;switch(a){case 10:this.whitespacesVisible&&
(i=t);break;case 11:this.whitespacesVisible&&(i=u);break;case 12:i=o;break;case 13:i=p;break;case 14:i=n;break;default:this.detectHyperlinks&&(i=this._detectHyperlinks(h.getData(),g,d,i))}i&&d.push({start:g,end:h.getOffset()+c,style:i})}},_parseString:function(a,c,d,e){var g=this._whitespaceScanner;for(g.setText(a);a=g.nextToken();){var h=g.getStartOffset()+c,i=e;switch(a){case 10:this.whitespacesVisible&&(i=t);break;case 11:this.whitespacesVisible&&(i=u)}i&&d.push({start:h,end:g.getOffset()+c,style:i})}},
_detectHyperlinks:function(a,c,d,e){var g=null,h;if((h=a.indexOf("://"))>0){for(var g=a,i=h;i>0;){h=g.charCodeAt(i-1);if(!(97<=h&&h<=122||65<=h&&h<=90||45===h||48<=h&&h<=57))break;i--}if(i>0&&(h="\"\"''(){}[]<>".indexOf(g.substring(i-1,i)),h!==-1&&(h&1)===0&&(h=g.lastIndexOf("\"\"''(){}[]<>".substring(h+1,h+2)))!==-1)){var f=h;h=this._clone(e);h.tagName="A";h.attributes={href:g.substring(i,f)};d.push({start:c,end:c+i,style:e});d.push({start:c+i,end:c+f,style:h});d.push({start:c+f,end:c+a.length,style:e});
return null}}else a.toLowerCase().indexOf("bug#")===0&&(g="https://bugs.eclipse.org/bugs/show_bug.cgi?id="+parseInt(a.substring(4),10));return g?(h=this._clone(e),h.tagName="A",h.attributes={href:g},h):e},_clone:function(a){if(!a)return a;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);return c},_findComments:function(a,c){var c=c||0,d=this._firstScanner,e;d.setText(a);for(var g=[];e=d.nextToken();)(e===7||e===8||e===5)&&g.push({start:d.getStartOffset()+c,end:d.getOffset()+c,type:e}),(e===
6||e===7||e===8)&&this._computeTasks(e,d.getStartOffset()+c,d.getOffset()+c);return g},_findMatchingBracket:function(a,c){var d="{}()[]<>",e=a.getText(c,c+1),g=d.indexOf(e,0);if(g===-1)return-1;var h;h=g&1?d.substring(g-1,g):d.substring(g+1,g+2);for(var i=a.getLineAtOffset(c),d=a.getLine(i),f=a.getLineStart(i),j=a.getLineEnd(i),d=this._findBrackets(e,h,d,f,f,j),j=0;j<d.length;j++)if(f=d[j]>=0?1:-1,d[j]*f===c){var k=1;if(g&1){for(j--;j>=0;j--)if(f=d[j]>=0?1:-1,k+=f,k===0)return d[j]*f;for(i-=1;i>=
0;){d=a.getLine(i);f=a.getLineStart(i);j=a.getLineEnd(i);d=this._findBrackets(e,h,d,f,f,j);for(g=d.length-1;g>=0;g--)if(f=d[g]>=0?1:-1,k+=f,k===0)return d[g]*f;i--}}else{for(j++;j<d.length;j++)if(f=d[j]>=0?1:-1,k+=f,k===0)return d[j]*f;i+=1;for(g=a.getLineCount();i<g;){d=a.getLine(i);f=a.getLineStart(i);j=a.getLineEnd(i);d=this._findBrackets(e,h,d,f,f,j);for(j=0;j<d.length;j++)if(f=d[j]>=0?1:-1,k+=f,k===0)return d[j]*f;i++}}break}return-1},_findBrackets:function(a,c,d,e,g,h){for(var i=[],a=a.charCodeAt(0),
c=c.charCodeAt(0),f=g,j=this._scanner,k,l=this.comments,n=this._binarySearch(l,g,!0);n<l.length;n++){if(l[n].start>=h)break;k=l[n].start;var m=l[n].end;if(f<k)for(j.setText(d.substring(f-g,k-g));k=j.nextToken();)k===a?i.push(j.getStartOffset()+f-g+e):k===c&&i.push(-(j.getStartOffset()+f-g+e));f=m}if(f<h)for(j.setText(d.substring(f-g,h-g));k=j.nextToken();)k===a?i.push(j.getStartOffset()+f-g+e):k===c&&i.push(-(j.getStartOffset()+f-g+e));return i},_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 d=a.oldValue,e=a.newValue,g=this.view,a=g.getModel(),h;if(this.highlightCaretLine){var i=a.getLineAtOffset(d.start);h=a.getLineAtOffset(e.start);var f=e.start===e.end,d=d.start===d.end;i===h&&d&&f||(d&&g.redrawLines(i,i+1),(i!==h||!d)&&f&&g.redrawLines(h,h+1))}if(this.annotationModel){var d=this._bracketAnnotations,j,k;if(e.start===e.end&&(k=g.getCaretOffset())>
0)k-=1,a.getBaseModel&&(k=a.mapOffset(k),a=a.getBaseModel()),a=this._findMatchingBracket(a,k),a!==-1&&(j=[c.AnnotationType.createAnnotation(c.AnnotationType.ANNOTATION_MATCHING_BRACKET,a,a+1),c.AnnotationType.createAnnotation(c.AnnotationType.ANNOTATION_CURRENT_BRACKET,k,k+1)]);this._bracketAnnotations=j;this.annotationModel.replaceAnnotations(d,j)}},_onModelChanged:function(a){var d=a.start,e=a.removedCharCount,g=a.addedCharCount-e,h=this.view,a=h.getModel(),i=a.getBaseModel?a.getBaseModel():a,e=
d+e,f=i.getCharCount(),j=this.comments.length,k=i.getLineStart(i.getLineAtOffset(d)),l=this._binarySearch(this.comments,k,!0),n=this._binarySearch(this.comments,e,!1,l-1,j);l<j&&this.comments[l].start<=k&&k<this.comments[l].end?(k=this.comments[l].start,k>d&&(k+=g)):k=l===j&&j>0&&f-g===this.comments[j-1].end?this.comments[j-1].start:k;var m;n<j?(m=this.comments[n].end,m>d&&(m+=g),n+=1):(n=j,m=f);for(var o,f=this._findComments(i.getText(k,m),k),j=l;j<this.comments.length;j++)o=this.comments[j],o.start>
d&&(o.start+=g),o.start>d&&(o.end+=g);var q=n-l!==f.length;if(!q)for(j=0;j<f.length;j++){o=this.comments[l+j];var p=f[j];if(o.start!==p.start||o.end!==p.end||o.type!==p.type){q=!0;break}}j=[l,n-l].concat(f);Array.prototype.splice.apply(this.comments,j);q&&(j=k,o=m,a!==i&&(j=a.mapOffset(j,!0),o=a.mapOffset(o,!0)),h.redrawRange(j,o));if(this.foldingEnabled&&i!==a&&this.annotationModel){h=this.annotationModel;l=h.getAnnotations(k,m);k=[];for(m=[];l.hasNext();)if(o=l.next(),o.type===c.AnnotationType.ANNOTATION_FOLDING){m.push(o);
for(j=0;j<f.length;j++)if(o.start===f[j].start&&o.end===f[j].end)break;j===f.length?(k.push(o),o.expand()):(j=o.start,n=o.end,j>d&&(j-=g),n>d&&(n-=g),j<=d&&d<n&&j<=e&&e<n&&(j=i.getLineAtOffset(o.start),n=i.getLineAtOffset(o.end),j!==n?o.expanded||(o.expand(),h.modifyAnnotation(o)):h.removeAnnotation(o)))}d=[];for(j=0;j<f.length;j++){o=f[j];for(g=0;g<m.length;g++)if(m[g].start===o.start&&m[g].end===o.end)break;g===m.length&&(o=this._createFoldingAnnotation(a,i,o.start,o.end))&&d.push(o)}h.replaceAnnotations(k,
d)}}};return{TextStyler:e}});
define("orion/editor/textMateStyler",["orion/editor/regex"],function(c){function f(a,c,e){this.initialize(a);this.grammar=this.clone(c);this.externalGrammars=e?this.clone(e):[];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(c){function g(a,
c){throw Error('Unsupported regex feature "'+a+'": "'+c[0]+'" at index: '+c.index+" in "+c.input);}var e="",i,c=a.processGlobalFlag("x",c,function(a){for(var c="",d=!1,e=a.length,g=0;g<e;){var h=a.charAt(g);if(!d&&h==="#")for(;g<e&&h!=="\r"&&h!=="\n";)h=a.charAt(++g);else if(!d&&/\s/.test(h))for(;g<e&&/\s/.test(h);)h=a.charAt(++g);else h==="\\"?(c+=h,/\s/.test(a.charAt(g+1))||(c+=a.charAt(g+1),g+=1)):(h==="["?d=!0:h==="]"&&(d=!1),c+=h),g+=1}return c}),c=a.processGlobalFlag("i",c,function(a){e+="i";
return a});for(i=0;i<this.unsupported.length;i++){var h;(h=this.unsupported[i].regex.exec(c))&&g(this.unsupported[i].func(h),h)}return RegExp(c,e)},processGlobalFlag:function(a,c,e){function i(a,c){for(var d=0,e=a.length,g=-1,h=c;h<e&&g===-1;h++)switch(a.charAt(h)){case "\\":h++;break;case "(":d++;break;case ")":d--,d===0&&(g=h)}return g}var h="(?"+a+")",a="(?"+a+":";if(c.substring(0,h.length)===h)return e(c.substring(h.length));else if(c.substring(0,a.length)===a){h=i(c,0);if(h<c.length-1)throw Error("Only a "+
a+") group that encloses the entire regex is supported in: "+c);return e(c.substring(a.length,h))}return c},hasBackReference:function(a){return/\\\d+/.test(a.source)},getSubstitutedRegex:function(a,g,e){for(var e=typeof e==="undefined"?!0:!1,a=a.source.split(/(\\\d+)/g),i=[],h=0;h<a.length;h++){var f=a[h],j=/\\(\d+)/.exec(f);j?(f=g[j[1]]||"",i.push(e?c.escape(f):f)):i.push(f)}return RegExp(i.join(""))},groupify:function(a,c){for(var e=a.source,i=e.length,h=[],f=0,j=[],l=1,m=1,o=[],n={},p={},q=0;q<
i;q++){var r=h[h.length-1],s=e.charAt(q);switch(s){case "(":if(r===4)h.pop(),o.push(")"),j[j.length-1].end=q;var u=q+2<i?e.charAt(q+1)+""+e.charAt(q+2):null;if(u==="?:"||u==="?="||u==="?!"){var t;u==="?:"?t=1:(t=3,f++);h.push(t);j.push({start:q,end:-1,type:t});o.push(s);o.push(u);q+=u.length}else h.push(2),j.push({start:q,end:-1,type:2,oldNum:l,num:m}),o.push(s),f===0&&(p[m]=null),n[l]=m,l++,m++;break;case ")":r=h.pop();r===3&&f--;j[j.length-1].end=q;o.push(s);break;case "*":case "+":case "?":case "}":var v=
s,x=e.charAt(q-1),u=q-1;if(s==="}"){for(t=q-1;e.charAt(t)!=="{"&&t>=0;t--);x=e.charAt(t-1);u=t-1;v=e.substring(t,q+1)}t=j[j.length-1];if(x===")"&&(t.type===2||t.type===4)){o.splice(t.start,0,"(");o.push(v);o.push(")");s={start:t.start,end:o.length-1,type:4,num:t.num};for(x=0;x<j.length;x++)if(r=j[x],(r.type===2||r.type===4)&&r.start>=t.start&&r.end<=u)if(r.start+=1,r.end+=1,r.num+=1,r.type===2)n[r.oldNum]=r.num;j.push(s);m++;break}default:s!=="|"&&r!==2&&r!==4&&f===0&&(h.push(4),j.push({start:q,end:-1,
type:4,num:m}),o.push("("),p[m]=null,m++),o.push(s),s==="\\"&&(s=e.charAt(q+1),o.push(s),q+=1)}}for(;h.length;)h.pop(),o.push(")");var e=RegExp(o.join("")),i={},c=c||n,w;for(w in c)c.hasOwnProperty(w)&&(i[w]="\\"+c[w]);e=this.getSubstitutedRegex(e,i,!1);return[e,n,p]},complexCaptures:function(a){if(!a)return!1;for(var c in a)if(a.hasOwnProperty(c)&&c!=="0")return!0;return!1}};f.prototype={initialize:function(a){this.textView=a;var c=this;this._listener={onModelChanged:function(a){c.onModelChanged(a)},
onDestroy:function(a){c.onDestroy(a)},onLineStyle:function(a){c.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 g(a){var c;if(a instanceof Array){c=Array(a.length);for(var h=0;h<a.length;h++)c[h]=g(a[h])}else for(h in c={},a)if(Object.prototype.hasOwnProperty.call(a,h)){var f=a[h];c[h]=typeof f==="object"&&f!==null?g(f):f}return c},preprocess:function(a){for(a=[a];a.length!==0;){var c=a.pop();if(!c._resolvedRule||!c._typedRule)if(c._resolvedRule=this._resolve(c),c._typedRule=this._createTypedRule(c),
this.addStyles(c.name),this.addStyles(c.contentName),this.addStylesForCaptures(c.captures),this.addStylesForCaptures(c.beginCaptures),this.addStylesForCaptures(c.endCaptures),c._resolvedRule!==c&&a.push(c._resolvedRule),c.patterns)for(var i=0;i<c.patterns.length;i++)a.push(c.patterns[i])}},addStyles:function(a){if(a&&!this._styles[a]){this._styles[a]=[];for(var c=a.split("."),i=0;i<c.length;i++)this._styles[a].push(c.slice(0,i+1).join("-"))}},addStylesForCaptures:function(a){for(var c in a)a.hasOwnProperty(c)&&
this.addStyles(a[c].name)},ContainerRule:function(){function a(c){this.rule=c;this.subrules=c.patterns}a.prototype.valueOf=function(){return"aa"};return a}(),BeginEndRule:function(){function c(e){this.rule=e;this.beginRegex=a.toRegExp(e.begin);this.endRegex=a.toRegExp(e.end);this.subrules=e.patterns||[];this.endRegexHasBackRef=a.hasBackReference(this.endRegex);var g=a.complexCaptures(e.captures),e=a.complexCaptures(e.beginCaptures)||a.complexCaptures(e.endCaptures);if(this.isComplex=g||e)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]}c.prototype.valueOf=function(){return this.beginRegex};return c}(),MatchRule:function(){function c(e){this.rule=e;this.matchRegex=a.toRegExp(e.match);if(this.isComplex=a.complexCaptures(e.captures))e=a.groupify(this.matchRegex),this.matchRegex=e[0],this.matchOld2New=e[1],this.matchConsuming=e[2]}c.prototype.valueOf=function(){return this.matchRegex};
return c}(),_createTypedRule:function(a){return a.match?new this.MatchRule(a):a.begin?new this.BeginEndRule(a):new this.ContainerRule(a)},_resolve:function(a){var c=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(c=this.grammar.repository&&this.grammar.repository[a.substring(1)],!c)throw Error("Couldn't find included rule "+a+" in grammar repository");}else if(a==="$self")c=this.grammar;else if(a===
"$base")throw Error('Include "$base" is not supported');else if(c=this._allGrammars[a],!c)for(var i=0;i<this.externalGrammars.length;i++){var h=this.externalGrammars[i];if(h.scopeName===a){this.preprocess(h);c=this._allGrammars[a]=h;break}}}return c},ContainerNode:function(){function a(c,g){this.parent=c;this.rule=g;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 c(e,g,h){this.parent=e;this.rule=g;this.children=[];this.setStart(h);this.endMatch=this.end=null;this.endRegexSubstituted=g.endRegexHasBackRef?a.getSubstitutedRegex(g.endRegex,h):null}c.prototype.addChild=function(a){this.children.push(a)};c.prototype.getIndexInParent=function(){return this.parent?this.parent.children.indexOf(this):-1};c.prototype.setStart=function(a){this.start=a.index;this.beginMatch=a};c.prototype.setEnd=
function(a){a&&typeof a==="object"?(this.endMatch=a,this.end=a.index+a[0].length):(this.endMatch=null,this.end=a)};c.prototype.shiftStart=function(a){this.start+=a;this.beginMatch.index+=a};c.prototype.shiftEnd=function(a){this.end+=a;this.endMatch&&(this.endMatch.index+=a)};c.prototype.valueOf=function(){return"{"+this.rule.beginRegex+" range="+this.start+".."+this.end+"}"};return c}(),push:function(a,c){if(c)for(var i=c.length;i>0;)a.push(c[--i])},exec:function(a,c,i){(c=a.exec(c))&&(c.index+=i);
a.lastIndex=0;return c},afterMatch:function(a){return a.index+a[0].length},getEndMatch:function(a,c,i){if(a instanceof this.BeginEndNode){var h=a.rule,a=a.endRegexSubstituted||h.endRegex;return!a?null:this.exec(a,c,i)}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 c=a.addedCharCount,i=a.removedCharCount,a=a.start;if(this._tree){var h=this.textView.getModel(),
f=h.getCharCount(),h=h.getLineEnd(h.getLineAtOffset(a)-1),j=this.getFirstDamaged(h,h),h=h===-1?0:h,c=j?this.parse(j,!0,h,a,c,i):f;this.textView.redrawRange(h,c)}else this.initialParse()},getFirstDamaged:function(a,c){if(a<0)return this._tree;for(var i=[this._tree],h=null;i.length;){var f=i.pop();if(!f.parent||this.isDamaged(f,a,c)){f instanceof this.BeginEndNode&&(h=f);for(var j=0;j<f.children.length;j++)i.push(f.children[j])}}return h||this._tree},isDamaged:function(a,c,i){return a.start<=i&&a.end>
c},parse:function(a,c,i,h,f,j){var l=this.textView.getModel(),m=l.getLineStart(l.getLineCount()-1),o=l.getCharCount(),n=this.getInitialExpected(a,i),p=-1;if(c)a.repaired=!0,a.endNeedsUpdate=!0,p=(p=a.children[a.children.length-1])?l.getLineEnd(l.getLineAtOffset(p.end+(f-j))):-1,h=l.getLineEnd(l.getLineAtOffset(h+j)),p=Math.max(p,h);for(var p=p===-1?o:p,h=n,q=a,r=!1,s=i,u=-1;q&&(!c||s<p);){var t=this.getNextMatch(l,q,s);t||(s=s>=m?o:l.getLineStart(l.getLineAtOffset(s)+1));var v=t&&t.match,x=t&&t.rule,
w=t&&t.isEnd;if(t&&t.isSub){if(s=this.afterMatch(v),x instanceof this.BeginEndRule)r=!0,c&&x===h.rule&&q===h.parent?(q=h,q.setStart(v),q.repaired=!0,q.endNeedsUpdate=!0,h=this.getNextExpected(h,"begin")):(c&&(this.prune(q,h),c=!1),v=new this.BeginEndNode(q,x,v),q.addChild(v),q=v)}else if(w||s===o){if(q instanceof this.BeginEndNode)v?(r=!0,u=Math.max(u,q.end),q.setEnd(v),s=this.afterMatch(v),c&&q===h&&q.parent===h.parent?(q.repaired=!0,delete q.endNeedsUpdate,h=this.getNextExpected(h,"end")):c&&(this.prune(q,
h),c=!1)):(q.setEnd(o),delete q.endNeedsUpdate);q=q.parent}c&&s>=p&&!r&&(this.prune(a,n),c=!1)}this.removeUnrepairedChildren(a,c,i);this.cleanup(c,a,i,p,o,f,j);return c?Math.max(u,s):s},removeUnrepairedChildren:function(a,c,i){if(c){for(var c=a.children,h=-1,f=0;f<c.length;f++){var j=c[f];if(!j.repaired&&this.isDamaged(j,i,Number.MAX_VALUE)){h=f;break}}if(h!==-1)a.children.length=h}},cleanup:function(a,c,i,h,f,j,l){if(a){a=j-l;f=this.getIntersecting(h-a+1,f);c=this.getIntersecting(i,h);for(i=0;i<
f.length;i++)h=f[i],!h.repaired&&h instanceof this.BeginEndNode&&(h.shiftEnd(a),h.shiftStart(a));for(i=0;i<c.length;i++)h=c[i],h.repaired&&h.endNeedsUpdate&&h.shiftEnd(a),delete h.endNeedsUpdate,delete h.repaired}else{c=this.getIntersecting(i,h);for(i=0;i<c.length;i++)delete c[i].repaired}},getNextMatch:function(a,c,i,h){var f=a.getLineAtOffset(i),f=a.getLineEnd(f),j=a.getText(i,f),l=[],m=[],a=[],f=[];for(this.push(l,c.rule.subrules);l.length;){var o=l.length?l.pop():null,o=o&&o._resolvedRule._typedRule;
if(o instanceof this.ContainerRule&&m.indexOf(o)===-1)m.push(o),this.push(l,o.subrules);else if(!o||!h||o.matchRegex){var n=o&&this.exec(o.matchRegex||o.beginRegex,j,i);n&&(a.push(n),f.push(o))}}l=Number.MAX_VALUE;m=-1;for(o=0;o<a.length;o++)if(n=a[o],n.index<l)l=n.index,m=o;if(!h&&(i=this.getEndMatch(c,j,i)))if(h=c.rule.applyEndPatternLast,m===-1||i.index<l||!h&&i.index===l)return{isEnd:!0,rule:c.rule,match:i};return m===-1?null:{isSub:!0,rule:f[m],match:a[m]}},getInitialExpected:function(a,c){var i,
h;if(a===this._tree)for(i=0;i<a.children.length;i++){if(h=a.children[i],h.start>=c)return h}else if(a instanceof this.BeginEndNode&&a.endMatch){var f=a.endMatch.index;for(i=0;i<a.children.length;i++)if(h=a.children[i],h.start>=c)break;if(h&&h.start<f)return h}return a},getNextExpected:function(a,c){if(c==="begin"){var i=a.children[0];return i?i:a}else if(c==="end"&&(i=a.parent)){var h=i.children[i.children.indexOf(a)+1];return h?h:i}return null},prune:function(a,c){if(c.parent===a)a.children.length=
c.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 c=a.lineStart,i=this.textView.getModel(),h=i.getLineEnd(a.lineIndex),f=i.getLineEnd(i.getLineAtOffset(c)-1),f=this.getFirstDamaged(f,f),c=this.getLineScope(i,f,c,h);a.ranges=this.toStyleRanges(c);a.ranges.sort(function(a,c){return a.start-c.start})},getLineScope:function(a,c,i,h){for(var f=i,
j=this.getInitialExpected(c,i),l=[],m=[];c&&f<h;){var o=this.getNextMatch(a,c,f);if(!o)break;var n=o&&o.match,p=o&&o.rule,q=o&&o.isSub,o=o&&o.isEnd;n.index!==f&&m.push({start:f,end:n.index,node:c});if(q)f=this.afterMatch(n),p instanceof this.BeginEndRule?(this.addBeginScope(l,n,p),c=j,j=this.getNextExpected(j,"begin")):this.addMatchScope(l,n,p);else if(o)f=this.afterMatch(n),this.addEndScope(l,n,p),j=this.getNextExpected(j,"end"),c=c.parent}f<h&&m.push({start:f,end:h,node:c});a=this.getInheritedLineScope(m,
i,h);return l.concat(a)},getInheritedLineScope:function(a){for(var c=[],i=0;i<a.length;i++)for(var h=a[i],f=h.node;f;){var j=f.rule.rule,l=j.name;if(j=j.contentName||l){this.addScopeRange(c,h.start,h.end,j);break}f=f.parent}return c},addBeginScope:function(a,c,f){var h=f.rule;this.addCapturesScope(a,c,h.beginCaptures||h.captures,f.isComplex,f.beginOld2New,f.beginConsuming)},addEndScope:function(a,c,f){var h=f.rule;this.addCapturesScope(a,c,h.endCaptures||h.captures,f.isComplex,f.endOld2New,f.endConsuming)},
addMatchScope:function(a,c,f){var h=f.rule,k=h.name;(h=h.captures)?this.addCapturesScope(a,c,h,f.isComplex,f.matchOld2New,f.matchConsuming):this.addScope(a,c,k)},addScope:function(a,c,f){f&&a.push({start:c.index,end:this.afterMatch(c),scope:f})},addScopeRange:function(a,c,f,h){h&&a.push({start:c,end:f,scope:h})},addCapturesScope:function(a,c,f,h,k,j){if(f)if(h){for(var h={1:0},l=0,m=1;c[m]!==void 0;m++)j[m]!==void 0&&(l+=c[m].length),c[m+1]!==void 0&&(h[m+1]=l);j=c.index;for(l=1;f[l];l++){var m=f[l].name,
o=k[l],n=j+h[o];typeof c[o]!=="undefined"&&this.addScopeRange(a,n,n+c[o].length,m)}}else this.addScope(a,c,f[0]&&f[0].name)},getIntersecting:function(a,c){for(var f=[],h=this._tree?[this._tree]:[];h.length;){var k=h.pop(),j=!1;k instanceof this.ContainerNode?j=!0:this.isDamaged(k,a,c)&&(j=!0,f.push(k));if(j)for(var j=k.children.length,l=0;l<j;l++)h.push(k.children[l])}return f.reverse()},toStyleRanges:function(a){for(var c=[],f=0;f<a.length;f++){var h=a[f],k=this._styles[h.scope];if(!k)throw Error("styles not found for "+
h.scope);k=k.join(" ");c.push({start:h.start,end:h.end,style:{styleClass:k}})}return c}};return{RegexUtil:a,TextMateStyler:f}});
define("orion/editor/asyncStyler",["i18n!orion/editor/nls/messages","orion/textview/annotations"],function(c,f){function a(a){return a.getName()===g&&a.getProperty("type")==="highlighter"}function d(a,c,d){this.initialize(a,c,d);this.lineStyles=[]}var g="orion.edit.highlighter";f.AnnotationType.registerType("orion.annotation.highlightError",{title:c.syntaxError,html:"<div class='annotationHTML error'></div>",rangeStyle:{styleClass:"annotationRange error"}});d.prototype={initialize:function(c,d,h){this.textView=
c;this.serviceRegistry=d;this.annotationModel=h;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,c){f.onServiceAdded(a,c)},onServiceRemoved:function(a,c){f.onServiceRemoved(a,c)}};c.addEventListener("ModelChanging",this.listener.onModelChanging);c.addEventListener("ModelChanged",
this.listener.onModelChanged);c.addEventListener("Destroy",this.listener.onDestroy);c.addEventListener("LineStyle",this.listener.onLineStyle);d.addEventListener("serviceAdded",this.listener.onServiceAdded);d.addEventListener("serviceRemoved",this.listener.onServiceRemoved);c=d.getServiceReferences(g);for(h=0;h<c.length;h++){var j=c[h];a(j)&&this.addServiceListener(d.getService(j))}},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("serviceAdded",this.listener.onServiceAdded),
this.serviceRegistry.removeEventListener("onServiceRemoved",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 c=this.startLine;(a.addedLineCount||a.removedLineCount)&&Array.prototype.splice.apply(this.lineStyles,[c,a.removedLineCount].concat(this._getEmptyStyle(a.addedLineCount)))},onStyleReady:function(a){var c=a.lineStyles||a.style,
a=Number.MAX_VALUE,d=-1,g=this.textView.getModel(),j;for(j in c)c.hasOwnProperty(j)&&(this.lineStyles[j]=c[j],a=Math.min(a,j),d=Math.max(d,j));a=Math.max(a,0);d=Math.min(d,g.getLineCount());if(c=this.annotationModel){for(var l=c.getAnnotations(g.getLineStart(a),g.getLineEnd(d)),m=[];l.hasNext();){var o=l.next();o.type==="orion.annotation.highlightError"&&m.push(o)}l=[];for(o=a;o<=d;o++){j=o;var n=this.lineStyles[j],n=n&&n.errors;j=g.getLineStart(j);if(n)for(var p=0;p<n.length;p++){var q=n[p];l.push(f.AnnotationType.createAnnotation("orion.annotation.highlightError",
q.start+j,q.end+j))}}c.replaceAnnotations(m,l)}this.textView.redrawLines(a,d+1)},onLineStyle:function(a){function c(a,d){for(var e=a.length,g=[],h=0;h<e;h++){var f=a[h];g.push({start:f.start+d,end:f.end+d,style:f.style})}return g}var d=this.lineStyles[a.lineIndex];if(d)if(d.ranges)a.ranges=c(d.ranges,a.lineStart);else if(d.style)a.style=d.style},_getEmptyStyle:function(a){for(var c=[],d=0;d<a;d++)c.push(null);return c},setContentType:function(a){this.contentType=a;if(this.services)for(a=0;a<this.services.length;a++){var c=
this.services[a];c.setContentType&&c.setContentType(this.contentType)}},onServiceAdded:function(c,d){a(c)&&this.addServiceListener(d)},onServiceRemoved:function(a,c){this.services.indexOf(c)!==-1&&this.removeServiceListener(c)},addServiceListener:function(a){a.addEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady);this.services.push(a);a.setContentType&&this.contentType&&a.setContentType(this.contentType)},removeServiceListener:function(a){a.removeEventListener("orion.edit.highlighter.styleReady",
this.listener.onStyleReady);a=this.services.indexOf(a);a!==-1&&this.services.splice(a,1)}};return{AsyncStyler:d}});
define("examples/textview/textStylerOptions",["orion/bootstrap"],function(c){function f(d){this._styler=d;this._view=this._styler.view;var g=this;this._listener={onStorage:function(a){g._onStorage(a)}};var e=this;this._view&&c.startup().then(function(c){a=c.preferences;e.preferences=a;e._updateStylesheet(a);e.storageKey=a.listenForChangedSettings(e._listener.onStorage)})}var a;f.prototype={_getSetting:function(a,c,e){for(var f,h=0;h<a.length;h++)if(a[h].label===c)for(var k=0;k<a[h].data.length;k++)if(a[h].data[k].label===
e){f=a[h].data[k].value;break}return f},_getStyleSheet:function(c,g){function e(e,h){var j=m.getClassNameForToken(e);if(j){var k=a.getSetting(c,h,"Color"),l=a.getSetting(c,h,"Weight").toLowerCase();f.push("."+g+" ."+j+" {");f.push("\tcolor: "+k+";");f.push("\tfont-weight: "+l+";");f.push("}")}}var f=[];f.push("");var h=this.preferences.getSetting(c,"Font","Family").toLowerCase(),h=h==="sans serif"?'"Menlo", "Consolas", "Vera Mono", "monospace"':"monospace",k=this.preferences.getSetting(c,"Font","Size"),
j=this.preferences.getSetting(c,"Font","Color"),l=this.preferences.getSetting(c,"Font","Background");f.push("."+g+" {");f.push("\tfont-family: "+h+";");f.push("\tfont-size: "+k+";");f.push("\tcolor: "+j+";");f.push("}");f.push("."+g+" .textview {");f.push("\tbackground-color: "+l+";");f.push("}");f.push("."+g+" .ruler {");f.push("\tbackground-color: "+l+";");f.push("}");var m=this._styler;m.getClassNameForToken&&(e("keyword","Keyword Types"),e("string","String Types"),e("singleLineComment","Comment Types"),
e("multiLineComment","Comment Types"),e("docComment","Comment Types"),e("docHtmlComment","Comment Types"));return f.join("\n")},_onStorage:function(a){a.key===this.storageKey&&this._updateStylesheet(this.preferences)},_updateStylesheet:function(a,c){var e,f=this;a.getPreferences("/settings",2).then(function(a){if(a.get("JavaScript Editor")!==void 0&&(e=JSON.parse(a.get("JavaScript Editor")))){if(f._stylesheet)f._stylesheet.parentNode.removeChild(f._stylesheet),f._stylesheet=null;a=f._stylesheet=document.createElement("STYLE");
a.appendChild(document.createTextNode(f._getStyleSheet(e,"userTheme",c)));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(a);var a=f._view,d={themeClass:null};a.getOptions(d);var j=d.themeClass;j?((j=j.replace("userTheme",""))&&(j+=" "),j+="userTheme"):j="userTheme";d.themeClass=j;a.setOptions(d);a.update(!0)}})}};return{TextStylerOptions:f}});
define("orion/highlight",["dojo","examples/textview/textStyler","orion/editor/textMateStyler","orion/editor/asyncStyler","examples/textview/textStylerOptions"],function(c,f,a,d,g){function e(e,i,j,l,m,o,n){function p(a,d){var e=a.getProperty("contentType"),g=a.getProperty("fileTypes");if(e)return i.isSomeExtensionOf(j,e).then(function(c){return c?a:null});else if(d&&g&&g.indexOf(d)!==-1)return e=new c.Deferred,e.callback(a),e;return null}var q=function(a){var c=null;switch(a&&a.id){case "application/javascript":case "application/json":c=
new f.TextStyler(l,"js",m);break;case "text/x-java-source":c=new f.TextStyler(l,"java",m);break;case "text/css":c=new f.TextStyler(l,"css",m)}c&&new g.TextStylerOptions(c);return c}(j);if(q)return o=new c.Deferred,o.callback(q),o;for(var q=o&&o.split(".").pop().toLowerCase(),o=e.getServiceReferences("orion.edit.highlighter"),r=[],s=[],u=0;u<o.length;u++){var t=o[u];t.getProperty("type")==="grammar"&&r.push(t.getProperty("grammar"));(t=p(t,q))&&s.push(t)}return(new c.DeferredList(s)).then(function(c){for(var g,
f=c.length-1;f>=0;f--){var i=c[f][1];if(i&&(n||i.getProperty("type")!=="highlighter")){g=i;break}}var k;if(g)if(c=g.getProperty("type"),c==="highlighter")k=new d.AsyncStyler(l,e,m),k.setContentType(j);else if(c==="grammar"||typeof c==="undefined")g=g.getProperty("grammar"),k=new a.TextMateStyler(l,g,r);return k})}function i(a){this.serviceRegistry=a;this.styler=null}i.prototype={setup:function(a,c,d,g,f){f=typeof f==="undefined"?!0:f;if(this.styler)this.styler.destroy&&this.styler.destroy(),this.styler=
null;var i=this;return e(this.serviceRegistry,this.serviceRegistry.getService("orion.core.contenttypes"),a,c,d,g,f).then(function(a){return i.styler=a})},getStyler:function(){return this.styler}};return{createStyler:e,SyntaxHighlighter:i}});
define("orion/treeModelIterator",[],function(){var c={};c.TreeModelIterator=function(){function c(a,d){this.firstLevelChildren=a;this.reset();this._init(d)}c.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 c=a.children&&a.children.length>0;this.isExpanded&&c&&(c=this.isExpanded(a));return c},_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 c=this._diveIn(this._cursor);if(!c){if(a&&this._expandable(this._cursor)&&this.forceExpandFunc){var g=this;return this.forceExpandFunc(this._cursor,"first",function(a){mdoel&&g.setCursor(a)})}(c=this._findSibling(this._cursor,!0))&&
this.setCursor(c)}return c},_backward:function(a){var c=this._findSibling(this._cursor,!1);c&&c!==this._cursor.parent&&(c=this._drillToLast(c));if(a&&c&&this._expandable(c)&&this.forceExpandFunc&&c!==this._cursor.parent)return this.forceExpandFunc(c,"last",function(a){mdoel&&that.setCursor(a)});c&&this.setCursor(c);return c},_findSibling:function(a,c){for(var g=this.topLevel(a),e=g?this.firstLevelChildren:a.parent.children,f=0;f<e.length;f++)if(e[f]===a)return f===0&&!c?g?null:a.parent:f===e.length-
1&&c?g?null:this._findSibling(a.parent,c):c?e[f+1]:e[f-1];return null},_inParentChain:function(a,c){for(var g=a.parent;g;){if(g===c)return!0;g=g.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,c,g){this.setCursor(c);var e=[];for(e.push(c);;){if(this.iterate(a))e.push(this.cursor());else break;if(g===
this.cursor())return e}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,c){var g=this.cursor(),e=this._scan(!0,a,c);e||(e=this._scan(!1,a,c));this.setCursor(g);return e},iterate:function(a,c){return a?this._forward(c):this._backward(c)},iterateOnTop:function(a,c){var g=this._findSibling(this._getTopLevelParent(this.cursor()),
a);g?this.setCursor(g):c&&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 c}();return c});
define("orion/treetable",["i18n!orion/nls/messages","dojo"],function(c,f){function a(a){this._init(a)}a.prototype={_init:function(a){var g=a.parent,e=this;typeof g==="string"&&(g=f.byId(g));if(!g)throw c["no parent"];if(!a.model)throw c["no tree model"];if(!a.renderer)throw c["no renderer"];this._parent=g;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._root=this._treeModel.getRoot(function(a){this._showRoot?(a._depth=0,this._generate([a],0)):e._treeModel.getChildren(a,function(a){e._generate(a,0)})})},_generate:function(a,c){f.empty(this._parent);var e=document.createElement("table");e.id=this._id;this._tableStyle&&f.addClass(e,this._tableStyle);this._renderer.initTable(e,this);var i=document.createElement("tbody");i.id=this._id+
"tbody";this._generateChildren(a,c,i,"last");e.appendChild(i);this._parent.appendChild(e);this._rowsChanged()},_generateChildren:function(a,c,e,i){for(var h in a){var k=document.createElement("tr");k.id=this._treeModel.getId(a[h]);k._depth=c;k._item=a[h];this._renderer.render(a[h],k);f.style(k.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*c+"px");f.place(k,e,i);i==="after"&&(e=k)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},
refresh:function(a,g,e){var i=this._treeModel.getId(a),h;if(i===this._id)this._removeChildRows(i),this._generateChildren(g,0,f.byId(i+"tbody"),"last"),this._rowsChanged();else{var k=f.byId(i);k?(k._item=a,k&&(e||k._expanded)?(k._expanded=!0,this._removeChildRows(i),this._renderer.updateExpandVisuals(k,!0),g?(this._generateChildren(g,k._depth+1,k,"after"),this._rowsChanged()):(h=this,g=this._treeModel.getChildren(k._item,function(a){h._generateChildren(a,k._depth+1,k,"after");h._rowsChanged()}))):
this._renderer.updateExpandVisuals(k,!1)):console.log(c["could not find table row "]+i)}},getItem:function(a){if(typeof a==="string"){var c=f.byId(a);if(c)return c._item}return a._item?a._item:a},toggle:function(a){var c=f.byId(a);c&&(c._expanded?(this.collapse(a),this._renderer.updateExpandVisuals(c,!1)):(this.expand(a),this._renderer.updateExpandVisuals(c,!0)))},isExpanded:function(a){return(a=f.byId(a))?a._expanded:!1},expand:function(a,c,e){var a=typeof a==="string"?a:this._treeModel.getId(a),
i=f.byId(a);if(i&&!i._expanded){i._expanded=!0;var h=this;this._renderer.updateExpandVisuals(i,!0);this._treeModel.getChildren(i._item,function(a){h._generateChildren(a,i._depth+1,i,"after");h._rowsChanged();c&&c.apply(this,e)})}},_removeChildRows:function(a){var c=a===this._id,e=!1,i=-1,h=[];f.query(".treeTableRow",this._parent).forEach(function(f){if(!e)if(c)f._depth>i?h.push(f):e=!0;else if(f.id===a)c=!0,i=f._depth});for(var k in h){var j=h[k];j.parentNode.removeChild(j)}},collapse:function(a){var a=
typeof a==="string"?a:this._treeModel.getId(a),c=f.byId(a);if(c){if(!c._expanded)return;c._expanded=!1;this._renderer.updateExpandVisuals(c,!1);this._removeChildRows(a);this._rowsChanged()}this._onCollapse&&this._onCollapse(c._item)}};a.prototype.constructor=a;return{TableTree:a}});
define("orion/explorerNavHandler",["i18n!orion/nls/messages","dojo","orion/treeModelIterator"],function(c,f,a){var c={},d=navigator.userAgent.indexOf("iPad")!==-1,g=window.navigator.platform.indexOf("Mac")!==-1;c.ExplorerNavHandler=function(){function c(d,e,g){this.explorer=d;this.model=this.explorer.model;this._navDict=e;this._listeners=[];this._selections=[];this._currentColumn=0;var j=this._getEventListeningDiv();f.attr(j,"tabIndex",0);f.addClass(j,"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,c,d){return this.explorer.forceExpandFunc(a,c,d)}):void 0});this._init(g);(!g||g.setFocus!==!1)&&j.focus();this._listeners.push(f.connect(j,"onkeydown",f.hitch(this,
function(a){if(a.target){if(a.target!==j)return!0}else if(a.srcElement&&a.srcElement!==j)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)})));d=f.connect(j,"onblur",f.hitch(this,function(){if(this.explorer.onFocus)this.explorer.onFocus(!1);else this.toggleCursor(null,!1)}));e=f.connect(j,"onfocus",f.hitch(this,function(){if(this.explorer.onFocus)this.explorer.onFocus(!0);else this.toggleCursor(null,!0)}));this._listeners.push(d);this._listeners.push(e)}c.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 g?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 c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(d){c._clearSelection();for(var e=0;e<d.length;e++)c._selections.push(d[e]);c._selections.length>0&&c.cursorOn(c._selections[0],!0,!1,a)})},refreshModel:function(a,c,d,e){this._currentColumn=0;this.topIterationNodes=[];
this.model=c;this._navDict=a;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(d)this.topIterationNodes=d;this._modelIterator.setTree(this.topIterationNodes);!e&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(a){for(var c=0;c<this._selections.length;c++)if(a===this._selections[c])return c;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,c){if(this._selectionPolicy==="cursorOnly")c&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(a,!0);else if(this._isRowSelectable(a)){if(c){var d=this._inSelection(a);d>=0?(this._checkRow(a,!0),this._selections.splice(d,1)):(this._checkRow(a,!1),this._selections.push(a),this._lastSelection=a)}else this._clearSelection(!0),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,c){a||(a=this.currentModel());var d=this._getGridChildren(a);if(d&&d.length>1||c===0&&d){c!==0&&this.toggleCursor(a,!1);var e=this._currentColumn,g=!0;e+=c;e<0?(this._linearGridMove&&c!==0&&(this._modelIterator.iterate(!1)?a=this.currentModel():g=!1),e=g?d.length-1:this._currentColumn):e>=d.length&&(this._linearGridMove&&c!==0&&(this._modelIterator.iterate(!0)?
a=this.currentModel():g=!1),e=g?0:this._currentColumn);this._currentColumn=e;c!==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,c){var d=this.getRowDiv(a);d&&f.toggleClass(d,"treeIterationCursorRow",c);(d=this.getCurrentGrid(a))&&d.domNode&&f.toggleClass(d.domNode,
"treeIterationCursor",c)},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(a,c,d,e){var d=d===void 0?!1:d,g,f;if(a||c){if(f===this._modelIterator.cursor())return;g=this._modelIterator.cursor();f=a;this._modelIterator.setCursor(f)}else g=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(g!==f||c)if(this.toggleCursor(g,!1),!c||f)if(this.moveColumn(null,0),this.toggleCursor(f,!0),(a=this.getRowDiv())&&!e&&!this._visible(a)&&a.scrollIntoView(!d),this.explorer.onCursorChanged)this.explorer.onCursorChanged(g,
f)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var a=[],c=0;c<this._selections.length;c++)a.push(this.model.getId(this._selections[c]));return a},getRowDiv:function(a){a=a?a:this._modelIterator.cursor();if(!a)return null;var a=this.model.getId(a),c=this._navDict.getValue(a);return c&&c.rowDomNode?c.rowDomNode:f.byId(a)},iterate:function(a,c,d){this.topIterationNodes.length!==0&&this._modelIterator.iterate(a,c)&&(this.cursorOn(null,!1,a),d&&this.setSelection(this.currentModel(),
!0))},_checkRow:function(a,c){if(this.explorer.renderer._useCheckboxSelection){var d=this.getRowDiv(a);if(d){var e=f.byId(this.explorer.renderer.getCheckBoxId(d.id)),g=c?!e.checked:!0;if(g!==e.checked)this.explorer.renderer.onCheck(d,e,g,!0)}}else this._select(a,c)},_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(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 c=0;c+=this._getToolBarHeight("staticBanner");c+=this._getToolBarHeight("titleArea");c+=this._getToolBarHeight("pageToolbar");var d=this._getEventListeningDiv(!0).getClientRects()[0],e=this._vpHeight();this._vpWidth();for(var c=d.top>c?d.top:c,d=d.bottom<e?d.bottom:e,a=a.getClientRects(),e=0,g=a.length;e<g;e++){var f=a[e];if(f.top>=c&&f.top<=d&&f.bottom>=c&&f.bottom<=d)return!0}return!1},_select:function(a){a||
(a=this._modelIterator.cursor());var c=this.getRowDiv(a);c&&f.toggleClass(c,"checkedRow",this._inSelection(a)<0)},_onModelGrid:function(a,c){var d=this._getGridChildren(a);if(d)for(var e=0;e<d.length;e++)if(c.target===d[e].domNode)return!0;return!1},onClick:function(a,c){var e=f.byId(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)));if(c.target!==e&&!this._onModelGrid(a,c))if(this.cursorOn(a,!0,!1,!0),d)this.setSelection(a,!0);else if(this._ctrlKeyOn(c))this.setSelection(a,!0);else if(c.shiftKey&&
this._lastSelection){if(e=this._modelIterator.scan(this._lastSelection,a)){this._clearSelection(!0);for(var g=0;g<e.length;g++)this.setSelection(e[g],!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 c=this.currentModel(),d=this._getGridChildren(c);return d&&d.length>1?this.isExpandable(c)?this._ctrlKeyOn(a):!0:!1},onLeftArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,-1),a.preventDefault(),!0;var c=this._modelIterator.cursor();if(!c)return!1;if(this.isExpandable(c)&&this.isExpanded(c))return this.explorer.myTree.collapse(c),a.preventDefault(),!0;this._modelIterator.topLevel(c)?
this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(c.parent),this.setSelection(c.parent,!1))},onRightArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,1),a.preventDefault(),!0;var c=this._modelIterator.cursor();if(!c)return!1;if(this.isExpandable(c)&&!this.isExpanded(c))return this.explorer.myTree.expand(c),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 c=this.getCurrentGrid(this._modelIterator.cursor());if(c)if(c.widget)if(typeof c.onClick==="function")c.onClick();else typeof c.widget.focus==="function"&&c.widget.focus();else{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(a),!1,!1,!1,0,null);c.domNode.dispatchEvent(d)}else if(this.explorer.renderer.getRowActionElement&&(c=this._modelIterator.cursor()))if(c=
this.explorer.renderer.getRowActionElement(this.model.getId(c)),c.href)this._ctrlKeyOn(a)?window.open(c.href):window.location.href=c.href}};return c}();c.ExplorerNavDict=function(){function a(c){this._dict={};this._model=c}a.prototype={addRow:function(a,c){this._dict[this._model.getId(a)]={model:a,rowDomNode:c}},getValue:function(a){return this._dict[a]},getGridNavHolder:function(a,c){if(!a)return null;var d=this._model.getId(a);if(this._dict[d]){if(!this._dict[d].gridChildren&&c)this._dict[d].gridChildren=
[];return this._dict[d].gridChildren}return null},initGridNavHolder:function(a){if(!a)return null;a=this._model.getId(a);if(this._dict[a])this._dict[a].gridChildren=null}};return a}();return c});define("text!orion/git/widgets/templates/CloneGitRepositoryDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t\t\t<span dojoAttachPoint="Basic">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<label dojoAttachPoint="gitUrlLabel" for="${id}_gitUrl" style="padding-right: 10">${gitUrlLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitUrl" id="${id}_gitUrl" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right;">\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLink" href="javascript:">Choose target location</a>\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLinkHide" href="javascript:" style="display: none">Default target location</a>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<span dojoAttachPoint="Advanced" style="display: none;">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isNewProject" type="radio" name="${id}_newExisting" checked value="new"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitNameLabel" for="${id}_gitName" style="padding-right: 10">${gitNameLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitName" id="${id}_gitName" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isExistingProject" type="radio" name="${id}_newExisting" value="existing"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitPathLabel" for="${id}_gitPath" style="padding-right: 10">${gitPathLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: left; float: right;">\n\t\t\t\t\t\t\t<input dojoAttachPoint="gitPath" id="${id}_gitPath" type="hidden" value="">\n\t\t\t\t\t\t\t<div style="width: 30em; float: left" float="left" dojoAttachPoint="shownGitPath"></div>\n\t\t\t\t\t\t\t<div style="width: 10em; float: right; text-align: right"><a dojoAttachPoint="changeGitPath" href="javascript:">Change...</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/AddRemoteDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t<div style="display: table">\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 dojoAttachPoint="gitRemoteLabel" for="${id}_gitRemote" style="padding-right: 10">${gitRemoteLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitRemote" id="${id}_gitRemote" style="display: inline-block; width: 98%;" value="">\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<label dojoAttachPoint="gitRemoteURILabel" for="${id}_gitRemoteURI" style="padding-right: 10">${gitRemoteURILabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitRemoteURI" id="${id}_gitRemoteURI" style="display: inline-block; width: 98%;" value="">\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"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/GitCredentialsDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t<div style="display: none; padding-top: 10px; padding-bottom: 10px;" dojoAttachPoint="gitCredentialsLabel">Provide credentials for: <b dojoAttachPoint="url"></b></div>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSshUsernameRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitSshUsernameLabel" for="${id}_gitSshUsername" style="padding-right: 10">${gitSshUsernameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="gitSshUsername" id="${id}_gitSshUsername" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSshPasswordRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="isSshPassword" type="radio" name="${id}_isSshPassword" checked value="password" style="width: 15px;"/>\n\t\t\t\t\t<label dojoAttachPoint="gitSshPasswordLabel" for="${id}_gitSshPassword" style="padding-right: 10">${gitSshPasswordLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="gitSshPassword" id="${id}_gitSshPassword" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPrivateKeyRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="isPrivateKey" type="radio" name="${id}_isSshPassword" value="privateKey" style="width: 15px;"/>\n\t\t\t\t\t<label dojoAttachPoint="gitPrivateKeyLabel" for="${id}_gitPrivateKey" style="padding-right: 10">${gitPrivateKeyLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<textarea dojoAttachPoint="gitPrivateKey" id="${id}_gitPrivateKey" style="display: inline-block; width: 98%;" value=""></textarea>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPassphraseRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitPassphraseLabel" for="${id}_gitPassphrase">${gitPassphraseLabelText}</label>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPassphraseRow_1">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="gitPassphrase" id="${id}_gitPassphrase" style="display: inline-block; width: 98%;" value="">\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"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="okButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">Ok\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/RemotePrompterDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseRemoteExplorerTree" class="explorerTreeClass" id="${id}_browseRemoteExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="newBranchSection">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t<label for="${id}_newBranch">${newBranchText}</label>\n\t\t\t\t\t<input dojoAttachPoint="newBranch" id="${id}_newBranch" value="" disabled=true/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="RemoteBrowserButton" disabled=true dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <\!-- end table --\>\n\t</div> <\!-- content pane --\>\n</div>'});
define("text!orion/git/widgets/templates/ApplyPatchDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\n\t\t<form method="post" id="applyPatchDialog.myForm"\n\t\t\tenctype="multipart/form-data">\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="radio" name="radio" value="urlRadio" id="applyPatchDialog.urlRadio" checked/>URL:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="text" name="url" id="applyPatchDialog.url" style="display: inline-block; width: 98%;"\n\t\t\t\t\t\t\t\tdojoType="dijit.form.ValidationTextBox"\n\t\t\t\t\t\t\t\tregExp="^http(s)*://.+" invalidMessage="Invalid URL."/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="radio" name="radio" value="fileRadio" id="applyPatchDialog.fileRadio"/>File:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: top;">\n\t\t\t\t\t\t\t<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="applyPatchDialog.uploader"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input name="uploadedfile" multiple="false" type="file" id="applyPatchDialog.uploader" force="iframe"\n\t\t\t\t\t\t\t\tdojoType="dojox.form.Uploader" style="height: 20px" label="Browse..."/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\t\tstyle="padding: 20 0 10 0; float: right; clear: both;"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/OpenCommitDialog.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">\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="resourceName" 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 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:30em;">\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="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/ContentDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\n\t\t<form method="post" id="contenDialog.myForm"\n\t\t\tenctype="multipart/form-data">\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;" , id = "div1" >\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/CommitDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" 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<\!-- Actual content here --\>\n\t\t<div style="display: none; padding-top: 10px; padding-bottom: 10px;" dojoAttachPoint="commitInfoBar"><b dojoAttachPoint="commitInfo"></b></div>\n\t\t\n\t\t<div style="display: table">\n\t\t\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 dojoAttachPoint="commitMessageLabel" for="${id}_commitMessage" style="padding-right: 10">${commitMessageLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="commitMessage" id="${id}_commitMessage" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\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 dojoAttachPoint="amendLabel" for="${id}_amend" style="padding-right: 10">${amendLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="amend" id="${id}_amend" type="checkbox" style="display: inline-block;">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\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 dojoAttachPoint="committerNameLabel" for="${id}_committerName" style="padding-right: 10">${committerNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="committerName" id="${id}_committerName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\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 dojoAttachPoint="committerEmailLabel" for="${id}_committerEmail" style="padding-right: 10">${committerEmailLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="committerEmail" id="${id}_committerEmail" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\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 dojoAttachPoint="authorNameLabel" for="${id}_authorName" style="padding-right: 10">${authorNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="authorName" id="${id}_authorName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\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 dojoAttachPoint="authorEmailLabel" for="${id}_authorEmail" style="padding-right: 10">${authorEmailLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="authorEmail" id="${id}_authorEmail" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="commitChangesButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/compare/compareUtils",["dojo","dijit"],function(c,f){var a=a||{};a.compareUtils=a.compareUtils||{};a.compareUtils.lookUpMapper=function(a,c,e){for(var f=0,h=0;h<a.length;h++){var k=a[h][c];k===0&&(k=1);if(e>=f&&e<f+k)return{mapperIndex:h,startFrom:f};if(h===a.length-1)break;f+=a[h][c]}return{mapperIndex:a.length-1,startFrom:f}};a.compareUtils.lookUpLineIndex=function(a,c,e){if(e===0)return 0;for(var f=0,h=0;h<e;h++)f+=a[h][c];return f};a.compareUtils.updateMapper=function(c,g,e,f,h){if(f!==
h&&(f>0||h>0)){var k=a.compareUtils.lookUpMapper(c,g,e);if(!(k.mapperIndex<0)){if(f>0)for(var j=e-k.startFrom,e=k.mapperIndex;e<c.length;e++){j=c[e][g]-j;if(f<=j){c[e][g]-=f;break}c[e][g]-=j;f-=j;j=0}h>0&&(c[k.mapperIndex][g]+=h)}}};a.compareUtils.overlapMapper=function(a,c,e,f,h){a=e+a[c]-1;a<e&&(a=e);h<f&&(h=f);return a<f||h<e?!1:!0};a.compareUtils.findFirstDiff=function(c,g,e,f){for(var h=0,k=void 0,j=0;j<c.length;j++){if(h>f)break;if(a.compareUtils.overlapMapper(c[j],g,h,e,f)&&(k={mapperIndex:j,
startFrom:h},c[j][2]!==0))break;h+=c[j][g]}return k};a.compareUtils.matchMapper=function(c,g,e,f){if(c.length===0)return e;var h=e+Math.round((f-e)/3),k=a.compareUtils.findFirstDiff(c,g,e,f),j=c[k.mapperIndex][g]===0?k.startFrom:k.startFrom+c[k.mapperIndex][g]-1,l=a.compareUtils.lookUpLineIndex(c,1-g,k.mapperIndex),m=k.startFrom-e;return c[k.mapperIndex][2]===0?l-m:h>=k.startFrom&&h<=j?l-Math.round((f-e)/3):h<k.startFrom?l-m:(c[k.mapperIndex][1-g]===0?l:l+c[k.mapperIndex][1-g]-1)-(j-e)};a.compareUtils.getMapperLineCount=
function(a){for(var c=0,e=0;e<a.length;e++)c+=Math.max(a[e][0],a[e][1]);return c};a.compareUtils.getAnnotationIndex=function(a,c){for(var e=0;e<a.length;e++)if(a[e][0]===c)return e;return-1};a.compareUtils.getAnnotationMapperIndex=function(a,c){return a[c][1]};a.compareUtils.getAnnotationIndexByMapper=function(a,c){for(var e=0;e<a.length;e++)if(a[e][1]===c)return{current:e,prev:e-1,next:e+1};return{current:-1,prev:-1,next:-1}};a.compareUtils.isMapperConflict=function(a,c){return c<0?!1:!a[c][3]?!1:
a[c][3]===1};a.compareUtils.mergeDiffBlocks=function(a,c,e,f,h,k){for(var j=0;j<c.length;j++){var l=c[j][0],m=e[c[j][1]];if(m[0]>0){for(var o="",n=0;n<m[0];n++)o=o+f[m[2]-1+n].substring(h)+k;l=a.getLineStart(l);a.setText(o,l,l)}}};a.compareUtils.generateCompareHref=function(a,g){var e=require.toUrl("compare/compare.html"),f="",h="";g&&(g.readonly&&(f="?readonly"),g.conflict&&(f===""?f="?conflict":f+="&conflict"),g.block&&g.block>0&&(h=",block="+g.block,g.change&&g.change>0&&(h=h+"&change="+g.change)));
return c.create("a",{href:e+f+"#"+a+h}).href};a.compareUtils.parseCompareHash=function(a){var c={complexURL:a},e=a.indexOf(",block=");if(e>0){c.complexURL=a.substring(0,e);a=a.substring(e+1).split("&");for(e=0;e<a.length;e++){var f=a[e].split("=");if(f.length===2)if(f[0]==="block")c.block=parseInt(f[1]);else if(f[0]==="change")c.change=parseInt(f[1])}}return c};a.compareUtils.destroyDijit=function(a){(a=f.byId(a))&&a.destroyRecursive()};a.compareUtils.getDijitSizeStyle=function(a){return"height:"+
(c.marginBox(a).h+"px")+";width:100%"};return a.compareUtils});
define("orion/compare/diffTreeNavigator",["orion/treeModelIterator","orion/compare/compareUtils","orion/textview/annotations","orion/compare/jsdiffAdapter"],function(c,f,a,d){var g={},e,i,h,k,j,l,m,o,n,p,q,r,s,u,t,v;g.DiffTreeNavigator=function(){function g(a,c,d,e,f,h){this._root={type:"root",children:[]};this._initialized=!1;this.initAll(a,c,d,e,f,h)}e="orion.annotation.diff.addedBlock";i="orion.annotation.diff.currentAddedBlock";h="orion.annotation.diff.deletedBlock";k="orion.annotation.diff.currentDeletedBlock";
j="orion.annotation.diff.blockTop";l="orion.annotation.diff.currentBlockTop";m="orion.annotation.diff.blockConflict";o="orion.annotation.diff.currentBlockConflict";n="orion.annotation.diff.addedWord";p="orion.annotation.diff.currentAddedWord";q="orion.annotation.diff.deletedWord";r="orion.annotation.diff.currentDeletedWord";s="orion.annotation.diff.emptyDeletedWordLeft";u="orion.annotation.diff.emptyDeletedWordRight";t="orion.annotation.diff.emptyAddedWordLeft";v="orion.annotation.diff.emptyAddedWordRight";
a.AnnotationType.registerType(e,{title:"",html:"",lineStyle:{styleClass:"annotationLine addedBlockDiff"}});a.AnnotationType.registerType(i,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentAddedBlockDiff"}});a.AnnotationType.registerType(h,{title:"",html:"",lineStyle:{styleClass:"annotationLine deletedBlockDiff"}});a.AnnotationType.registerType(k,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentDeletedBlockDiff"}});a.AnnotationType.registerType(j,{title:"",html:"",lineStyle:{styleClass:"annotationLine blockDiffTopOnly"}});
a.AnnotationType.registerType(l,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentBlockDiffTopOnly"}});a.AnnotationType.registerType(m,{title:"",html:"",lineStyle:{styleClass:"annotationLine blockDiffConflict"}});a.AnnotationType.registerType(o,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentBlockDiffConflict"}});a.AnnotationType.registerType(n,{title:"word added",html:"",rangeStyle:{styleClass:"annotationRange addedWordDiff"}});a.AnnotationType.registerType(p,{title:"",
html:"",rangeStyle:{styleClass:"annotationRange currentAddedWordDiff"}});a.AnnotationType.registerType(q,{title:"word deleted",html:"",rangeStyle:{styleClass:"annotationRange deletedWordDiff"}});a.AnnotationType.registerType(r,{title:"",html:"",rangeStyle:{styleClass:"annotationRange currentDeletedWordDiff"}});a.AnnotationType.registerType(s,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyDeletedWordDiffLeft"}});a.AnnotationType.registerType(u,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyDeletedWordDiffRight"}});
a.AnnotationType.registerType(t,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyAddedWordDiffLeft"}});a.AnnotationType.registerType(v,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyAddedWordDiffRight"}});g.prototype={initAll:function(a,c,d,e,g,f,h){this._charOrWordDiff=a?a:"word";if(c)this._initialized=!0;this.editorWrapper=[{editor:c,diffFeeder:e},{editor:d,diffFeeder:g}];this._curveRuler=h;(this._overviewRuler=f)&&this._overviewRuler.setDiffNavigator(this)},initMapper:function(a){if(a)for(var c=
0;c<this.editorWrapper.length;c++)this.editorWrapper[c].diffFeeder.init(this.editorWrapper[c].editor.getTextView().getModel(),a)},destroy:function(){this.initAll(this._charOrWordDiff)},renderAnnotations:function(){for(var a=0;a<this.editorWrapper.length;a++){this.editorWrapper[a].annoTypes=[];this.editorWrapper[a].diffFeeder.getBlockAnnoTypes(this.editorWrapper[a].annoTypes);this.editorWrapper[a].diffFeeder.getWordAnnoTypes(this.editorWrapper[a].annoTypes);for(var e=0;e<this.editorWrapper[a].annoTypes.length;e++)this.editorWrapper[a].annoTypes[e].current&&
this.editorWrapper[a].editor.getAnnotationStyler().addAnnotationType(this.editorWrapper[a].annoTypes[e].current),this.editorWrapper[a].annoTypes[e].normal&&this.editorWrapper[a].editor.getAnnotationStyler().addAnnotationType(this.editorWrapper[a].annoTypes[e].normal)}this._root.children=[];e=this.editorWrapper[0].diffFeeder.getDiffBlocks();if(!e||e.length===0)this.replaceAllAnnotations(!0,0,"block",!1,[]),this.replaceAllAnnotations(!0,1,"block",!1,[]),this.replaceAllAnnotations(!0,0,"word",!1,[]),
this.replaceAllAnnotations(!0,1,"word",!1,[]),this.replaceAllAnnotations(!0,0,"block",!0,[]),this.replaceAllAnnotations(!0,1,"block",!0,[]),this.replaceAllAnnotations(!0,0,"word",!0,[]),this.replaceAllAnnotations(!0,1,"word",!0,[]);else{for(var g=new d.JSDiffAdapter,a=0;a<e.length;a++){var f=this.generatePairBlockAnnotations(this._root,a);this._root.children.push(f);var h=this.generatePairWordAnnotations(f,a,g);if(h)f.children=h}this.replaceAllAnnotations(!1,0,"block",!0);this.replaceAllAnnotations(!1,
1,"block",!0);this.replaceAllAnnotations(!1,0,"word",!0);this.replaceAllAnnotations(!1,1,"word",!0);this.iterator=new c.TreeModelIterator(this._root.children)}},replaceAllAnnotations:function(a,c,d,e,g){for(var f=0;f<this.editorWrapper[c].annoTypes.length;f++)this.editorWrapper[c].annoTypes[f].type===d&&this.replaceDiffAnnotations(this.editorWrapper[c].editor,g?g:this.editorWrapper[c].annoTypes[f].list,e?this.editorWrapper[c].annoTypes[f].normal:this.editorWrapper[c].annoTypes[f].current,a)},getMapper:function(){return this.editorWrapper[0].diffFeeder.getMapper()},
getFeeder:function(a){return a?this.editorWrapper[1].diffFeeder:this.editorWrapper[0].diffFeeder},iterateOnBlock:function(a,c){this.iterator&&(this.iterator.iterateOnTop(a,c),this.updateCurrentAnnotation(!0))},iterateOnChange:function(a){if(this.iterator){this.iterator.iterate(a);var c=this.iterator.cursor();c.type==="block"&&c.children&&c.children.length>0&&this.iterator.iterate(a);this.updateCurrentAnnotation(!0)}},gotoBlock:function(a,c){if(this.iterator){if(a<0||a>=this._root.children.length||
this._root.children.length===0)a=0;c!==void 0&&c>=0&&this._root.children[a].children&&c<this._root.children[a].children.length?this.iterator.setCursor(this._root.children[a].children[c]):this.iterator.setCursor(this._root.children[a]);this.updateCurrentAnnotation(!1);this._positionDiffBlock()}},_hitDiffAnnotation:function(a,c,d){if(d===this.editorWrapper[a].editor.getTextView()){for(var e=0;e<this._root.children.length;e++){var d=this._root.children[e],g=a===0?d.oldA:d.newA;if(c>=g.start&&c<=g.end){e=
d;if(d.children&&d.children.length>0)for(g=0;g<d.children.length;g++){var f=d.children[g],h=a===0?f.oldA:f.newA;if(c>=h.start&&c<=h.end){e=f;break}}return e}}return null}},gotoChange:function(a,c){for(var d=0;d<this.editorWrapper.length;d++){var e=this._hitDiffAnnotation(d,a,c);if(e)return this.iterator.setCursor(e),this.updateCurrentAnnotation(!1,c),!0}return!1},getCurrentBlockIndex:function(){if(!this.iterator)return-1;var a=this.iterator.cursor();return!a?-1:a.type==="block"?a.index:a.parent.index},
getCurrentPosition:function(){if(!this.iterator)return{};var a=this.iterator.cursor();return a.type==="block"?{block:a.index+1}:{block:a.parent.index+1,change:a.index+1}},getCurrentMapperIndex:function(){var a=this.getCurrentBlockIndex();a<0&&(a=0);return this.getFeeder().getDiffBlocks().length===0?-1:this.getFeeder().getDiffBlocks()[a][1]},replaceDiffAnnotations:function(a,c,d,e){if(c&&d&&(a=a.getAnnotationModel())){for(var g=a.getAnnotations(0,a.getTextModel().getCharCount()),f=[];e&&g.hasNext();){var h=
g.next();h.type===d&&f.push(h)}a.replaceAnnotations(f,c)}},updateCurrentAnnotation:function(c,d){this.replaceAllAnnotations(!0,0,"block",!1,[]);this.replaceAllAnnotations(!0,1,"block",!1,[]);this.replaceAllAnnotations(!0,0,"word",!1,[]);this.replaceAllAnnotations(!0,1,"word",!1,[]);if(this.iterator){var e=this.iterator.cursor();if(e){var g,f,h={start:e.oldA.start,end:e.oldA.end},i={start:e.newA.start,end:e.newA.end};e.type==="word"?(g=this.editorWrapper[0].diffFeeder.getCurrentWordAnnoType(h,this.editorWrapper[0].editor.getTextView().getModel()),
f=this.editorWrapper[1].diffFeeder.getCurrentWordAnnoType(i,this.editorWrapper[1].editor.getTextView().getModel())):(g=this.editorWrapper[0].diffFeeder.getCurrentBlockAnnoType(e.index),f=this.editorWrapper[1].diffFeeder.getCurrentBlockAnnoType(e.index));this.replaceDiffAnnotations(this.editorWrapper[0].editor,[new (a.AnnotationType.getType(g.current))(h.start,h.end)],g,!0);this.replaceDiffAnnotations(this.editorWrapper[1].editor,[new (a.AnnotationType.getType(f.current))(i.start,i.end)],f,!0);if(c)this.autoSelecting=
!0,this.editorWrapper[0].editor.setSelection(e.oldA.start,e.oldA.end,!0),this.editorWrapper[1].editor.setSelection(e.newA.start,e.newA.end,!0),this.autoSelecting=!1;else if(d)this.autoSelecting=!0,d!==this.editorWrapper[0].editor.getTextView()&&this.editorWrapper[0].editor.setSelection(e.oldA.start,e.oldA.end,!0),d!==this.editorWrapper[1].editor.getTextView()&&this.editorWrapper[1].editor.setSelection(e.newA.start,e.newA.end,!0),this.autoSelecting=!1}}},generatePairBlockAnnotations:function(a,c){var d=
this.generateBlockDiffAnnotations(0,c),e=this.generateBlockDiffAnnotations(1,c);return{parent:a,index:c,type:"block",oldA:d,newA:e}},generatePairWordAnnotations:function(a,c,d){var e=this.editorWrapper[0].diffFeeder.getTextOnBlock(c),g=this.editorWrapper[1].diffFeeder.getTextOnBlock(c),c=null,f=0,h=0;if(e&&g)c=d.adaptCharDiff(e.text,g.text,this._charOrWordDiff==="word"),h=g.start,f=e.start;else return null;d=[];e=[];this.generateWordDiffAnnotations(0,d,f,c,2,3);this.generateWordDiffAnnotations(1,
e,h,c,0,1);c=[];for(f=0;f<d.length;f++)c.push({parent:a,index:f,type:"word",oldA:d[f],newA:e[f]});return c},getAnnoModelList:function(a,c,d){for(var e=0;e<this.editorWrapper[a].annoTypes.length;e++)if(this.editorWrapper[a].annoTypes[e].type===c&&this.editorWrapper[a].annoTypes[e].normal===d)return this.editorWrapper[a].annoTypes[e].list;return null},generateBlockDiffAnnotations:function(c,d){var e=this.editorWrapper[c].diffFeeder.getCurrentBlockAnnoType(d),g=this.getAnnoModelList(c,"block",e.normal),
f=this.editorWrapper[c].diffFeeder.getCharRange(d),e=a.AnnotationType.createAnnotation(e.normal,f.start,f.end);g&&g.push(e);return e},generateWordDiffAnnotations:function(c,d,e,g,f,h){if(g)for(var i=this.editorWrapper[c].diffFeeder.getCurrentWordAnnoType({start:-1,end:-1}),c=this.getAnnoModelList(c,"word",i.normal),j=0;j<g.length;j++){var k=a.AnnotationType.createAnnotation(i.normal,g[j][f]+e,g[j][h]+e);c.push(k);d.push(k)}},_updateOverviewRuler:function(){if(this._overviewRuler){var a=this.editorWrapper[0].editor.getTextView().getTopIndex();
this.editorWrapper[0].editor.getTextView().redrawLines(a,a+1,this._overviewRuler)}},_updateCurveRuler:function(){this._curveRuler&&this._curveRuler.render()},_setTextViewPosition:function(a,c){var d=a.getLineHeight(),e=a.getClientArea(),d=Math.floor(e.height/d/3);a.setTopIndex(c-d>0?c-d:0)},_positionDiffBlock:function(){var a=this.getCurrentBlockIndex(),c=this.getFeeder().getDiffBlocks();c.length!==0&&(this._setTextViewPosition(this.editorWrapper[0].editor.getTextView(),c[a][0]),this.editorWrapper[0].editor!==
this.editorWrapper[1].editor&&(a=f.lookUpLineIndex(this.getMapper(),0,c[a][1]),this._setTextViewPosition(this.editorWrapper[1].editor.getTextView(),a)),this._updateOverviewRuler(),this._updateCurveRuler())},matchPositionFromOverview:function(a){this._initialized&&this.gotoBlock(a<0?0:f.getAnnotationIndex(this.getFeeder().getDiffBlocks(),a))},gotoDiff:function(a,c){this.gotoChange(a,c)&&(this._updateOverviewRuler(),this._updateCurveRuler())},nextDiff:function(){this.iterateOnBlock(!0,!0);this._positionDiffBlock()},
prevDiff:function(){this.iterateOnBlock(!1,!0);this._positionDiffBlock()},nextChange:function(){this.iterateOnChange(!0);this._positionDiffBlock()},prevChange:function(){this.iterateOnChange(!1);this._positionDiffBlock()}};return g}();g.DiffBlockFeeder=function(){function a(){}a.prototype={getWordAnnoTypes:function(a){this._mapperColumnIndex===0?a.push({type:"word",current:p,normal:n,list:[]}):a.push({type:"word",current:r,normal:q,list:[]});a.push({type:"word",current:s});a.push({type:"word",current:u});
a.push({type:"word",current:t});a.push({type:"word",current:v})},getCurrentWordAnnoType:function(a,c){return a.start===a.end&&c?this._mapperColumnIndex===0?{current:this._repositionEmptyWord(a,c),normal:n}:{current:this._repositionEmptyWord(a,c),normal:q}:this._mapperColumnIndex===0?{current:p,normal:n}:{current:r,normal:q}},_repositionEmptyWord:function(a,c){var d=c.getLineAtOffset(a.start),e=c.getLineStart(d),g=c.getLineEnd(d);if(e!==g){if(a.start===g)return a.start--,this._mapperColumnIndex===
0?v:u;a.end++}else if(d>0&&(d--,e=c.getLineStart(d),g=c.getLineEnd(d),e!==g))return a.start=g-1,a.end=g,this._mapperColumnIndex===0?v:u;return this._mapperColumnIndex===0?t:s},getMapper:function(){return this._mapper},getDiffBlocks:function(){return this._diffBlocks},getDiffBlockH:function(a){if(!this._diffBlocks)return-1;a=this._diffBlocks[a][1];return a===-1?0:this._mapper[a][this._mapperColumnIndex]},getOverviewLineCount:function(){return this._textModel.getLineCount()},getLineNumber:function(a){return a},
getCharRange:function(a){var c=this._diffBlocks[a][0],d=c+this._mapper[this._diffBlocks[a][1]][this._mapperColumnIndex]-1,a=this._textModel.getLineStart(c);if(d<c)return{start:a,end:a};c=this._textModel.getLineEnd(d,!0);return{start:a,end:c}},getTextOnBlock:function(a){a=this.getCharRange(a);return{start:a.start,text:this._textModel.getText(a.start,a.end)}},isMapperEmpty:function(){return this._mapper.length===0}};return a}();g.TwoWayDiffBlockFeeder=function(){function a(c,d,e){this._mapperColumnIndex=
e;this.init(c,d)}a.prototype=new g.DiffBlockFeeder;a.prototype.init=function(a,c){this._textModel=a;this._diffBlocks=void 0;if(c){this._mapper=c;this._diffBlocks=[];for(var d=0,e=0;e<this._mapper.length;e++)this._mapper[e][2]!==0&&this._diffBlocks.push([d,e]),d+=this._mapper[e][this._mapperColumnIndex]}};a.prototype.getBlockAnnoTypes=function(a){this._mapperColumnIndex===0?a.push({type:"block",normal:e,current:i,list:[]}):a.push({type:"block",normal:h,current:k,list:[]});a.push({type:"block",normal:j,
current:l,list:[]});a.push({type:"block",normal:m,current:o,list:[]})};a.prototype.getCurrentBlockAnnoType=function(a){a=this._diffBlocks[a][1];if(this._mapper[a][this._mapperColumnIndex]===0)return{normal:j,current:l};else if(f.isMapperConflict(this.getMapper(),a))return{normal:m,current:o};else if(this._mapperColumnIndex===0)return{type:"block",normal:e,current:i,list:[]};return{type:"block",normal:h,current:k,list:[]}};return a}();g.inlineDiffBlockFeeder=function(){function a(c,d){this._mapperColumnIndex=
d;this.init(c)}a.prototype=new g.DiffBlockFeeder;a.prototype.setModel=function(a){this._textModel=a};a.prototype.init=function(a){this._diffBlocks=void 0;if(a){this._mapper=a;this._diffBlocks=[];this._gapBlocks=[];for(var c=a=0,d=0;d<this._mapper.length;d++){if(this._mapper[d][2]!==0){if(this._mapperColumnIndex===0){var e=a+this._mapper[d][1];this._diffBlocks.push([e,d]);this._gapBlocks.push([e,e+this._mapper[d][0],c])}else this._diffBlocks.push([a,d]),this._gapBlocks.push([a,a+this._mapper[d][1],
c]);a+=this._mapper[d][0]+this._mapper[d][1]}else this._gapBlocks.push([a,a+this._mapper[d][this._mapperColumnIndex],c]),a+=this._mapper[d][this._mapperColumnIndex];c+=this._mapper[d][this._mapperColumnIndex]}}};a.prototype.getBlockAnnoTypes=function(a){this._mapperColumnIndex===0?a.push({type:"block",normal:e,current:i,list:[]}):a.push({type:"block",normal:h,current:k,list:[]});a.push({type:"block",normal:m,current:o,list:[]})};a.prototype.getCurrentBlockAnnoType=function(a){a=this._diffBlocks[a][1];
if(this._mapper[a][this._mapperColumnIndex]===0)return{current:p,normal:n};else if(f.isMapperConflict(this.getMapper(),a))return{normal:m,current:o};else if(this._mapperColumnIndex===0)return{type:"block",normal:e,current:i,list:[]};return{type:"block",normal:h,current:k,list:[]}};a.prototype.getDiffBlockH=function(a){if(!this._diffBlocks)return-1;a=this._diffBlocks[a][1];return this._mapper[a][0]+this._mapper[a][1]};a.prototype.getLineNumber=function(a){for(var c=0;c<this._gapBlocks.length;c++)if(this._gapBlocks[c][0]!==
this._gapBlocks[c][1]&&a>=this._gapBlocks[c][0]&&a<this._gapBlocks[c][1])return a-this._gapBlocks[c][0]+this._gapBlocks[c][2];return-1};return a}();return g});
define("orion/compare/compare-rulers",["orion/compare/compareUtils","orion/compare/diffTreeNavigator"],function(c){var f=f||{};f.CompareRuler=function(){function a(a,c,e){this._location=a||"left";this._overview=c||"page";this._rulerStyle=e;this._editor=null;var f=this;this._listener={onModelChanged:function(a){f._onModelChanged(a)}}}a.prototype={setView:function(a){this._onModelChanged&&this._editor&&this._editor.removeEventListener("ModelChanged",this._listener.onModelChanged);this._editor=a;this._onModelChanged&&
this._editor&&this._editor.addEventListener("ModelChanged",this._listener.onModelChanged)},getLocation:function(){return this._location},getOverview:function(){return this._overview},getAnnotationModel:function(){return null},addAnnotationType:function(){},isAnnotationTypeVisible:function(){return!1},removeAnnotationType:function(){},setAnnotationModel:function(){},getAnnotations:function(a,c){for(var e=[],f=a;f<c;f++){var h=this.getStyle(f);h&&(e[f]={html:this.getHTML(f),style:h})}return e},getWidestAnnotation:function(){return{html:this.getHTML(-1),
style:this.getStyle(-1)}},getRulerStyle:function(){return this.getStyle(void 0)}};return a}();f.LineNumberCompareRuler=function(){function a(a,c,e,i,h,k){f.CompareRuler.call(this,e,"page",i);this._diffNavigator=a;this._oddStyle=h||{style:{backgroundColor:"white"}};this._evenStyle=k||{style:{backgroundColor:"white"}};this._numOfDigits=0;this._mapperColumnIndex=c}a.prototype=new f.CompareRuler;a.prototype.getStyle=function(a){return a===void 0?this._rulerStyle:this._evenStyle};a.prototype.getHTML=function(a){var c=
this._editor.getModel(),e=this._diffNavigator.getFeeder(this._mapperColumnIndex===0);return!e?"":a===-1?c.getLineCount():e.getLineNumber?(a=e.getLineNumber(a),a===-1?"":a+1):a+1};a.prototype._onModelChanged=function(a){var a=a.start,c=this._editor.getModel(),e=c.getLineCount(),f=(e+"").length;if(this._numOfDigits!==f)this._numOfDigits=f,this._editor.redrawLines(c.getLineAtOffset(a),e,this)};return a}();f.CompareOverviewRuler=function(){function a(a,c,e,i){this._diffNavigator=e;this._onClick=i;f.CompareRuler.call(this,
a,"document",c)}a.prototype=new f.CompareRuler;a.prototype.getStyle=function(a){var g,e;if(a===void 0)g=this._rulerStyle||{},e=g.style||(g.style={}),e.lineHeight="1px",e.fontSize="1px",e.width="14px";else if(g=a!==-1?{styleClass:"annotationOverview breakpoint"}:{},e=g.style||(g.style={}),e.cursor="pointer",e.width="8px",e.left="2px",this._editor.getModel(),a>=0){var f;if(this._diffNavigator&&this._diffNavigator.getFeeder())f=this._diffNavigator.getFeeder().getDiffBlocks();else return null;a=c.getAnnotationIndex(f,
a);if(a===-1)return null;f=c.getAnnotationMapperIndex(f,a);var h;h=this._diffNavigator.getMapper();if(f=c.isMapperConflict(h,f))e.border="1px #FF0000 solid";if(a===this._diffNavigator.getCurrentBlockIndex())e.backgroundColor=f?"red":"blue";a=this._diffNavigator.getFeeder().getDiffBlockH(a);f=this._diffNavigator.getFeeder().getOverviewLineCount();if(a<0)return null;h=this._editor.getClientArea();a=Math.floor(h.height*a/f);a<2&&(a=2);e.height=a+"px"}else return e.height="3px";return g};a.prototype.setDiffNavigator=
function(a){this._diffNavigator=a};a.prototype.getHTML=function(){return"&nbsp;"};a.prototype.onClick=function(a){a!==void 0&&this._onClick(a,this)};a.prototype._onModelChanged=function(){this._editor.getModel().getLineCount()>0&&this._editor.redrawLines(0,1,this)};return a}();f.CompareCurveRuler=function(){function a(a){this._canvasDiv=a;this._mapper=void 0;this._initialized=!1}a.prototype={init:function(a,c,e,f){this._initing=this._initialized=!0;this._mapper=a;this._leftEditor=c;this._rightEditor=
e;this._leftTextView=c.getTextView();this._rightTextView=e.getTextView();this._diffNavigator=f;this.render()},matchPositionFrom:function(a){var g=a?this._leftTextView:this._rightTextView,e=a?this._rightTextView:this._leftTextView,f=g.getTopIndex(),g=g.getBottomIndex(),a=c.matchMapper(this._mapper,a?0:1,f,g);e.setTopIndex(a)},copyToLeft:function(){if(this._diffNavigator.iterator){var a=this._diffNavigator.iterator.cursor();a&&this._leftTextView.setText(this._rightTextView.getText(a.oldA.start,a.oldA.end),
a.newA.start,a.newA.end)}},render:function(){if(this._mapper){var a=this._canvasDiv.getContext("2d");a.clearRect(0,0,this._canvasDiv.width,this._canvasDiv.height);a.strokeStyle="#AAAAAA";a.lineWidth=1;a.beginPath();var g=this._leftTextView.getTopIndex(),e=this._leftTextView.getBottomIndex(),f=this._rightTextView.getTopIndex(),h=this._rightTextView.getBottomIndex();this._leftLineH=this._leftTextView.getLineHeight();this._rightLineH=this._rightTextView.getLineHeight();for(var k=0,j=0,l=!1,m=0;m<this._mapper.length;m++){if(this._mapper[m][2]!==
0)if(c.overlapMapper(this._mapper[m],0,k,g,e)||c.overlapMapper(this._mapper[m],1,j,f,h))this._renderCurve(m,k,j,this._canvasDiv,a,g,e,f,h),l=!0;else if(l)break;k+=this._mapper[m][0];j+=this._mapper[m][1]}a.stroke()}},_renderCurve:function(a,c,e,f,h){var k=this._mapper[a],c=this._leftTextView.getLinePixel(c+k[0]/2)+k[0]%2*this._leftLineH/3-this._leftTextView.getTopPixel(),e=this._rightTextView.getLinePixel(e+k[1]/2)+k[1]%2*this._rightLineH/3-this._rightTextView.getTopPixel(),f=f.parentNode.clientWidth;
a===this._diffNavigator.getCurrentMapperIndex()?(h.stroke(),h.strokeStyle="#000",h.lineWidth=1,h.beginPath(),h.moveTo(0,c),h.bezierCurveTo(f/3,c,f*0.666,e,f,e),h.stroke(),h.strokeStyle="#AAAAAA",h.lineWidth=1,h.beginPath()):(h.moveTo(0,c),h.bezierCurveTo(f/3,c,f*0.666,e,f,e),h.stroke())},onChanged:function(a){if(a.removedLineCount!==a.addedLineCount)this._initing||c.updateMapper(this._mapper,0,this._leftTextView.getModel().getLineAtOffset(a.start),a.removedLineCount,a.addedLineCount),this._initing=
!1,(a.removedLineCount>0||a.addedLineCount>0)&&this.render()}};return a}();return f});define("orion/dialogs",[],function(){function c(c){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.dialog",this)}c.prototype={confirm:function(c,a){a(window.confirm(c))},openFiles:function(){}};c.prototype.constructor=c;return{DialogService:c}});
define("orion/ssh/sshTools",[],function(){var c=c||{};c.SshService=function(){function c(a){if(a)this._serviceRegistry=a,this._serviceRegistration=a.registerService("orion.net.ssh",this)}c.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(a,c){c||(c="");var g=localStorage.getItem(c+this._KNOWN_HOSTS);g?g.indexOf(a)<0&&localStorage.setItem(c+this._KNOWN_HOSTS,g+"\n"+a):localStorage.setItem(c+this._KNOWN_HOSTS,a)},clearKnownhosts:function(a){a||(a="");localStorage.removeItem(a+this._KNOWN_HOSTS)},
getKnownHosts:function(a){a||(a="");return localStorage.getItem(a+this._KNOWN_HOSTS)}};return c}();return c});
define("orion/contentTypes",[],function(){function c(a,c){function d(a,c,e,g){var e=c.filename.indexOf(e)>=0,f=c.extension.indexOf(g)>=0;if(e||f)if(!a||e&&a.extension.indexOf(g)>=0)return c;return a}for(var g=a&&a.split(".").pop(),f=null,l=0;l<c.length;l++){var m=c[l];d(f,m,a,g)===m&&(f=m)}return f}function f(c){this.serviceRegistry=c;this.map=function(a){function c(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var a=a.getServiceReferences(d).concat(a.getServiceReferences(g)),
e={},f=0;f<a.length;f++)for(var l=c(a[f].getProperty("contentTypes")),m=0;m<l.length;m++){var o=l[m];e[o.id]||(e[o.id]={id:o.id,name:o.name,image:o.image,"extends":o["extends"],extension:c(o.extension),filename:c(o.filename)})}return e}(c);c.registerService(a,this)}var a="orion.core.contenttypes",d="orion.core.contenttype",g="orion.file.contenttype";f.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),c=[],d;for(d in a)a.hasOwnProperty(d)&&c.push(a[d]);return c},getContentTypesMap:function(){return this.map},
getFileContentType:function(a){return c(a.Name,this.getContentTypes())},getFilenameContentType:function(a){return c(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,c){a=typeof a==="string"?this.getContentType(a):a;c=typeof c==="string"?this.getContentType(c):c;if(!a||!c)return!1;if(a.id===c.id)return!0;else for(var d=a,g={};d&&(d=this.getContentType(d["extends"]));){if(d.id===c.id)return!0;if(g[d.id])throw Error("Cycle: "+d.id);g[d.id]=!0}return!1},
isSomeExtensionOf:function(a,c){for(var d=0;d<c.length;d++)if(this.isExtensionOf(a,c[d]))return!0;return!1}};return{ContentTypeService:f,getFilenameContentType:c}});
define("dojo/parser",["dojo","dojo/date/stamp"],function(c){c.parser=new function(){function f(a,c){switch(c){case "string":return a;case "number":return a.length?Number(a):NaN;case "boolean":return typeof a=="boolean"?a:a.toLowerCase()!="false";case "function":g.isFunction(a)&&(a=a.toString(),a=g.trim(a.substring(a.indexOf("{")+1,a.length-1)));try{return a===""||a.search(/[^\w\.]+/i)!=-1?new Function(a):g.getObject(a,!1)||new Function(a)}catch(d){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 g.date.stamp.fromISOString(a)}case "url":return g.baseUrl+a;default:return g.fromJson(a)}}function a(a,c){for(var d in a)if(d.charAt(0)!="_"&&!(d in e)){var f=c,i=d,o;o=a[d];o=g.isString(o)?"string":typeof o=="number"?"number":typeof o=="boolean"?"boolean":g.isFunction(o)?"function":g.isArray(o)?"array":o instanceof Date?"date":o instanceof g._Url?"url":"object";f[i]=o}return c}function d(c,d){var e=i[c];
if(e){if(!d&&!e.params)e.params=a(e.cls.prototype,{})}else{var e=g.getObject(c),f=null;if(!e)return null;d||(f=a(e.prototype,{}));e={cls:e,params:f}}return e}var g=c,e={},i={};g.connect(g,"extend",function(){i={}});this._functionFromScript=function(a,c){var d="",e="",f=a.getAttribute(c+"args")||a.getAttribute("args");f&&g.forEach(f.split(/\s*,\s*/),function(a,c){d+="var "+a+" = arguments["+c+"]; "});(f=a.getAttribute("with"))&&f.length&&g.forEach(f.split(/\s*,\s*/),function(a){d+="with("+a+"){";e+=
"}"});return new Function(d+a.innerHTML+e)};this.instantiate=function(a,e,i){var l=[],e=e||{},i=i||{},m=(i.scope||g._scopeName)+"Type",o="data-"+(i.scope||g._scopeName)+"-";g.forEach(a,function(a){if(a){var h,q,r,s,u,t;a.node?(h=a.node,q=a.type,t=a.fastpath,s=(r=a.clsInfo||q&&d(q,t))&&r.cls,u=a.scripts):(h=a,u=(s=(r=(q=m in e?e[m]:h.getAttribute(m))&&d(q))&&r.cls)&&(s._noScript||s.prototype._noScript)?[]:g.query("> script[type^='dojo/']",h));if(!r)throw Error("Could not load class '"+q);var v={};
i.defaults&&g._mixin(v,i.defaults);a.inherited&&g._mixin(v,a.inherited);if(t){if((r=h.getAttribute(o+"props"))&&r.length)try{r=g.fromJson.call(i.propsThis,"{"+r+"}"),g._mixin(v,r)}catch(x){throw Error(x.toString()+" in data-dojo-props='"+r+"'");}if(r=h.getAttribute(o+"attach-point"))v.dojoAttachPoint=r;if(r=h.getAttribute(o+"attach-event"))v.dojoAttachEvent=r;c.mixin(v,e)}else{var a=h.attributes,w;for(w in r.params)if((q=w in e?{value:e[w],specified:!0}:a.getNamedItem(w))&&(q.specified||c.isIE&&w.toLowerCase()==
"value")){q=q.value;switch(w){case "class":q="className"in e?e.className:h.className;break;case "style":q="style"in e?e.style:h.style&&h.style.cssText}t=r.params[w];v[w]=typeof q=="string"?f(q,t):q}}var z=[],B=[];g.forEach(u,function(a){h.removeChild(a);var c=a.getAttribute(o+"event")||a.getAttribute("event"),d=a.getAttribute("type"),a=g.parser._functionFromScript(a,o);c?d=="dojo/connect"?z.push({event:c,func:a}):v[c]=a:B.push(a)});var M=(u=s.markupFactory||s.prototype&&s.prototype.markupFactory)?
u(v,h,s):new s(v,h);l.push(M);(s=h.getAttribute(o+"id")||h.getAttribute("jsId"))&&g.setObject(s,M);g.forEach(z,function(a){g.connect(M,a.event,null,a.func)});g.forEach(B,function(a){a.call(M)})}});e._started||g.forEach(l,function(a){!i.noStart&&a&&c.isFunction(a.startup)&&!a._started&&(!a.getParent||!a.getParent())&&a.startup()});return l};this.parse=function(a,e){function f(a,g){var h=c.clone(a.inherited);c.forEach(["dir","lang"],function(c){var d=a.node.getAttribute(c);d&&(h[c]=d)});for(var i=a.clsInfo&&
!a.clsInfo.cls.prototype._noScript?a.scripts:null,l=!a.clsInfo||!a.clsInfo.cls.prototype.stopParser||e&&e.template,n=a.node.firstChild;n;n=n.nextSibling)if(n.nodeType==1){var p,w=l&&n.getAttribute(o+"type");p=w?w:l&&n.getAttribute(m);w=w==p;p?(p={type:p,fastpath:w,clsInfo:d(p,w),node:n,scripts:[],inherited:h},g.push(p),f(p,g)):i&&n.nodeName.toLowerCase()=="script"?(p=n.getAttribute("type"))&&/^dojo\/\w/i.test(p)&&i.push(n):l&&f({node:n,inherited:h},g)}}var i;!e&&a&&a.rootNode?(e=a,i=e.rootNode):i=
a;i=i?c.byId(i):c.body();var e=e||{},m=(e.scope||g._scopeName)+"Type",o="data-"+(e.scope||g._scopeName)+"-",n={};if(e&&e.inherited)for(var p in e.inherited)e.inherited[p]&&(n[p]=e.inherited[p]);p=[];f({node:i,inherited:n},p);return this.instantiate(p,e&&e.template?{template:!0}:null,e)}};(function(){var f=function(){c.config.parseOnLoad&&c.parser.parse()};c.getObject("dijit.wai.onload")===c._loaders[0]?c._loaders.splice(1,0,f):c._loaders.unshift(f)})();return c.parser});
define("dijit/_Templated","dojo,dijit,dijit/_Widget,dojo/string,dojo/parser,dojo/cache".split(","),function(c,f){c.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:!1,_skipNodeCache:!1,_earlyTemplatedStartup:!1,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var d=this.declaredClass,g=this;return c.string.substitute(a,this,function(a,f){f.charAt(0)=="!"&&(a=c.getObject(f.substr(1),!1,g));if(typeof a=="undefined")throw Error(d+
" template:"+f);return a==null?"":f.charAt(0)=="!"?a:a.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=f._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),d;if(c.isString(a)){if(d=c._toDom(this._stringRepl(a)),d.nodeType!=1)throw Error("Invalid template: "+a);}else d=a.cloneNode(!0);this.domNode=d;this.inherited(arguments);this._attachTemplateNodes(d);if(this.widgetsInTemplate)a=this._startupWidgets=c.parser.parse(d,{noStart:!this._earlyTemplatedStartup,
template:!0,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"}),this._supportingWidgets=f.findWidgets(d),this._attachTemplateNodes(a,function(a,c){return a[c]});this._fillContent(this.srcNodeRef)},_fillContent:function(a){var c=this.containerNode;if(a&&c)for(;a.hasChildNodes();)c.appendChild(a.firstChild)},_attachTemplateNodes:function(a,d){for(var d=d||function(a,c){return a.getAttribute(c)},g=c.isArray(a)?a:a.all||a.getElementsByTagName("*"),e=c.isArray(a)?0:-1;e<g.length;e++){var i=
e==-1?a:g[e];if(!this.widgetsInTemplate||!d(i,"dojoType")&&!d(i,"data-dojo-type")){var h=d(i,"dojoAttachPoint")||d(i,"data-dojo-attach-point");if(h)for(var k=h.split(/\s*,\s*/);h=k.shift();)c.isArray(this[h])?this[h].push(i):this[h]=i,this._attachPoints.push(h);if(h=d(i,"dojoAttachEvent")||d(i,"data-dojo-attach-event"))for(var k=h.split(/\s*,\s*/),j=c.trim;h=k.shift();)if(h){var l=null;h.indexOf(":")!=-1?(l=h.split(":"),h=j(l[0]),l=j(l[1])):h=j(h);l||(l=h);this._attachEvents.push(this.connect(i,h,
l))}(h=d(i,"waiRole"))&&f.setWaiRole(i,h);(h=d(i,"waiState"))&&c.forEach(h.split(/\s*,\s*/),function(a){a.indexOf("-")!=-1&&(a=a.split("-"),f.setWaiState(i,a[0],a[1]))})}}},startup:function(){c.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){c.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];c.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});
f._Templated._templateCache={};f._Templated.getCachedTemplate=function(a,d,g){var e=f._Templated._templateCache,i=d||a,h=e[i];if(h){try{if(!h.ownerDocument||h.ownerDocument==c.doc)return h}catch(k){}c.destroy(h)}d||(d=c.cache(a,{sanitize:!0}));d=c.string.trim(d);if(g||d.match(/\$\{([^\}]+)\}/g))return e[i]=d;else{a=c._toDom(d);if(a.nodeType!=1)throw Error("Invalid template: "+d);return e[i]=a}};c.isIE&&c.addOnWindowUnload(function(){var a=f._Templated._templateCache,d;for(d in a){var g=a[d];typeof g==
"object"&&c.destroy(g);delete a[d]}});c.extend(f._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return f._Templated});
define("dijit/form/_FormWidget","dojo,dijit,dojo/window,dijit/_Widget,dijit/_Templated,dijit/_CssStateMixin".split(","),function(c,f){c.declare("dijit.form._FormWidget",[f._Widget,f._Templated,f._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,attributeMap:c.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);c.attr(this.focusNode,"disabled",a);this.valueNode&&c.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",c.forEach(c.isArray(a)?
a:[a],function(a){a=this[a];c.isWebKit||f.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){c.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(a){this.scrollOnFocus&&c.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&
c.style(this.domNode,"display")!="none"},focus:function(){this.disabled||f.focus(this.focusNode)},compare:function(a,c){return typeof a=="number"&&typeof c=="number"?isNaN(a)&&isNaN(c)?0:a-c:a>c?1:a<c?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,d){if(this._lastValueReported==void 0&&(d===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||d||d===void 0)&&this._pendingOnChange)if(this._lastValueReported=a,this._pendingOnChange=!1,this._onChangeActive)this._onChangeHandle&&clearTimeout(this._onChangeHandle),this._onChangeHandle=setTimeout(c.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){c.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){c.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&c.mouseButtons.isLeft(a)&&this.isFocusable())var d=this.connect(c.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(d)})}});c.declare("dijit.form._FormValueWidget",
f.form._FormWidget,{readOnly:!1,attributeMap:c.delegate(f.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){c.attr(this.focusNode,"readOnly",a);f.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(c.isIE<9||c.isIE&&c.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===void 0)this._lastValueReported=this._resetValue=this.value},_setValueAttr:function(a,
c){this._handleOnChange(a,c)},_handleOnChange:function(a,c){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==c.keys.ESCAPE&&!a.ctrlKey&&!a.altKey&&!a.metaKey){var d;if(c.isIE)a.preventDefault(),d=document.createEventObject(),d.keyCode=c.keys.ESCAPE,d.shiftKey=a.shiftKey,a.srcElement.fireEvent("onkeypress",d)}},_layoutHackIE7:function(){if(c.isIE==
7)for(var a=this.domNode,d=a.parentNode,g=a.firstChild||a,e=g.style.filter,f=this;d&&d.clientHeight==0;)(function(){var a=f.connect(d,"onscroll",function(){f.disconnect(a);g.style.filter=(new Date).getMilliseconds();setTimeout(function(){g.style.filter=e},0)})})(),d=d.parentNode}});return f.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(c,f){c.declare("dijit.form.TextBox",f.form._FormValueWidget,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",templateString:c.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:c.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:c.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=c.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,
c,g){var e;a!==void 0&&(e=this.filter(a),typeof g!="string"&&(g=e!==null&&(typeof e!="number"||!isNaN(e))?this.filter(this.format(e,this.constraints)):""));if(g!=null&&g!=void 0&&(typeof g!="number"||!isNaN(g))&&this.textbox.value!=g)this.textbox.value=g,this._set("displayedValue",this.get("displayedValue"));this._updatePlaceHolder();this.inherited(arguments,[e,c])},displayedValue:"",getDisplayedValue:function(){c.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){c.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 c.keys.SHIFT:case c.keys.ALT:case c.keys.CTRL:case c.keys.TAB:return}if(this.intermediateChanges){var d=this;setTimeout(function(){d._handleOnChange(d.get("value"),!1)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){c.isIE&&setTimeout(c.hitch(this,
function(){var a=c.getComputedStyle(this.domNode);if(a&&(a=a.fontFamily)){var d=this.domNode.getElementsByTagName("INPUT");if(d)for(var g=0;g<d.length;g++)d[g].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);c.isMoz||c.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=c.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&&c.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;c.isIE?(a=c.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,d,g){var e=c.global,i=c.doc,a=c.byId(a);isNaN(d)&&(d=0);isNaN(g)&&(g=a.value?a.value.length:0);f.focus(a);i.selection&&c.body().createTextRange?a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",d),a.moveEnd("character",
g-d),a.select()):e.getSelection&&a.setSelectionRange&&a.setSelectionRange(d,g)};return f.form.TextBox});
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(c,f){c.declare("dijit.form.Button",f.form._FormWidget,{label:"",showLabel:!0,iconClass:"",type:"button",baseClass:"dijitButton",templateString:c.cache("dijit.form","templates/Button.html"),attributeMap:c.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 c=this.domNode;c.parentNode;c=c.parentNode){var g=f.byNode(c);if(g&&typeof g._onSubmit=="function"){g._onSubmit(a);break}}else this.valueNode&&(this.valueNode.click(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);c.setSelectable(this.focusNode,
!1)},_fillContent:function(a){a&&(!this.params||!("label"in this.params))&&this.set("label",a.innerHTML)},_setShowLabelAttr:function(a){this.containerNode&&c.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return!0},_clicked:function(){},setLabel:function(a){c.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=c.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){c.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});c.declare("dijit.form.DropDownButton",[f.form.Button,f._Container,f._HasDropDown],{baseClass:"dijitDropDownButton",templateString:c.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
c.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=c.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 d=c.connect(a,"onLoad",this,function(){c.disconnect(d);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});c.declare("dijit.form.ComboButton",f.form.DropDownButton,{templateString:c.cache("dijit.form","templates/ComboButton.html"),attributeMap:c.mixin(c.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==c.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"])f.focus(this._popupStateNode),c.stopEvent(a)},_onArrowKeyPress:function(a){if(a.charOrCode==c.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"])f.focus(this.titleNode),c.stopEvent(a)},focus:function(a){this.disabled||f.focus(a=="start"?this.titleNode:this._popupStateNode)}});
c.declare("dijit.form.ToggleButton",f.form.Button,{baseClass:"dijitToggleButton",checked:!1,attributeMap:c.mixin(c.clone(f.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,d){this._set("checked",a);c.attr(this.focusNode||this.domNode,"checked",a);f.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,d)},setChecked:function(a){c.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(c,f){return f.form.DropDownButton});define("dijit/form/ToggleButton",["dojo","dijit","dijit/form/Button"],function(c,f){return f.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(c,f){c.declare("dijit.form.CheckBox",f.form.ToggleButton,{templateString:c.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:!1,attributeMap:c.delegate(f.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);c.attr(this.focusNode,"readOnly",a);f.setWaiState(this.focusNode,
"readonly",a)},_setValueAttr:function(a,d){typeof a=="string"&&(this._set("value",a),c.attr(this.focusNode,"value",a),a=!0);this._created&&this.set("checked",a,d)},_getValueAttr:function(){return this.checked?this.value:!1},_setLabelAttr:void 0,postMixInProperties:function(){if(this.value=="")this.value="on";this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments)},_fillContent:function(){},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1);this._set("value",
this.params.value||"on");c.attr(this.focusNode,"value",this.value)},_onFocus:function(){this.id&&c.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&c.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)},_onClick:function(a){return this.readOnly?(c.stopEvent(a),!1):this.inherited(arguments)}});c.declare("dijit.form.RadioButton",f.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(a){this.inherited(arguments);
if(this._created&&a){var d=this;c.query("INPUT[type=radio]",this.focusNode.form||c.doc).forEach(function(a){a.name==d.name&&a!=d.focusNode&&a.form==d.focusNode.form&&(a=f.getEnclosingWidget(a))&&a.checked&&a.set("checked",!1)})}},_clicked:function(){this.checked||this.set("checked",!0)}});return f.form.CheckBox});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(c,f){c.declare("dijit._MasterTooltip",[f._Widget,f._Templated],{duration:f.defaultDuration,templateString:c.cache("dijit","templates/Tooltip.html"),postCreate:function(){c.body().appendChild(this.domNode);this.bgIframe=new f.BackgroundIframe(this.domNode);this.fadeIn=c.fadeIn({node:this.domNode,duration:this.duration,onEnd:c.hitch(this,"_onShow")});this.fadeOut=c.fadeOut({node:this.domNode,
duration:this.duration,onEnd:c.hitch(this,"_onHide")})},show:function(a,d,g,e){if(!(this.aroundNode&&this.aroundNode===d))this.domNode.width="auto",this.fadeOut.status()=="playing"?this._onDeck=arguments:(this.containerNode.innerHTML=a,f.placeOnScreenAroundElement(this.domNode,d,f.getPopupAroundAlignment(g&&g.length?g:f.Tooltip.defaultPosition,!e),c.hitch(this,"orient")),c.style(this.domNode,"opacity",0),this.fadeIn.play(),this.isShowingNow=!0,this.aroundNode=d)},orient:function(a,d,g,e,f){this.connectorNode.style.top=
"";var h=e.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"}[d+"-"+g];this.domNode.style.width="auto";var k=c.contentBox(this.domNode),j=Math.min(Math.max(h,1),k.w),l=j<k.w;this.domNode.style.width=j+"px";if(l&&(this.containerNode.style.overflow=
"auto",l=this.containerNode.scrollWidth,this.containerNode.style.overflow="visible",l>j))l=l+c.style(this.domNode,"paddingLeft")+c.style(this.domNode,"paddingRight"),this.domNode.style.width=l+"px";g.charAt(0)=="B"&&d.charAt(0)=="B"?(a=c.marginBox(a),d=this.connectorNode.offsetHeight,a.h>e.h?(this.connectorNode.style.top=e.h-f.h/2-d/2+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(f.h/2-d/2,0),a.h-d)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top=
"",this.connectorNode.style.bottom="");return Math.max(0,k.w-h)},_onShow:function(){if(c.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,c,g,e){if(!f._masterTT)f._masterTT=
new f._MasterTooltip;return f._masterTT.show(a,c,g,e)};f.hideTooltip=function(a){if(!f._masterTT)f._masterTT=new f._MasterTooltip;return f._masterTT.hide(a)};c.declare("dijit.Tooltip",f._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){c.forEach(this._connections||[],function(a){c.forEach(a,c.hitch(this,"disconnect"))},this);var d=c.isArrayLike(a)?a:a?[a]:[];this._connections=c.map(d,function(a){return(a=c.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=d},addTarget:function(a){a=a.id||a;c.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=c.indexOf(this._connectIds,a.id||a);a>=0&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);
c.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;c.forEach(c.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 d=a.target;this._showTimer=setTimeout(c.hitch(this,function(){this.open(d)}),
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(c,f){c.declare("dijit.form.ValidationTextBox",f.form.TextBox,{templateString:c.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,c){return RegExp("^(?:"+this.regExpGen(c)+")"+(this.required?"":"?")+"$").test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,c)!==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 c="",g=this.disabled||this.isValid(a);if(g)this._maskValidSubsetError=!0;var e=this._isEmpty(this.textbox.value),i=!g&&a&&this._isValidSubset();this._set("state",g?"":((!this._hasBeenBlurred||a)&&e||i)&&this._maskValidSubsetError?"Incomplete":"Error");f.setWaiState(this.focusNode,
"invalid",g?"false":"true");this.state=="Error"?(this._maskValidSubsetError=a&&i,c=this.getErrorMessage(a)):this.state=="Incomplete"?(c=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):e&&(c=this.getPromptMessage(a));this.set("message",c);return g},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 c="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=a;break;case ")":c+="|$)";break;default:c+="(?:"+a+"|$)"}});
try{"".search(c)}catch(g){c=this.regExp,console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+c+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=c.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)}});
c.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=c.place("<input type='hidden'"+
(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});c.declare("dijit.form.RangeBoundTextBox",f.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,c){return("min"in c?this.compare(a,c.min)>=0:!0)&&("max"in c?this.compare(a,c.max)<=0:!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=this.get("value"),c=!1,g=!1;
if("min"in this.constraints)c=this.constraints.min,c=this.compare(a,typeof c=="number"&&c>=0&&a!=0?0:c),c=typeof c=="number"&&c<0;if("max"in this.constraints)g=this.constraints.max,g=this.compare(a,typeof g!="number"||g>0?g:0),g=typeof g=="number"&&g>0;return c||g},_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 c=
this.get("value");return c!==null&&c!==""&&c!==void 0&&(typeof c!="number"||!isNaN(c))&&!this.isInRange(a)?this.rangeMessage:this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage)this.messages=c.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,c){f.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return f.form.ValidationTextBox});
define("dijit/form/ComboBox","dojo,dijit,text!dijit/form/templates/DropDownBox.html,dojo/window,dojo/regexp,dojo/data/util/simpleFetch,dojo/data/util/filter,dijit/_CssStateMixin,dijit/form/_FormWidget,dijit/form/ValidationTextBox,dijit/_HasDropDown,i18n!dijit/form/nls/ComboBox".split(","),function(c,f){c.declare("dijit.form.ComboBoxMixin",f._HasDropDown,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:!0,highlightMatch:"first",searchDelay:100,searchAttr:"name",labelAttr:"",
labelType:"text",queryExpr:"${0}*",ignoreCase:!0,hasDownArrow:!0,templateString:c.cache("dijit.form","templates/DropDownBox.html"),baseClass:"dijitTextBox dijitComboBox",dropDownClass:"dijit.form._ComboBoxMenu",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},maxHeight:-1,_stopClickEvents:!1,_getCaretPos:function(a){var d=0;if(typeof a.selectionStart=="number")d=a.selectionStart;else if(c.isIE){var g=c.doc.selection.createRange().duplicate(),a=a.createTextRange();g.move("character",0);a.move("character",
0);try{a.setEndPoint("EndToEnd",g),d=String(a.text).replace(/\r/g,"").length}catch(e){}}return d},_setCaretPos:function(a,c){c=parseInt(c);f.selectInputText(a,c,c)},_setDisabledAttr:function(a){this.inherited(arguments);f.setWaiState(this.domNode,"disabled",a)},_abortQuery:function(){if(this.searchTimer)clearTimeout(this.searchTimer),this.searchTimer=null;if(this._fetchHandle)this._fetchHandle.abort&&this._fetchHandle.abort(),this._fetchHandle=null},_onInput:function(a){if(!this.searchTimer&&(a.type==
"paste"||a.type=="input")&&this._lastInput!=this.textbox.value)this.searchTimer=setTimeout(c.hitch(this,function(){this._onKey({charOrCode:229})}),100);this.inherited(arguments)},_onKey:function(a){var d=a.charOrCode;if(!a.altKey&&!((a.ctrlKey||a.metaKey)&&d!="x"&&d!="v"||d==c.keys.SHIFT)){var g=!1,e=this.dropDown,f=c.keys,h=null;this._prev_key_backspace=!1;this._abortQuery();this.inherited(arguments);this._opened&&(h=e.getHighlightedOption());switch(d){case f.PAGE_DOWN:case f.DOWN_ARROW:case f.PAGE_UP:case f.UP_ARROW:this._opened&&
this._announceOption(h);c.stopEvent(a);break;case f.ENTER:if(h)if(h==e.nextButton){this._nextSearch(1);c.stopEvent(a);break}else{if(h==e.previousButton){this._nextSearch(-1);c.stopEvent(a);break}}else this._setBlurValue(),this._setCaretPos(this.focusNode,this.focusNode.value.length);(this._opened||this._fetchHandle)&&a.preventDefault();case f.TAB:d=this.get("displayedValue");if(e&&(d==e._messages.previousMessage||d==e._messages.nextMessage))break;h&&this._selectOption();if(this._opened)this._lastQuery=
null,this.closeDropDown();break;case " ":h?(c.stopEvent(a),this._selectOption(),this.closeDropDown()):g=!0;break;case f.DELETE:case f.BACKSPACE:g=this._prev_key_backspace=!0;break;default:g=typeof d=="string"||d==229}if(g)this.item=void 0,this.searchTimer=setTimeout(c.hitch(this,"_startSearchFromInput"),1)}},_autoCompleteText:function(a){var c=this.focusNode;f.selectInputText(c,c.value.length);var g=this.ignoreCase?"toLowerCase":"substr";if(a[g](0).indexOf(this.focusNode.value[g](0))==0){if(g=this._getCaretPos(c),
g+1>c.value.length)c.value=a,f.selectInputText(c,g)}else c.value=a,f.selectInputText(c)},_openResultList:function(a,d){this._fetchHandle=null;if(!this.disabled&&!(this.readOnly||d.query[this.searchAttr]!=this._lastQuery)){var g=this.dropDown._highlighted_option&&c.hasClass(this.dropDown._highlighted_option,"dijitMenuItemSelected");this.dropDown.clearResultList();if(!a.length&&!this._maxOptions)this.closeDropDown();else{d._maxOptions=this._maxOptions;var e=this.dropDown.createOptions(a,d,c.hitch(this,
"_getMenuLabelFromItem"));this._showResultList();d.direction?(1==d.direction?this.dropDown.highlightFirstOption():-1==d.direction&&this.dropDown.highlightLastOption(),g&&this._announceOption(this.dropDown.getHighlightedOption())):this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(d.query[this.searchAttr])&&this._announceOption(e[1])}}},_showResultList:function(){this.closeDropDown(!0);this.displayMessage("");this.openDropDown();f.setWaiState(this.domNode,"expanded","true")},loadDropDown:function(){this._startSearchAll()},
isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),f.setWaiState(this.domNode,"expanded","false"),f.removeWaiState(this.focusNode,"activedescendant"))},_setBlurValue:function(){var a=this.get("displayedValue"),c=this.dropDown;c&&(a==c._messages.previousMessage||a==c._messages.nextMessage)?this._setValueAttr(this._lastValueReported,!0):typeof this.item=="undefined"?(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&
f.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,!0),this._refreshState())},_onBlur:function(){this.closeDropDown();this.inherited(arguments)},_setItemAttr:function(a,c,g){g||(g=this.store.getValue(a,this.searchAttr));var e=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):g;this._set("item",a);f.form.ComboBox.superclass._setValueAttr.call(this,e,c,g)},_announceOption:function(a){if(a){var d;a==this.dropDown.nextButton||a==this.dropDown.previousButton?(d=a.innerHTML,
this.item=void 0,this.value=""):(d=this.store.getValue(a.item,this.searchAttr).toString(),this.set("item",a.item,!1,d));this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);f.setWaiState(this.focusNode,"activedescendant",c.attr(a,"id"));this._autoCompleteText(d)}},_selectOption:function(a){a&&this._announceOption(a.target);this.closeDropDown();this._setCaretPos(this.focusNode,this.focusNode.value.length);f.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,
!0)},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"))},_getQueryString:function(a){return c.string.substitute(this.queryExpr,[a])},_startSearch:function(a){if(!this.dropDown){var d=this.id+"_popup";this.dropDown=new (c.getObject(this.dropDownClass,!1))({onChange:c.hitch(this,this._selectOption),id:d,dir:this.dir});f.removeWaiState(this.focusNode,"activedescendant");f.setWaiState(this.textbox,"owns",
d)}d=c.clone(this.query);this._lastInput=a;this._lastQuery=d[this.searchAttr]=this._getQueryString(a);this.searchTimer=setTimeout(c.hitch(this,function(a,d){this.searchTimer=null;var f={queryOptions:{ignoreCase:this.ignoreCase,deep:!0},query:a,onBegin:c.hitch(this,"_setMaxOptions"),onComplete:c.hitch(this,"_openResultList"),onError:function(a){d._fetchHandle=null;console.error("dijit.form.ComboBox: "+a);d.closeDropDown()},start:0,count:this.pageSize};c.mixin(f,d.fetchProperties);this._fetchHandle=
d.store.fetch(f);this._nextSearch=this.dropDown.onPage=c.hitch(this,function(a,c){a.start+=a.count*c;a.direction=c;this._fetchHandle=this.store.fetch(a);this.focus()},this._fetchHandle)},d,this),this.searchDelay)},_setMaxOptions:function(a){this._maxOptions=a},_getValueField:function(){return this.searchAttr},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store&&(this.store=new f.form._ComboBoxDataStore(this.srcNodeRef),!("value"in this.params))){var a=
this.item=this.store.fetchSelectedItem();if(a){var c=this._getValueField();this.value=this.store.getValue(a,c)}}this.inherited(arguments)},postCreate:function(){var a=c.query('label[for="'+this.id+'"]');if(a.length)a[0].id=this.id+"_label",f.setWaiState(this.domNode,"labelledby",a[0].id);this.inherited(arguments)},_setHasDownArrowAttr:function(a){this.hasDownArrow=a;this._buttonNode.style.display=a?"":"none"},_getMenuLabelFromItem:function(a){var a=this.labelFunc(a,this.store),c=this.labelType;this.highlightMatch!=
"none"&&this.labelType=="text"&&this._lastInput&&(a=this.doHighlight(a,this._escapeHtml(this._lastInput)),c="html");return{html:c=="html",label:a}},doHighlight:function(a,d){var g=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),e=this.queryExpr.indexOf("${0}"),d=c.regexp.escapeString(d);return this._escapeHtml(a).replace(RegExp((e==0?"^":"")+"("+d+")"+(e==this.queryExpr.length-4?"$":""),g),'<span class="dijitComboBoxHighlightMatch">$1</span>')},_escapeHtml:function(a){return a=String(a).replace(/&/gm,
"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,c){return c.getValue(a,this.labelAttr||this.searchAttr).toString()}});c.declare("dijit.form._ComboBoxMenu",[f._Widget,f._Templated,f._CssStateMixin],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' style='overflow: \"auto\"; overflow-x: \"hidden\";'><li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' role='option'></li><li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' role='option'></li></ul>",
_messages:null,baseClass:"dijitComboBoxMenu",postMixInProperties:function(){this.inherited(arguments);this._messages=c.i18n.getLocalization("dijit.form","ComboBox",this.lang)},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages.previousMessage;this.nextButton.innerHTML=this._messages.nextMessage},_setValueAttr:function(a){this.value=a;this.onChange(a)},onChange:function(){},onPage:function(){},onClose:function(){this._blurOptionNode()},_createOption:function(a,
d){var g=c.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"}),e=d(a);e.html?g.innerHTML=e.label:g.appendChild(c.doc.createTextNode(e.label));if(g.innerHTML=="")g.innerHTML="&nbsp;";g.item=a;return g},createOptions:function(a,d,g){this.previousButton.style.display=d.start==0?"none":"";c.attr(this.previousButton,"id",this.id+"_prev");c.forEach(a,function(a,d){var e=this._createOption(a,g);c.attr(e,"id",this.id+d);this.domNode.insertBefore(e,
this.nextButton)},this);var e=!1;d._maxOptions&&d._maxOptions!=-1?d.start+d.count<d._maxOptions?e=!0:d.start+d.count>d._maxOptions&&d.count==a.length&&(e=!0):d.count==a.length&&(e=!0);this.nextButton.style.display=e?"":"none";c.attr(this.nextButton,"id",this.id+"_next");return this.domNode.childNodes},clearResultList:function(){for(;this.domNode.childNodes.length>2;)this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);this._blurOptionNode()},_onMouseDown:function(a){c.stopEvent(a)},
_onMouseUp:function(a){if(a.target!==this.domNode&&this._highlighted_option)if(a.target==this.previousButton)this._blurOptionNode(),this.onPage(-1);else if(a.target==this.nextButton)this._blurOptionNode(),this.onPage(1);else{for(a=a.target;!a.item;)a=a.parentNode;this._setValueAttr({target:a},!0)}},_onMouseOver:function(a){if(a.target!==this.domNode){a=a.target;if(!(a==this.previousButton||a==this.nextButton))for(;!a.item;)a=a.parentNode;this._focusOptionNode(a)}},_onMouseOut:function(a){a.target!==
this.domNode&&this._blurOptionNode()},_focusOptionNode:function(a){if(this._highlighted_option!=a)this._blurOptionNode(),this._highlighted_option=a,c.addClass(this._highlighted_option,"dijitMenuItemSelected")},_blurOptionNode:function(){if(this._highlighted_option)c.removeClass(this._highlighted_option,"dijitMenuItemSelected"),this._highlighted_option=null},_highlightNextOption:function(){if(this.getHighlightedOption()){var a=this._highlighted_option.nextSibling;a&&a.style.display!="none"?this._focusOptionNode(a):
this.highlightFirstOption()}else a=this.domNode.firstChild,this._focusOptionNode(a.style.display=="none"?a.nextSibling:a);c.window.scrollIntoView(this._highlighted_option)},highlightFirstOption:function(){var a=this.domNode.firstChild,d=a.nextSibling;this._focusOptionNode(d.style.display=="none"?a:d);c.window.scrollIntoView(this._highlighted_option)},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);c.window.scrollIntoView(this._highlighted_option)},_highlightPrevOption:function(){if(this.getHighlightedOption()){var a=
this._highlighted_option.previousSibling;a&&a.style.display!="none"?this._focusOptionNode(a):this.highlightLastOption()}else a=this.domNode.lastChild,this._focusOptionNode(a.style.display=="none"?a.previousSibling:a);c.window.scrollIntoView(this._highlighted_option)},_page:function(a){var d=0,g=this.domNode.scrollTop,e=c.style(this.domNode,"height");for(this.getHighlightedOption()||this._highlightNextOption();d<e;){if(a){if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display==
"none")break;this._highlightPrevOption()}else{if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none")break;this._highlightNextOption()}var f=this.domNode.scrollTop;d+=(f-g)*(a?-1:1);g=f}},pageUp:function(){this._page(!0)},pageDown:function(){this._page(!1)},getHighlightedOption:function(){var a=this._highlighted_option;return a&&a.parentNode?a:null},handleKey:function(a){switch(a.charOrCode){case c.keys.DOWN_ARROW:return this._highlightNextOption(),
!1;case c.keys.PAGE_DOWN:return this.pageDown(),!1;case c.keys.UP_ARROW:return this._highlightPrevOption(),!1;case c.keys.PAGE_UP:return this.pageUp(),!1;default:return!0}}});c.declare("dijit.form.ComboBox",[f.form.ValidationTextBox,f.form.ComboBoxMixin],{_setValueAttr:function(a,c,g){this._set("item",null);a||(a="");f.form.ValidationTextBox.prototype._setValueAttr.call(this,a,c,g)}});c.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(a){this.root=a;if(a.tagName!="SELECT"&&a.firstChild)a=
c.query("select",a),a.length>0?a=a[0]:(this.root.innerHTML="<SELECT>"+this.root.innerHTML+"</SELECT>",a=this.root.firstChild),this.root=a;c.query("> option",a).forEach(function(a){a.innerHTML=c.trim(a.innerHTML)})},getValue:function(a,c){return c=="value"?a.value:a.innerText||a.textContent||""},isItemLoaded:function(){return!0},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0}},_fetchItems:function(a,d){if(!a.query)a.query={};if(!a.query.name)a.query.name="";if(!a.queryOptions)a.queryOptions=
{};var g=c.data.util.filter.patternToRegExp(a.query.name,a.queryOptions.ignoreCase),e=c.query("> option",this.root).filter(function(a){return(a.innerText||a.textContent||"").match(g)});a.sort&&e.sort(c.data.util.sorter.createSortFunction(a.sort,this));d(e,a)},close:function(){},getLabel:function(a){return a.innerHTML},getIdentity:function(a){return c.attr(a,"value")},fetchItemByIdentity:function(a){var d=c.query("> option[value='"+a.identity+"']",this.root)[0];a.onItem(d)},fetchSelectedItem:function(){var a=
this.root,d=a.selectedIndex;return typeof d=="number"?c.query("> option:nth-child("+(d!=-1?d+1:1)+")",a)[0]:null}});c.extend(f.form._ComboBoxDataStore,c.data.util.simpleFetch);return f.form.ComboBox});
define("dijit/MenuItem","dojo,dijit,text!dijit/templates/MenuItem.html,dijit/_Widget,dijit/_Templated,dijit/_Contained,dijit/_CssStateMixin".split(","),function(c,f){c.declare("dijit.MenuItem",[f._Widget,f._Templated,f._Contained,f._CssStateMixin],{templateString:c.cache("dijit","templates/MenuItem.html"),attributeMap:c.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";c.attr(this.containerNode,"id",a);this.accelKeyNode&&(c.attr(this.accelKeyNode,"id",this.id+"_accel"),a+=" "+this.id+"_accel");f.setWaiState(this.domNode,"labelledby",a);c.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);c.stopEvent(a)},onClick:function(){},focus:function(){try{c.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){c.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){c.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){c.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;c.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(c,f){c.declare("dijit.CheckedMenuItem",f.MenuItem,{templateString:c.cache("dijit","templates/CheckedMenuItem.html"),checked:!1,_setCheckedAttr:function(a){c.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(c,f){c.declare("dijit.PopupMenuItem",f.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=c.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=c.query("[widgetId]",this.dropDownContainer)[0];this.popup=f.byNode(a)}c.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&c.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("dijit/MenuSeparator","dojo,dijit,text!dijit/templates/MenuSeparator.html,dijit/_Widget,dijit/_Templated,dijit/_Contained".split(","),function(c,f){c.declare("dijit.MenuSeparator",[f._Widget,f._Templated,f._Contained],{templateString:c.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);c.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(c,f){c.declare("dijit._MenuBase",[f._Widget,f._Templated,f._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){this._started||(c.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(c.hitch(this,"_openPopup"),this.popupDelay);this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(!1);var c=a.popup;if(c)this._stopPendingCloseTimer(c),c._pendingClose_timer=setTimeout(function(){c._pendingClose_timer=null;if(c.parentMenu)c.parentMenu.currentPopup=null;f.popup.close(c)},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,
c){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return!1;a.popup?this._openPopup():(this.onExecute(),a.onClick(c))},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var d=a.popup;if(!d.isShowingNow){this.currentPopup&&(this._stopPendingCloseTimer(this.currentPopup),f.popup.close(this.currentPopup));d.parentMenu=this;d.from_item=a;var g=this;f.popup.open({parent:this,popup:d,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(){g.focusChild(a);g._cleanUp();a._setSelected(!0);g.focusedChild=a},onExecute:c.hitch(this,"_cleanUp")});this.currentPopup=d;d.connect(d.domNode,"onmouseenter",c.hitch(g,"_onPopupHover"));if(d.focus)d._focus_timer=setTimeout(c.hitch(d,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=!0;c.replaceClass(this.domNode,"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=
!0;this._markActive()},_markInactive:function(){this.isActive=!1;c.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&&c.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()}});c.declare("dijit.Menu",f._MenuBase,{constructor:function(){this._bindings=[]},templateString:c.cache("dijit","templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:!1,
leftClickToOpen:!1,refocus:!0,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(c.body()):c.forEach(this.targetNodeIds,this.bindDomNode,this);var a=c.keys,d=this.isLeftToRight();this._openSubMenuKey=d?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=d?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);c.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)if(this.parentMenu._isMenuBar)this.parentMenu.focusPrev();
else this.onCancel(!1);else c.stopEvent(a)}},_iframeContentWindow:function(a){return c.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&c.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&c.doc.frames[a.name]&&c.doc.frames[a.name].document||null},bindDomNode:function(a){var a=c.byId(a),d;if(a.tagName.toLowerCase()=="iframe"){var g=a,e=this._iframeContentWindow(g);d=
c.withGlobal(e,c.body)}else d=a==c.body()?c.doc.documentElement:a;var f={node:a,iframe:g};c.attr(a,"_dijitMenu"+this.id,this._bindings.push(f));var h=c.hitch(this,function(a){return[c.connect(a,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(a){c.stopEvent(a);this._scheduleOpen(a.target,g,{x:a.pageX,y:a.pageY})}),c.connect(a,"onkeydown",this,function(a){a.shiftKey&&a.keyCode==c.keys.F10&&(c.stopEvent(a),this._scheduleOpen(a.target,g))})]});f.connects=d?h(d):[];if(g)f.onloadHandler=c.hitch(this,
function(){var a=this._iframeContentWindow(g);d=c.withGlobal(a,c.body);f.connects=h(d)}),g.addEventListener?g.addEventListener("load",f.onloadHandler,!1):g.attachEvent("onload",f.onloadHandler)},unBindDomNode:function(a){var d;try{d=c.byId(a)}catch(g){return}a="_dijitMenu"+this.id;if(d&&c.hasAttr(d,a)){var e=c.attr(d,a)-1,f=this._bindings[e];c.forEach(f.connects,c.disconnect);var h=f.iframe;h&&(h.removeEventListener?h.removeEventListener("load",f.onloadHandler,!1):h.detachEvent("onload",f.onloadHandler));
c.removeAttr(d,a);delete this._bindings[e]}},_scheduleOpen:function(a,d,g){if(!this._openTimer)this._openTimer=setTimeout(c.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:d,coords:g})}),1)},_openMyself:function(a){function d(){l.refocus&&f.focus(m);f.popup.close(l)}var g=a.target,e=a.iframe;if(a=a.coords){if(e){var g=c.position(e,!0),i=this._iframeContentWindow(e),i=c.withGlobal(i,"_docScroll",c),h=c.getComputedStyle(e),k=c._toPixelValue,j=(c.isIE&&c.isQuirks?0:k(e,
h.paddingLeft))+(c.isIE&&c.isQuirks?k(e,h.borderLeftWidth):0),e=(c.isIE&&c.isQuirks?0:k(e,h.paddingTop))+(c.isIE&&c.isQuirks?k(e,h.borderTopWidth):0);a.x+=g.x+j-i.x;a.y+=g.y+e-i.y}}else a=c.position(g,!0),a.x+=10,a.y+=10;var l=this,m=f.getFocus(this);f.popup.open({popup:this,x:a.x,y:a.y,onExecute:d,onCancel:d,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);f.popup.close(this)}},uninitialize:function(){c.forEach(this._bindings,function(a){a&&
this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return f.Menu});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(c,f){c.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){c.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){c.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,d=this.domNode.style;d.display="none";var g=c.window.getBox();d.top=g.t+"px";d.left=g.l+"px";a.width=g.w+"px";a.height=g.h+"px";d.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/form/Form","dojo,dijit,dijit/_Widget,dijit/_Templated,dijit/form/_FormMixin,dijit/layout/_ContentPaneResizeMixin".split(","),function(c,f){c.declare("dijit.form.Form",[f._Widget,f._Templated,f.form._FormMixin,f.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:c.delegate(f._Widget.prototype.attributeMap,
{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){this.nameAttrSetting=this.name?"name='"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){this.encType=a;c.attr(this.domNode,"encType",a);if(c.isIE)this.domNode.encoding=a},postCreate:function(){if(c.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var a=this.srcNodeRef.attributes.getNamedItem("encType");a&&!a.specified&&typeof a.value==
"string"&&this.set("encType",a.value)}this.inherited(arguments)},reset:function(a){var c={returnValue:!0,preventDefault:function(){this.returnValue=!1},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(c)!==!1&&c.returnValue&&this.inherited(arguments,[])},onReset:function(){return!0},_onReset:function(a){this.reset(a);c.stopEvent(a);return!1},_onSubmit:function(a){var d=f.form.Form.prototype;if(this.execute!=d.execute||this.onExecute!=
d.onExecute)c.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0"),this.onExecute(),this.execute(this.getValues());this.onSubmit(a)===!1&&c.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==!1&&this.containerNode.submit()}});return f.form.Form});
define("dijit/ProgressBar","dojo,dijit,text!dijit/templates/ProgressBar.html,dojo/fx,dojo/number,dijit/_Widget,dijit/_Templated".split(","),function(c,f){c.declare("dijit.ProgressBar",[f._Widget,f._Templated],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:c.cache("dijit","templates/ProgressBar.html"),_indeterminateHighContrastImagePath:c.moduleUrl("dijit","themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);
if(!("value"in this.params))this.value=this.indeterminate?Infinity:this.progress},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());this.update()},update:function(a){c.mixin(this,a||{});var a=this.internalProgress,d=this.domNode,g=1;this.indeterminate?(f.removeWaiState(d,"valuenow"),f.removeWaiState(d,"valuemin"),f.removeWaiState(d,"valuemax")):(String(this.progress).indexOf("%")!=-1?(g=Math.min(parseFloat(this.progress)/
100,1),this.progress=g*this.maximum):(this.progress=Math.min(this.progress,this.maximum),g=this.progress/this.maximum),f.setWaiState(d,"describedby",this.labelNode.id),f.setWaiState(d,"valuenow",this.progress),f.setWaiState(d,"valuemin",0),f.setWaiState(d,"valuemax",this.maximum));this.labelNode.innerHTML=this.report(g);c.toggleClass(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);a.style.width=g*100+"%";this.onChange()},_setValueAttr:function(a){this._set("value",a);a==Infinity?
this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:a})},_setLabelAttr:function(a){this._set("label",a);this.update()},_setIndeterminateAttr:function(a){this.indeterminate=a;this.update()},report:function(a){return this.label?this.label:this.indeterminate?"&nbsp;":c.number.format(a,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}});return f.ProgressBar});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(c){c.declare("dojo.dnd.Container",null,{skipForm:!1,constructor:function(f,a){this.node=c.byId(f);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&c.byId(a.dropParent);this.map={};this.current=null;this.containerState="";c.addClass(this.node,"dojoDndContainer");(!a||!a._skipStartup)&&this.startup();this.events=[c.connect(this.node,"onmouseover",this,"onMouseOver"),c.connect(this.node,
"onmouseout",this,"onMouseOut"),c.connect(this.node,"ondragstart",this,"onSelectStart"),c.connect(this.node,"onselectstart",this,"onSelectStart")]},creator:function(){},getItem:function(c){return this.map[c]},setItem:function(c,a){this.map[c]=a},delItem:function(c){delete this.map[c]},forInItems:function(f,a){var a=a||c.global,d=this.map,g=c.dnd._empty,e;for(e in d)e in g||f.call(a,d[e],e,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return c.query("> .dojoDndItem",this.parent)},
sync:function(){var f={};this.getAllNodes().forEach(function(a){if(a.id){var d=this.getItem(a.id);if(d){f[a.id]=d;return}}else a.id=c.dnd.getUniqueId();var d=a.getAttribute("dndType"),g=a.getAttribute("dndData");f[a.id]={data:g||a.innerHTML,type:d?d.split(/\s*,\s*/):["text"]}},this);this.map=f;return this},insertNodes:function(c,a,d){if(this.parent.firstChild)if(a){if(!d)d=this.parent.firstChild}else{if(d)d=d.nextSibling}else d=null;if(d)for(a=0;a<c.length;++a){var g=this._normalizedCreator(c[a]);
this.setItem(g.node.id,{data:g.data,type:g.type});this.parent.insertBefore(g.node,d)}else for(a=0;a<c.length;++a)g=this._normalizedCreator(c[a]),this.setItem(g.node.id,{data:g.data,type:g.type}),this.parent.appendChild(g.node);return this},destroy:function(){c.forEach(this.events,c.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(f,a){f._skipStartup=!0;return new c.dnd.Container(a,f)},startup:function(){if(!this.parent&&(this.parent=this.node,this.parent.tagName.toLowerCase()==
"table")){var f=this.parent.getElementsByTagName("tbody");if(f&&f.length)this.parent=f[0]}this.defaultCreator=c.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(c){for(var a=c.relatedTarget;a;){if(a==this.node)break;try{a=a.parentNode}catch(d){a=null}}a||(this._changeState("Container","Over"),this.onOverEvent());a=this._getChildByEvent(c);if(this.current!=a)this.current&&this._removeItemClass(this.current,"Over"),a&&this._addItemClass(a,"Over"),this.current=a},onMouseOut:function(c){for(c=
c.relatedTarget;c;){if(c==this.node)return;try{c=c.parentNode}catch(a){c=null}}if(this.current)this._removeItemClass(this.current,"Over"),this.current=null;this._changeState("Container","");this.onOutEvent()},onSelectStart:function(f){(!this.skipForm||!c.dnd.isFormElement(f))&&c.stopEvent(f)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(f,a){var d="dojoDnd"+f,g=f.toLowerCase()+"State";c.replaceClass(this.node,d+a,d+this[g]);this[g]=a},_addItemClass:function(f,a){c.addClass(f,
"dojoDndItem"+a)},_removeItemClass:function(f,a){c.removeClass(f,"dojoDndItem"+a)},_getChildByEvent:function(f){if(f=f.target)for(var a=f.parentNode;a;f=a,a=f.parentNode)if(a==this.parent&&c.hasClass(f,"dojoDndItem"))return f;return null},_normalizedCreator:function(f,a){var d=(this.creator||this.defaultCreator).call(this,f,a);if(!c.isArray(d.type))d.type=["text"];if(!d.node.id)d.node.id=c.dnd.getUniqueId();c.addClass(d.node,"dojoDndItem");return d}});c.dnd._createNode=function(f){return!f?c.dnd._createSpan:
function(a){return c.create(f,{innerHTML:a})}};c.dnd._createTrTd=function(f){var a=c.create("tr");c.create("td",{innerHTML:f},a);return a};c.dnd._createSpan=function(f){return c.create("span",{innerHTML:f})};c.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};c.dnd._defaultCreator=function(f){var f=f.tagName.toLowerCase(),a=f=="tbody"||f=="thead"?c.dnd._createTrTd:c.dnd._createNode(c.dnd._defaultCreatorNodes[f]);return function(d,g){var e=d&&c.isObject(d),f,h;e&&d.tagName&&d.nodeType&&
d.getAttribute?(f=d.getAttribute("dndData")||d.innerHTML,e=(e=d.getAttribute("dndType"))?e.split(/\s*,\s*/):["text"],h=d):(f=e&&d.data?d.data:d,e=e&&d.type?d.type:["text"],h=(g=="avatar"?c.dnd._createSpan:a)(String(f)));if(!h.id)h.id=c.dnd.getUniqueId();return{node:h,data:f,type:e}}};return c.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(c,f){c.getObject("tree",!0,c);f.tree._compareNodes=function(a,c){if(a===c)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-c.sourceIndex;else if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(c)&2?1:-1;else if(document.createRange){var g=doc.createRange();g.setStartBefore(a);var e=doc.createRange();e.setStartBefore(c);return g.compareBoundaryPoints(g.END_TO_END,
e)}else throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");};c.declare("dijit.tree._dndContainer",null,{constructor:function(a,d){this.tree=a;this.node=a.domNode;c.mixin(this,d);this.map={};this.current=null;this.containerState="";c.addClass(this.node,"dojoDndContainer");this.events=[c.connect(this.node,"onmouseenter",this,"onOverEvent"),c.connect(this.node,"onmouseleave",this,"onOutEvent"),c.connect(this.tree,"_onNodeMouseEnter",this,"onMouseOver"),
c.connect(this.tree,"_onNodeMouseLeave",this,"onMouseOut"),c.connect(this.node,"ondragstart",c,"stopEvent"),c.connect(this.node,"onselectstart",c,"stopEvent")]},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},destroy:function(){c.forEach(this.events,c.disconnect);this.node=this.parent=null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,d){var g="dojoDnd"+a,e=a.toLowerCase()+"State";c.replaceClass(this.node,g+d,g+this[e]);
this[e]=d},_addItemClass:function(a,d){c.addClass(a,"dojoDndItem"+d)},_removeItemClass:function(a,d){c.removeClass(a,"dojoDndItem"+d)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return f.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(c,f){c.declare("dijit.tree._dndSelector",f.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;f.setWaiState(this.tree.domNode,"multiselect",!this.singular);this.events.push(c.connect(this.tree.domNode,"onmousedown",this,"onMouseDown"),c.connect(this.tree.domNode,"onmouseup",this,"onMouseUp"),c.connect(this.tree.domNode,"onmousemove",this,"onMouseMove"))},singular:!1,getSelectedTreeNodes:function(){var a=
[],c=this.selection,g;for(g in c)a.push(c[g]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,c){this.setSelection(this.getSelectedTreeNodes().concat([a]));if(c)this.anchor=a;return a},removeTreeNode:function(a){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[a]));return a},isTreeNodeSelected:function(a){return a.id&&!!this.selection[a.id]},setSelection:function(a){var d=
this.getSelectedTreeNodes();c.forEach(this._setDifference(d,a),c.hitch(this,function(a){a.setSelected(!1);this.anchor==a&&delete this.anchor;delete this.selection[a.id]}));c.forEach(this._setDifference(a,d),c.hitch(this,function(a){a.setSelected(!0);this.selection[a.id]=a}));this._updateSelectionProperties()},_setDifference:function(a,d){c.forEach(d,function(a){a.__exclude__=!0});var g=c.filter(a,function(a){return!a.__exclude__});c.forEach(d,function(a){delete a.__exclude__});return g},_updateSelectionProperties:function(){var a=
this.getSelectedTreeNodes(),d=[],g=[];c.forEach(a,function(a){g.push(a);d.push(a.getTreePath())});a=c.map(g,function(a){return a.item});this.tree._set("paths",d);this.tree._set("path",d[0]||[]);this.tree._set("selectedNodes",g);this.tree._set("selectedNode",g[0]||null);this.tree._set("selectedItems",a);this.tree._set("selectedItem",a[0]||null)},onMouseDown:function(a){if(this.current&&!this.tree.isExpandoNode(a.target,this.current)&&a.button!=c.mouseButtons.RIGHT){c.stopEvent(a);var d=this.current,
g=c.isCopyKey(a),e=d.id;!this.singular&&!a.shiftKey&&this.selection[e]?this._doDeselect=!0:(this._doDeselect=!1,this.userSelect(d,g,a.shiftKey))}},onMouseUp:function(a){if(this._doDeselect)this._doDeselect=!1,this.userSelect(this.current,c.isCopyKey(a),a.shiftKey)},onMouseMove:function(){this._doDeselect=!1},userSelect:function(a,c,g){if(this.singular)this.anchor==a&&c?this.selectNone():(this.setSelection([a]),this.anchor=a);else if(g&&this.anchor){g=this.anchor;f.tree._compareNodes(this.anchor.rowNode,
a.rowNode)<0?c=g:(c=a,a=g);for(nodes=[];c!=a;)nodes.push(c),c=this.tree._getNextNode(c);nodes.push(a);this.setSelection(nodes)}else this.selection[a.id]&&c?this.removeTreeNode(a):c?this.addTreeNode(a,!0):(this.setSelection([a]),this.anchor=a)},forInSelectedItems:function(a,d){var d=d||c.global,g;for(g in this.selection)a.call(d,this.getItem(g),g,this)}});return f.tree._dndSelector});
define("dijit/Tree","dojo,dijit,text!dijit/templates/TreeNode.html,text!dijit/templates/Tree.html,dojo/fx,dojo/DeferredList,dijit/_Widget,dijit/_Templated,dijit/_Container,dijit/_Contained,dijit/_CssStateMixin,dojo/cookie,dijit/tree/TreeStoreModel,dijit/tree/ForestStoreModel,dijit/tree/_dndSelector".split(","),function(c,f){c.declare("dijit._TreeNode",[f._Widget,f._Templated,f._Container,f._Contained,f._CssStateMixin],{item:null,isTreeNode:!0,label:"",isExpandable:null,isExpanded:!1,state:"UNCHECKED",
templateString:c.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:c.delegate(f._Widget.prototype.attributeMap,{label:{node:"labelNode",type:"innerText"},tooltip:{node:"rowNode",type:"attribute",attribute:"title"}}),buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&f.setWaiState(this.labelNode,"expanded",this.isExpanded);this.setSelected(!1)},
_setIndentAttr:function(a){var d=Math.max(a,0)*this.tree._nodePixelIndent+"px";c.style(this.domNode,"backgroundPosition",d+" 0px");c.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",d);c.forEach(this.getChildren(),function(c){c.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="LOADING";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(a){var c=this.tree,g=c.model;c._v10Compat&&a===g.root&&(a=null);
this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,d,g){var e="_"+d+"Class";d+="Node";var f=this[e];this[e]=this.tree["get"+g+"Class"](a,this.isExpanded);c.replaceClass(this[d],this[e]||"",f||"");c.style(this[d],this.tree["get"+g+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();!a||a.rowNode.style.display=="none"?c.addClass(this.domNode,"dijitTreeIsRoot"):c.toggleClass(this.domNode,
"dijitTreeIsLast",!this.getNextSibling())},_setExpando:function(a){var d=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],a=a?0:this.isExpandable?this.isExpanded?1:2:3;c.replaceClass(this.expandoNode,d[a],d);this.expandoNodeText.innerHTML=["*","-","+","*"][a]},expand:function(){if(this._expandDeferred)return this._expandDeferred;this._wipeOut&&this._wipeOut.stop();this.isExpanded=!0;f.setWaiState(this.labelNode,"expanded","true");(this.tree.showRoot||
this!==this.tree.rootNode)&&f.setWaiRole(this.containerNode,"group");c.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&f.setWaiState(this.tree.domNode,"expanded","true");var a,d=c.fx.wipeIn({node:this.containerNode,duration:f.defaultDuration,onEnd:function(){a.callback(!0)}});a=this._expandDeferred=new c.Deferred(function(){d.stop()});d.play();return a},collapse:function(){if(this.isExpanded){this._expandDeferred&&
(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;f.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&f.setWaiState(this.tree.domNode,"expanded","false");c.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut)this._wipeOut=c.fx.wipeOut({node:this.containerNode,duration:f.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var d=this.tree,g=d.model,
e=[];c.forEach(this.getChildren(),function(a){f._Container.prototype.removeChild.call(this,a)},this);this.state="LOADED";a&&a.length>0?(this.isExpandable=!0,c.forEach(a,function(a){var c=g.getIdentity(a),f=d._itemNodesMap[c],j;if(f)for(var l=0;l<f.length;l++)if(f[l]&&!f[l].getParent()){j=f[l];j.set("indent",this.indent+1);break}j||(j=this.tree._createTreeNode({item:a,tree:d,isExpandable:g.mayHaveChildren(a),label:d.getLabel(a),tooltip:d.getTooltip(a),dir:d.dir,lang:d.lang,indent:this.indent+1}),f?
f.push(j):d._itemNodesMap[c]=[j]);this.addChild(j);(this.tree.autoExpand||this.tree._state(a))&&e.push(d._expandNode(j))},this),c.forEach(this.getChildren(),function(a){a._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);if(this==d.rootNode)(a=this.tree.showRoot?this:this.getChildren()[0])?(a.setFocusable(!0),d.lastFocused=a):d.domNode.setAttribute("tabIndex","0");return new c.DeferredList(e)},getTreePath:function(){for(var a=this,c=
[];a&&a!==this.tree.rootNode;)c.unshift(a.item),a=a.getParent();c.unshift(this.tree.rootNode.item);return c},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(a){this.inherited(arguments);var d=this.getChildren();if(d.length==0)this.isExpandable=!1,this.collapse();c.forEach(d,function(a){a._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){f.setWaiState(this.labelNode,
"selected",a);c.toggleClass(this.rowNode,"dijitTreeRowSelected",a)},setFocusable:function(a){this.labelNode.setAttribute("tabIndex",a?"0":"-1")},_onClick:function(a){this.tree._onClick(this,a)},_onDblClick:function(a){this.tree._onDblClick(this,a)},_onMouseEnter:function(a){this.tree._onNodeMouseEnter(this,a)},_onMouseLeave:function(a){this.tree._onNodeMouseLeave(this,a)}});c.declare("dijit.Tree",[f._Widget,f._Templated],{store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],
paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:c.cache("dijit","templates/Tree.html"),persist:!0,autoExpand:!1,dndController:"dijit.tree._dndSelector",dndParams:"onDndDrop,itemCreator,onDndCancel,checkAcceptance,checkItemAcceptance,dragThreshold,betweenThreshold".split(","),onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,d){c.publish(this.id,
[c.mixin({tree:this,event:a},d||{})])},postMixInProperties:function(){this.tree=this;if(this.autoExpand)this.persist=!1;this._itemNodesMap={};if(!this.cookieName)this.cookieName=this.id+"SaveStateCookie";this._loadDeferred=new c.Deferred;this.inherited(arguments)},postCreate:function(){this._initState();this.model||this._store2model();this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,"onDelete","_onItemDelete");
this._load();this.inherited(arguments);if(this.dndController){if(c.isString(this.dndController))this.dndController=c.getObject(this.dndController);for(var a={},d=0;d<this.dndParams.length;d++)this[this.dndParams[d]]&&(a[this.dndParams[d]]=this[this.dndParams[d]]);this.dndController=new this.dndController(this,a)}},_store2model:function(){this._v10Compat=!0;c.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+"_ForestStoreModel",store:this.store,
query:this.query,childrenAttrs:this.childrenAttr};if(this.params.mayHaveChildren)a.mayHaveChildren=c.hitch(this,"mayHaveChildren");if(this.params.getItemChildren)a.getChildren=c.hitch(this,function(a,c,e){this.getItemChildren(this._v10Compat&&a===this.model.root?null:a,c,e)});this.model=new f.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(c.hitch(this,function(a){var d=this.rootNode=this.tree._createTreeNode({item:a,tree:this,isExpandable:!0,
label:this.label||this.getLabel(a),indent:this.showRoot?0:-1});if(!this.showRoot)d.rowNode.style.display="none",f.setWaiRole(this.domNode,"presentation"),f.setWaiRole(d.labelNode,"presentation"),f.setWaiRole(d.containerNode,"tree");this.domNode.appendChild(d.domNode);a=this.model.getIdentity(a);this._itemNodesMap[a]?this._itemNodesMap[a].push(d):this._itemNodesMap[a]=[d];d._updateLayout();this._expandNode(d).addCallback(c.hitch(this,function(){this._loadDeferred.callback(!0);this.onLoad()}))}),function(a){console.error(this,
": error loading root: ",a)})},getNodesByItem:function(a){return!a?[]:[].concat(this._itemNodesMap[c.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var d=this;this._loadDeferred.addCallback(c.hitch(this,function(){var g=c.map(a,function(a){return!a||c.isString(a)?a:d.model.getIdentity(a)}),e=[];c.forEach(g,function(a){e=e.concat(d._itemNodesMap[a]||[])});this.set("selectedNodes",e)}))},_setPathAttr:function(a){return a.length?
this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function d(a,f,h){var k=a.shift(),j=c.filter(f,function(a){return a.getIdentity()==k})[0];j?a.length?g._expandNode(j).addCallback(function(){d(a,j.getChildren(),h)}):h.callback(j):h.errback("Could not expand path at "+k)}var g=this;return(new c.DeferredList(c.map(a,function(a){var f=new c.Deferred,a=c.map(a,function(a){return c.isString(a)?a:g.model.getIdentity(a)});a.length?g._loadDeferred.addCallback(function(){d(a,[g.rootNode],
f)}):f.errback("Empty path");return f}))).addCallback(function(a){g.set("selectedNodes",c.map(c.filter(a,function(a){return a[0]}),function(a){return a[1]}))})},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this._loadDeferred.addCallback(c.hitch(this,function(){this.dndController.setSelection(a)}))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},getIconClass:function(a,c){return!a||this.model.mayHaveChildren(a)?
c?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onKeyPress:function(a){if(!a.altKey){var d=c.keys,g=f.getEnclosingWidget(a.target);if(g){var e=a.charOrCode;if(typeof e=="string"&&e!=" ")!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey&&(this._onLetterKeyNav({node:g,key:e.toLowerCase()}),c.stopEvent(a));else{this._curSearch&&(clearTimeout(this._curSearch.timer),
delete this._curSearch);var i=this._keyHandlerMap;if(!i)i={},i[d.ENTER]="_onEnterKey",i[d.SPACE]=i[" "]="_onEnterKey",i[this.isLeftToRight()?d.LEFT_ARROW:d.RIGHT_ARROW]="_onLeftArrow",i[this.isLeftToRight()?d.RIGHT_ARROW:d.LEFT_ARROW]="_onRightArrow",i[d.UP_ARROW]="_onUpArrow",i[d.DOWN_ARROW]="_onDownArrow",i[d.HOME]="_onHomeKey",i[d.END]="_onEndKey",this._keyHandlerMap=i;this._keyHandlerMap[e]&&(this[this._keyHandlerMap[e]]({node:g,item:g.item,evt:a}),c.stopEvent(a))}}}},_onEnterKey:function(a){this._publish("execute",
{item:a.item,node:a.node});this.dndController.userSelect(a.node,c.isCopyKey(a.evt),a.evt.shiftKey);this.onClick(a.item,a.node,a.evt)},_onDownArrow:function(a){(a=this._getNextNode(a.node))&&a.isTreeNode&&this.focusNode(a)},_onUpArrow:function(a){var a=a.node,c=a.getPreviousSibling();if(c)for(a=c;a.isExpandable&&a.isExpanded&&a.hasChildren();)a=a.getChildren(),a=a[a.length-1];else if(c=a.getParent(),this.showRoot||c!==this.rootNode)a=c;a&&a.isTreeNode&&this.focusNode(a)},_onRightArrow:function(a){a=
a.node;a.isExpandable&&!a.isExpanded?this._expandNode(a):a.hasChildren()&&(a=a.getChildren()[0])&&a.isTreeNode&&this.focusNode(a)},_onLeftArrow:function(a){a=a.node;a.isExpandable&&a.isExpanded?this._collapseNode(a):(a=a.getParent())&&a.isTreeNode&&(this.showRoot||a!==this.rootNode)&&this.focusNode(a)},_onHomeKey:function(){var a=this._getRootOrFirstNode();a&&this.focusNode(a)},_onEndKey:function(){for(var a=this.rootNode;a.isExpanded;)a=a.getChildren(),a=a[a.length-1];a&&a.isTreeNode&&this.focusNode(a)},
multiCharSearchDuration:250,_onLetterKeyNav:function(a){var c=this._curSearch;c?(c.pattern+=a.key,clearTimeout(c.timer)):c=this._curSearch={pattern:a.key,startNode:a.node};var g=this;c.timer=setTimeout(function(){delete g._curSearch},this.multiCharSearchDuration);a=c.startNode;do(a=this._getNextNode(a))||(a=this._getRootOrFirstNode());while(a!==c.startNode&&a.label.toLowerCase().substr(0,c.pattern.length)!=c.pattern);a&&a.isTreeNode&&a!==c.startNode&&this.focusNode(a)},isExpandoNode:function(a,d){return c.isDescendant(a,
d.expandoNode)},_onClick:function(a,d){var g=this.isExpandoNode(d.target,a);this.openOnClick&&a.isExpandable||g?a.isExpandable&&this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:d}),this.onClick(a.item,a,d),this.focusNode(a));c.stopEvent(d)},_onDblClick:function(a,d){var g=d.target,g=g==a.expandoNode||g==a.expandoNodeText;this.openOnDblClick&&a.isExpandable||g?a.isExpandable&&this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:d}),this.onDblClick(a.item,
a,d),this.focusNode(a));c.stopEvent(d)},_onExpandoClick:function(a){a=a.node;this.focusNode(a);a.isExpanded?this._collapseNode(a):this._expandNode(a)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(a){if(a.isExpandable&&a.isExpanded&&a.hasChildren())return a.getChildren()[0];else{for(;a&&a.isTreeNode;){var c=a.getNextSibling();if(c)return c;a=a.getParent()}return null}},_getRootOrFirstNode:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},
_collapseNode:function(a){a._expandNodeDeferred&&delete a._expandNodeDeferred;a.isExpandable&&a.state!="LOADING"&&(a.collapse(),this.onClose(a.item,a),a.item&&(this._state(a.item,!1),this._saveState()))},_expandNode:function(a,d){if(a._expandNodeDeferred&&!d)return a._expandNodeDeferred;var g=this.model,e=a.item,f=this;switch(a.state){case "UNCHECKED":a.markProcessing();var h=a._expandNodeDeferred=new c.Deferred;g.getChildren(e,function(c){a.unmarkProcessing();var c=a.setChildItems(c),d=f._expandNode(a,
!0);c.addCallback(function(){d.addCallback(function(){h.callback()})})},function(a){console.error(f,": error loading root children: ",a)});break;default:h=a._expandNodeDeferred=a.expand(),this.onOpen(a.item,a),e&&(this._state(e,!0),this._saveState())}return h},focusNode:function(a){f.focus(a.labelNode)},_onNodeFocus:function(a){if(a&&a!=this.lastFocused)this.lastFocused&&!this.lastFocused._destroyed&&this.lastFocused.setFocusable(!1),a.setFocusable(!0),this.lastFocused=a},_onNodeMouseEnter:function(){},
_onNodeMouseLeave:function(){},_onItemChange:function(a){var d=this._itemNodesMap[this.model.getIdentity(a)];if(d){var g=this.getLabel(a),e=this.getTooltip(a);c.forEach(d,function(c){c.set({item:a,label:g,tooltip:e});c._updateItemClasses(a)})}},_onItemChildrenChange:function(a,d){var g=this._itemNodesMap[this.model.getIdentity(a)];g&&c.forEach(g,function(a){a.setChildItems(d)})},_onItemDelete:function(a){var a=this.model.getIdentity(a),d=this._itemNodesMap[a];d&&(c.forEach(d,function(a){this.dndController.removeTreeNode(a);
var c=a.getParent();c&&c.removeChild(a);a.destroyRecursive()},this),delete this._itemNodesMap[a])},_initState:function(){if(this.persist){var a=c.cookie(this.cookieName);this._openedItemIds={};a&&c.forEach(a.split(","),function(a){this._openedItemIds[a]=!0},this)}},_state:function(a,c){if(!this.persist)return!1;var g=this.model.getIdentity(a);if(arguments.length===1)return this._openedItemIds[g];c?this._openedItemIds[g]=!0:delete this._openedItemIds[g]},_saveState:function(){if(this.persist){var a=
[],d;for(d in this._openedItemIds)a.push(d);c.cookie(this.cookieName,a.join(","),{expires:365})}},destroy:function(){this._curSearch&&(clearTimeout(this._curSearch.timer),delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!c.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(a){a&&c.marginBox(this.domNode,a);this._nodePixelIndent=c._getMarginSize(this.tree.indentDetector).w;
this.tree.rootNode&&this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new f._TreeNode(a)}});return f.Tree});
define("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(c,f){c.declare("orion.widgets._ExplorerTreeNode",[f._TreeNode],{templateString:c.cache("orion","widgets/templates/_ExplorerTreeNode.html"),_updateItemClasses:function(a){this.inherited(arguments);this._applyClassAndStyle(a,"follow","Follow");typeof this.tree.updateFollowLink==="function"&&this.tree.updateFollowLink(a,this.followLink)}});c.declare("orion.widgets.ExplorerTree",
[f.Tree],{selectedNodes:{},postCreate:function(){c.connect(this,"onMouseDown",this._eatSelectionEvent);c.connect(this.domNode,"onselectstart",this._eatSelectionEvent);this.inherited(arguments)},getFollowClass:function(){},getFollowStyle:function(){},updateFollowLink:function(){},onFollowClick:function(){},getSelectedItems:function(){var a=[];this._forEachSelectedNode(function(c,g){a.push(g.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(c,g){a.push(g)});
return a},_forEachSelectedNode:function(a){var c=this.selectedNodes,g;for(g in c)c.hasOwnProperty(g)&&a(g,c[g])},_createTreeNode:function(a){return new orion.widgets._ExplorerTreeNode(a)},_eatSelectionEvent:function(a){(c.isCopyKey(a)||a.shiftKey)&&c.stopEvent(a)},_onClick:function(a,d){var g=d.target,e=g===a.expandoNode||g===a.expandoNodeText,g=g===a.followNode;if(c.isCopyKey(d))this._toggleSelectNode(a),this.focusNode(a);else if(d.shiftKey)this.selectedNode&&(this._selectRange(this.selectedNode,
a),this.focusNode(a));else{if(g)this.onFollowClick(a.item,a,d);else this.openOnClick&&a.isExpandable||e?a.isExpandable&&this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:d}),this.onClick(a.item,a,d),this.focusNode(a));!e&&!g&&this._selectNode(a)}g||c.stopEvent(d)},_onItemDelete:function(a){var d=this._itemNodesMap[this.model.getIdentity(a)];if(d){var g=this;c.forEach(d,function(a){g._removeFromSelection(a)})}this.inherited(arguments)},_getVisibleAncestor:function(a){if(!a)return null;
for(var c=a.getParent();c&&(!c.isExpandable||!c.isExpanded);)a=c,c=c.getParent();return a},_toggleSelectNode:function(a){this.selectedNodes[a.get("id")]?(a.setSelected(!1),this._removeFromSelection(a)):(a.setSelected(!0),this._addToSelection(a))},_addToSelection:function(a){this.selectedNodes[a.get("id")]=a},_removeFromSelection:function(a){delete this.selectedNodes[a.get("id")]},_selectRange:function(a,c){function g(a,c){var d=[],e=a;do d.push(e),e=h._getNextNode(e);while(e&&e!==c);return e===c?
(d.push(c),d):null}var e=this._getVisibleAncestor(a),f=this._getVisibleAncestor(c);if(e&&f)if(e===f)this._selectNode(e);else{var h=this,k=g(e,f);k?this._selectNodes(k.reverse(),!0):(k=g(f,e))?this._selectNodes(k,!0):console.debug("Warning: couldn't select range from "+e.label+" to "+f.label)}},_selectNode:function(a){this._selectNodes(a?[a]:null)},_selectNodes:function(a){this._forEachSelectedNode(function(a,c){c._destroyed||c.setSelected(!1)});this.selectedNodes={};if(a)for(var c=0;c<a.length;c++){var g=
a[c];g.setSelected(!0);this._addToSelection(g);this.selectedNode=g}}})});
define("dojo/hash",["dojo"],function(c){(function(){function f(a,c){var d=a.indexOf(c);return d>=0?a.substring(d+1):""}function a(){return f(location.href,"#")}function d(){c.publish("/dojo/hashchange",[a()])}function g(){a()!==h&&(h=a(),d())}function e(a){if(k)if(k.isTransitioning())setTimeout(c.hitch(null,e,a),l);else{var d=k.iframe.location.href,f=d.indexOf("?");k.iframe.location.replace(d.substring(0,f)+"?"+a)}else location.replace("#"+a),!j&&g()}function i(){function e(){h=a();j=u?h:f(t.href,
"?");k=!1;r=null}var g=document.createElement("iframe"),i=c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo","resources/blank.html");c.config.useXDomain&&!c.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");g.id="dojo-hash-iframe";g.src=i+"?"+a();g.style.display="none";document.body.appendChild(g);this.iframe=c.global["dojo-hash-iframe"];
var j,k,r,s,u,t=this.iframe.location;this.isTransitioning=function(){return k};this.pollLocation=function(){if(!u)try{var v=f(t.href,"?");if(document.title!=s)s=this.iframe.document.title=document.title}catch(x){u=!0,console.error("dojo.hash: Error adding history entry. Server unreachable.")}var w=a();if(k&&h===w)if(u||v===r)e(),d();else{setTimeout(c.hitch(this,this.pollLocation),0);return}else if(!(h===w&&(u||j===v)))if(h!==w){h=w;k=!0;r=w;g.src=i+"?"+r;u=!1;setTimeout(c.hitch(this,this.pollLocation),
0);return}else if(!u)location.href="#"+t.search.substring(1),e(),d();setTimeout(c.hitch(this,this.pollLocation),l)};e();setTimeout(c.hitch(this,this.pollLocation),l)}c.hash=function(c,d){if(!arguments.length)return a();c.charAt(0)=="#"&&(c=c.substring(1));d?e(c):location.href="#"+c;return c};var h,k,j,l=c.config.hashPollFrequency||100;c.addOnLoad(function(){"onhashchange"in c.global&&(!c.isIE||c.isIE>=8&&document.compatMode!="BackCompat")?j=c.connect(c.global,"onhashchange",d):document.addEventListener?
(h=a(),setInterval(g,l)):document.attachEvent&&(k=new i)})})();return c.hash});
define("orion/util",["i18n!orion/nls/messages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(c,f,a){function d(a){var c=window.navigator.platform.indexOf("Mac")!==-1;return c&&a.metaKey||!c&&a.ctrlKey}function g(a){return typeof a.textContent!=="undefined"?a.textContent:a.innerText}return{getUserKeyString:function(a){var c="",d=navigator.platform.indexOf("Mac")!==-1;a.mod1&&(c+=d?"Cmd+":"Ctrl+");a.mod2&&(c+="Shift+");a.mod3&&(c+="Alt+");a.mod4&&d&&(c+="Ctrl+");if(a.alphaKey)return c+
a.alphaKey;for(var g in f.keys)if(typeof(f.keys[g]==="number")&&f.keys[g]===a.keyCode)return c+g;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?c+j:c+String.fromCharCode(a.keyCode)},openDialog:function(c,
d){c.startup();if(typeof d==="string"){var g=f.byId(d);if(!g&&(g=a.byId(d)))g=g.domNode;d=g?g:null}d&&(g=f.position(d),c._setStyleAttr("left:"+(g.x+16)+"px !important;"),c._setStyleAttr("top:"+(g.y+16)+"px !important;"));c.show()},getUserText:function(c,d,g,k,j,l,m,o,n){var m=function(m){return function(o){var p=a.byId(c),u=p.get("value");m&&o.keyCode===f.keys.ESCAPE?(g&&f.style(d,"display","inline"),p.destroyRecursive(),l&&l()):m&&o.keyCode!==f.keys.ENTER||(!p.isValid()||!n&&u===k?g&&f.style(d,"display",
"inline"):j(u),p.destroyRecursive(),l&&l())}},p=new a.form.ValidationTextBox({id:c,required:!0,value:k||""});f.place(p.domNode,d,"after");f.addClass(p.domNode,"userEditBoxPrompt");g&&f.style(d,"display","none");f.connect(p,"onKeyDown",m(!0));f.connect(p,"onBlur",m(!1));window.setTimeout(function(){p.focus();if(k){var d=f.byId(c),g=o?k.indexOf(o):-1;g>0?a.selectInputText(d,0,g):d.select()}},0)},openInNewWindow:d,followLink:function(a,c){c&&d(c)?window.open(a):window.location=a},makeRelative:function(a){if(!a)return a;
var c=window.location.protocol+"//"+window.location.host;return a.indexOf(c)===0?a.substring(c.length):a},makeFullPath:function(a){if(!a)return a;var c=window.location.protocol+"//"+window.location.host;a.charAt(0)!=="/"&&(a="/"+a);return c+a},isAtRoot:function(a){return this.makeRelative(a).indexOf("/workspace")===0},processNavigatorParent:function(a,c){a.children=c;for(var d in c)c[d].parent=a;a.children.sort(function(a,c){var d=a.Directory;if(d!==c.Directory)return d?-1:1;var d=a.Name&&a.Name.toLowerCase(),
e=c.Name&&c.Name.toLowerCase();return d<e?-1:d>e?1:0})},getText:g,safeText:function(a){return g(document.createTextNode(a))},setText:function(a,c){typeof a.textContent!=="undefined"?a.textContent=c:a.innerText=c},forceLayout:function(c){for(typeof c==="string"&&(c=f.byId(c));c;){var d=a.byId(c.id);if(d&&typeof d.layout==="function"){d.layout();break}c=c.parentNode}},saveFileContents:function(a,d,g,f){a.write(d.Location,g,{ETag:d.ETag}).then(function(){f&&f()},function(j){j.status===412?window.confirm(c["Resource is out of sync with the server. Do you want to save it anyway?"])&&
a.write(d.Location,g).then(function(a){d.ETag=a.ETag;f&&f()}):j.log=!0})},splitFile:function(a){for(var c=0,d=0,g=0,f=0,l=[];;){c!==-1&&c<=g&&(c=a.indexOf("\r",g));d!==-1&&d<=g&&(d=a.indexOf("\n",g));if(d===-1&&c===-1){l.push(a.substring(f));break}var m=1;c!==-1&&d!==-1?c+1===d?(m=2,g=d+1):g=(c<d?c:d)+1:g=c!==-1?c+1:d+1;l.push(a.substring(f,g-m));f=g}return l}}});
define("orion/status",["require","dojo","orion/util"],function(c,f,a){function d(a,c,d,g,f){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this._operationsClient=c;this.notificationContainerDomId=f;this.domId=d;this.progressDomId=g||d;this._hookedClose=!1}function g(a,c,d,g){this.statusService=a;this.progressId=c;if(d){this.deferred=d;this.begin(g);var j=this;d.then(function(){f.hitch(j,j.done)()},function(){f.hitch(j,j.done)()})}}d.prototype={_init:function(){var a=
f.byId("closeNotifications");a&&!this._hookedClose&&(f.connect(a,"onclick",this,function(){this.setProgressMessage("");f.removeClass(this.notificationContainerDomId,"slideContainerActive")}),f.connect(a,"onkeypress",this,function(a){if(a.keyCode===f.keys.ENTER||a.keyCode===f.keys.SPACE)this.setProgressMessage(""),f.removeClass(this.notificationContainerDomId,"slideContainerActive")}))},setMessage:function(a,c,d){this._init();this.currentMessage=a;if(typeof d==="boolean"){var g=this,j=f.byId(this.domId),
l=f.attr(j,"aria-live");f.attr(j,"aria-live",d?"polite":"off");window.setTimeout(function(){f.place(window.document.createTextNode(a),g.domId,"only")},100);window.setTimeout(function(){f.attr(j,"aria-live",l)},200)}else f.place(window.document.createTextNode(a),this.domId,"only");typeof c==="number"&&(g=this,window.setTimeout(function(){var c=f.byId(g.domId);(typeof c.textContent==="string"?c.textContent:c.innerText)===a&&f.place(window.document.createTextNode(""),g.domId,"only")},c))},setErrorMessage:function(a){this.currentMessage=
a;this._init();var c=a.responseText||a.message||a;try{c=JSON.parse(c)}catch(d){}var a=c.Message||c,g="red";if(c.Severity)switch(c.Severity){case "Warning":g="#FFCC00";break;case "Error":g="red";break;case "Info":case "Ok":g="green"}c=f.create("span",{style:{color:g}});f.place(window.document.createTextNode(a),c);f.place(c,this.domId,"only")},setProgressMessage:function(c){this._init();this.currentMessage=c;var d=f.create("span",{"class":"imageSprite core-sprite-progress"});f.place(d,this.progressDomId,
"only");f.place(window.document.createTextNode(c),this.progressDomId,"last");f.addClass(this.notificationContainerDomId,"progressNormal");c&&c.length>0?f.addClass(this.notificationContainerDomId,"slideContainerActive"):this._progressMonitors&&this._progressMonitors.length>0?this._renderOngoingMonitors():f.removeClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},setProgressResult:function(c){this.currentMessage=c;c=c.responseText||c;try{c=
JSON.parse(c)}catch(d){}this._init();var g=c.Message||c,k="imageSprite core-sprite-info",j="progressInfo",l="progressWarning progressError progressNormal";if(c.Severity)switch(c.Severity){case "Warning":k="imageSprite core-sprite-warning";j="progressWarning";l="progressInfo progressError progressNormal";break;case "Error":k="imageSprite core-sprite-error",j="progressError",l="progressWarning progressInfo progressNormal"}k=f.create("span",{"class":k});f.place(k,this.progressDomId,"only");c.HTML?f.place(g,
this.progressDomId,"last"):(f.place(window.document.createTextNode("   "+g),this.progressDomId,"last"),j&&this.progressDomId!==this.domId&&(f.addClass(this.notificationContainerDomId,j),f.removeClass(this.notificationContainerDomId,l)));f.addClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},showWhile:function(a,c){var d=this;c&&(d.setProgressMessage(c),a.addBoth(function(){c===d.currentMessage&&d.setProgressMessage("")}));return a},_lastProgressId:0,
_progressMonitors:{length:0},createProgressMonitor:function(a,c){return new g(this,++this._lastProgressId,a,c)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var a="",c=!0,d;for(d in this._progressMonitors)this._progressMonitors[d].status&&(c||(a+=", "),a+=this._progressMonitors[d].status,c=!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()}};d.prototype.constructor=d;g.prototype=new f.Deferred;g.prototype.begin=function(a){this.status=a;this.statusService._beginProgressMonitor(this)};g.prototype.done=function(a){this.status=a;this.statusService._doneProgressMonitor(this)};
g.prototype.worked=function(a){this.status=a;this.statusService._workedProgressMonitor(this)};g.prototype.constructor=g;return{StatusReportingService:d,ProgressMonitor:g}});
define("orion/searchUtils",["require","dojo","orion/editor/regex","orion/util"],function(c,f,a,d){var g=g||{};g.searchUtils=g.searchUtils||{};g.searchUtils.parseQueryStr=function(a){var c=a.indexOf("?"),d=a.indexOf("q=");c<d&&d>0&&(a=a.substring(c+1));c=a.split("&");a={queryStr:a,start:0,rows:10,sort:"Path asc",replace:null};for(d=0;d<c.length;d++){var f=c[d].indexOf("q="),j=c[d].indexOf("replace=");if(f>=0)g.searchUtils.parseLocationAndSearchStr(c[d].substring(f+2),a);else if(j>=0)a.replace=c[d].substring(j+
8);else if(f=c[d].split("="),f.length===2)if(f[0]==="rows")a.rows=parseInt(f[1]);else if(f[0]==="start")a.start=parseInt(f[1]);else if(f[0]==="sort")a.sort=f[1]}return a};g.searchUtils.copyQueryParams=function(a,c){return{sort:a.sort,rows:a.rows,start:a.start,searchStr:a.searchStr,location:a.location,replace:c?a.replace:null}};g.searchUtils.generateSearchHref=function(a){return c.toUrl("search/search.html")+"#"+g.searchUtils.generateSearchQuery(a)};g.searchUtils.generateSearchQuery=function(a){var c=
"Path asc",d=40,g=0,f="",l="",m="";if(a){if(a.sort)c=a.sort;if(a.rows)d=a.rows;if(a.start)g=a.start;if(a.searchStr)f=a.searchStr,f=f.split(" ").join("");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&&(m="&replace="+a.replace)}return"?sort="+c+"&rows="+d+"&start="+g+"&q="+f+l+m};g.searchUtils.parseLocationAndSearchStr=function(a,c){var d=a.indexOf("+Location:")>-1;c.location="";c.searchStr=a;if(d&&(d=a.split("+Location:"),
d.length===2)){var f=d[1];f.length>0&&f[f.length-1]==="*"&&(f=f.substring(0,f.length-1));c.location=f;c.searchStr=d[0].split(" ").join("")}c.searchStrTitle=c.searchStr.split("\\").join("");c.inFileQuery=g.searchUtils.generateInFileQuery(c.searchStr)};g.searchUtils.generateInFileQuery=function(c){var d={};d.originalSearchStr=c;var g=c.indexOf("*")>-1,f=c.indexOf("?")>-1;g&&(c=c.split("*").join(".*"));f&&(c=c.split("?").join("."));if(!g&&!f)d.searchStr=c.split("\\").join("").toLowerCase(),d.wildCard=
!1;else if(d.searchStr=c.toLowerCase(),g=a.parse("/"+d.searchStr+"/"))c=g.pattern,g=g.flags,g+=g.indexOf("i")===-1?"i":"",d.regExp={pattern:c,flags:g},d.wildCard=!0;d.searchStrLength=d.searchStr.length;return d};g.searchUtils.generateFindURLBinding=function(a,c,d){a=",find="+a.originalSearchStr;typeof d==="string"&&(a=a+"@@replaceWith@@"+d);typeof c==="number"&&(a=a+"@@atLine@@"+c);return a};g.searchUtils.parseFindURLBinding=function(a){var c=null,d=a.split("@@atLine@@");d.length>1&&(c=parseInt(d[1]),
c<1&&(c=1));var a=null,d=d[0].split("@@replaceWith@@"),f=d[0];d.length>1&&(a=d[1]);d=g.searchUtils.generateInFileQuery(f);return{searchStr:d.searchStr,replaceStr:a,lineNumber:c,useRegExp:d.wildCard}};g.searchUtils.replaceRegEx=function(a,c,d){return a.replace(RegExp(c.pattern,c.flags),d)};g.searchUtils.replaceStringLiteral=function(c,d,f){d=a.parse("/"+d+"/gim");return g.searchUtils.replaceRegEx(c,d,f)};g.searchUtils.searchOnelineLiteral=function(a,c,d){var g;g=0;for(var f=!1,l=[];;)if(g=c.indexOf(a.searchStr,
g),g<0)break;else{l.push({startIndex:g});f=!0;if(d)break;g+=a.searchStrLength}return f?l:null};g.searchUtils.findRegExp=function(a,c,d,g){if(!c)return null;d=d||"";d+=(d.indexOf("g")===-1?"g":"")+(d.indexOf("m")===-1?"m":"");var f=null;return(f=RegExp(c,d).exec(a.substring(g)))&&{startIndex:f.index+g,length:f[0].length}};g.searchUtils.searchOnelineRegEx=function(a,c,d){for(var f=0,j=!1,l=[];;)if(f=g.searchUtils.findRegExp(c,a.regExp.pattern,a.regExp.flags,f)){l.push(f);j=!0;if(d)break;f=f.startIndex+
f.length}else break;return j?l:null};g.searchUtils.generateNewContents=function(a,c,d,f,j){if(d&&a){var l;l=c.length>0?!0:!1;for(var m=0;m<a.length;m++){for(var o=a[m],n=!1,p=!1,q=[],r,s=0,u=0;u<d.children.length;u++)if(d.children[u].lineNumber-1===m){s=u;for(n=0;n<d.children[u].matches.length;n++)d.children[u+n].checked!==!1&&q.push(n);p=q.length>0;r=d.children[u].matches;n=!0;break}if(n){if(p){q=g.searchUtils.replaceCheckedMatches(o,f,r,q,j);o=q.replacedStr;for(n=0;n<d.children[s].matches.length;n++)d.children[s+
n].newMatches=q.newMatches}else for(n=0;n<d.children[s].matches.length;n++)d.children[s+n].newMatches=d.children[s+n].matches;l?c[m]=o:c.push(o)}else l||c.push(o)}}};g.searchUtils.generateMatchContext=function(a,c,d){var g=[],f=a*2+1,l;c.length<=f?(l=0,a=c.length-1):(l=d-a,l<0?(l=0,a=l+f-1):(a=d+a,a>c.length-1&&(a=c.length-1,l=a-f+1)));for(f=l;f<=a;f++)g.push({context:c[f],current:f===d});return g};g.searchUtils.searchWithinFile=function(a,c,f,k,j,l){f=d.splitFile(f);if(j)c.contents=f;if(c){c.children=
[];for(var m=k=0;m<f.length;m++){var o=f[m];if(o&&o.length>0){var n=l?o:o.toLowerCase();if(n=a.wildCard?g.searchUtils.searchOnelineRegEx(a,n):g.searchUtils.searchOnelineLiteral(a,n)){var p=m+1;if(j)for(var q=0;q<n.length;q++){var r=q+1,r={parent:c,checked:c.checked,type:"detail",matches:n,lineNumber:p,matchNumber:r,name:o,location:c.location+"-"+p+"-"+r};c.children.push(r)}else r={parent:c,context:g.searchUtils.generateMatchContext(2,f,m),checked:c.checked,type:"detail",matches:n,lineNumber:p,name:o,
location:c.location+"-"+p},c.children.push(r);k+=n.length}}}c.totalMatches=k}};g.searchUtils.replaceCheckedMatches=function(a,c,d,g,f){for(var l=0,m="",o=[],n=0;n<d.length;n++){l!==d[n].startIndex&&(m+=a.substring(l,d[n].startIndex));if(d[n].length)f=d[n].length;for(var l=!1,p=0;p<g.length;p++)if(g[p]===n){l=!0;break}l?(o.push({startIndex:m.length,length:c.length}),m+=c):(o.push({startIndex:m.length,length:f}),m+=a.substring(d[n].startIndex,d[n].startIndex+f));l=d[n].startIndex+f}l<a.length&&(m+=
a.substring(l));return{replacedStr:m,newMatches:o}};g.searchUtils.fullPathNameByMeta=function(a){var c=a.length,d="";if(c>0)for(c-=1;c>-1;c--)d=d+(d===""?"":"/")+a[c].Name;return d};g.searchUtils.path2FolderName=function(a,c,d){return a.substring(0,a.length-c.length-(d?0:1))};return g.searchUtils});
define("orion/breadcrumbs",["require","dojo","orion/util"],function(c,f,a){function d(a){this._init(a)}d.prototype={_init:function(a){var c=a.container;typeof c==="string"&&(c=f.byId(c));if(!c)throw"no parent container";this._container=c;f.removeClass(c,"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=c.toUrl("navigate/table.html")+"#"):a=document.createElement("span");f.place(document.createTextNode(this._workspaceRootSegmentName),a,"only");return a}return null},render:function(){var d=this._container,e=f.byId(this._id);e?f.empty(e):(e=document.createElement("span"),e.id=this._id,d.appendChild(e));var i;if(i=this.getNavigatorWorkspaceRootSegment())if(f.addClass(i,"breadcrumb"),e.appendChild(i),
this._resource&&this._resource.Parents)i=document.createElement("span"),f.place(document.createTextNode(" / "),i,"only"),this.path+="/",f.addClass(i,"breadcrumbSeparator"),e.appendChild(i);else{i.href="";f.removeClass(i,"breadcrumb");f.addClass(i,"currentLocation");a.forceLayout(d);return}var h=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var k=this._resource.Parents,j=k.length;--j>=0;)i=document.createElement("a"),f.addClass(i,"breadcrumb"),h?(f.place(document.createTextNode(h),
i,"only"),h=null):f.place(document.createTextNode(k[j].Name),i,"only"),this.path+=k[j].Name,this._makeHref?this._makeHref(i,k[j].Location):i.href=c.toUrl("navigate/table.html")+"#"+k[j].ChildrenLocation,e.appendChild(i),i=document.createElement("span"),f.place(document.createTextNode(" / "),i,"only"),this.path+="/",f.addClass(i,"breadcrumbSeparator"),e.appendChild(i);i=document.createElement("span");h?(f.place(document.createTextNode(h),i,"only"),h=null):f.place(document.createTextNode(this._resource.Name),
i,"only");f.addClass(i,"currentLocation");this.path+=this._resource.Name;e.appendChild(i)}e.childNodes.length===0&&(i=document.createElement("a"),f.place(document.createTextNode(h||document.title),i,"only"),f.addClass(i,"breadcrumb"),f.addClass(i,"currentLocation"),e.appendChild(i));a.forceLayout(d)}};d.prototype.constructor=d;return{BreadCrumbs:d}});
define("orion/favorites",["require","dojo","orion/util"],function(c,f,a){function d(a){this._favorites=[];this._init(a);this._initializeFavorites()}d.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this._serviceRegistration.dispatchEvent("favoritesChanged",{navigator:this._favorites,registry:this._registry})},makeFavorites:function(c){for(var c=f.isArray(c)?c:[c],d=0;d<c.length;d++){var i=
c[d],h=i.ChildrenLocation?i.ChildrenLocation:i.Location,h=a.makeRelative(h);this.addFavorite(i.Name,h,i.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(a){this.addFavorite(a,a,!1,!0)},addFavorite:function(a,c,d){this._favorites.push({name:a,path:c,directory:d,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(a){for(var c in this._favorites)if(this._favorites[c].path===a){this._favorites.splice(c,
1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(a,c){var d=!1,f;for(f in this._favorites)if(this._favorites[f].path===a){var k=this._favorites[f];if(k.name!==c)k.name=c,d=!0}d&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(a){for(var c in this._favorites)if(this._favorites[c].path===a)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(a){var c;if(!a)return this._favorites;
var d="";for(c=0;c<a.length;c++){var f=a.charAt(c);d+=f==="*"?".*":f==="?"?".?":this._SPECIAL_CHARS.indexOf(f)>=0?"\\"+f:f}d+=".*";a=RegExp(d);d=[];for(c in this._favorites)this._favorites[c].name.search(a)===0&&d.push(this._favorites[c]);return d},_initializeFavorites:function(){var a=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(c){var d,c=c.get("navigate");typeof c==="string"&&(c=JSON.parse(c));if(c)for(d in c)c[d].isFavorite=!0,a._favorites.push(c[d]);
a._favorites.sort(a._sorter);a._notifyListeners()})},_storeFavorites:function(){var a=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(c){c.put("navigate",a)})},_sorter:function(a,c){var d=a.name.toLowerCase(),f=c.name.toLowerCase();return d>f?1:d<f?-1:0},getFavorites:function(){return{navigator:this._favorites}}};d.prototype.constructor=d;return{FavoritesService:d}});
define("orion/git/util",["i18n!git/nls/gitmessages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(){function c(a){for(var c=0;c<d.length;c++)if(a.type===d[c])return!0;return!1}function f(c){for(var d=0;d<a.length;d++)if(c.type===a[d])return!0;return!1}var a=["Missing","Modified","Untracked","Conflicting"],d=["Added","Changed","Removed"];return{statusUILocation:"git/git-status2.html",isStaged:c,isUnstaged:f,isChange:function(a){return c(a)||f(a)},hasStagedChanges:function(a){for(var c=
0;c<d.length;c++)if(a[d[c]].length>0)return!0;return!1},hasUnstagedChanges:function(c){for(var d=0;d<a.length;d++)if(c[a[d]].length>0)return!0;return!1}}});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(c,f){c.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||(c.forEach(this.getChildren(),this._setupChild,
this),this.inherited(arguments))},_setupChild:function(a){var d=a.region;if(d){this.inherited(arguments);c.addClass(a.domNode,this.baseClass+"Pane");var g=this.isLeftToRight();d=="leading"&&(d=g?"left":"right");d=="trailing"&&(d=g?"right":"left");if(d!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget)g=new (c.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter"))({id:a.id+"_splitter",container:this,child:a,region:d,live:this.liveSplitters}),g.isSplitter=!0,a._splitterWidget=g,c.place(g.domNode,
a.domNode,"after"),g.startup();a.region=d}},layout:function(){this._layoutChildren()},addChild:function(a,c){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var d=a.region,g=a._splitterWidget;g&&(g.destroy(),delete a._splitterWidget);this.inherited(arguments);this._started&&this._layoutChildren();c.removeClass(a.domNode,this.baseClass+"Pane");c.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});c.style(a.domNode,d=="top"||d=="bottom"?
"width":"height","auto")},getChildren:function(){return c.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return c.filter(this.getChildren(),function(c){return c.region==a})[0]._splitterWidget},resize:function(a,d){if(!this.cs||!this.pe){var g=this.domNode;this.cs=c.getComputedStyle(g);this.pe=c._getPadExtents(g,this.cs);this.pe.r=c._toPixelValue(g,this.cs.paddingRight);this.pe.b=c._toPixelValue(g,this.cs.paddingBottom);c.style(g,"padding","0px")}this.inherited(arguments)},
_layoutChildren:function(a,d){if(this._borderBox&&this._borderBox.h){var g=c.map(this.getChildren(),function(a,c){return{pane:a,weight:[a.region=="center"?Infinity:0,a.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(a.region)?1:-1),c]}},this);g.sort(function(a,c){for(var d=a.weight,e=c.weight,g=0;g<d.length;g++)if(d[g]!=e[g])return d[g]-e[g];return 0});var e=[];c.forEach(g,function(a){a=a.pane;e.push(a);a._splitterWidget&&e.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},e,a,d)}},destroyRecursive:function(){c.forEach(this.getChildren(),function(a){var c=a._splitterWidget;c&&c.destroy();delete a._splitterWidget});this.inherited(arguments)}});c.extend(f._Widget,{region:"",layoutPriority:0,splitter:!1,minSize:0,maxSize:Infinity});c.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);c.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=c.cookie(this._cookieName);a&&(this.child.domNode.style[this.horizontal?"height":"width"]=a)}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",d=c.marginBox(this.child.domNode)[a],g=c.filter(this.container.getChildren(),function(a){return a.region=="center"})[0],a=c.marginBox(g.domNode)[a];return Math.min(this.child.maxSize,d+a)},_startDrag:function(a){if(!this.cover)this.cover=c.doc.createElement("div"),c.addClass(this.cover,"dijitSplitterCover"),c.place(this.cover,this.child.domNode,"after");c.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&c.destroy(this.fake);if(!(this._resize=this.live))(this.fake=this.domNode.cloneNode(!0)).removeAttribute("id"),
c.addClass(this.domNode,"dijitSplitterShadow"),c.place(this.fake,this.domNode,"after");c.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");this.fake&&c.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var d=this._factor,g=this.horizontal,e=g?"pageY":"pageX",f=a[e],h=this.domNode.style,k=c.marginBox(this.child.domNode)[g?"h":"w"],j=this._computeMaxSize(),l=this.child.minSize||20,g=this.region,m=g=="top"||g=="bottom"?
"top":"left",o=parseInt(h[m],10),n=this._resize,p=c.hitch(this.container,"_layoutChildren",this.child.id),g=c.doc;this._handlers=(this._handlers||[]).concat([c.connect(g,"onmousemove",this._drag=function(a,c){var g=a[e]-f,u=d*g+k,t=Math.max(Math.min(u,j),l);(n||c)&&p(t);h[m]=g+o+d*(t-u)+"px"}),c.connect(g,"ondragstart",c.stopEvent),c.connect(c.body(),"onselectstart",c.stopEvent),c.connect(g,"onmouseup",this,"_stopDrag")]);c.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||a.type=="mouseenter";
c.toggleClass(this.domNode,"dijitSplitterHover",a);c.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&c.removeClass(this.cover,"dijitSplitterCoverActive"),this.fake&&c.destroy(this.fake),c.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&&c.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){c.forEach(this._handlers,c.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=!0;var d=this.horizontal,g=1,e=c.keys;switch(a.charOrCode){case d?e.UP_ARROW:e.LEFT_ARROW:g*=-1;case d?e.DOWN_ARROW:e.RIGHT_ARROW:break;default:return}d=c._getMarginSize(this.child.domNode)[d?"h":"w"]+this._factor*g;this.container._layoutChildren(this.child.id,Math.max(Math.min(d,this._computeMaxSize()),
this.child.minSize));c.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});c.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);c.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return f.layout.BorderContainer});
define("dojo/html",["dojo","dojo/parser"],function(c){c.getObject("html",!0,c);(function(){var f=0;c.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};c.html._emptyNode=c.empty;c.html._setNodeContent=function(a,d){c.empty(a);if(d)if(typeof d=="string"&&(d=c._toDom(d,a.ownerDocument)),!d.nodeType&&c.isArrayLike(d))for(var g=d.length,e=0;e<d.length;e=g==d.length?e+1:0)c.place(d[e],a,"last");else c.place(d,a,"last");return a};c.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:c._scopeName,startup:!0,constructor:function(a,d){c.mixin(this,a||{});d=this.node=c.byId(this.node||d);if(!this.id)this.id=["Setter",d?d.id||d.tagName:"",f++].join("_")},set:function(a,c){if(void 0!==a)this.content=a;c&&this._mixin(c);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=
c.html._setNodeContent(a,this.content)}catch(d){var g=this.onContentError(d);try{a.innerHTML=g}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e)}}this.node=a},empty:function(){this.parseResults&&this.parseResults.length&&(c.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);c.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(c.isString(a)&&(this.cleanContent&&(a=c.html._secureForInnerHtml(a)),
this.extractContent)){var d=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);d&&(a=d[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 c={},g;for(g in a)g in c||(this[g]=a[g])},_parse:function(){var a=this.node;try{var d={};c.forEach(["dir","lang","textDir"],
function(a){this[a]&&(d[a]=this[a])},this);this.parseResults=c.parser.parse({rootNode:a,noStart:!this.startup,inherited:d,scope:this.parserScope})}catch(g){this._onError("Content",g,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,d,g){a=this["on"+a+"Error"].call(this,d);g?console.error(g,d):a&&c.html._setNodeContent(this.node,a,!0)}});c.html.set=function(a,d,g){void 0==d&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),d="");return g?(new c.html._ContentSetter(c.mixin(g,
{content:d,node:a}))).set():c.html._setNodeContent(a,d,!0)}})();return c.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(c,f){c.declare("dijit.layout.ContentPane",[f._Widget,f.layout._ContentPaneResizeMixin],{href:"",extractContent:!1,parseOnLoad:!0,parserScope:c._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:c.delegate(f._Widget.prototype.attributeMap,{title:[]}),stopParser:!0,template:!1,create:function(a,d){if((!a||!a.template)&&d&&!("href"in a)&&!("content"in a)){for(var g=c.doc.createDocumentFragment(),d=c.byId(d);d.firstChild;)g.appendChild(d.firstChild);a=c.delegate(a,{content:g})}this.inherited(arguments,[a,d])},postMixInProperties:function(){this.inherited(arguments);var a=c.i18n.getLocalization("dijit","loading",
this.lang);this.loadingMessage=c.string.substitute(this.loadingMessage,a);this.errorMessage=c.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";c.attr(this.domNode,"role")||f.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&c.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&c.isFunction(a.startup))a.startup(),
a._started=!0},this)},setHref:function(a){c.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 c.Deferred(c.hitch(this,"cancel"));this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){c.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 c.Deferred(c.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(c.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 c.Deferred(c.hitch(this,"cancel"));this.onLoadDeferred.addCallback(c.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
!0);var a=this,d={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};c.isObject(this.ioArgs)&&c.mixin(d,this.ioArgs);var g=this._xhrDfd=(this.ioMethod||c.xhrGet)(d);g.addCallback(function(c){try{a._isDownloaded=!0,a._setContent(c,!1),a.onDownloadEnd()}catch(d){a._onError("Content",d)}delete a._xhrDfd;return c});g.addErrback(function(c){g.canceled||a._onError("Download",c);delete a._xhrDfd;return c});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
!0);try{this.onLoadDeferred.callback(a)}catch(c){console.error("Error "+this.widgetId+" running custom onLoad code: "+c.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;c.forEach(this.getChildren(),function(a){a.destroyRecursive&&a.destroyRecursive()});a&&(c.forEach(a.parseResults,
function(a){a.destroyRecursive&&a.domNode&&a.domNode.parentNode==c.body()&&a.destroyRecursive()}),delete a.parseResults);c.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,d){this.destroyDescendants();var g=this._contentSetter;if(!(g&&g instanceof c.html._ContentSetter))g=this._contentSetter=new c.html._ContentSetter({node:this.containerNode,_onError:c.hitch(this,this._onError),onContentError:c.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=
a}catch(c){console.error("Fatal "+this.id+" could not change content due to "+c.message,c)}})});var e=c.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang},this._contentSetterParams||{});g.set(c.isObject(a)&&a.domNode?a.domNode:a,e);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();d||(this._started&&(this._startChildren(),this._scheduleLayout()),this._onLoadHandler(a))},
_onError:function(a,c,g){this.onLoadDeferred.errback(c);a=this["on"+a+"Error"].call(this,c);g?console.error(g,c):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("dijit/TooltipDialog","dojo,dijit,text!dijit/templates/TooltipDialog.html,dijit/layout/ContentPane,dijit/_Templated,dijit/form/_FormMixin,dijit/_DialogMixin".split(","),function(c,f){c.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:c.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,d,g){a="dijitTooltipAB"+(g.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(g.charAt(0)=="T"?"Below":"Above");c.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 d=a.target,g=c.keys;a.charOrCode===g.TAB&&this._getFocusItems(this.containerNode);var e=this._firstFocusItem==this._lastFocusItem;a.charOrCode==g.ESCAPE?(setTimeout(c.hitch(this,"onCancel"),0),c.stopEvent(a)):d==this._firstFocusItem&&a.shiftKey&&a.charOrCode===g.TAB?(e||f.focus(this._lastFocusItem),c.stopEvent(a)):d==this._lastFocusItem&&a.charOrCode===g.TAB&&!a.shiftKey?(e||f.focus(this._firstFocusItem),c.stopEvent(a)):a.charOrCode===g.TAB&&
a.stopPropagation()}});return f.TooltipDialog});
define("orion/widgets/OperationsDialog","i18n!orion/operations/nls/messages,require,dojo,dijit,orion/util,dijit/TooltipDialog,text!orion/widgets/templates/OperationsDialog.html".split(","),function(c,f,a,d){a.declare("orion.widgets.OperationsDialog",[d.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,c){this._operations=[];c=c||{};this._myOperations=[];if(a.Children)for(var d=0;d<a.Children.length;d++)c[a.Children[d].Id]?this._myOperations.push(a.Children[d]):this._operations.push(a.Children[d]);this._operations.sort(function(a,c){return parseInt(c.Modified)-parseInt(a.Modified)});this._myOperations.sort(function(a,c){return parseInt(c.Modified)-parseInt(a.Modified)});this._renderOperations()},
parseProgressResult:function(a){if(!a)return{};a=a.responseText||a;try{a=JSON.parse(a)}catch(c){}var d={Message:a.Message||a,Severity:a.Severity};if(a.DetailedMessage&&a.DetailedMessage!==d.Message)d.DetailedMessage=a.DetailedMessage;return d},_renderOperations:function(){this._renderOperationsTable(this.myOperationsList,this._myOperations);this._renderOperationsTable(this.operationsList,this._operations)},_renderOperationsTable:function(d,e){a.empty(d);for(var f=0;f<e.length;f++){var h=e[f],k=a.create("tr"),
j=a.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:h.Name},k),j=a.create("div",null,j,"only"),l=a.create("span",{innerHTML:h.Name,className:"primaryColumn"},j,"last");a.place(document.createTextNode(h.Name),l,"only");var m=a.create("span",null,j,"first");a.addClass(m,"imageSprite");l=this.parseProgressResult(h.Result);switch(l.Severity){case "Warning":a.addClass(m,"core-sprite-warning");a.attr(m,"aria-label",c["Operation resulted in a warning."]);break;case "Error":a.addClass(m,
"core-sprite-error");a.attr(m,"aria-label",c["Operation resulted in an error."]);break;default:h.Running===!0?(a.addClass(m,"core-sprite-start"),a.attr(m,"aria-label",c["Operation is running."])):h.Canceled===!0?(a.addClass(m,"core-sprite-stop"),a.attr(m,"aria-label",c["Operation is canceled."])):h.Failed===!0?(a.addClass(m,"core-sprite-error"),a.attr(m,"aria-label",c["Operation failed."])):(a.addClass(m,"core-sprite-ok"),a.attr(m,"aria-label","Operation ok."))}if(l.Message||h.Message)h=l.Message||
h.Message,l.DetailedMessage&&l.DetailedMessage!==""&&(h+=": "+l.DetailedMessage),a.create("br",null,j,"last"),a.create("span",{className:"secondaryColumn",style:"margin-left: 18px;",innerHTML:h},j,"last");a.place(k,d,"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);d.popup.hide&&d.popup.hide(this);d.popup.close(this)}})});
define("orion/commands","i18n!orion/nls/messages,require,dojo,dijit,orion/util,orion/PageUtil,orion/navigationUtils,dijit/Menu,dijit/form/DropDownButton,dijit/MenuItem,dijit/PopupMenuItem,dijit/MenuSeparator,dijit/Tooltip,dijit/TooltipDialog".split(","),function(c,f,a,d,g,e,i){function h(c,d,e){var g=function(){e&&a.addClass(this,e)},f=function(){e&&a.removeClass(this,e)};a.connect(c,"onmouseover",c,g);a.connect(d,"onfocus",c,g);a.connect(c,"onmouseout",c,f);a.connect(d,"onblur",c,f)}function k(a,
c,d,e,g){this.commandService=a;this.handler=c;this.items=d;this.userData=e;this.command=g;if(g.parameters)this.parameters=g.parameters.makeCopy();this.id=g.id}function j(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._init(a);this._parameterCollector=null;this.showMenuIcons=!1}function l(c,d,e){a.addClass(d,"commandImage");var g;c.imageClass?(g=a.create("span",{},d,"last"),a.addClass(g,c.spriteClass),a.addClass(g,c.imageClass)):(g=new Image,
g.alt=c.name,g.name=e,g.id=e,g.src=c.image,a.place(g,d,"last"));return g}function m(a){this._init(a)}function o(c,d,e,g,f,h,i){this.keyCode=typeof c==="string"?c.toUpperCase().charCodeAt(0):c;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=e!==void 0&&e!==null?e:!1;this.mod3=g!==void 0&&g!==null?g:!1;this.mod4=f!==void 0&&f!==null?f:!1;typeof h==="string"?(this.domScope=a.byId(h),this.scopeName=i||h):(this.domScope=h,this.scopeName=i||h?h.id:null)}function n(a,c){this.token=a;this.parameterName=c}function p(a,
c,d,e,g){this.name=a;this.type=c;this.label=d;this.value=e;this.lines=g||1}function q(a,c,d){this._storeParameters(a);this._hasOptionalParameters=c&&c.hasOptionalParameters;this._clientCollect=c&&c.clientCollect;this._options=c;this.optionsRequested=!1;this.getParameters=d}k.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(){var a=new k(this.commandService,this.handler,this.items,this.userData,this.command);a.domNode=
this.domNode;a.domParent=this.domParent;if(this.parameters)a.parameters=this.parameters.makeCopy();return a}};k.prototype.constructor=k;var r=a.declare(d.MenuItem,{constructor:function(){var c=arguments[0]||{};c.onKeyDown=a.hitch(this,function(c){if((c.keyCode===a.keys.ENTER||c.keyCode===a.keys.SPACE)&&this._anchorLocation)c.ctrlKey?window.open(this._anchorLocation):window.location=this._anchorLocation});this.inherited(arguments||[c])},postCreate:function(){var c=a.query("a",this.domNode)[0];if(c)a.addClass(c,
"commandMenuItemAnchor"),this._anchorLocation=c.href},setLink:function(a,c){this.set("label","<a class='commandMenuItemAnchor' href='"+a+"'>"+c+"</a>");this._anchorLocation=a},_onClick:function(a){this.hasLink||this.inherited(arguments)}}),s=a.declare(d.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(c){this.inherited(arguments);
this.polling=!0;this.pollForMissingTarget();window.setTimeout(function(){d._masterTT&&a.removeAttr(d._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&&d.byId(this.options.commandParent.id)&&a.connect(this.options.commandParent,"onClose",a.hitch(this,function(){this.close()}))}});j.prototype={_init:function(c){this._registry=c.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._defaultSelectionService=c.selection;a.connect(window.document,"onkeydown",a.hitch(this,function(a){a=a||window.event;if(a.target.contentEditable!=="true"){var c=a.target.nodeName.toLowerCase();
if(c==="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(c==="textarea")return;this._processKey(a)}}))},_processKey:function(c){function d(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var e in this._activeBindings)if(this._activeBindings[e]&&this._activeBindings[e].keyBinding&&
this._activeBindings[e].command&&this._activeBindings[e].keyBinding.match(c)){var g=this._activeBindings[e],f=g.invocation;if(f)if(g=g.command,g.hrefCallback){d(c);c=g.hrefCallback.call(f.handler||window,f);c.then?c.then(function(a){window.open(a)}):window.open(c);break}else if(g.callback){d(c);window.setTimeout(a.hitch(this,function(){this._invoke(f)}),0);break}}},processURL:function(c){for(var d in this._urlBindings)if(this._urlBindings[d]&&this._urlBindings[d].urlBinding&&this._urlBindings[d].command){var e=
this._urlBindings[d].urlBinding.match(c);if(e){var g=this._urlBindings[d],f=g.command,h=g.invocation;if(h&&h.parameters&&f.callback){h.parameters.setValue(e.parameterName,e.parameterValue);window.setTimeout(a.hitch(this,function(){this._invoke(h)}),0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(c,d,e){if(d){var g=this._commandList[c];(g.visibleWhen?g.visibleWhen(d):1)&&g.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(new k(this,e,d,null,g))}),
0)}else{var f=this._urlBindings[c];f&&f.command&&f.command.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(f.invocation)}),0)}},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,c,d){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,c,d))},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},
collectsParameters:function(){return this._parameterCollector},_invoke:function(a){return this._collectAndInvoke(a.makeCopy(),!1)},_collectAndInvoke:function(c,e){if(c)if(this._parameterCollector&&c.parameters&&c.parameters.hasParameters()&&(e||c.parameters.shouldCollectParameters())){var g=!1;c.parameters.updateParameters(c);g=this._parameterCollector.collectParameters(c);if(!g){var f=new d.TooltipDialog({onBlur:function(){d.popup.close(f)}}),h=a.create("div"),i=window.document.activeElement,j=this._parameterCollector.getFillFunction(c,
function(){d.popup.close(f);f.destroyRecursive();i&&i.focus()})(h);f.set("content",h);h=(h=d.byId(c.domParent.id))?a.position(h.eclipseScopeId,!0):a.position(c.domNode,!0);h.x&&h.y&&h.w&&(d.popup.open({popup:f,x:h.x+h.w-8,y:h.y+8}),window.setTimeout(function(){j.focus();j.select()},0),g=!0)}if(!g)c.parameters=null,c.command.callback.call(c.handler||window,c)}else c.command.callback.call(c.handler||window,c);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},
collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(c){var d={},e,f,h;for(h in this._activeBindings)if((f=this._activeBindings[h])&&f.keyBinding&&f.command)f.keyBinding.scopeName?(d[f.keyBinding.scopeName]||(d[f.keyBinding.scopeName]=[]),d[f.keyBinding.scopeName].push(f)):(e=g.getUserKeyString(f.keyBinding),a.place("<span role='listitem'>"+e+" = "+f.command.name+"<br></span>",c,"last"));for(var i in d)if(d[i].length&&d[i].length>0){a.place("<h2>"+i+"</h2>",c,"last");
for(h=0;h<d[i].length;h++)f=d[i][h],e=g.getUserKeyString(f.keyBinding),a.place("<span role='listitem'>"+e+" = "+f.command.name+"<br></span>",c,"last")}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,c,d,e,g,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];g&&(a=this._createEntryForPath(a,g));if(a[c]){if(e)a[c].title=e;if(d)a[c].position=d;a[c].emptyGroupMessage=f}else a[c]={title:e,position:d,emptyGroupMessage:f,
children:{}},a.sortedContributions=null},_createEntryForPath:function(a,c){if(c)for(var d=c.split("/"),e=0;e<d.length;e++)if(d[e].length>1)a[d[e]]||(a[d[e]]={position:0,children:{}}),a=a[d[e]].children;return a},registerSelectionService:function(a,c){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=c},registerCommandContribution:function(a,c,d,e,g,f,h){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=
this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[c]={position:d};f&&(d=this._commandList[c])&&(this._activeBindings[c]={command:d,keyBinding:f,bindingOnly:g});h&&(d=this._commandList[c])&&(this._urlBindings[c]={command:d,urlBinding:h,bindingOnly:g});a.sortedContributions=null},_isLastChildSeparator:function(c,e){if(e==="tool"||e==="button")return c.childNodes.length>0&&a.hasClass(c.childNodes[c.childNodes.length-1],"commandSeparator");if(e==="menu"){var g=c.getChildren();return g.length>
0&&g[g.length-1]instanceof d.MenuSeparator}return!1},renderCommands:function(c,d,e,f,h,i,j){if(typeof c!=="string")throw"a scope id for rendering must be specified";typeof d==="string"&&(d=a.byId(d));if(!d)throw"no parent";var l=this._contributionsByScopeId[c];if(!e&&l){var e=l.localSelectionService||this._defaultSelectionService,k=this;e&&e.getSelections(function(a){k.renderCommands(c,d,a,f,h,i)})}else l&&(this._render(this._contributionsByScopeId[c],d,e,f,h,i,j),h==="tool"||h==="button"?this._isLastChildSeparator(d,
h)&&d.removeChild(d.childNodes[d.childNodes.length-1]):h==="menu"&&this._isLastChildSeparator(d,h)&&(e=d.getChildren()[d.getChildren().length-1],d.removeChild(e),e.destroy()),g.forceLayout(d))},destroy:function(c){typeof c==="string"&&(c=a.byId(c));if(!c)throw"no parent";var e=d.findWidgets(c);a.forEach(e,function(a){a.destroyRecursive()});a.empty(c)},_render:function(e,g,f,j,l,n,m){var o=e.sortedContributions;if(!o){var o=[],q=!1,p;for(p in e)if(!e.hasOwnProperty||e.hasOwnProperty(p)){var s=e[p];
if(s&&typeof s.position==="number")s.id=p,o.push(s),q=!0}if(q)o.sort(function(a,c){return a.position-c.position}),e.sortedContributions=o}for(e=0;e<o.length;e++){var r,u;if(o[e].children&&Object.getOwnPropertyNames(o[e].children).length>0){p=o[e];var K,q=o[e].children,G=this;if(l==="tool"||l==="button")if(p.title){var F=new d.Menu({style:"display: none;"});r=new d.form.DropDownButton({label:p.title==="*"?c.Actions:p.title,showLabel:p.title!=="*",style:"visibility: hidden;",dropDown:F});a.addClass(r.domNode,
"commandMenu");m&&i.generateNavGrid(m,r.domNode,r);s=g;g.nodeName.toLowerCase()==="ul"?s=a.create("li",{},g):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");F.eclipseScopeId=g.eclipseScopeId||g.id;window.setTimeout(a.hitch({contributions:q,emptyGroupMessage:p.emptyGroupMessage},function(){if(!F._destroyed){G._render(this.contributions,F,f,j,"menu",n,m);K=F.getChildren();if(G._isLastChildSeparator(F,
"menu")){var c=K[K.length-1];F.removeChild(c);c.destroy();K=F.getChildren()}K.length===0?this.emptyGroupMessage?(a.connect(r.focusNode,"onclick",this,function(){var a=new d.TooltipDialog({content:"<p>"+this.emptyGroupMessage+"</p>",onMouseLeave:function(){d.popup.close(a);a.destroyRecursive()}});d.popup.open({popup:a,around:r.domNode});window.setTimeout(function(){d.popup.close(a);a.destroyRecursive()},15E3)}),a.style(r.domNode,"visibility","visible")):(m&&i.removeNavGrid(m,r.domNode),r.destroyRecursive()):
a.style(r.domNode,"visibility","visible")}}),0)}else{var O;g.childNodes.length>0&&!this._isLastChildSeparator(g,l)&&(O=this.generateSeparatorImage(g));G._render(q,g,f,j,l,n,m);g.childNodes.length>0&&g.childNodes[g.childNodes.length-1]!==O&&(O=this.generateSeparatorImage(g))}else if(p.title)s=new d.Menu,p=new d.PopupMenuItem({label:p.title,popup:s}),g.addChild(p),G._render(q,s,f,j,l,n,m),s.getChildren().length===0&&(p.set("label","removeme"),g.removeChild(p),p.destroyRecursive());else{var H;g.getChildren().length>
0&&!this._isLastChildSeparator(g,l)&&(H=new d.MenuSeparator,g.addChild(H));G._render(q,g,f,j,l,n,m);q=g.getChildren();q[q.length-1]!==H&&(H=new d.MenuSeparator,g.addChild(H))}}else{p=(q=this._commandList[o[e].id])?!0:!1;var N=null,N=null;if(q){u=new k(this,j,f,n,q);u.domParent=g;s=p&&(q.visibleWhen?q.visibleWhen(f):!0);if(this._activeBindings[q.id]&&this._activeBindings[q.id].keyBinding)N=this._activeBindings[q.id],N.invocation=s?u:null,N.bindingOnly&&(p=!1);if(this._urlBindings[q.id]&&this._urlBindings[q.id].urlBinding)N=
this._urlBindings[q.id],N.invocation=s?u:null,N.bindingOnly&&(p=!1);p=p&&s}if(p)if(q.choiceCallback)if(p=new d.Menu({style:"display: none;"}),l==="tool"||l==="button"){r=new d.form.DropDownButton({label:q.name,dropDown:p});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,g,"last");r.eclipseCommand=q;r.eclipseChoices=p;a.connect(r,"onClick",r,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,
f,j,n)})}else{if(l==="menu")s=new d.PopupMenuItem({label:q.name,popup:p}),g.addChild(s),s.eclipseCommand=q,s.eclipseChoices=p,a.connect(g,"_openPopup",s,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,f,j,n)})}else l==="tool"?(p="tool"+q.id+e,q._addTool(g,p,u,m)):l==="button"?(p="button"+q.id+e,q._addButton(g,p,u,m)):l==="menu"&&q._addMenuItem(g,u,m)}}},generateSeparatorImage:function(c){c=c.nodeName.toLowerCase()==="ul"?a.create("li",null,c,"last"):a.create("span",null,c,"last");
a.addClass(c,"core-sprite-sep");a.addClass(c,"imageSprite");a.addClass(c,"commandSeparator");return c}};j.prototype.constructor=j;m.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||f.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters;
this.description=a.description},_addTool:function(c,d,e,g){e.handler=e.handler||this;var f,j;if(this.hrefCallback){if(f=this._makeLink(e),!f)return}else f=a.create("span",{tabindex:g?"-1":"0",role:"button"}),this.hasImage()?(j=l(this,f,d),this._addAccessibleLabel(f)):(d=window.document.createTextNode(this.name),a.place(d,f,"last"),a.addClass(f,"commandMissingImageButton commandButton")),this._hookCallback(f,e),h(f,f,j?"commandImageOver":"commandButtonOver");e.domNode=f;e.domParent=c;this.tooltip&&
new s({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:c,commandService:e.commandService});c.nodeName.toLowerCase()==="ul"?c=a.create("li",{},c):a.addClass(f,"commandMargins");a.place(f,c,"last");i.generateNavGrid(g,e.domNode)},_addButton:function(c,d,e,g){e.handler=e.handler||this;var f;if(this.hrefCallback){if(f=this._makeLink(e),!f)return}else{f=a.create("span",{tabindex:"0",role:"button"});this._hookCallback(f,e);var j;this.name?(a.place(window.document.createTextNode(this.name),
f,"last"),a.addClass(f,"commandButton"),j="commandButtonOver"):(l(this,f,d),j="commandImageOver",this._addAccessibleLabel(f));h(f,f,j)}f.id=d;this.tooltip&&new s({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:c,commandService:e.commandService});e.domParent=c;e.domNode=f;c.nodeName.toLowerCase()==="ul"?c=a.create("li",{},c):a.addClass(f,"commandMargins");a.place(f,c,"last");i.generateNavGrid(g,e.domNode)},_addMenuItem:function(c,d,e){var g=d.commandService.showMenuIcons;
d.domParent=c.domNode;var f=new r({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:g?this.imageClass:null,hasLink:!!this.hrefCallback});this.tooltip&&new s({connectId:[f.domNode],label:this.tooltip,commandParent:c,commandService:d.commandService});if(this.hrefCallback){var h=this.hrefCallback.call(d.handler,d);if(h)if(h.then)h.then(a.hitch(this,function(a){f.setLink(a,this.name)}));else if(h)f.setLink(h,this.name);else return}else if(this.callback)f.onClick=a.hitch(this,function(){d.commandService._invoke(d)});
f.eclipseCommand=this;c.addChild(f);if(g)if(this.imageClass)a.addClass(f.iconNode,this.spriteClass);else if(this.image)a.addClass(f.iconNode,"commandMenuItem"),f.iconNode.src=this.image;d.domNode=f.domNode;i.generateNavGrid(e,d.domNode)},_makeLink:function(c){var d=a.create("a",{tabindex:"0"});a.addClass(d,"commandLink");a.place(window.document.createTextNode(this.name),d,"last");c=this.hrefCallback.call(c.handler,c);if(c.then)c.then(function(a){d.href=a});else if(c)d.href=c;else return null;return d},
_hookCallback:function(c,d){a.connect(c,"onclick",this,function(){d.commandService._invoke(d)});a.connect(c,"onkeypress",this,function(c){(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)&&d.commandService._invoke(d)})},_addAccessibleLabel:function(c){var d=this.name||this.tooltip;d&&a.attr(c,"aria-label",d)},populateChoicesMenu:function(c,e,g,f){c.focusedChild=null;a.forEach(c.getChildren(),function(a){c.removeChild(a);a.destroy()});for(var g=this.getChoices(e,g,f),f=this.showMenuIcons,h=0;h<
g.length;h++){var i=g[h],j;if(i.name){if(j=new d.MenuItem({label:i.name,iconClass:f?i.imageClass:null,onClick:this.makeChoiceCallback(i,e)}),f)if(i.imageClass)a.addClass(j.iconNode,i.spriteClass||"commandSprite");else if(i.image)a.addClass(j.iconNode,"commandImage"),j.iconNode.src=i.image}else j=new d.MenuSeparator;c.addChild(j)}},getChoices:function(a,c,d){return this.choiceCallback?this.choiceCallback.call(c,a,d):null},makeChoiceCallback:function(a,c){return function(d){a.callback&&a.callback.call(a,
c,d)}},hasImage:function(){return this.imageClass||this.image!==f.toUrl("images/none.png")}};m.prototype.constructor=m;var u=window.navigator.platform.indexOf("Mac")!==-1;o.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(u?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(u&&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;n.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};n.prototype.constructor=n;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 c=0;c<a.length;c++)this.parameterTable[a[c].name]=a[c]}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this._clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,
c){var d=this.parameterTable[a];if(d)d.value=c},forEach:function(a){for(var c in this.parameterTable)this.parameterTable[c].type&&this.parameterTable[c].name&&a(this.parameterTable[c])},makeCopy:function(){var a=[];this.forEach(function(c){c=new p(c.name,c.type,c.label,c.value,c.lines);a.push(c)});return new q(a,this._options,this.getParameters)},hasOptionalParameters:function(){return this._hasOptionalParameters}};q.prototype.constructor=q;return{CommandService:j,CommandKeyBinding:o,Command:m,CommandInvocation:k,
CommandMenuItem:r,URLBinding:n,ParametersDescription:q,CommandParameter:p,CommandTooltip:s}});
define("orion/parameterCollectors","i18n!orion/nls/messages,require,dojo,dijit,orion/commands,orion/util,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton".split(","),function(c,f,a,d,g,e){function i(){this._activeContainer=null}i.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&a.empty(this._activeElements.parameterArea);this._activeElements.parameterContainer&&(a.removeClass(this._activeElements.parameterContainer,"slideActive"),a.removeClass(this._activeElements.slideContainer,
"slideContainerActive"));this._activeElements.dismissArea&&a.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&a.removeClass(this._activeElements.commandNode,"activeCommand");e.forceLayout(this._activeElements.parameterContainer);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},_findParameterElements:function(c){var d={},e=null;typeof c==="string"&&(c=a.byId(c));
for(var g=c;g;){if(a.hasClass(g,"toolComposite")){e=g;break}g=g.parentNode}if(a.hasClass(c,"commandMarker"))d.commandNode=c;if(e)d.slideContainer=a.query(".slideParameters",e)[0],d.parameterContainer=a.query(".slide",e)[0],d.parameterArea=a.query(".parameters",e)[0],d.dismissArea=a.query(".parametersDismiss",e)[0];return d},open:function(d,g,f){typeof d==="string"&&(d=a.byId(d));this.close();this._activeElements=null;if((this._activeElements=this._findParameterElements(d))&&this._activeElements.parameterArea&&
this._activeElements.slideContainer&&this._activeElements.parameterContainer){this._activeElements.onClose=f;var i=g(this._activeElements.parameterArea,this._activeElements.dismissArea),d=a.query("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(d.length===0)d=a.create("span",{id:"closebox",role:"button",tabindex:"0"},this._activeElements.dismissArea||this._activeElements.parameterArea,"last"),a.addClass(d,"imageSprite"),a.addClass(d,"core-sprite-close"),a.addClass(d,
"dismiss"),d.title=c.Close,a.connect(d,"onclick",a.hitch(this,function(){this.close()})),a.connect(d,"onkeypress",a.hitch(this,function(c){(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)&&this.close()}));a.addClass(this._activeElements.slideContainer,"slideContainerActive");a.addClass(this._activeElements.parameterContainer,"slideActive");e.forceLayout(this._activeElements.parameterContainer);if(i)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){i.focus();i.select()},
0);this._activeElements.commandNode&&a.addClass(this._activeElements.commandNode,"activeCommand");return!0}return!1},_collectAndCall:function(c,d){a.query("input",d).forEach(function(a){a.type==="checkbox"?c.parameters.setValue(a.parameterName,a.checked):a.type!=="button"&&c.parameters.setValue(a.parameterName,a.value.trim())});a.query("textArea",d).forEach(function(a){c.parameters.setValue(a.parameterName,a.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?
(c.domNode&&a.addClass(c.domNode,"commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(d,e){return a.hitch(this,function(g,f){var i=null,o=a.hitch(this,function(){e&&e();this.close()}),n=a.hitch(this,function(c){c.keyCode===a.keys.ENTER&&this._collectAndCall(d,g);if(c.keyCode===a.keys.ESCAPE||c.keyCode===a.keys.ENTER)o(),a.stopEvent(c)});d.parameters.forEach(function(c){c.label&&a.create("label",{innerHTML:c.label,"class":"parameterInput","for":c.name+
"parameterCollector"},g,"last");var d={type:c.type,id:c.name+"parameterCollector"},e;if(c.type==="text"&&typeof c.lines==="number"&&c.lines>1)d.rows=c.lines,d.type="textarea",e=a.create("textarea",d,g,"last"),n=a.hitch(this,function(c){c.keyCode===a.keys.ESCAPE&&(o(),a.stopEvent(c))});else if(c.type==="boolean"){if(d.type="checkbox",c.value)d.checked=!0}else if(c.value)d.value=c.value;e||(e=a.create("input",d,g,"last"));a.addClass(e,"parameterInput parameterInput"+d.type);e.setAttribute("speech",
"speech");e.setAttribute("x-webkit-speech","x-webkit-speech");e.parameterName=c.name;i||(i=e);a.connect(e,"onkeypress",n)});var p=f||g,q=function(a){a._collectAndCall(d,g);o()};if(d.parameters.hasOptionalParameters()){d.parameters.optionsRequested=!1;var r=a.create("span",{role:"button",tabindex:"0"},p,"last");a.place(window.document.createTextNode("More"),r,"last");a.addClass(r,"dismiss");a.connect(r,"onclick",a.hitch(this,function(){d.parameters.optionsRequested=!0;q(this)}));a.connect(r,"onkeypress",
a.hitch(this,function(c){if(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)d.parameters.optionsRequested=!0,q(this)}))}r=a.create("span",{role:"button",tabindex:"0"},p,"last");a.place(window.document.createTextNode("Submit"),r,"last");a.addClass(r,"dismiss");a.connect(r,"onclick",a.hitch(this,function(){q(this)}));a.connect(r,"onkeypress",a.hitch(this,function(c){(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)&&q(this)}));p=a.create("span",{id:"closebox",role:"button",tabindex:"0"},p,"last");
a.addClass(p,"imageSprite");a.addClass(p,"core-sprite-close");a.addClass(p,"dismiss");p.title=c.Close;a.connect(p,"onclick",a.hitch(this,function(){o()}));a.connect(p,"onkeypress",a.hitch(this,function(c){(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)&&o()}));return i})}};i.prototype.constructor=i;return{CommandParameterCollector:i}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,dojo,dijit,orion/commands,orion/util,dijit/Menu".split(","),function(c,f,a,d,g){a.declare("orion.widgets.UserMenu",[d.Menu],{widgetsInTemplate:!1,id:"userMenu",templateString:'<table role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0"><tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody></table>',label:c.test,postCreate:function(){this.inherited(arguments);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 c=0,d;for(d in a)a.hasOwnProperty(d)&&
c++;return c},_renderAuthenticatedService:function(d,f,h){var k=this;(f=this.authenticatedServices[d].authService)&&f.logout&&this.addChild(new g.CommandMenuItem({label:h?c["Sign Out "]+h:c["Sign Out"],onClick:a.hitch(this,function(c,d){return function(){c.logout().then(a.hitch(k,function(){this.addUserItem(d,c,this.authenticatedServices[d].label);localStorage.removeItem(d);for(var a=0,e=localStorage.length;a<e;a++){var g=localStorage.key(a);g&&g.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(g)}c.getAuthForm(window.location.href).then(function(a){window.location=
a})}))}})(f,d)}))},_renderUnauthenticatedService:function(d,f,h){var k=this,j=this.unauthenticatedServices[d].authService;if(j)j.getAuthForm?a.hitch(k,function(a){j.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(d){d+=d.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+a:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+a;k.addChild(new g.CommandMenuItem({label:h?"<a target='_blank' href="+d+">"+c["Sign In To "]+
h+"</a>":"<a target='_blank' href="+d+">"+c["Sign In"]+"</a>",hasLink:!0}),f)})})(d):j.login&&this.addChild(new g.CommandMenuItem({label:h?"Sign In To "+h:"Sign In",onClick:a.hitch(k,function(a){return function(){a.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(j)}),f);else{var l=this.unauthenticatedServices[d].SignInLocation;l+=l.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+d:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+d;this.addChild(new g.Command.MenuItem({label:h?"<a target='_blank' href="+l+">"+c["Sign In To "]+h+"</a>":"<a target='_blank' href="+l+">"+c["Sign In"]+"</a>",hasLink:!0}),f)}},renderServices:function(){for(var a=this.getChildren(),i=0;i<a.length;i++)this.removeChild(a[i]);this.addChild(new g.CommandMenuItem({label:"<a href="+f.toUrl("help/index.jsp")+">"+c.Help+"</a>",hasLink:!0}));this.keyAssistFunction&&this.addChild(new g.CommandMenuItem({label:c["Keyboard Shortcuts"],onClick:this.keyAssistFunction}));
this.addChild(new d.MenuSeparator);this.addChild(new g.CommandMenuItem({label:"<a href="+f.toUrl("settings/settings.html")+">"+c.Settings+"</a>",hasLink:!0}));if(this.isSingleService())for(i in this.authenticatedServices)this._renderAuthenticatedService(i,0)},getUserLabel:function(a){if(a.data){var c=a.data.Name&&a.data.Name.replace(/^\s+|\s+$/g,"")!==""?a.data.Name:a.data.login;c.length>40&&(c=c.substring(0,30)+"...");c+=" ("+a.label+")";return c}else return a.label},setUserName:function(){},setKeyAssist:function(a){this.keyAssistFunction=
a;this.renderServices()},addUserItem:function(e,i,h,k){var j=this;k?(this.unauthenticatedServices[e]&&delete this.unauthenticatedServices[e],this.authenticatedServices[e]={authService:i,label:h,data:k}):(this.authenticatedServices[e]&&delete this.authenticatedServices[e],this.unauthenticatedServices[e]=this.unauthenticatedServices[e]?{authService:i,label:h,pending:this.unauthenticatedServices[e].pending}:{authService:i,label:h});a.hitch(this,this.renderServices)();if(a.byId("userInfo"))if(this.isSingleService()&&
k)h=e=k.Name&&k.Name.replace(/^\s+|\s+$/g,"")!==""?k.Name:k.login,h.length>40&&(h=h.substring(0,30)+"..."),k=a.create("a",{innerHTML:h,href:f.toUrl("profile/user-profile.html")+"#"+k.Location,"aria-label":c["View profile of "]+e,style:"margin-right: 0px"},a.byId("userInfo"),"only"),new g.CommandTooltip({connectId:[k],label:c["View profile of "]+e,position:["above","left","right","below"]});else if(this.isSingleService()&&!k)if(i.getAuthForm)a.hitch(this,function(d){i.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(e){e+=
e.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+d:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+d;a.create("a",{innerHTML:c["Sign In"],href:e,style:"margin-right: 0px",target:"_blank"},a.byId("userInfo"),"only")})})(e);else{if(i.login){var l=a.create("a",{innerHTML:c["Sign In"],style:"margin-right: 0px"},a.byId("userInfo"),"only");a.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});a.connect(l,"onmouseout",l,function(){l.style.cursor=
"default"});a.connect(l,"onclick",function(){i.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else this.hasServices()?(l=a.create("a",{innerHTML:c.Profiles,style:"margin-right: 0px"},a.byId("userInfo"),"only"),a.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"}),a.connect(l,"onmouseout",l,function(){l.style.cursor="default"}),a.connect(l,"onclick",function(){try{d.popup.open({popup:j.options.loginDialog,around:a.byId("userInfo")})}catch(c){}d.focus(j.options.loginDialog.domNode)})):
a.empty(a.byId("userInfo"))}})});define("orion/widgets/UserMenuDropDown","require,dojo,dijit,orion/commands,orion/util,dijit/form/DropDownButton".split(","),function(c,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/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(c,f,a,d,g){var e=e||{};e.TextSearcher=function(){function e(a,c,d,g){this._editor=a;this._commandService=c;this._undoStack=d;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(g)}e.prototype={_createActionTable:function(){var e=this;this._commandService.openParameterCollector("pageNavigationActions",function(f){var i=document.createElement("input");i.type="text";i.name=c["Find:"];i.id="localSearchFindWith";i.placeholder=
c["Find With"];i.onkeyup=function(a){return e._handleKeyUp(a)};i.onkeydown=function(a){return e._handleKeyDown(a,!0)};f.appendChild(i);e.createButton("Next",f,function(){e.findNext(!0)});e.createButton("Previous",f,function(){e.findNext(!1)});i=document.createElement("input");i.type="text";i.name=c["ReplaceWith:"];i.id="localSearchReplaceWith";i.placeholder=c["Replace With"];d.addClass(i,"searchCmdGroupMargin");i.onkeydown=function(a){return e._handleKeyDown(a,!1)};f.appendChild(i);e.createButton(c.Replace,
f,function(){e.replace()});e.createButton(c["Replace All"],f,function(){e.replaceAll()});(i=g.byId("searchOptMenu"))&&i.destroy();i=new g.Menu({style:"display: none;",id:"searchOptMenu"});i.addChild(new g.CheckedMenuItem({label:c["Show all"],checked:e._showAllOccurrence,onChange:function(c){e.setOptions({showAllOccurrence:c});c?e.markAllOccurrences(!0):(c=e._editor.getAnnotationModel())&&c.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)}}));i.addChild(new g.CheckedMenuItem({label:c["Case sensitive"],
checked:!e._ignoreCase,onChange:function(a){e.setOptions({ignoreCase:!a})}}));i.addChild(new g.CheckedMenuItem({label:c["Wrap search"],checked:e._wrapSearch,onChange:function(a){e.setOptions({wrapSearch:a})}}));i.addChild(new g.CheckedMenuItem({label:c["Incremental search"],checked:e._incremental,onChange:function(a){e.setOptions({incremental:a})}}));i.addChild(new g.CheckedMenuItem({label:c["Whole Word"],checked:e._wholeWord,onChange:function(a){e.setOptions({wholeWord:a})}}));i.addChild(new g.CheckedMenuItem({label:c["Regular expression"],
checked:e._useRegExp,onChange:function(a){e.setOptions({useRegExp:a})}}));i.addChild(new g.CheckedMenuItem({label:c["Find after replace"],checked:e._findAfterReplace,onChange:function(a){e.setOptions({findAfterReplace:a})}}));i=new g.form.DropDownButton({label:c.Options,dropDown:i});d.addClass(i.domNode,"findSlideoutMenu");d.place(i.domNode,f,"last")},function(){e.closeUI()})},visible:function(){return document.getElementById("localSearchFindWith")?!0:!1},_handleKeyUp:function(){this._incremental&&
!this._keyUpHandled&&this.findNext(!0,null,!0);this._keyUpHandled=!1;return!0},_handleKeyDown:function(a,c){var d=this.isMac?a.metaKey:a.ctrlKey;if(d&&a.keyCode===70)return this._keyUpHandled=c,a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,!1;if(d&&a.keyCode===75||a.keyCode===13)return a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,this.findNext(!a.shiftKey),this._keyUpHandled=c,!1;if(d&&a.keyCode===82)return a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,c||this.replace(),
this._keyUpHandled=c,!1;return a.keyCode===27?(this.closeUI(),this._keyUpHandled=c,!1):!0},closeUI:function(){this.visible()&&this._commandService.closeParameterCollector();this._editor.getTextView().removeEventListener("Focus",this._listeners.onEditorFocus);this._editor.getTextView().focus();var c=this._editor.getAnnotationModel();c&&(c.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),c.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH))},removeCurrentAnnotation:function(){var c=
this._editor.getAnnotationModel();c&&c.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH)},createButton:function(a,c,e){var g=d.create("span",{tabindex:"0",role:"button"});d.connect(g,"onclick",this,e);d.connect(g,"onkeypress",this,function(a){a.keyCode===d.keys.ENTER||a.charCode===d.keys.SPACE?e():a.keyCode===d.keys.ESCAPE&&this.closeUI()});d.place(window.document.createTextNode(a),g,"last");d.addClass(g,"findSlideoutButton");d.place(g,c,"last")},buildToolBar:function(a,c){this._keyUpHandled=
!0;this._editor.getTextView().addEventListener("Focus",this._listeners.onEditorFocus);var d=document.getElementById("localSearchFindWith");if(this.visible()){if(a.length>0)d.value=a}else{this._createActionTable();if(typeof c==="string")document.getElementById("localSearchReplaceWith").value=c;d=document.getElementById("localSearchFindWith");d.value=a}window.setTimeout(function(){d.select();d.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,c){var d=this._editor.getCaretOffset();if(a){var e=this._editor.getSelection(),g=e.end>e.start?e.end-e.start:0;return!c?d-g-1>0?d-g-1:0:e.end>0?e.end:0}return d>0?d:0},findNext:function(a,c,d){this.setOptions({reverse:!a});var e=document.getElementById("localSearchFindWith"),d=this.getSearchStartIndex(d?
!0:!a);c||(c=e?e.value:this._lastSearchString);return this._doFind(c,d,!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,c=this._editor,d=c.getSelection(),e=document.getElementById("localSearchFindWith").value,g=d?d.start:0,d=d?d.end:0;if(e){var f=c.getModel().find({string:e,start:g,
reverse:!1,wrap:this._wrapSearch,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(f)g=f.start,d=f.end}c.setText(a,g,d);c.setSelection(g,g+a.length,!0);this.endUndo();this._findAfterReplace&&e&&this._doFind(e,this.getSearchStartIndex(!1),!1,this._wrapSearch)},_doFind:function(d,e,g,f){var i=this._editor,o=i.getAnnotationModel();if(!d)return o&&(o.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),o.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)),
null;this._lastSearchString=d;var n=i.getModel().find({string:d,start:e,reverse:g,wrap:f,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(!this._replacingAll&&(n?this._editor.reportStatus(""):this._editor.reportStatus(c["Not found"],"error"),this.visible()&&(d=a.AnnotationType.ANNOTATION_CURRENT_SEARCH,o&&(o.removeAnnotations(d),n&&o.addAnnotation(a.AnnotationType.createAnnotation(d,n.start,n.end))),this._showAllOccurrence))){this._timer&&window.clearTimeout(this._timer);
var p=this;this._timer=window.setTimeout(function(){p.markAllOccurrences(n);p._timer=null},500)}n&&i.moveSelection(n.start,n.end,null,!1);return n},replaceAll:function(){var a=document.getElementById("localSearchFindWith").value;if(a){this._replacingAll=!0;var e=this._editor;e.reportStatus("");e.reportStatus(c["Replacing all..."],"progress");var g=document.getElementById("localSearchReplaceWith").value;window.setTimeout(d.hitch(this,function(){for(var d=0,f=0;;){if(!this._doFind(a,d))break;f++;f===
1&&this.startUndo();d=e.getSelection();e.setText(g,d.start,d.end);e.setSelection(d.start,d.start+g.length,!0);d=this.getSearchStartIndex(!0,!0)}f>0&&this.endUndo();e.reportStatus("","progress");d>0?e.reportStatus(c["Replaced "]+f+c[" matches"]):e.reportStatus(c["Nothing replaced"],"error");this._replacingAll=!1}),100)}},markAllOccurrences:function(c){var d=this._editor.getAnnotationModel();if(d){for(var e=a.AnnotationType.ANNOTATION_MATCHING_SEARCH,g=d.getAnnotations(0,d.getTextModel().getCharCount()),
f=[],i;g.hasNext();){var n=g.next();n.type===e&&f.push(n)}g=document.getElementById("localSearchFindWith").value;if(c&&g){g=this._editor.getModel().find({string:g,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase});for(i=[];g.hasNext();)c=g.next(),i.push(a.AnnotationType.createAnnotation(e,c.start,c.end))}d.replaceAnnotations(f,i)}}};return e}();return e});
define("orion/explorer","i18n!orion/nls/messages,require,dojo,orion/treetable,orion/explorerNavHandler,orion/commands".split(","),function(c,f,a,d,g,e){var i={};i.Explorer=function(){function c(a,d,e){this.registry=a;this.renderer=e;this.selection=d;this.myTree=null}c.prototype={changedItem:function(c,d){a.hitch(this.myTree,this.myTree.refresh)(c,d,!0)},updateCommands:function(c){this.myTree&&a.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(c))},makeNewItemPlaceHolder:function(c,
d,e){c=this.getRow(c);if(e&&(c=c.childNodes[e],a.place("<br><span id='"+d+"placeHolderRow'></span>",c,"last"),e=a.byId(d+"placeHolderRow")))return{tempNode:e,refNode:e};return c&&(a.place("<tr id='"+d+"placeHolderRow'><td id='"+d+"placeHolderCol'></td>",c,"after"),e=a.byId(d+"placeHolderRow"),c=a.byId(d+"placeHolderCol"),e&&c)?{tempNode:e,refNode:c}:null},getRow:function(c){if(c=this.model.getId(c))return a.byId(c)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),c=0;c<a.length;c++)this.myTree.collapse(a[c])},
expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),c=0;c<a.length;c++)this._expandRecursively(a[c])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var c=this;this.myTree.expand(a,function(){c.model.getChildren(a,function(a){if(!(a===void 0||a===null))for(var d=a.length,e=0;e<d;e++)c._expandRecursively(a[e])})})}},createTree:function(c,e,f){this.selection&&this.selection.setSelections([]);
this.getNavHandler()&&this.getNavHandler()._clearSelection();var h=c+"innerTree",i=a.byId(h);i&&a.destroy(i);if(e)e.rootId=h;this.model=e;this._parentId=c;this._treeOptions=f;if(!f||f&&!f.noSelection)this.selectionPolicy=f?f.selectionPolicy:"",this._navDict=new g.ExplorerNavDict(this.model);this.myTree=new d.TableTree({id:h,model:e,showRoot:!1,parent:c,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,indent:f?f.indent:void 0,onCollapse:f?f.onCollapse:void 0,tableStyle:"mainPadding"});
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(),c=[];if(a&&this.getNavDict())for(var d=a.getSelection(),e=0;e<d.length;e++){var g=a.getRowDiv(d[e]);g&&g.parentNode&&(g=this.getNavDict().getValue(this.model.getId(d[e])),g.model&&c.push(g.model))}this.selection.setSelections(c)}},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 g.ExplorerNavHandler(this,this._navDict,{setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var c=this;this.model.getRoot(function(d){d instanceof Array?c.getNavHandler().refreshModel(c.getNavDict(),c.model,d):d.children&&d.children instanceof Array&&c.getNavHandler().refreshModel(c.getNavDict(),c.model,d.children);
a&&a.setFocus&&c.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return c}();i.createExplorerCommands=function(a,d){function g(a){return typeof a.getItemCount==="function"?a.getItemCount()>0?d?d(a):!0:!1:!1}var f=new e.Command({tooltip:c["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return g(a)},callback:function(a){a.items.expandAll()}}),i=new e.Command({tooltip:c["Collapse all"],imageClass:"core-sprite-collapseAll",
id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return g(a)},callback:function(a){a.items.collapseAll()}});a.addCommand(f);a.addCommand(i)};i.ExplorerModel=function(){function c(a,d){this.rootPath=a;this.fetchItems=d}c.prototype={destroy:function(){},getRoot:function(c){this.fetchItems(this.rootPath).then(a.hitch(this,function(a){this.root=a;c(a)}))},getChildren:function(c,d){c.Children?d(c.Children):c.ChildrenLocation?this.fetchItems(c.ChildrenLocation).then(a.hitch(this,
function(a){c.Children=a;d(a)})):d([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),c="",d=0;d<a.length;d++)c+=a[d].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(d):a[d];return c}};return c}();i.ExplorerFlatModel=function(){function c(a,d,e){this.rootPath=a;this.fetchItems=d;this.root=e}c.prototype=new i.ExplorerModel;c.prototype.getRoot=function(c){this.root?c(this.root):this.fetchItems(this.rootPath).then(a.hitch(this,function(a){this.root=
a;c(a)}))};c.prototype.getChildren=function(a,c){a===this.root?c(this.root):c([])};return c}();i.ExplorerRenderer=function(){function c(a,d){this.explorer=d;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite"}c.prototype={getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(c,d){this.tableTree=d;a.empty(c);a.addClass(c,"treetable");this.renderTableHeader(c)},
getActionsColumn:function(c,d,e,g,f){var e=e||"tool",h=this.explorer.registry.getService("orion.page.command"),i=document.createElement("td");i.id=d.id+"actionswrapper";g&&a.addClass(i,g);this.actionScopeId?h.renderCommands(this.actionScopeId,i,c,this.explorer,e,null,f&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(c,!0):null):window.console.log("Warning, no action scope was specified.  No commands rendered.");return i},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},
getCheckboxColumn:function(c,d){if(this._useCheckboxSelection){var e=document.createElement("td"),g=document.createElement("span");g.id=this.getCheckBoxId(d.id);a.addClass(g,"core-sprite-check selectionCheckmarkSprite");g.itemId=d.id;if(this.getCheckedFunc)g.checked=this.getCheckedFunc(c),this._highlightSelection&&a.toggleClass(d,"checkedRow",g.checked),a.toggleClass(g,"core-sprite-check_on",g.checked);e.appendChild(g);a.connect(g,"onclick",a.hitch(this,function(a){this.onCheck(d,a.target,a.target.checked?
!1:!0,!0)}));return e}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(c,d,e,g,f){d.checked=e;a.toggleClass(d,"core-sprite-check_on",e);if(this.onCheckedFunc)this.onCheckedFunc(d.itemId,e,g);this.explorer.getNavHandler()&&f&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(c.id).model,!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),c=this._getUIStatePreferencePath();c&&window.sessionStorage&&
(window.sessionStorage[c+"selection"]=JSON.stringify(a))}},_restoreSelections:function(c){c=window.sessionStorage[c+"selection"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var d;if(c&&this.explorer.getNavDict()){var e=[];for(d=0;d<c.length;d++){var g=this.explorer.getNavDict().getValue(c[d]);if(g&&g.rowDomNode&&g.model&&(e.push(g.model),this._highlightSelection&&a.addClass(g.rowDomNode,"checkedRow"),g=a.byId(this.getCheckBoxId(g.rowDomNode.id))))g.checked=!0,a.addClass(g,"core-sprite-check_on")}this.explorer.selection&&
(this.explorer.selection.setSelections(e),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(c){var d=!1,e=window.sessionStorage[c+"expanded"];typeof e==="string"&&(e=e.length>0?JSON.parse(e):null);var g;if(e)for(g=0;g<e.length;g++)a.byId(e[g])&&(this._expanded.push(e[g]),this.tableTree.expand(e[g],a.hitch(this,function(){this._restoreSelections(c)})),
d=!0);return!d},_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(c,d){var e=a.byId(this.expandCollapseImageId(c.id));e&&(a.addClass(e,d?this._expandImageClass:this._collapseImageClass),a.removeClass(e,d?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(c,
d,e,g){var f=a.create("span",{id:this.expandCollapseImageId(c.id)},d,"last");a.addClass(f,this._twistieSpriteClass);a.addClass(f,this._collapseImageClass);e&&(d=a.create("span",null,d,"last"),a.addClass(d,g||"imageSprite"),a.addClass(d,e));f.onclick=a.hitch(this,function(){this.tableTree.toggle(c.id);if(this.tableTree.isExpanded(c.id))this._expanded.push(c.id);else for(var a in this._expanded)if(this._expanded[a]===c.id){this._expanded.splice(a,1);break}(a=this._getUIStatePreferencePath())&&window.sessionStorage&&
this._storeExpansions(a)});return f},render:function(c,d){a.addClass(d,"navRow");this.renderRow(c,d)},rowsChanged:function(){this._decorateAlternatingLines&&a.query(".treeTableRow").forEach(function(c,d){d%2?(a.addClass(c,"darkTreeTableRow"),a.removeClass(c,"lightTreeTableRow")):(a.addClass(c,"lightTreeTableRow"),a.removeClass(c,"darkTreeTableRow"))});this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){var c=this.explorer.registry;
a.query(".treeTableRow").forEach(function(d){var e=a.byId(d.id+"actionswrapper");a.empty(e);this.actionScopeId&&c.getService("orion.page.command").renderCommands(this.actionScopeId,e,d._item,this.explorer,"tool")})},_init:function(a){if(a){this._useCheckboxSelection=a.checkbox===void 0?!1:a.checkbox;this._colums=a.colums||[];this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;if(a.highlightSelection===!1)this._highlightSelection=
!1;this._decorateAlternatingLines=!0;if(a.decorateAlternatingLines===!1)this._decorateAlternatingLines=!1;if(!this.actionScopeId)this.actionScopeId=a.actionScopeId}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return c}();i.SelectionRenderer=function(){function c(a,d){this._init(a);this.explorer=d}c.prototype=new i.ExplorerRenderer;c.prototype.renderTableHeader=function(c){var d=
document.createElement("thead"),e=document.createElement("tr");a.addClass(d,"navTableHeading");this._useCheckboxSelection&&e.appendChild(this.initCheckboxColumn(c));for(var g=0,f=this.getCellHeaderElement(g);f;)f.innerHTML.length>0&&a.addClass(f,"navColumn"),e.appendChild(f),f=this.getCellHeaderElement(++g);d.appendChild(e);c.appendChild(d)};c.prototype.renderRow=function(c,d){a.style(d,"verticalAlign","baseline");a.addClass(d,"treeTableRow");var e=this.explorer.getNavDict();e&&(e.addRow(c,d),a.connect(d,
"onclick",a.hitch(this,function(a){if(this.explorer.getNavHandler())this.explorer.getNavHandler().onClick(c,a)})));if(e=this.getCheckboxColumn(c,d))a.addClass(e,"checkColumn"),d.appendChild(e);for(var e=0,g=this.getCellElement(e,c,d);g;)d.appendChild(g),e===0?this.getPrimColumnStyle?a.addClass(g,this.getPrimColumnStyle()):a.addClass(g,"navColumn"):this.getSecondaryColumnStyle?a.addClass(g,this.getSecondaryColumnStyle()):a.addClass(g,"secondaryColumn"),g=this.getCellElement(++e,c,d)};c.prototype.getCellHeaderElement=
function(){};c.prototype.getCellElement=function(){};return c}();i.SimpleFlatModel=function(){function a(c,d,e){this.items=c;this.getKey=e;this.idPrefix=d;this.root={children:c}}a.prototype=new i.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,""),c="",d=0;d<a.length;d++)c+=a[d].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(d):a[d];return this.idPrefix+c};a.prototype.getChildren=function(a,
c){a===this.root?c(this.items):c([])};return a}();return i});
define("orion/widgets/LoginDialog","i18n!orion/widgets/nls/messages,require,dojo,dijit,orion/util,dijit/TooltipDialog,text!orion/widgets/templates/LoginDialog.html".split(","),function(c,f,a,d){a.declare("orion.widgets.LoginDialog",[d.TooltipDialog],{widgetsInTemplate:!0,templateString:a.cache("orion","widgets/templates/LoginDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},postCreate:function(){this.inherited(arguments);
var c=this;a.addClass(this.closeLink,"imageSprite");a.addClass(this.closeLink,"core-sprite-close");a.connect(this.closeLink,"onmouseover",this.closeLink,function(){c.closeLink.style.cursor="pointer"});a.connect(this.closeLink,"onmouseout",this.closeLink,function(){c.closeLink.style.cursor="default"});a.connect(this.closeLink,"onclick",function(){a.hitch(c,c.closeDialog)()})},setPendingAuthentication:function(a){for(var c in this.unauthenticatedServices)delete this.unauthenticatedServices[c].pending;
for(c in a)this.unauthenticatedServices[a[c].SignInKey]?this.unauthenticatedServices[a[c].SignInKey].pending=!0:this.authenticatedServices[a[c].SignInKey]?(this.unauthenticatedServices[a[c].SignInKey]=this.authenticatedServices[a[c].SignInKey],this.unauthenticatedServices[a[c].SignInKey].pending=!0,delete this.authenticatedServices[a[c].SignInKey]):this.unauthenticatedServices[a[c].SignInKey]={label:a[c].label,SignInLocation:a[c].SignInLocation,pending:!0};this.renderUnauthenticatedServices();this.renderAuthenticatedServices()},
authenticatedService:function(a){this.unauthenticatedServices[a]&&!this.unauthenticatedServices[a].authService&&(this.authenticatedServices[a]=this.unauthenticatedServices[a],delete this.unauthenticatedServices[a])},addUserItem:function(c,d,f,h){h?(this.unauthenticatedServices[c]&&delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:d,label:f,data:h}):(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?
{authService:d,label:f,pending:this.unauthenticatedServices[c].pending}:{authService:d,label:f});a.hitch(this,this.renderAuthenticatedServices)();a.hitch(this,this.renderUnauthenticatedServices)()},renderAuthenticatedServices:function(){a.empty(this.authenticatedList);this.authenticated.style.display=this.isEmpty(this.authenticatedServices)?"none":"";var d=this,e=!0,i;for(i in this.authenticatedServices){if(!e){var h=a.create("tr",null,this.authenticatedList);a.create("td",{style:"padding: 0; margin 0;",
colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},h)}var e=!1,h=a.create("tr",{className:"navTableHeading"}),k=this.authenticatedServices[i].authService,j=a.create("td",null,h,"only"),l=a.create("h2",null,j,"only");if(k)k.getAuthForm?a.hitch(d,function(a,c){k.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(e){if(d.authenticatedServices[c].label)a.innerHTML=d.authenticatedServices[c].label+
"<br>";a.innerHTML+=d.getHostname(e)})})(l,i):l.innerHTML=this.authenticatedServices[i].label?this.authenticatedServices[i].label:i;else{var m=this.authenticatedServices[i].SignInLocation;if(this.authenticatedServices[i].label)l.innerHTML=this.authenticatedServices[i].label+"<br>";l.innerHTML+=this.getHostname(m)}a.addClass(j,"LoginWindowLeft");j=a.create("td",{style:"text-align: right"},h,"last");a.addClass(j,"LoginWindowRight");l=this.authenticatedServices[i].data;k=this.authenticatedServices[i].authService;
if(!k){a.place(h,this.authenticatedList,"last");break}l.Location&&a.create("a",{href:f.toUrl("profile/user-profile.html")+"#"+l.Location,innerHTML:c.Profile},j,"last");a.place(document.createTextNode(" "),j,"last");if(k.logout){var o=a.create("a",{innerHTML:c["Sign out"]},j,"last");a.connect(o,"onmouseover",o,function(){o.style.cursor="pointer"});a.connect(o,"onmouseout",o,function(){o.style.cursor="default"});a.connect(o,"onclick",a.hitch(d,function(c,e){return function(){c.logout().then(a.hitch(d,
function(){this.addUserItem(e,c,this.authenticatedServices[e].label);this.isSingleService()&&this.closeDialog();localStorage.removeItem(e)}))}})(k,i))}a.place(h,this.authenticatedList,"last");j=c["N/A"];l&&l.lastlogintimestamp&&(j=a.date.locale.format(new Date(l.lastlogintimestamp),{formatLength:"short"}));l=l.Name&&l.Name.replace(/^\s+|\s+$/g,"")!==""?l.Name:l.login;h=a.create("tr");j=l.length>40?a.create("td",{innerHTML:l.substring(0,30)+"... "+c["logged in since "]+j,colspan:2,title:l+" "+c["logged in since "]+
j},h,"only"):a.create("td",{innerHTML:l+" "+c["logged in since "]+j,colspan:2},h,"only");a.addClass(j,"LoginWindowLeft");a.addClass(j,"LoginWindowRight");a.addClass(j,"LoginWindowComment");a.place(h,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){this.emptyListInfo.style.display=this.unauthenticatedServices.length===0&&this.authenticatedServices.length===0?"":"none";a.empty(this.otherUnauthenticatedList);var g=this;this.otherUnauthenticated.style.display=this.isEmpty(this.unauthenticatedServices)?
"none":"";var e=!0,i;for(i in this.unauthenticatedServices){if(!e||!this.isEmpty(this.authenticatedServices)){var h=a.create("tr",null,this.otherUnauthenticatedList);a.create("td",{style:"padding: 0; margin 0;",colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},h)}var e=!1,h=a.create("tr",{className:"navTableHeading"}),k=a.create("td",null,h,"only");a.addClass(k,"LoginWindowLeft");var j=a.create("h2",null,k,"only"),k=
a.create("td",{style:"text-align: right"},h,"last");a.addClass(k,"LoginWindowRight");var l=this.unauthenticatedServices[i].authService,m=eclipse.globalCommandUtils.notifyAuthenticationSite,o=m+(m.indexOf("?")===-1?"?":"&")+"key="+i;if(l)if(l.getAuthForm)a.hitch(g,function(d,e){l.getAuthForm(o).then(function(f){a.create("a",{target:"_blank",href:f,innerHTML:c["Sign in"]},d,"last");if(g.unauthenticatedServices[e].label)j.innerHTML=g.unauthenticatedServices[e].label+"<br>";j.innerHTML+=g.getHostname(f)})})(k,
i);else{if(l.login){a.place(document.createTextNode(this.unauthenticatedServices[i].label?this.unauthenticatedServices[i].label:i),j,"only");var n=a.create("a",{innerHTML:c["Sign in"],style:"cursor: hand;"},k,"last");a.connect(n,"onmouseover",n,function(){n.style.cursor="pointer"});a.connect(n,"onmouseout",n,function(){n.style.cursor="default"});a.connect(n,"onclick",a.hitch(g,function(a){return function(){a.login(o).then(function(){g.isSingleService()&&d.popup.hide&&d.popup.hide(g);d.popup.close(g)})}})(l))}}else{m=
this.unauthenticatedServices[i].SignInLocation;m.indexOf("?")===-1?a.create("a",{target:"_blank",href:m+"?redirect="+encodeURIComponent(o),innerHTML:c["Sign in"]},k,"last"):a.create("a",{target:"_blank",href:m+"&redirect="+encodeURIComponent(o),innerHTML:c["Sign in"]},k,"last");if(this.unauthenticatedServices[i].label)j.innerHTML=this.unauthenticatedServices[i].label+"<br>";j.innerHTML+=this.getHostname(m)}a.place(h,this.otherUnauthenticatedList,"last");this.unauthenticatedServices[i].pending&&(h=
a.create("tr"),k=a.create("td",{innerHTML:c["Authentication required!"],style:"padding-left: 10px",colspan:2},h,"only"),a.addClass(k,"LoginWindowLeft"),a.addClass(k,"LoginWindowRight"),a.create("img",{src:f.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},k,"first"),a.place(h,this.otherUnauthenticatedList,"last"))}},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},isEmpty:function(a){for(var c in a)if(a.hasOwnProperty(c))return!1;
return!0},length:function(a){var c=0,d;for(d in a)a.hasOwnProperty(d)&&c++;return c},getHostname:function(a){var c=document.createElement("a");c.href=a;a=c.href;return a.match(/^(?:f|ht)tp(?:s)?:\/\/([^/]+)/im)[1].toString()},closeDialog:function(){d.popup.hide&&d.popup.hide(this);d.popup.close(this)}})});
define("orion/git/widgets/CommitTooltipDialog","i18n!git/nls/gitmessages,require,dojo,dijit,orion/util,dijit/TooltipDialog".split(","),function(c,f,a,d){a.declare("orion.git.widgets.CommitTooltipDialog",[d.TooltipDialog],{widgetsInTemplate:!1,closable:!0,constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postCreate:function(){this.inherited(arguments);this.displayCommit(this.options.commit)},displayCommit:function(d){var e=a.create("div",{style:"padding:10px; max-width:480px"},
this.containerNode),f=d.Message.split(/(\r?\n|$)/)[0];link=a.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+d.Location+"?page=1&pageSize=1"},e);a.place(document.createTextNode(f),link);a.create("div",{style:"padding-top:15px"},e);a.create("span",{"class":"gitSecondaryDescription",innerHTML:c[" commit: "]+d.Name},e);d.Parents&&d.Parents.length>0&&(a.create("div",null,e),a.place(document.createTextNode(c["parent: "]),e),link=a.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+
d.Parents[0].Location+"?page=1&pageSize=1"},e),a.place(document.createTextNode(d.Parents[0].Name),link));a.create("div",{style:"padding-top:15px"},e);if(d.AuthorImage){var f=a.create("div",{"class":"git-author-icon-small",style:"margin-bottom:30px"},e),h=new Image;h.src=d.AuthorImage;h.name=d.AuthorName;h.width=35;h.height=35;a.place(h,f,"first")}a.create("span",{"class":"gitSecondaryDescription",innerHTML:a.string.substitute(c[" authored by ${0} {${1}) on ${2}"],[d.AuthorName,d.AuthorEmail,a.date.locale.format(new Date(d.Time),
{formatLength:"short"})])},e);a.create("div",null,e);a.create("span",{"class":"gitSecondaryDescription",innerHTML:a.string.substitute(c["committed by 0 (1)"],[d.CommitterName,d.CommitterEmail])},e)},_onBlur:function(){this.inherited(arguments);d.popup.hide&&d.popup.hide(this);d.popup.close(this)}})});
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(c,f){c.declare("dijit._DialogBase",[f._Templated,f.form._FormMixin,f._DialogMixin,f._CssStateMixin],{templateString:c.cache("dijit","templates/Dialog.html"),baseClass:"dijitDialog",
cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:c.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=c.i18n.getLocalization("dijit","common");c.mixin(this,a);this.inherited(arguments)},postCreate:function(){c.style(this.domNode,
{display:"none",position:"absolute"});c.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=c.position(a.node)},_setup:function(){var a=
this.domNode;this.titleBar&&this.draggable?(this._moveable=c.isIE==6?new c.dnd.TimedMoveable(a,{handle:this.titleBar}):new c.dnd.Moveable(a,{handle:this.titleBar,timeout:0}),this._dndListener=c.subscribe("/dnd/move/stop",this,"_endDrag")):c.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":c.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 c.style(this.containerNode,{width:"auto",height:"auto"});var a=c._getMarginSize(this.domNode),d=c.window.getBox();if(a.w>=d.w||a.h>=d.h){var g=Math.min(a.w,Math.floor(d.w*0.75)),a=Math.min(a.h,Math.floor(d.h*0.75));this._singleChild&&this._singleChild.resize?(this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText,this._singleChild.resize({w:g,h:a})):c.style(this.containerNode,{width:g+"px",height:a+"px",overflow:"auto",
position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!c.hasClass(c.body(),"dojoMove")){var a=this.domNode,d=c.window.getBox(),g=this._relativePosition,e=g?null:c._getBorderBox(a);c.style(a,{left:Math.floor(d.l+(g?g.x:(d.w-e.w)/2))+"px",top:Math.floor(d.t+(g?g.y:(d.h-e.h)/2))+"px"})}},_onKey:function(a){if(a.charOrCode){var d=c.keys,g=a.target;a.charOrCode===d.TAB&&this._getFocusItems(this.domNode);var e=this._firstFocusItem==this._lastFocusItem;
if(g==this._firstFocusItem&&a.shiftKey&&a.charOrCode===d.TAB)e||f.focus(this._lastFocusItem),c.stopEvent(a);else if(g==this._lastFocusItem&&a.charOrCode===d.TAB&&!a.shiftKey)e||f.focus(this._firstFocusItem),c.stopEvent(a);else{for(;g;){if(g==this.domNode||c.hasClass(g,"dijitPopup"))if(a.charOrCode==d.ESCAPE)this.onCancel();else return;g=g.parentNode}if(a.charOrCode!==d.TAB)c.stopEvent(a);else if(!c.isOpera)try{this._firstFocusItem.focus()}catch(i){}}}},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(c.connect(window,"onscroll",this,"layout"));this._modalconnects.push(c.connect(window,"onresize",this,function(){var a=c.window.getBox();if(!this._oldViewport||a.h!=this._oldViewport.h||a.w!=this._oldViewport.w)this.layout(),this._oldViewport=a}));this._modalconnects.push(c.connect(this.domNode,"onkeypress",this,"_onKey"));c.style(this.domNode,
{opacity:0,display:""});this._set("open",!0);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new c.Deferred(c.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=c.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:c.hitch(this,function(){f._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:c.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 c.Deferred(c.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=c.fadeOut({node:this.domNode,duration:this.duration,onEnd:c.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;c.forEach(this._modalconnects,c.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&&
c.unsubscribe(this._dndListener);c.forEach(this._modalconnects,c.disconnect);f._DialogLevelManager.hide(this);this.inherited(arguments)}});c.declare("dijit.Dialog",[f.layout.ContentPane,f._DialogBase],{});f._DialogLevelManager={show:function(a,d){var g=f._dialogStack;g[g.length-1].focus=f.getFocus(a);var e=f._underlay;!e||e._destroyed?e=f._underlay=new f.DialogUnderlay(d):e.set(a.underlayAttrs);var i=g[g.length-1].dialog?g[g.length-1].zIndex+2:950;g.length==1&&e.show();c.style(f._underlay.domNode,
"zIndex",i-1);c.style(a.domNode,"zIndex",i);g.push({dialog:a,underlayAttrs:d,zIndex:i})},hide:function(a){var d=f._dialogStack;if(d[d.length-1].dialog==a){d.pop();var g=d[d.length-1];d.length==1?f._underlay._destroyed||f._underlay.hide():(c.style(f._underlay.domNode,"zIndex",g.zIndex-1),f._underlay.set(g.underlayAttrs));if(a.refocus){d=g.focus;if(!d||g.dialog&&!c.isDescendant(d.node,g.dialog.domNode))g.dialog._getFocusItems(g.dialog.domNode),d=g.dialog._firstFocusItem;try{f.focus(d)}catch(e){}}}else g=
c.indexOf(c.map(d,function(a){return a.dialog}),a),g!=-1&&d.splice(g,1)},isTop:function(a){var c=f._dialogStack;return c[c.length-1].dialog==a}};f._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return f.Dialog});
define("orion/widgets/NewItemDialog","i18n!orion/widgets/nls/messages,dojo,dijit,dijit/Dialog,dijit/form/CheckBox,dijit/form/CheckBox,dijit/form/Form,dijit/form/ValidationTextBox,dojo/data/ItemFileReadStore,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/NewItemDialog.html".split(","),function(c,f,a){f.declare("orion.widgets.NewItemDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","widgets/templates/NewItemDialog.html"),constructor:function(a){this.options=
a||{};this.options.advanced=this.options.advanced||!1},postMixInProperties:function(){this.inherited(arguments);this.itemNameLabelText=this.options.label||c["Name:"]},postCreate:function(){this.inherited(arguments);this.options.advanced?(this.itemAdvancedInfo.style.display="table-row",this.itemAdvancedInfo1.style.display="table-row",f.connect(this.itemURL,"onkeyup",null,f.hitch(this,this.onURLChange))):(this.itemAdvancedInfo.style.display="none",this.itemAdvancedInfo1.style.display="none")},execute:function(){var a,
c;this.newItemButton.focus();this.options.advanced&&(a=this.itemURL.value.replace(/^\s+|\s+$/g,""),c=this.createCheckbox.get("disabled")?!1:this.createCheckbox.get("checked"));this.options.func(this.itemName.value,a&&a!==""?a:void 0,c)},onURLChange:function(){var a=this.itemURL.value;a.match(/^file:\/\//)?this.createCheckbox.set("disabled",!1):a.match(/^[a-zA-Z][a-zA-Z]+:\/\/.+/)?this.createCheckbox.set("disabled",!0):this.createCheckbox.set("disabled",!1)}})});
define("orion/widgets/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,dojo,dijit,orion/util,dijit/Dialog,dijit/form/Button,orion/widgets/ExplorerTree,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/DirectoryPrompterDialog.html".split(","),function(c,f,a,d){f.declare("orion.widgets.DirectoryPrompterDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:!0,templateString:f.cache("orion","widgets/templates/DirectoryPrompterDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||c["Choose a Folder"];this.buttonOk=c.OK;this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("/");this.message||f.style(this.messageCell,{display:"none"})},loadFolderList:function(a){a=d.makeRelative(a);this.treeRoot.Location=a;this.options.fileClient.loadWorkspace(a).then(f.hitch(this,
function(a){for(var c in a)this.treeRoot[c]=a[c];d.processNavigatorParent(this.treeRoot,a.Children);this.createTree()}))},createTree:function(){var a=new orion.widgets.DirectoryTreeModel(this.options.serviceRegistry,this.treeRoot,this.options.fileClient);this.treeWidget=new orion.widgets.ExplorerTree({id:"treeWidget",style:"width:100%; height:100%",model:a,showRoot:!1,persist:!1,openOnClick:!1,getLabel:function(a){return a.Name},getIconClass:function(){return"folderItem"}});this.treeWidget.startup();
f.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},execute:function(){var a=this.treeWidget.getSelectedItems();this.onHide();this.options.func(a[0])}});orion.widgets.DirectoryTreeModel=function(){function a(c,d,g){this.registry=c;this.root=d;this.fileClient=g}a.prototype={destroy:function(){},getRoot:function(a){a(this.root)},mayHaveChildren:function(){return!0},getChildren:function(a,c){a.children?c(a.children):a.Directory!==void 0&&a.Directory===!1?c([]):a.Location?this.fileClient.fetchChildren(a.ChildrenLocation).then(f.hitch(this,
function(g){for(var f=[],j=0;j<g.length;j++)g[j].Directory&&f.push(g[j]);d.processNavigatorParent(a,f);c(f)})):c([])},getIdentity:function(a){return a.Name?a.Location:"ROOT"},getLabel:function(a){return a.Name},onChildrenChange:function(){}};return a}()});
define("orion/widgets/SFTPConnectionDialog","i18n!orion/widgets/nls/messages,dojo,dijit,dijit/Dialog,dijit/form/CheckBox,dijit/form/ComboBox,dojo/data/ItemFileReadStore,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/SFTPConnectionDialog.html".split(","),function(c,f,a){localStorage.getItem("orion.sftpConnections")||localStorage.setItem("orion.sftpConnections",JSON.stringify({identifier:"name",label:c.name,items:[]}));window.sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"));
f.declare("orion.widgets.SFTPConnectionDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","widgets/templates/SFTPConnectionDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="SFTP Transfer";this.sftpHostLabelText=c["Remote host:"];this.sftpPathLabelText=c["Remote path:"];this.sftpUserLabelText=c["User name:"];this.sftpPasswordLabelText=
c["Password:"];this.buttonOk=c["Start Transfer"];this.locationLabelText=c["Location:"];sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"))},postCreate:function(){this.inherited(arguments);f.connect(this.addSFTPConnection,"onClick",null,f.hitch(this,this.onAddConnection))},execute:function(){var a=this.sftpConnectionList.value.split("@");if(a.length===2){var c=a[0],e=a[1].indexOf("/");if(!(e<=0)){var f=a[1].substring(0,e),a=a[1].substring(e);this.options.func(f,a,c,this.sftpPassword.value,
this._computeOverwriteValue())}}},_computeOverwriteValue:function(){if(this.overwriteCancel.checked)return"no-overwrite";else if(this.overwriteOlder.checked)return"overwrite-older";return""},onAddConnection:function(){for(var a={name:this.sftpUser.value+"@"+this.sftpHost.value+this.sftpPath.value},c=JSON.parse(localStorage.getItem("orion.sftpConnections")),e=!1,f=0;f<c.items.length;f++)if(c.items[f].name===a.name){e=!0;break}e||(c.items.unshift(a),localStorage.setItem("orion.sftpConnections",JSON.stringify(c)),
this.sftpConnectionList.set("value",a.name))}})});
define("orion/widgets/OpenResourceDialog","i18n!orion/widgets/nls/messages,require,dojo,dijit,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/OpenResourceDialog.html".split(","),function(c,f,a,d){return a.declare("orion.widgets.OpenResourceDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.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;if(!this.searcher)throw Error("Missing required argument: searcher");this.searchRenderer=this.options&&this.options.searchRenderer;if(!this.searchRenderer||typeof this.searchRenderer.makeRenderFunction!=="function")throw Error(c["Missing required argument: searchRenderer"]);this.favService=this.options.favoriteService;
if(!this.favService)throw Error(c["Missing required argument: favService"]);},postMixInProperties:function(){this.options.title=this.options.title||c["Find File Named"];this.selectFile=c["Type the name of a file to open (? = any character, * = any string):"];this.searchPlaceHolder=c.Search;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);a.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(a.hitch(this,
this.checkSearch),0)});a.connect(this.resourceName,"onKeyPress",this,function(c){c.keyCode===a.keys.ENTER&&this.results&&(c=a.query("a",this.results),c.length>0&&(window.open(c[0].href),this.hide()))});a.connect(this,"onKeyPress",this,function(c){var e,f,h,k,j;if(c.keyCode===a.keys.DOWN_ARROW||c.keyCode===a.keys.UP_ARROW)f=a.query("a",this.results),e=a.query("a",this.favresults),h=d.getFocus(),j=f.indexOf(h.node),k=e.indexOf(h.node),c.keyCode===a.keys.DOWN_ARROW?k>=0?d.focus(k<e.length-1?e[k+1]:f.length>
0?f[0]:e[0]):j>=0?d.focus(j<f.length-1?f[j+1]:e.length>0?e[0]:f[0]):(f.length>0||e.length>0)&&d.focus(-1<e.length-1?e[0]:f[0]):k>=0?(h=this.resourceName&&this.resourceName.get("textbox"),d.focus(k>0?e[k-1]:h)):j>=0?(h=this.resourceName&&this.resourceName.get("textbox"),d.focus(j>0?f[j-1]:e.length>0?e[e.length-1]:h)):f.length>0?d.focus(f[f.length-1]):e.length>0&&d.focus(e[e.length-1]),a.stopEvent(c)});a.connect(this,"onMouseUp",function(a){a.target.focus()});this.populateFavorites()},populateFavorites:function(){a.place("<div>"+
c["Populating favorites&#x2026;"]+"</div>",this.favresults,"only");this.favService.getFavorites().then(this.showFavorites());this.favService.addEventListener("favoritesChanged",this.showFavorites())},showFavorites:function(){var c=this;return function(d){if(d.navigator)d=d.navigator;c.searchRenderer.makeRenderFunction(c.favresults,!1,a.hitch(c,c.decorateResult),c.showFavoritesImage)(d);d&&d.length>0&&a.place("<hr/>",c.favresults,"last")}},showFavoritesImage:function(d){var e=new Image;a.addClass(e,
"modelDecorationSprite");a.addClass(e,"core-sprite-makeFavorite");e.src=f.toUrl("images/none.png");e.title=c.Favorite;d.appendChild(e);a.style(e,"verticalAlign","middle")},checkSearch:function(){clearTimeout(this.timeoutId);var c=(new Date).getTime();c-this.time>this.SEARCH_DELAY?(this.time=c,this.doSearch()):this.timeoutId=setTimeout(a.hitch(this,"checkSearch"),50)},doSearch:function(){var d=this.resourceName&&this.resourceName.get("value"),e=this.showFavorites();this.favService.queryFavorites(d).then(function(a){e(a)});
if(d){a.place("<div>"+c["Searching&#x2026;"]+"</div>",this.results,"only");var f=this;setTimeout(function(){var c=f.searcher.createSearchQuery(null,d,"NameLower"),e=f.searchRenderer.makeRenderFunction(f.results,!1,a.hitch(f,f.decorateResult));f.searcher.search(c,!1,e)},0)}},decorateResult:function(c){var d=this;a.query("a",c).forEach(function(c){a.connect(c,"onmouseup",function(c){!a.mouseButtons.isMiddle(c)&&!a.isCopyKey(c)&&d.hide()});a.connect(c,"onkeyup",d,function(c){c.keyCode===a.keys.ENTER&&
d.hide()})})},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});
define("orion/git/widgets/CloneGitRepositoryDialog","i18n!git/nls/gitmessages,require,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,orion/widgets/DirectoryPrompterDialog,text!orion/git/widgets/templates/CloneGitRepositoryDialog.html".split(","),function(c,f,a,d){a.declare("orion.git.widgets.CloneGitRepositoryDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.cache("orion","git/widgets/templates/CloneGitRepositoryDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title?this.options.title:c["Clone Git Repository"];this.gitUrlLabelText=c["Repository URL:"];this.gitPathLabelText=c["Existing directory:"];this.gitNameLabelText=c["New folder:"];this.advancedShown=!1},postCreate:function(){var c=this;this.inherited(arguments);if(this.options.url)this.gitUrl.value=this.options.url;if(this.options.advancedOnly)this.Basic.style.display="none",this.Advanced.style.display=
"",setTimeout(function(){c.gitName.focus()},400);a.connect(this.changeGitPath,"onclick",null,a.hitch(this,this.openDirectoryPickerDialog));a.connect(this.isExistingProject,"onchange",null,a.hitch(this,this.showExistingFolder));a.connect(this.gitName,"onfocus",null,a.hitch(this,this.showNewProject));a.connect(this.advancedLink,"onclick",null,a.hitch(this,this.showAdvanced));a.connect(this.advancedLinkHide,"onclick",null,a.hitch(this,this.hideAdvanced));this.options.alwaysShowAdvanced&&this.showAdvanced()},
execute:function(){this.options.func&&this.options.func(this.options.advancedOnly?void 0:this.gitUrl.value,this.advancedShown&&this.isNewProject.checked?void 0:this.gitPath.value,this.advancedShown&&!this.isNewProject.checked?void 0:this.gitName.value);delete this.options.func},showAdvanced:function(){this.advancedShown=!0;this.Advanced.style.display="";this.advancedLink.style.display="none";this.advancedLinkHide.style.display=""},hideAdvanced:function(){this.advancedShown=!1;this.Advanced.style.display=
"none";this.advancedLink.style.display="";this.advancedLinkHide.style.display="none"},showExistingFolder:function(){this.isExistingProject.checked?this.openDirectoryPickerDialog():this.gitName.focus()},showNewProject:function(){this.isNewProject.checked=!0},openDirectoryPickerDialog:function(){this.isExistingProject.checked=!0;var d=new orion.widgets.DirectoryPrompterDialog({title:c["Choose a Folder"],serviceRegistry:this.options.serviceRegistry,fileClient:this.options.fileClient,func:a.hitch(this,
function(a){if(a&&a.Location){this.gitPath.value=a.Location;for(this.shownGitPath.innerHTML="<a href='"+f.toUrl("navigate/table.html")+"#"+a.ChildrenLocation+"'>"+a.Name+"</a>";a.parent&&!a.parent.Projects;)this.shownGitPath.innerHTML="<a href='"+f.toUrl("navigate/table.html")+"#"+a.parent.ChildrenLocation+"'>"+a.parent.Name+"</a>/"+this.shownGitPath.innerHTML,a=a.parent}})});d.startup();d.show()}})});
define("orion/git/widgets/AddRemoteDialog","i18n!git/nls/gitmessages,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/AddRemoteDialog.html".split(","),function(c,f,a){f.declare("orion.git.widgets.AddRemoteDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","git/widgets/templates/AddRemoteDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=c["Add Remote"];this.gitRemoteLabelText=c["Remote Name:"];this.gitRemoteURILabelText=c["Remote URI:"]},execute:function(){this.options.func&&this.options.func(this.gitRemote.value,this.gitRemoteURI.value);delete this.options.func}})});
define("orion/git/widgets/GitCredentialsDialog","i18n!git/nls/gitmessages,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/GitCredentialsDialog.html".split(","),function(c,f,a){f.declare("orion.git.widgets.GitCredentialsDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","git/widgets/templates/GitCredentialsDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=this.options.title||c["Git Credentials"];this.gitUrlLabelText=c["Repository URL:"];this.gitSshUsernameLabelText=c["Username:"];this.gitSshPasswordLabelText=c["Ssh password:"];this.gitPrivateKeyLabelText=c["Private key:"];this.gitPassphraseLabelText=c["Passphrase (optional):"];if(!this.options.username&&!this.options.password&&!this.options.privatekey&&!this.options.passphrase)this.options.username=!0,this.options.password=!0,this.options.privatekey=!0,this.options.passphrase=!0;if(this.options.serviceRegistry)this._sshService=
this.options.serviceRegistry.getService("orion.net.ssh"),this._progressService=this.options.serviceRegistry.getService("orion.page.progress")},postCreate:function(){this.inherited(arguments);var a=this;this.options.username||f.style(this.gitSshUsernameRow,"display","none");this.options.password||f.style(this.gitSshPasswordRow,"display","none");this.options.privatekey||f.style(this.gitPrivateKeyRow,"display","none");this.options.passphrase||(f.style(this.gitPassphraseRow,"display","none"),f.style(this.gitPassphraseRow_1,
"display","none"));if(this.options.errordata&&this.options.errordata.Url)f.style(this.gitCredentialsLabel,"display","block"),this.url.innerHTML=this.options.errordata.Url;if(this.options.errordata&&this.options.errordata.User&&this.options.errordata.User!=="")this.gitSshUsername.value=this.options.errordata.User,f.style(this.gitSshUsernameRow,"display","none"),setTimeout(function(){a.gitSshPassword.focus()},400);f.connect(this.gitSshPassword,"onfocus",null,f.hitch(this,function(){this.isSshPassword.checked=
!0}));f.connect(this.gitPrivateKey,"onfocus",null,f.hitch(this,function(){this.isPrivateKey.checked=!0}));f.connect(this.gitPassphrase,"onfocus",null,f.hitch(this,function(){this.isPrivateKey.checked=!0}))},execute:function(){if(this._sshService){var a=this;this._sshService.getKnownHosts().then(function(c){a.options.func&&a.options.func({gitSshUsername:a.gitSshUsername.value,gitSshPassword:a.isSshPassword.checked?a.gitSshPassword.value:"",gitPrivateKey:a.isPrivateKey.checked?a.gitPrivateKey.value:
"",gitPassphrase:a.isPrivateKey.checked?a.gitPassphrase.value:"",knownHosts:c});delete a.options.func})}else this.options.func&&this.options.func({gitSshUsername:this.gitSshUsername.value,gitSshPassword:this.gitSshPassword.value,gitPrivateKey:this.gitPrivateKey.value,gitPassphrase:this.gitPassphrase.value,knownHosts:this.gitSshKnownHosts.value}),delete this.options.func}})});
define("orion/git/widgets/RemotePrompterDialog","i18n!git/nls/gitmessages,dojo,dijit,orion/util,orion/explorer,dijit/Dialog,dijit/form/Button,orion/widgets/ExplorerTree,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/RemotePrompterDialog.html".split(","),function(c,f,a,d,g){f.declare("orion.git.widgets.RemotePrompterDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:!0,templateString:f.cache("orion","git/widgets/templates/RemotePrompterDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.treeRoot=this.options.treeRoot},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||c["Choose a Folder"];this.newBranchText=c["New Branch:"];this.buttonOk=c.OK},postCreate:function(){this.inherited(arguments);this.loadRemoteChildren(this.treeRoot);f.connect(this.newBranch,"onchange",f.hitch(this,this.validate));if(this.options.hideNewBranch)this.newBranchSection.style.display="none"},
loadRemoteChildren:function(a){this.treeRoot=a;this.createTree(new e(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))},createTree:function(a){var d=this.treeWidget=new orion.widgets.ExplorerTree({style:"width:100%; height:100%",model:a,region:"center",showRoot:!1,persist:!0,openOnClick:!1,getLabel:function(a){return a.Type==="RemoteTrackingBranch"&&!a.Id?a.Name+c[" [New branch]"]:a.Name},getIconClass:function(a){return a.BranchLocation&&a.RemoteLocation?"gitRepoItem":a.GroupNode?a.Name===
"Branch"?"gitBranchesItem":"gitRemotesItem":a.Type==="Branch"||a.Type==="RemoteTrackingBranch"?"gitBranchItem":a.Type==="Remote"?"gitRemoteItem":"gitDefaultItem"}}),e=this;this.treeWidget._inheritedSelectNode=this.treeWidget._selectNode;this.treeWidget._selectNode=function(a){d._inheritedSelectNode(a);e.newBranch.disabled=a.item&&a.item.Type==="Remote"?!1:!0;f.hitch(e,e.validate)()};this.treeWidget.startup();f.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},validate:function(){var a=
this.treeWidget.getSelectedItems();if(a.length==1)if(a[0].Type==="RemoteTrackingBranch"){this.RemoteBrowserButton.disabled=!1;return}else if(a[0].Type==="Remote"&&this.newBranch.value!=""){this.RemoteBrowserButton.disabled=!1;return}this.RemoteBrowserButton.disabled=!0},execute:function(){var a=this.treeWidget.getSelectedItems();this.onHide();this.options.func&&(a[0].Type==="RemoteTrackingBranch"?this.options.func(a[0],a[0].parent):this.options.func(null,a[0],this.newBranch.value));delete this.options.func}});
var e=function(){function a(c,d,e,f){this.gitClient=c;this.rootPath=d;this.fetchItems=e;this.root=f?f:null}a.prototype=new g.ExplorerModel;a.prototype.getRoot=function(a){this.root?a(this.root):this.fetchItems(this.rootPath).then(f.hitch(this,function(c){this.root=c;a(c)}))};a.prototype.mayHaveChildren=function(a){if(a.children||a.Children)return!0;else if(a.BranchLocation&&a.RemoteLocation)return!0;else if(a.GroupNode)return!0;else if(a.Type==="Remote")return!0;return!1};a.prototype.getIdentity=
function(a){a.Location?(a=a.Location,a=a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")):a="ROOT";return a};a.prototype.getChildren=function(a,c){a.children=[];if(a.Children){for(var d=0;d<a.Children.length;d++)a.Children[d].parent=a,a.children[d]=a.Children[d];c(a.Children)}else a.BranchLocation&&a.RemoteLocation?(a.children=[{GroupNode:"true",Location:a.BranchLocation,Name:"Branches",parent:a},{GroupNode:"true",Location:a.RemoteLocation,BranchLocation:a.BranchLocation,Name:"Remotes",parent:a},{GroupNode:"true",
Location:a.TagLocation,Name:"Tags",parent:a}],c(a.children)):a.GroupNode?this.gitClient.getGitBranch(a.Location).then(f.hitch(this,function(d){a.children=d.Children;for(var e=0;e<d.Children.length;e++)d.Children[e].parent=a;c(d.Children)})):a.Type==="Remote"&&this.gitClient.getGitBranch(a.Location).then(f.hitch(this,function(d){a.children=d.Children;for(var e=0;e<d.Children.length;e++)d.Children[e].parent=a;c(d.Children)}))};return a}()});
define("orion/git/widgets/OpenCommitDialog","i18n!git/nls/gitmessages,require,dojo,dijit,orion/util,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/OpenCommitDialog.html".split(","),function(c,f,a,d){return a.declare("orion.git.widgets.OpenCommitDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.cache("orion","git/widgets/templates/OpenCommitDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,
constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.options=arguments[0];this.serviceRegistry=this.options.serviceRegistry;if(!this.serviceRegistry)throw Error("Missing required argument: serviceRegistry");this.repositories=this.options.repositories;if(!this.repositories)throw Error("Missing required argument: repositories");this.commitName=this.options.commitName},postMixInProperties:function(){this.options.title=this.options.title||c["Find Commit"];this.selectFile=
c["Type the commit name (sha1):"];this.searchPlaceHolder=c.Search;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);a.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(a.hitch(this,this.checkSearch),0)});a.connect(this.resourceName,"onKeyPress",this,function(c){c.keyCode===a.keys.ENTER&&this.results&&(c=a.query("a",this.results),c.length>0&&(window.open(c[0].href),this.hide()))});a.connect(this,
"onMouseUp",function(a){a.target.focus()});this.resourceName.set("value",this.commitName)},checkSearch:function(){clearTimeout(this.timeoutId);var c=(new Date).getTime();c-this.time>this.SEARCH_DELAY?(this.time=c,this.doSearch()):this.timeoutId=setTimeout(a.hitch(this,"checkSearch"),50)},_findCommitLocation:function(c,d,f){var h=this;f==null&&(f=new a.Deferred);c.length>0?h.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+d+c[0].ContentLocation+"?page=1&pageSize=1").then(function(a){f.callback(a.Children[0])},
function(){h._findCommitLocation(c.slice(1),d,f)}):f.errback();return f},doSearch:function(){var d=this.resourceName&&this.resourceName.get("value");if(d){a.place("<div>"+c["Searching&#x2026;"]+"</div>",this.results,"only");var e=this;this.serviceRegistry.getService("orion.page.message").setProgressMessage(c["Looking for the commit"]);this._findCommitLocation(this.repositories,d).then(function(c){a.empty(e.results);e.displayCommit(c,e.results)},function(){a.place("<div>No commits found</div>",e.results,
"only");e.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}},displayCommit:function(d,e){var f=a.create("div",{style:"padding:10px; max-width:480px"},e),h=d.Message.split(/(\r?\n|$)/)[0],k=a.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+d.Location+"?page=1&pageSize=1"},f);a.place(document.createTextNode(h),k);a.connect(k,"onclick",k,a.hitch(this,function(){this.hide()}));a.create("div",{style:"padding-top:15px"},f);a.create("span",{"class":"gitSecondaryDescription",
innerHTML:c[" commit: "]+d.Name},f);d.Parents&&d.Parents.length>0&&(a.create("div",null,f),a.place(document.createTextNode(c["parent: "]),f),h=a.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+d.Parents[0].Location+"?page=1&pageSize=1"},f),a.place(document.createTextNode(d.Parents[0].Name),h),a.connect(h,"onclick",h,a.hitch(this,function(){this.hide()})));a.create("div",{style:"padding-top:15px"},f);if(d.AuthorImage)h=a.create("span",{"class":"git-author-icon-small",style:"margin-bottom:30px"},
f),k=new Image,k.src=d.AuthorImage,k.name=d.AuthorName,k.width=35,k.height=35,a.place(k,h,"first");a.create("span",{"class":"gitSecondaryDescription",innerHTML:a.string.substitute(c[" authored by ${0} (${1})) on ${2}"],[d.AuthorName,d.AuthorEmail,a.date.locale.format(new Date(d.Time),{formatLength:"short"})])},f);a.create("div",null,f);a.create("span",{"class":"gitSecondaryDescription",innerHTML:a.string.substitute(c["committed by 0 (1)"],[d.CommitterName,d.CommitterEmail])},f)},show:function(){this.inherited(arguments);
this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});
define("orion/git/widgets/CommitDialog","i18n!git/nls/gitmessages,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/CommitDialog.html".split(","),function(c,f,a){f.declare("orion.git.widgets.CommitDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","git/widgets/templates/CommitDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=c["Commit Changes"];this.commitMessageLabelText=c["Message:"];this.amendLabelText=c["Amend:"];this.committerNameLabelText=c["Committer Name:"];this.committerEmailLabelText=c["Committer Email:"];this.authorNameLabelText=c["Author Name:"];this.authorEmailLabelText=c["Author Email:"]},postCreate:function(){this.inherited(arguments);if(this.options.body.Message)this.commitMessage.value=this.options.body.Message;f.connect(this.commitMessage,"onkeyup",f.hitch(this,this.validate));if(this.options.body.Amend)this.amend.checked=
!0;if(this.options.body.CommitterName)this.committerName.value=this.options.body.CommitterName;f.connect(this.committerName,"onkeyup",f.hitch(this,this.validate));if(this.options.body.CommitterEmail)this.committerEmail.value=this.options.body.CommitterEmail;f.connect(this.committerEmail,"onkeyup",f.hitch(this,this.validate));if(this.options.body.AuthorName)this.authorName.value=this.options.body.AuthorName;f.connect(this.authorName,"onkeyup",f.hitch(this,this.validate));if(this.options.body.AuthorEmail)this.authorEmail.value=
this.options.body.AuthorEmail;f.connect(this.authorEmail,"onkeyup",f.hitch(this,this.validate));this.validate()},validate:function(){this.commitMessage.value?this.committerName.value?this.committerEmail.value?this.authorName.value?this.authorEmail.value?(f.style(this.commitInfoBar,"display","none"),this.commitChangesButton.disabled=!1):(f.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.innerHTML=c["The author mail is required."]):(f.style(this.commitInfoBar,
"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.innerHTML=c["The author name is required."]):(f.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.innerHTML=c["The committer mail is required."]):(f.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.innerHTML=c["The committer name is required."]):(f.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.innerHTML=
c["The commit message is required."])},execute:function(){if(this.options.func){var a={};a.Message=this.commitMessage.value;a.Amend=this.amend.checked?!0:!1;a.CommitterName=this.committerName.value;a.CommitterEmail=this.committerEmail.value;a.AuthorName=this.authorName.value;a.AuthorEmail=this.authorEmail.value;this.options.func(a)}delete this.options.func}})});
define("orion/compare/compare-features","i18n!orion/compare/nls/messages,orion/util,orion/compare/compareUtils,dojo,dijit,dijit/layout/ContentPane,dijit/layout/BorderContainer".split(","),function(c,f,a,d,g){var e=e||{};e.TwoWayCompareUIFactory=function(){function e(a){this._parentDivID=a.parentDivID;this._commandSpanId=a.commandSpanId;this._showTitle=a.showTitle;this._leftTitle=a.leftTitle;this._rightTitle=a.rightTitle;this._showLineStatus=a.showLineStatus}e.prototype={_createNoWrapTextDiv:function(a,
c,e,f){var g=document.createElement("table");g.width="100%";var i=document.createElement("tr");g.appendChild(i);var n=document.createElement("td");n.noWrap=!0;if(e)n.align=e;i.appendChild(n);e=document.createElement("h2");e.id=a;d.place(document.createTextNode(c),e,"only");n.appendChild(e);if(f&&!this._commandSpanId)this._commandSpanId="compare_rightContainerCommands",n=document.createElement("td"),n.id=this._commandSpanId,i.appendChild(n),n.noWrap=!0,n.align="right",g.align="right";return g},_createEditorParentDiv:function(a){a=
new g.layout.ContentPane({id:a,region:"center"});d.addClass(a.domNode,"paneScrolled");d.addClass(a.domNode,"compareEditorParent");return a},_createCompareCanvasDiv:function(a){var c=new g.layout.ContentPane({region:"leading",splitter:!1});d.addClass(c.domNode,"canvasContainer");var e=document.createElement("canvas");e.id=a;e.width=46;e.height=3E3;d.toggleClass(e,"compareCanvas",!0);c.attr("content",e);return c},_appendDomNode:function(a,c){c.placeAt(a)},_createTileDiv:function(a,e,f){a=this._createNoWrapTextDiv(a,
e?e:c["Compare..."],"left",f);e=new g.layout.ContentPane({region:"top"});d.addClass(e.domNode,"titleContainer");e.attr("content",a);return e},_createStatusDiv:function(a){var a=this._createNoWrapTextDiv(a,c["Line 0 : Col 0"],"center"),e=new g.layout.ContentPane({region:"bottom"});d.addClass(e.domNode,"statusContainer");e.attr("content",a);return e},_createLeftEditorParentDiv:function(a,c){return this._createEditorParentDiv(a,c)},_createRightEditorParentDiv:function(a,c){var e=new g.layout.BorderContainer({region:"center",
gutters:!1,design:"headline",liveSplitters:!1,persist:!1,splitter:!1});d.addClass(e.domNode,"borderContainer");this._appendDomNode(e,this._createCompareCanvasDiv(c));this._appendDomNode(e,this._createEditorParentDiv(a));return e},_createLeftBorder:function(){var a=new g.layout.BorderContainer({region:"leading",gutters:!1,design:"headline",liveSplitters:!0,persist:!1,splitter:!0});d.addClass(a.domNode,"leftBorder");if(this._showTitle)this._leftTitleDivId=this._parentDivID+"_left_title_id",this._appendDomNode(a,
this._createTileDiv(this._leftTitleDivId,this._leftTitle,!1));this._leftEditorParentDivId=this._parentDivID+"_left_editor_id";this._appendDomNode(a,this._createLeftEditorParentDiv(this._leftEditorParentDivId));if(this._showLineStatus)this._leftStatusDivId=this._parentDivID+"_left_status_id",this._appendDomNode(a,this._createStatusDiv(this._leftStatusDivId));return a},_createRightBorder:function(){var a=new g.layout.BorderContainer({region:"center",gutters:!1,design:"headline",liveSplitters:!1,persist:!1,
splitter:!1});d.addClass(a.domNode,"rightBorder");if(this._showTitle)this._rightTitleDivId=this._parentDivID+"_right_title_id",this._appendDomNode(a,this._createTileDiv(this._rightTitleDivId,this._rightTitle,!0));this._rightEditorParentDivId=this._parentDivID+"_right_editor_id";this._diffCanvasDivId=this._parentDivID+"_diff_canvas_id";this._appendDomNode(a,this._createRightEditorParentDiv(this._rightEditorParentDivId,this._diffCanvasDivId));if(this._showLineStatus)this._rightStatusDivId=this._parentDivID+
"_right_status_id",this._appendDomNode(a,this._createStatusDiv(this._rightStatusDivId));return a},buildUI:function(){this._topWidgetId=this._parentDivID+"_topWidget";this.destroy();var c=this._createLeftBorder(),d=this._createRightBorder(),e=a.getDijitSizeStyle(this._parentDivID),e=new g.layout.BorderContainer({id:this._topWidgetId,style:e,region:"center",gutters:!1,design:"headline",liveSplitters:!0,persist:!1,splitter:!0});e.placeAt(this._parentDivID);e.addChild(c);e.addChild(d);e.startup();f.forceLayout(this._parentDivID)},
destroy:function(){a.destroyDijit(this._topWidgetId)},getEditorParentDivId:function(a){return a?this._leftEditorParentDivId:this._rightEditorParentDivId},getTitleDivId:function(a){return a?this._leftTitleDivId:this._rightTitleDivId},getStatusDivId:function(a){return a?this._leftStatusDivId:this._rightStatusDivId},getCommandSpanId:function(){return this._commandSpanId},getDiffCanvasDivId:function(){return this._diffCanvasDivId}};return e}();return e});
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(c,f){c.declare("dojox.layout.ToggleSplitter",[f.layout._Splitter],{open:!0,closedThreshold:5,openSize:"",_closedSize:"0",templateString:'<div class="dijitSplitter dojoxToggleSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_onMouseDown" tabIndex="0" role="separator"><div dojoAttachPoint="toggleNode" class="dijitSplitterThumb dojoxToggleSplitterIcon"></div></div>',postCreate:function(){this._started=
!1;this.inherited(arguments);var a=this.region;c.addClass(this.domNode,"dojoxToggleSplitter"+a.charAt(0).toUpperCase()+a.substring(1));this.connect(this,"onDblClick","_toggleMe")},startup:function(){this.inherited(arguments);var a=this.child.domNode,d=c.style(a,this.horizontal?"height":"width");c.forEach(["toggleSplitterOpen","toggleSplitterClosedThreshold","toggleSplitterOpenSize"],function(a){var c=a.substring(14),c=c.charAt(0).toLowerCase()+c.substring(1);a in this.child&&(this[c]=this.child[a])},
this);if(!this.openSize)this.openSize=this.open?d+"px":"75px";this._openStyleProps=this._getStyleProps(a,!0);this._started=!0;this.set("open",this.open);return this},_onMouseUp:function(){c.disconnect(this._onMoveHandle);c.disconnect(this._onUpHandle);delete this._onMoveHandle;delete this._onUpHandle;delete this._startPosn},_onPrelimMouseMove:function(a){if(Math.abs((this._startPosn||0)-(this.horizontal?a.clientY:a.clientX))>=3)c.disconnect(this._onMoveHandle),this._startDrag(a)},_onMouseDown:function(a){if(this.open){if(!this._onUpHandle)this._onUpHandle=
c.connect(c.body(),"onmouseup",this,"_onMouseUp");if(!this._onMoveHandle)this._startPosn=this.horizontal?a.clientY:a.clientX,this._onMoveHandle=c.connect(c.body(),"onmousemove",this,"_onPrelimMouseMove")}},_handleOnChange:function(){var a=this.child.domNode,d;d=this.horizontal?"height":"width";if(this.open){var f=c.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);f[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.openSize;c.style(a,f);
this.connect(this.domNode,"onmousedown","_onMouseDown")}else f=c.getComputedStyle(a),d=this._getStyleProps(a,!0,f),f=this._getStyleProps(a,!1,f),this._openStyleProps=d,c.style(a,f);this._setStateClass();this.container._started&&this.container._layoutChildren(this.region)},_getStyleProps:function(a,d,f){f||(f=c.getComputedStyle(a));var e={},i=this.horizontal?"height":"width";e.visibility=d?f.visibility:"hidden";e[i]=d?a.style[i]||f[i]:this._closedSize;var h=["Top","Right","Bottom","Left"];c.forEach(["padding",
"margin","border"],function(a){for(var c=0;c<h.length;c++){var i=a+h[c];a=="border"&&(a+="Width");void 0!==f[i]&&(e[i]=d?f[i]:0)}});return e},_setStateClass:function(){this.open?(c.removeClass(this.domNode,"dojoxToggleSplitterClosed"),c.addClass(this.domNode,"dojoxToggleSplitterOpen"),c.removeClass(this.toggleNode,"dojoxToggleSplitterIconClosed"),c.addClass(this.toggleNode,"dojoxToggleSplitterIconOpen")):(c.addClass(this.domNode,"dojoxToggleSplitterClosed"),c.removeClass(this.domNode,"dojoxToggleSplitterOpen"),
c.addClass(this.toggleNode,"dojoxToggleSplitterIconClosed"),c.removeClass(this.toggleNode,"dojoxToggleSplitterIconOpen"))},_setOpenAttr:function(a){if(this._started)this.open=a,this._handleOnChange(a,!0),this[this.open?"onOpen":"onClose"](this.child)},onOpen:function(){},onClose:function(){},_toggleMe:function(a){a&&c.stopEvent(a);this.set("open",!this.open)},_onKeyPress:function(a){this.inherited(arguments)}});c.extend(f._Widget,{toggleSplitterOpen:!0,toggleSplitterClosedThreshold:5,toggleSplitterOpenSize:""})});
define("orion/widgets/eWebBorderContainer",["dojo","dijit","dijit/layout/BorderContainer","dojox/layout/ToggleSplitter"],function(c,f){c.declare("orion.widgets.eWebBorderContainer",f.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredLeftPaneWidth:function(){var a=this.getSizeCookie();return a<=0?c.position(this.getRightPane()).w*0.25:a},isLeftPaneOpen:function(){var a=this.getSplitter("left");return a?a.open:!1},getLeftPane:function(){if(this._left)return this._left;
for(var a=this.getChildren(),c=0;c<a.length;c++)if(a[c].region&&(a[c].region==="leading"||a[c].region==="left"))return this._left=a[c].domNode},getHidingPane:function(){return this.getLeftPane()},getRightPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),c=0;c<a.length;c++)if(a[c].region&&a[c].region==="center")return this._center=a[c].domNode},getSizeCookie:function(){var a=this.getSplitter("left");return a?a.getSizeCookie():0},setSizeCookie:function(a){var c=this.getSplitter("left");
if(c)return c.setSizeCookie(a)},toggleLeftPaneState:function(){var a=this.getSplitter("left");a&&a.toggleHidingPaneState()},setToggleCallback:function(a){this.toggleCallback=a},toggle:function(){if(!this._left||!this._center)for(var a=this.getChildren(),d=0;d<a.length;d++)if(a[d].region&&a[d].region==="center")this._center=a[d].domNode;else if(a[d].region&&(a[d].region==="leading"||a[d].region==="left"))this._left=a[d].domNode;var f=this._left,e=this._center,i=c.position(f).w,h=this.isLeftPaneOpen(),
k;k=h?0:this.getPreferredLeftPaneWidth();h||this.toggleLeftPaneState();var j=f.style.overflow,l=e.style.overflow;(new c.Animation({node:f,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(a){f.style.width=i+(k-i)*a/100+"px";f.style.overflow="hidden";e.style.overflow="hidden";this.layout()}),onEnd:c.hitch(this,function(){e.style.overflow=l;f.style.overflow=j;this.toggleCallback&&this.toggleCallback.apply();h?this.toggleLeftPaneState():this.setSizeCookie(null)})})).play()}});c.declare("orion.widgets.eWebSplitter",
dojox.layout.ToggleSplitter,{postCreate:function(){this.inherited(arguments);this.connect(this.toggleNode,"onmousedown","_onThumbMouseDown");this.connect(this.domNode,"onmouseover","_onMouseOver");this._openStateCookieName=this.container.id+"_"+this.region+"_open"},startup:function(){this.inherited(arguments);if(this.container.persist){var a=c.cookie(this._openStateCookieName);a==="true"?this.container.getHidingPane().style.width=this.getSizeCookie()+"px":(a==="false"?this.set("open",!1):this.set("open",
!0),this._handleOnChange())}else this.set("open",!0),this._handleOnChange();return this},_handleOnChange:function(){var a=this.child.domNode,d;d=this.horizontal?"height":"width";if(this.open){var f=c.mixin({display:"block",visibility:"visible"},this._openStyleProps);f[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.openSize;c.style(a,f);this.connect(this.domNode,"onmousedown","_onMouseDown")}else f=c.getComputedStyle(a),d=this._getStyleProps(a,!0,f),f=this._getStyleProps(a,
!1,f),this._openStyleProps=d,c.style(a,f);this._setStateClass();this.container._started&&(a=0,this.open&&this.openSize&&(a=parseInt(this.openSize.replace("px",""),10)),this.container._layoutChildren(this.region,a))},_removeFocusVisual:function(a){c.stopEvent(a)},_onMouseDown:function(a){this.open?this._startDrag(a):this._removeFocusVisual(a)},_onMouseOver:function(){this.domNode.style.cursor=this.open?"e-resize":"default"},_onThumbMouseDown:function(a){a.stopPropagation();this._removeFocusVisual(a);
this.container.toggle()},_toggleMe:function(){},getSizeCookie:function(){if(this.container.persist){var a=c.cookie(this._cookieName);if(a)return parseInt(a.replace("px",""),10)}return 0},setSizeCookie:function(){this.container.persist&&c.cookie(this._cookieName,this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},toggleHidingPaneState:function(){this.set("open",!this.open);this.container.getHidingPane().style.visibility=this.open?"visible":"hidden";this.container.persist&&c.cookie(this._openStateCookieName,
this.open?"true":"false",{expires:365})}});c.declare("orion.widgets.eWebBorderContainerReverse",f.layout.BorderContainer,{_splitterClass:"orion.widgets.eWebSplitter",getPreferredRightPaneWidth:function(){var a=this.getSizeCookie();return a<=0?c.position(this.getLeftPane()).w*0.25:a},isRightPaneOpen:function(){var a=this.getSplitter("right");return a?a.open:!1},getRightPane:function(){if(this._right)return this._right;for(var a=this.getChildren(),c=0;c<a.length;c++)if(a[c].region&&(a[c].region==="trailing"||
a[c].region==="right"))return this._right=a[c].domNode},getHidingPane:function(){return this.getRightPane()},getLeftPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),c=0;c<a.length;c++)if(a[c].region&&a[c].region==="center")return this._center=a[c].domNode},getSizeCookie:function(){var a=this.getSplitter("right");return a?a.getSizeCookie():0},setSizeCookie:function(a){var c=this.getSplitter("right");if(c)return c.setSizeCookie(a)},toggleRightPaneState:function(){var a=
this.getSplitter("right");a&&a.toggleHidingPaneState()},setToggleCallback:function(a){this.toggleCallback=a},toggle:function(){if(!this._right||!this._center)for(var a=this.getChildren(),d=0;d<a.length;d++)if(a[d].region&&a[d].region==="center")this._center=a[d].domNode;else if(a[d].region&&(a[d].region==="trailing"||a[d].region==="right"))this._right=a[d].domNode;var f=this._right,e=this._center,i=c.position(f).w,h=this.isRightPaneOpen(),k;k=h?0:this.getPreferredRightPaneWidth();h||this.toggleRightPaneState();
var j=f.style.overflow,l=e.style.overflow;(new c.Animation({node:f,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(a){f.style.width=i+(k-i)*a/100+"px";f.style.overflow="hidden";e.style.overflow="hidden";this.layout()}),onEnd:c.hitch(this,function(){e.style.overflow=l;f.style.overflow=j;this.toggleCallback&&this.toggleCallback.apply();h?this.toggleRightPaneState():this.setSizeCookie(null)})})).play()}})});
define("dojox/form/uploader/Base","dojo,dijit,dojox,dojox/form/uploader/Base,dijit/_Widget,dijit/_Templated".split(","),function(c,f){c.declare("dojox.form.uploader.Base",[f._Widget,f._Templated],{getForm:function(){if(!this.form)for(var a=this.domNode;a&&a.tagName&&a!==document.body;){if(a.tagName.toLowerCase()=="form"){this.form=a;break}a=a.parentNode}return this.form},getUrl:function(){if(this.uploadUrl)this.url=this.uploadUrl;if(this.url)return this.url;if(this.getForm())this.url=this.form.action;
return this.url},connectForm:function(){this.url=this.getUrl();if(!this._fcon&&this.getForm())this._fcon=!0,this.connect(this.form,"onsubmit",function(a){c.stopEvent(a);this.submit(c.formToObject(this.form))})},supports:function(a){if(!this._hascache)this._hascache={testDiv:c.create("div"),testInput:c.create("input",{type:"file"}),xhr:window.XMLHttpRequest?new XMLHttpRequest:{}},c.style(this._hascache.testDiv,"opacity",0.7);switch(a){case "FormData":return!!window.FormData;case "sendAsBinary":return!!this._hascache.xhr.sendAsBinary;
case "opacity":return c.style(this._hascache.testDiv,"opacity")==0.7;case "multiple":if(this.force=="flash"||this.force=="iframe")break;a=c.attr(this._hascache.testInput,"multiple");return a===!0||a===!1}return!1},getMimeType:function(){return"application/octet-stream"},getFileType:function(a){return a.substring(a.lastIndexOf(".")+1).toUpperCase()},convertBytes:function(a){var c=Math.round(a/1024*1E5)/1E5,f=Math.round(a/1048576*1E5)/1E5,e=Math.round(a/1073741824*1E5)/1E5,i=a;c>1&&(i=c.toFixed(1)+
" kb");f>1&&(i=f.toFixed(1)+" mb");e>1&&(i=e.toFixed(1)+" gb");return{kb:c,mb:f,gb:e,bytes:a,value:i}}})});
define("dojox/form/Uploader",["dojo","dijit","dojox","dojox/form/uploader/Base"],function(c,f,a){c.declare("dojox.form.Uploader",[a.form.uploader.Base],{uploadOnSelect:!1,tabIndex:0,multiple:!1,label:"Upload...",url:"",name:"uploadedfile",flashFieldName:"",uploadType:"form",_nameIndex:0,widgetsInTemplate:!0,templateString:'<div class="dojoxFileInput"><div dojoType="dijit.form.Button" dojoAttachPoint="button">${label}</div></div>',postMixInProperties:function(){this._inputs=[];this._getButtonStyle(this.srcNodeRef);
this.inherited(arguments)},postCreate:function(){var a=!1,f=this._getNodePosition(this.domNode);if(!this.btnSize.w||!this.btnSize.h)c.body().appendChild(this.domNode),this._getButtonStyle(this.domNode),a=!0;this._setButtonStyle();a&&c.place(this.domNode,f.node,f.pos);this.inherited(arguments)},onChange:function(){},onBegin:function(){},onProgress:function(){},onComplete:function(){this.reset()},onCancel:function(){},onAbort:function(){},onError:function(){},upload:function(){},submit:function(){},
reset:function(){this._disconnectButton();c.forEach(this._inputs,c.destroy,c);this._inputs=[];this._nameIndex=0;this._createInput()},getFileList:function(){var a=[];this.supports("multiple")?c.forEach(this.inputNode.files,function(c,e){a.push({index:e,name:c.name,size:c.size,type:c.type})},this):c.forEach(this._inputs,function(c,e){a.push({index:e,name:c.value.substring(c.value.lastIndexOf("\\")+1),size:0,type:c.value.substring(c.value.lastIndexOf(".")+1)})},this);return a},_getValueAttr:function(){return this.getFileList()},
_setValueAttr:function(){console.error("Uploader value is read only")},_getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(a){this._disabled!=a&&(this.button.set("disabled",a),c.style(this.inputNode,"display",a?"none":"block"))},_getNodePosition:function(a){return a.previousSibling?{node:a.previousSibling,pos:"after"}:{node:a.nextSibling,pos:"before"}},_getButtonStyle:function(a){this.btnSize=a?c.marginBox(a):{w:80,h:25}},_setButtonStyle:function(){var a=!0;if(!this.domNode.parentNode||
!this.domNode.parentNode.tagName)document.body.appendChild(this.domNode),a=!1;c.style(this.domNode,{width:this.btnSize.w+"px",height:this.btnSize.h+4+"px",overflow:"hidden",position:"relative"});this.inputNodeFontSize=Math.max(2,Math.max(Math.ceil(this.btnSize.w/60),Math.ceil(this.btnSize.h/15)));this._createInput();c.style(this.button.domNode,{margin:"0px",display:"block",verticalAlign:"top"});c.style(this.button.domNode.firstChild,{margin:"0px",display:"block"});a||document.body.removeChild(this.domNode)},
_createInput:function(){this._inputs.length&&(c.style(this.inputNode,{top:"500px"}),this._disconnectButton(),this._nameIndex++);var a;a=this.supports("multiple")?this.name+"s[]":this.name+(this.multiple?this._nameIndex:"");this.inputNode=c.create("input",{type:"file",name:a,className:"dojoxInputNode"},this.domNode,"first");this.supports("multiple")&&this.multiple&&c.attr(this.inputNode,"multiple",!0);this._inputs.push(this.inputNode);c.style(this.inputNode,{fontSize:this.inputNodeFontSize+"em"});
a=c.marginBox(this.inputNode);c.style(this.inputNode,{position:"absolute",top:"-2px",left:"-"+(a.w-this.btnSize.w-2)+"px",opacity:0});this._connectButton()},_connectButton:function(){this._cons=[];var a=c.hitch(this,function(a){this._cons.push(c.connect(this.inputNode,a,this,function(){this.button._cssMouseEvent({type:a})}))});a("mouseover");a("mouseout");a("mousedown");this._cons.push(c.connect(this.inputNode,"change",this,function(a){this.onChange(this.getFileList(a));!this.supports("multiple")&&
this.multiple&&this._createInput()}));this.button.set("tabIndex",-1);if(this.tabIndex>-1){this.inputNode.tabIndex=this.tabIndex;var f=c.style(this.button.domNode.firstChild,"border");this._cons.push(c.connect(this.inputNode,"focus",this,function(){c.style(this.button.domNode.firstChild,"border","1px dashed #ccc")}));this._cons.push(c.connect(this.inputNode,"blur",this,function(){c.style(this.button.domNode.firstChild,"border",f)}))}},_disconnectButton:function(){c.forEach(this._cons,c.disconnect,
c)}});(function(){a.form.UploaderOrg=a.form.Uploader;var d=[a.form.UploaderOrg];a.form.addUploaderPlugin=function(a){d.push(a);c.declare("dojox.form.Uploader",d,{})}})()});
define("dojox/form/uploader/plugins/HTML5",["dojo","dijit","dojox","dojox/form/Uploader"],function(c,f,a){c.declare("dojox.form.uploader.plugins.HTML5",[],{errMsg:"Error uploading files. Try checking permissions",uploadType:"html5",postCreate:function(){this.connectForm();this.inherited(arguments);this.uploadOnSelect&&this.connect(this,"onChange","upload")},upload:function(a){this.onBegin(this.getFileList());this.supports("FormData")?this.uploadWithFormData(a):this.supports("sendAsBinary")&&this.sendAsBinary(a)},
submit:function(a){a=a?a.tagName?a:this.getForm():this.getForm();a=c.formToObject(a);console.log("form data:",a);this.upload(a)},sendAsBinary:function(a){if(this.getUrl()){var c="---------------------------"+(new Date).getTime(),e=this.createXhr();e.setRequestHeader("Content-Type","multipart/form-data; boundary="+c);if(a=this._buildRequestBody(a,c))e.sendAsBinary(a);else this.onError(this.errMsg)}else console.error("No upload url found.",this)},uploadWithFormData:function(a){if(this.getUrl()){var f=
new FormData;c.forEach(this.inputNode.files,function(a){f.append(this.name+"s[]",a)},this);if(a)for(var e in a)f.append(e,a[e]);this.createXhr().send(f)}else console.error("No upload url found.",this)},_xhrProgress:function(a){if(a.lengthComputable){var c={bytesLoaded:a.loaded,bytesTotal:a.total,type:a.type,timeStamp:a.timeStamp};a.type=="load"?(c.percent="100%",c.decimal=1):(c.decimal=a.loaded/a.total,c.percent=Math.ceil(a.loaded/a.total*100)+"%");this.onProgress(c)}},createXhr:function(){var a=
new XMLHttpRequest,f;a.upload.addEventListener("progress",c.hitch(this,"_xhrProgress"),!1);a.addEventListener("load",c.hitch(this,"_xhrProgress"),!1);a.addEventListener("error",c.hitch(this,function(a){this.onError(a);clearInterval(f)}),!1);a.addEventListener("abort",c.hitch(this,function(a){this.onAbort(a);clearInterval(f)}),!1);a.onreadystatechange=c.hitch(this,function(){a.readyState===4&&(console.info("COMPLETE"),clearInterval(f),this.onComplete(c.eval(a.responseText)))});a.open("POST",this.getUrl());
f=setInterval(c.hitch(this,function(){}),250);return a},_buildRequestBody:function(a,f){var e="",f="--"+f,i=[];c.forEach(this.inputNode.files,function(a,c){var d=this.name+"s[]",h=this.inputNode.files[c].fileName,o;try{o=this.inputNode.files[c].getAsBinary()+"\r\n",e+=f+"\r\n",e+="Content-Disposition: form-data; ",e+='name="'+d+'"; ',e+='filename="'+h+'"\r\n',e+="Content-Type: "+this.getMimeType()+"\r\n\r\n",e+=o}catch(n){i.push({index:c,name:h})}},this);i.length&&i.length>=this.inputNode.files.length&&
(this.onError({message:this.errMsg,filesInError:i}),e=!1);if(!e)return!1;if(a)for(var h in a)e+=f+"\r\n",e+="Content-Disposition: form-data; ",e+='name="'+h+'"\r\n\r\n',e+=a[h]+"\r\n";e+=f+"--\r\n";return e}});a.form.addUploaderPlugin(a.form.uploader.plugins.HTML5)});
define("dojox/form/uploader/plugins/IFrame","dojo,dijit,dojox,dojo/io/iframe,dojox/form/uploader/plugins/HTML5,dojox/form/Uploader".split(","),function(c,f,a){c.declare("dojox.form.uploader.plugins.IFrame",[],{force:"",postMixInProperties:function(){this.inherited(arguments);if(!this.supports("multiple"))this.uploadType="iframe"},upload:function(a){if(!this.supports("multiple")||this.force=="iframe")this.uploadIFrame(a),c.stopEvent(a)},uploadIFrame:function(){this.getUrl();c.io.iframe.send({url:this.getUrl(),
form:this.form,handleAs:"json",error:c.hitch(this,function(a){console.error("HTML Upload Error:"+a.message)}),load:c.hitch(this,function(a){this.onComplete(a)})})}});a.form.addUploaderPlugin(a.form.uploader.plugins.IFrame)});
define("dojox/form/uploader/FileList","dojo,dijit,dojox,dojox/form/uploader/Base,dijit/_Widget,dijit/_Templated".split(","),function(c,f,a){c.declare("dojox.form.uploader.FileList",[a.form.uploader.Base],{uploaderId:"",uploader:null,headerIndex:"#",headerType:"Type",headerFilename:"File Name",headerFilesize:"Size",_upCheckCnt:0,rowAmt:0,templateString:'<div class="dojoxUploaderFileList"><div dojoAttachPoint="progressNode" class="dojoxUploaderFileListProgress"><div dojoAttachPoint="percentBarNode" class="dojoxUploaderFileListProgressBar"></div><div dojoAttachPoint="percentTextNode" class="dojoxUploaderFileListPercentText">0%</div></div><table class="dojoxUploaderFileListTable"><tr class="dojoxUploaderFileListHeader"><th class="dojoxUploaderIndex">${headerIndex}</th><th class="dojoxUploaderIcon">${headerType}</th><th class="dojoxUploaderFileName">${headerFilename}</th><th class="dojoxUploaderFileSize">${headerFilesize}</th></tr><tr ><td colSpan="4" class="dojoxUploaderFileListContainer" dojoAttachPoint="containerNode"><table class="dojoxUploaderFileListContent" dojoAttachPoint="listNode"></table></td><tr></table><div>',
postCreate:function(){this.setUploader();this.hideProgress()},reset:function(){for(var a=0;a<this.rowAmt;a++)this.listNode.deleteRow(0);this.rowAmt=0},setUploader:function(){if(!this.uploaderId&&!this.uploader)console.warn("uploaderId not passed to UploaderFileList");else if(this.uploaderId&&!this.uploader)this.uploader=f.byId(this.uploaderId);else if(this._upCheckCnt>4){console.warn("uploader not found for ID ",this.uploaderId);return}this.uploader?(this.connect(this.uploader,"onChange","_onUploaderChange"),
this.connect(this.uploader,"reset","reset"),this.connect(this.uploader,"onBegin",function(){this.showProgress(!0)}),this.connect(this.uploader,"onProgress","_progress"),this.connect(this.uploader,"onComplete",function(){setTimeout(c.hitch(this,function(){this.hideProgress(!0)}),1250)})):(this._upCheckCnt++,setTimeout(c.hitch(this,"setUploader"),250))},hideProgress:function(a){this._hideShowProgress(a?{ani:!0,endDisp:"none",beg:15,end:0}:{endDisp:"none",ani:!1})},showProgress:function(a){this._hideShowProgress(a?
{ani:!0,endDisp:"block",beg:0,end:15}:{endDisp:"block",ani:!1})},_progress:function(a){this.percentTextNode.innerHTML=a.percent;c.style(this.percentBarNode,"width",a.percent)},_hideShowProgress:function(a){var f=this.progressNode,e=function(){c.style(f,"display",a.endDisp)};a.ani?(c.style(f,"display","block"),c.animateProperty({node:f,properties:{height:{start:a.beg,end:a.end,units:"px"}},onEnd:e}).play()):e()},_onUploaderChange:function(a){this.reset();c.forEach(a,function(a,c){this._addRow(c+1,
this.getFileType(a.name),a.name,a.size)},this)},_addRow:function(a,f,e,i){var h,k=this.listNode.insertRow(-1);h=k.insertCell(-1);c.addClass(h,"dojoxUploaderIndex");h.innerHTML=a;h=k.insertCell(-1);c.addClass(h,"dojoxUploaderIcon");h.innerHTML=f;h=k.insertCell(-1);c.addClass(h,"dojoxUploaderFileName");h.innerHTML=e;h=k.insertCell(-1);c.addClass(h,"dojoxUploaderSize");h.innerHTML=this.convertBytes(i).value;this.rowAmt++}})});
define("orion/widgets/ImportDialog","i18n!orion/widgets/nls/messages,dojo,dijit,dojox,dijit/Dialog,dojo/data/ItemFileReadStore,dojox/form/Uploader,dojox/form/uploader/FileList,dojox/form/uploader/plugins/IFrame,dijit/form/Button,dijit/ProgressBar,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/ImportDialog.html,dojo/io/iframe".split(","),function(c,f,a){f.declare("orion.widgets.ImportDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title"><div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar"><span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="${id}_title"></span><span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="onclick:onCancel" title="${buttonCancel}"><span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span></span></div><div ondragover="event.preventDefault()" data-dojo-attach-point="containerNode" class="dijitDialogPaneContent"><div class="uploadContainer" data-dojo-attach-event="drop:drop,dragenter:dragEnter,dragexit:dragExit,dragover:dragOver"><div class="dottedOutline"><div data-dojo-attach-point="dragArea" class="floatingSection"><div class="uploadInstruction">'+
c["Drag a File or Zip here"]+'</div><div class="tipInstruction">'+c["or if you prefer"]+'</div><form data-dojo-attach-point="importform" method="post" id="importDialog.myForm" enctype="multipart/form-data" ><input class="uploadBrowser" data-dojo-attach-point="importloader" name="uploadedfile" multiple="false" type="file" id="importLoader" force="iframe" data-dojo-type="dojox.form.Uploader" style="height: 20px" label="'+c["Browse..."]+'" ><input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button" style="visibility:hidden;padding: 20 0 10 0; float: right; clear: both;"/></form></div></div></div></div></div>',
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=c["Import a file or zip"]},handleReadyState:function(){this.req.readyState===4&&(this.hide(),this.options.func())},uploadDroppedFiles:function(a){this.req=new XMLHttpRequest;this.req.open("post",this.options.importLocation,!0);this.req.setRequestHeader("X-Requested-With","XMLHttpRequest");this.req.setRequestHeader("Slug",a.name);a.name.indexOf(".zip")!==
a.name.length-4&&this.req.setRequestHeader("X-Xfer-Options","raw");this.req.setRequestHeader("Content-Type",a.type);this.req.onreadystatechange=f.hitch(this,"handleReadyState");this.req.send(a)},upload:function(a){a&&this.importloader.upload(a)},handleFiles:function(a){for(this.importloader.form[0].files=a;0<a.length;a++)this.uploadDroppedFiles(a[0])},dragEnter:function(){return!1},dragExit:function(){return!1},dragOver:function(){return!1},drop:function(a){a.preventDefault();a.stopPropagation();
a=a.dataTransfer.files;a.length>0&&this.handleFiles(a)},postCreate:function(){this.inherited(arguments);f.style(this.importloader.domNode,"left","100px");f.style(this.titleBar,"padding","10px 10px 10px");this.importloader.force="iframe";this.importloader.preventDefault=function(){};this.importloader.stopPropagation=function(){};this.importform.action=this.options.importLocation;this.importloader.url=this.options.importLocation;f.connect(this.importloader,"onChange",f.hitch(this,function(){this.importloader.upload({preventDefault:function(){},
stopPropagation:function(){}})}));f.connect(this.importloader,"onError",f.hitch(this,function(){setTimeout(f.hitch(this,function(){this.hide()}),2E3)}));f.connect(this.importloader,"onComplete",f.hitch(this,function(){setTimeout(f.hitch(this,function(){this.hide();this.options.func()}),2E3)}));f.connect(this.importloader,"onKeyPress",function(a){a.keyCode===f.keys.ENTER&&a.stopPropagation()})}})});
define("orion/extensionCommands","require,dojo,orion/util,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/widgets/NewItemDialog,orion/widgets/DirectoryPrompterDialog,orion/widgets/ImportDialog,orion/widgets/SFTPConnectionDialog".split(","),function(c,f,a,d,g,e,i,h){var k={},c=window.location.href.split("#")[0],j=c.substring(0,c.length-window.location.pathname.length);k._cloneItemWithoutChildren=function m(a){if(a===null||typeof a!=="object")return a;var c=
a.constructor(),d;for(d in a)d!=="children"&&d!=="Children"&&(c[d]=m(a[d]));return c};k._createOpenWithCommands=function(a){function c(a,d){for(var e=a.getServiceReferences("orion.navigate.openWith"),f=[],g=0;g<e.length;g++){var h=e[g];h.getProperty("editor")===d.id&&(h=h.getProperty("contentType"),h instanceof Array?f=f.concat(h):h!==null&&typeof h!=="undefined"&&f.push(h))}return f}for(var d=function(){for(var c=a.getServiceReferences("orion.edit.editor"),d=[],e=0;e<c.length;e++){var f=c[e],g=f.getProperty("id");
d.push({id:g,name:f.getProperty("name"),nameKey:f.getProperty("nameKey"),nls:f.getProperty("nls"),uriTemplate:f.getProperty("orionTemplate")||f.getProperty("uriTemplate")})}return d}(),e=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),f=[],g=0;g<d.length;g++){var h=d[g],i=e&&e.editor===h.id,j=c(a,h);j.length&&f.push({properties:{name:h.name||h.id,nameKey:h.nameKey,id:"eclipse.openWithCommand."+h.id,tooltip:h.name,
tooltipKey:h.nameKey,contentType:j,uriTemplate:h.uriTemplate,nls:h.nls,forceSingleItem:!0,isEditor:i?"default":"editor"},service:{}})}return f};k._makeValidator=function(a,c,d,g){function h(a,c,d,e){var f=d.match,g;if(c.indexOf("|")>=0)return g=c.substring(0,c.indexOf("|")),c=c.substring(c.indexOf("|")+1),h(a,g,d,e)?!0:h(a,c,d,e);else if(c.indexOf(":")>=0)return g=c.substring(0,c.indexOf(":")),c=c.substring(c.indexOf(":")+1),a[g]?h(a[g],c,d,e):!1;else{a:{g=!1;var i;if(a[c]){if(f)if(typeof f==="string"){if(!typeof(a[c]===
"string")){d=!1;break a}if(d.variableName){if(f=RegExp(f).exec(a[c]))g=f[0],i=d.variableMatchPosition==="before"?a[c].substring(0,f.index):d.variableMatchPosition==="after"?a[c].substring(f.index+g.length):d.variableMatchPosition==="only"?g:a[c],g=!0}else{d=RegExp(f).test(a[c]);break a}}else a[c]===f&&(i=a[c],g=!0);else i=a[c],g=!0;if(g&&d.variableName&&(e[d.variableName]=i,e.itemCached=a,d.replacements))for(a=0;a<d.replacements.length;a++)c=!1,d.replacements[a].pattern?e[d.variableName]=e[d.variableName].replace(RegExp(d.replacements[a].pattern),
d.replacements[a].replacement||""):c=!0,c&&window.console.log("Invalid replacements specified in validation property.  "+d.replacements[a]);d=g}else d=!1}return d}}c={info:a};c.validationFunction=f.hitch(c,function(c){typeof g==="function"&&(c=g.call(this,c));if(c){if(f.isArray(c)){if((this.info.forceSingleItem||this.info.uriTemplate)&&c.length!==1)return!1;if(c.length<1)return!1}else c=[c];for(var i=0;i<c.length;i++){var j;a:{var k=c[i],o=d;if(this.info.validationProperties)for(j=0;j<this.info.validationProperties.length;j++){var x=
this.info.validationProperties[j];if(x.source){if(!h(k,x.source,x,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&&o){x=!1;if(k=e.getFilenameContentType(k.Name,o))for(j=0;j<this.info.contentType.length;j++)if(k.id===this.info.contentType[j]){x=!0;break}j=x}else j=!0}if(!j)return!1}return!0}return!1});c.generatesURI=f.hitch(c,function(){return!!this.info.uriTemplate});c.getURI=f.hitch(c,
function(a){if(this.info.uriTemplate){var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(this.info.validationProperties)for(d=0;d<this.info.validationProperties.length;d++){var e=this.info.validationProperties[d];e.source&&e.variableName&&(this.itemCached===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."):c[e.variableName]=this[e.variableName])}c.OrionHome=
j;a=new i(this.info.uriTemplate);return window.decodeURIComponent(a.expand(c))}return null});return c};k._createCommandOptions=function(a,c,d,e,g,i){function j(h,s){var u=k._makeValidator(a,d,e,i);h.visibleWhen=u.validationFunction;if(g)u.generatesURI()?h.hrefCallback=f.hitch(u,function(a){return this.getURI(f.isArray(a.items)?a.items[0]:a.items)}):h.callback=f.hitch(a,function(a){var e;if(this.forceSingleItem)a=f.isArray()?a.items[0]:a.items,e=k._cloneItemWithoutChildren(a);else if(f.isArray(a.items)){e=
[];for(var g=0;g<a.items.length;g++)e.push(k._cloneItemWithoutChildren(a.items[g]))}else e=k._cloneItemWithoutChildren(a.items);c.run?c.run(e):d&&d.getService(c).run(e)});s.resolve(h)}var u=new f.Deferred;a.nls?h.getMessageBundle(a.nls).then(function(c){j({name:a.nameKey?c[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?c[a.tooltipKey]:a.tooltip,isEditor:a.isEditor},u)}):j({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},u);return u};k.getOpenWithCommands=
function(a){var c=[],d;for(d in a._commandList){var e=a._commandList[d];e.isEditor&&c.push(e)}return c};return k});
define("orion/globalCommands","i18n!orion/nls/messages,require,dojo,dijit,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/util,orion/textview/keyBinding,orion/breadcrumbs,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton,orion/widgets/OpenResourceDialog,orion/widgets/LoginDialog,orion/widgets/UserMenu,orion/widgets/UserMenuDropDown".split(","),function(c,f,a,d,g,e,i,h,k,j,l,m,o,n,
p){function q(c,d){if(c.getLabel)return c.getLabel();else{var e=new a.Deferred;e.callback(d.properties.name);return e}}function r(c){(c=c.getService("orion.page.progress"))&&a.hitch(c,c.init)("progressPane")}function s(a,c){var d=a.getService("orion.core.auth");d!==null&&d.getUser().then(function(a){a.Name?c.set("label",a.Name):a.login&&c.set("label",a.login)})}function u(f){var g=f.getServiceReferences("orion.core.auth");C=[];var h=a.byId("userMenu");if(h){if(!d.byId("logins")){var i=new orion.widgets.UserMenuDropDown({id:"logins",
dropDown:I,label:c.Options,showLabel:!0});a.place(i.domNode,h,"only");i.valueNode&&a.destroy(i.valueNode);i.titleNode&&a.attr(i.titleNode,"title")&&a.removeAttr(i.titleNode,"title");new e.CommandTooltip({connectId:[i.focusNode],label:c.Options,position:["above","left","right","below"]});s(f,i)}for(h=0;h<g.length;h++){var i=g[h],j=f.getService(i);a.hitch(this,function(a,c){q(a,c).then(function(c){a.getKey().then(function(d){C.push(d);a.getUser().then(function(e){A.addUserItem(d,a,c,e);I.addUserItem(d,
a,c,e)},function(e,f){A.addUserItem(d,a,c);I.addUserItem(d,a,c,f)});window.addEventListener("storage",function(){E[d]!==localStorage.getItem(d)&&(E[d]=localStorage.getItem(d),a.getUser().then(function(e){A.addUserItem(d,a,c,e);I.addUserItem(d,a,c,e)},function(){A.addUserItem(d,a,c);I.addUserItem(d,a,c)}))},!1)})})})(j,i)}}}function t(){if(a.byId("relatedLinks")&&y){var c=d.byId("related");c&&c.closeDropDown();y.focusedChild=null;a.forEach(y.getChildren(),function(a){y.removeChild(a);a.destroy()})}}
function v(e,f){y||(y=new d.Menu({style:"display: none;padding:3px;border-radius:3px;",id:"relatedLinksMenu"}));e._addMenuItem(y,f);var g=d.byId("related"),h=a.byId("relatedLinks");h&&!g&&(g=new orion.widgets.UserMenuDropDown({id:"related",label:c.Related,dropDown:y}),a.addClass(g.domNode,"bannerMenu"),a.place(g.domNode,h,"only"),k.forceLayout(h))}function x(c,d,f,g,i){var j,l=c.getServiceReferences("orion.page.link.related");if(!(l.length<=0)){var n=a.byId("relatedLinks");n&&a.when(function(){if(j)return j;
var a=c.getService("orion.core.contenttypes");a||(a=new o.ContentTypeService(c),a=c.getService("orion.core.contenttypes"));return a.getContentTypes().then(function(a){return j=a})}(),a.hitch(this,function(){var m;t();for(var q=[],o=0;o<l.length;o++){var p={},r,s=l[o].getPropertyNames();for(r=0;r<s.length;r++)p[s[r]]=l[o].getProperty(s[r]);if(p.id){var u=function(c){if(c)if(!c.visibleWhen||c.visibleWhen(d)){var f=new e.CommandInvocation(g,d,d,null,c);v(c,f)}else typeof i==="function"&&(m||(m=i()),
a.when(m,a.hitch(c,function(a){a&&d===J&&(!this.visibleWhen||this.visibleWhen(a))&&v(this,new e.CommandInvocation(g,a,a,null,this))})))},B=null;if(a.indexOf(f,p.id)<0)if((p.nls&&p.nameKey||p.name)&&p.uriTemplate)r=h._createCommandOptions(p,l[o],c,j,!0),q.push(r),r.then(a.hitch(this,function(a){a=new e.Command(a);u(a)}));else{if(!B&&(B=g.findCommand(p.id))){u(B);continue}if(!B){var w=c.getServiceReferences("orion.navigate.command");for(r=0;r<w.length;r++)if(w[r].getProperty("id")===p.id){for(var p=
{},s=w[r].getPropertyNames(),x=0;x<s.length;x++)p[s[x]]=w[r].getProperty(s[x]);r=h._createCommandOptions(p,w[r],c,j,!0);q.push(r);r.then(a.hitch(this,function(a){B=new e.Command(a);u(B)}));break}}}}}(new a.DeferredList(q)).addBoth(a.hitch(this,function(){var c=a.byId("relatedLinks");y&&c&&(y.getChildren().length===0?a.style(c,"visibility","hidden"):a.style(c,"visibility","visible"));k.forceLayout(n)}))}))}}function w(c){var d=a.byId("globalActions");d&&(a.empty(d),c.renderCommands(d.id,d,{},{},"tool"))}
function z(a){var d=a.getService("orion.core.favorite");d||(d=new m.FavoritesService({serviceRegistry:a}),d=a.getService("orion.core.favorite"));G&&G.Location&&d.hasFavorite(G.ChildrenLocation||G.Location).then(function(e){e?a.getService("orion.page.message").setMessage(G.Name+c[" is already a favorite."],2E3):(d.makeFavorites([G]),a.getService("orion.page.message").setMessage(G.Name+c[" has been added to the favorites list."],2E3))})}function B(d,f){var g=a.byId("pageFavorite");g&&(G&&G.Location?
(a.addClass(g,"bannerButton"),a.connect(g,"onclick",this,function(){z(d)}),a.connect(g,"onkeypress",this,function(c){c.keyCode===a.keys.ENTER&&z(d)}),new e.CommandTooltip({connectId:[g],label:c["Add to the favorites list"],position:["below","left","right","above"],commandService:f}),a.style(g,"visibility","visible")):a.style(g,"visibility","hidden"))}var M=function(a){var c=document.createElement("a");c.href=a;return c.href}(f.toUrl("auth/NotifyAuthentication.html")),E={},A=new orion.widgets.LoginDialog,
I=new orion.widgets.UserMenu({loginDialog:A}),C=[],y,J,K=[],G=null,F;return{generateUserInfo:u,generateRelatedLinks:x,generateDomCommandsInBanner:function(c,d,e,f,g,h,i){c.closeParameterCollector();if(h=a.byId("pageActions"))a.empty(h),(h=c.renderCommands(h.id,h,e||d,d,"button"))&&h.then?h.then(function(){c.processURL(window.location.href)}):c.processURL(window.location.href);if(!i&&(h=a.byId("pageNavigationActions")))a.empty(h),c.renderCommands(h.id,h,g||e||d,f||d,"button")},generateBanner:function(h,
l,o,q,s,t,v,x){function M(c){a.query(".targetSelector").forEach(function(a){a.target=c})}function E(){q.getPreferences("/settings",2).then(function(a){a=a.get("General");if(a!==void 0&&(a=JSON.parse(a)))a=q.getSetting(a,"Navigation","Links"),M(a==="Open in new tab"?"_blank":"_self")})}var z,A=a.byId(h);if(!A)throw c["could not find banner parent, id was "]+h;a.byId("staticBanner")||a.place(g.topHTMLFragment,A,"only");(h=a.byId("pageToolbar"))?(a.place(g.toolbarHTMLFragment,h,"only"),a.addClass(h,
"toolComposite")):(h=a.create("div",{id:"pageToolbar","class":"toolbar toolComposite layoutBlock"},"titleArea","after"),a.place(g.toolbarHTMLFragment,h,"only"));a.byId("footerContent")||(h=a.byId("footer"))&&a.place(g.bottomHTMLFragment,h,"only");o.setParameterCollector(new i.CommandParameterCollector);a.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',document.body,"last");var J=a.byId("primaryNav");if(J)for(var h=
l.getServiceReferences("orion.page.link"),t=p.matchResourceParameters(window.location.href),y={OrionHome:window.location.protocol+"//"+window.location.host,Location:t.resource},t=0;t<h.length;t++){for(var C={},F=h[t].getPropertyNames(),K=0;K<F.length;K++)C[F[K]]=h[t].getProperty(F[K]);C.uriTemplate&&C.nls&&(C.name||C.nameKey)?f(["i18n!"+C.nls],function(c){var d=new n(C.uriTemplate),d=window.decodeURIComponent(d.expand(y)),d=a.create("a",{href:d,target:"_self","class":"targetSelector"},J,"last");z=
document.createTextNode(C.nameKey?c[C.nameKey]:C.name);a.place(z,d,"only")}):C.uriTemplate&&C.name&&(F=new n(C.uriTemplate),F=window.decodeURIComponent(F.expand(y)),F=a.create("a",{href:F,target:"_self","class":"targetSelector"},J,"last"),z=document.createTextNode(C.name),a.place(z,F,"only"))}var G=a.byId("search");if(!G)throw"failed to generate HTML for banner";a.connect(G,"onkeypress",function(d){if(d.charOrCode===a.keys.ENTER)if(s){if(G.value.length>0)d=s.createSearchQuery(G.value),window.location=
f.toUrl("search/search.html")+"#"+d}else window.alert(c["Can't search: no search service is available"])});h=new e.Command({name:c["Make Favorite"],tooltip:c["Add to the favorites list"],imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(c){c=a.isArray(c)?c:[c];if(c.length===0)return!1;for(var d=0;d<c.length;d++)if(!c[d].Location)return!1;return!0},callback:function(d){for(var d=a.isArray(d.items)?d.items:[d.items],e=l.getService("orion.core.favorite"),f=function(a){return function(d){d?
l.getService("orion.page.message").setMessage(a.Name+c[" is already a favorite."],2E3):e.makeFavorites(a)}},g=0;g<d.length;g++){var h=d[g];e.hasFavorite(h.ChildrenLocation||h.Location).then(f(h))}}});o.addCommand(h);var V=function(c,d,e){var f=d.getService("orion.core.favorite");f||(f=new m.FavoritesService({serviceRegistry:d}),f=d.getService("orion.core.favorite"));var g=new orion.widgets.OpenResourceDialog({searcher:c,searchRenderer:c.defaultRenderer,favoriteService:f});e&&a.connect(g,"onHide",
function(){e.getTextView().focus()});window.setTimeout(function(){g.show()},0)},h=new e.Command({name:c["Find File Named..."],tooltip:c["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){V(s,l,v)}});v&&(v.getTextView().setKeyBinding(new j.KeyBinding("f",!0,!0,!1),h.id),v.getTextView().setAction(h.id,function(){V(s,l,v);return!0},h));o.addCommand(h);o.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new e.CommandKeyBinding("f",
!0,!0));h=new e.Command({name:c["Toggle banner and footer"],tooltip:c["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var c=d.byId(A.parentNode.id);if(c){var e=a.byId("footer");A.style.display==="none"?(A.style.display="block",e.style.display="block"):(A.style.display="none",e.style.display="none");c.layout()}return!0}});o.addCommand(h);o.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.CommandKeyBinding("m",!0,!0));v&&(v.getTextView().setKeyBinding(new e.CommandKeyBinding("m",
!0,!0),h.id),v.getTextView().setAction(h.id,h.callback,h));var Q=a.byId("keyAssist");a.connect(document,"onkeypress",a.hitch(this,function(c){if(c.charOrCode===a.keys.ESCAPE)Q.style.display="none"}));a.connect(document,"onclick",a.hitch(this,function(a){if((a=a.target||a.originalTarget||a.srcElement)&&a.id!=="keyAssist")Q.style.display="none"}));v&&v.getTextView().addEventListener("MouseDown",function(){Q.style.display="none"});x&&x.addHandler({isActive:function(){return Q.style.display==="block"},
cancel:function(){return this.isActive()?(Q.style.display="none",!0):!1}});x=new e.Command({name:c["System Configuration Details"],tooltip:c["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return f.toUrl("help/about.html")}});o.addCommand(x);o.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new e.CommandKeyBinding(112,!0,!0));x=new e.Command({name:c["Background Operations"],tooltip:c["Background Operations Tooltip"],id:"orion.backgroundOperations",
hrefCallback:function(){return f.toUrl("operations/list.html")}});o.addCommand(x);o.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new e.CommandKeyBinding("o",!0,!0));x=new e.Command({name:c["Show Keys"],tooltip:c["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(Q.style.display==="none"){a.empty(Q);if(v){a.place("<h2>"+c.Editor+"</h2>",Q,"last");for(var d=v.getTextView().getActions(!1),e=0;e<d.length;e++){var f=
d[e],g=f,h=v.getTextView(),i=h.getActionDescription(f);if(i&&i.name)g=i.name;f=h.getKeyBindings(f);for(h=0;h<f.length;h++)a.place('<span role="listitem">'+k.getUserKeyString(f[h])+" = "+g+"<br></span>",Q,"last")}}a.place("<h2>"+c.Global+"</h2>",Q,"last");o.showKeyBindings(Q);Q.style.display="block"}else Q.style.display="none";return!0}});o.addCommand(x);o.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new e.CommandKeyBinding(191,!1,!0));v&&(h=window.navigator.platform.indexOf("Mac")!==
-1,v.getTextView().setKeyBinding(new e.CommandKeyBinding(191,!1,!0,!h,h),x.id),v.getTextView().setAction(x.id,x.callback,x));I.setKeyAssist(x.callback);B(l,o);w(o);u(l);r(l);k.forceLayout(A.parentNode);a.subscribe("/dojo/hashchange",o,function(){o.processURL(window.location.href)});window.setTimeout(function(){E()},0)},notifyAuthenticationSite:M,setPendingAuthentication:function(c){A.setPendingAuthentication(c);for(var e in c)if(c.hasOwnProperty(e)){var f=a.byId("userMenu");if(f.innerHTML)try{d.popup.open({popup:A,
around:f})}catch(g){}else window.setTimeout(function(){try{d.popup.open({popup:A,around:f})}catch(a){}},500);return}d.popup.hide&&d.popup.hide(A);d.popup.close(A)},getAuthenticationIds:function(){return C},setPageTarget:function(c){var d,e,f=c.breadcrumbRootName;c.target?(c.searchService&&c.searchService.setLocationByMetaData(c.target),c.fileService&&!c.breadcrumbTarget&&(e=f?f+" ":"",e+=c.fileService.fileServiceName(c.target.Location),f=null),d=c.name||c.target.Name,J=c.target,x(c.serviceRegistry,
c.target,K,c.commandService,c.makeAlternate)):(c.breadcrumbTarget||(f=f||c.task||c.name),d=c.name);(F=c.title)||(F=d?d+" - "+c.task:c.task);window.document.title=F;a.empty("location");new l.BreadCrumbs({container:"location",resource:c.breadcrumbTarget||c.target,rootSegmentName:f,workspaceRootSegmentName:e,makeHref:c.makeBreadcrumbLink});G=c.target&&c.isFavoriteTarget?c.target:null;B(c.serviceRegistry,c.commandService)},setDirtyIndicator:function(c){if(F)F.charAt(0)==="*"&&!c&&(F=F.substring(1)),c&&
F.charAt(0)!=="*"&&(F="*"+F),window.document.title=F;var d=a.byId("dirty");if(d)d.innerHTML=c?"*":""},setPageCommandExclusions:function(a){K=a},authenticatedService:function(a){A.authenticatedService(a)}}});
define("orion/progress",["i18n!orion/nls/messages","require","dojo","orion/globalCommands","orion/widgets/OperationsDialog"],function(c,f,a,d){function g(a,c){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._operationsClient=c;this._initDone=!1;this._topicListeners={};this._myOperations={};this._lastIconClass=this._lastOperation=null}g.prototype={init:function(c){if(!this._progressPane){this._progressPane=a.byId(c);this._operationsDialog=new orion.widgets.OperationsDialog;
a.connect(this._progressPane,"onclick",a.hitch(this,this._openOperationsPopup));var f=this;a.connect(this._progressPane,"onkeypress",function(c){(c.charOrCode===" "||c.keyCode===a.keys.ENTER)&&a.hitch(f,f._openOperationsPopup)()});new Date-this.getLastListUpdate()>3E5?this._operationsClient.getRunningOperations().then(function(c){a.hitch(f,f._loadOperationsList)(c);window.setTimeout(function(){a.hitch(f,f._checkOperationsChanges())},5E3)},function(a){console.error(a)}):(a.hitch(f,f._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||
'{"Children": []}'))),window.setTimeout(function(){a.hitch(f,f._checkOperationsChanges())},5E3));window.addEventListener("storage",function(c){d.getAuthenticationIds().indexOf(c.key)>=0&&f._operationsClient.getRunningOperations().then(function(c){a.hitch(f,f._loadOperationsList)(c)},function(a){console.error(a)})},!1);window.addEventListener("storage",function(c){c.key==="orionOperations"&&a.hitch(f,f._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,f){a.Message=c["Operation status is unknown"];a.Running=!1;a.Failed=!0;a.Result={HttpCode:f?f.xhr.staus:
500,Severity:d,Message:d.Message?d.Message:d};this.writeOperation(a)},_checkOperationsChanges:function(){for(var c=this,d=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),f=[],g=[],j=0;j<d.Children.length;j++){var l=d.Children[j];if(l.Running==!0&&new Date-new Date(l.lastClientDate?l.lastClientDate:0)>5E3){var m=this._operationsClient.getOperation(l.Location);g.push(m);a.hitch(this,function(g){m.then(function(d){d.lastClientDate=new Date;a.hitch(c,c.writeOperation)(d)},function(j,
l){if(j.status==404)return f.push(g),j;a.hitch(c,c._markOperationAsFailed(d.Children[g],j,l))})})(j)}!l.Running&&new Date-new Date(l.lastClientDate?l.lastClientDate:0)>3E5&&f.push(j)}(new a.DeferredList(g)).addBoth(function(){if(f.length>0){d.lastClientDate=new Date;for(var g=f.length-1;g>=0;g--)d.Children.splice(f[g],1);localStorage.setItem("orionOperations",JSON.stringify(d));a.hitch(c,c._generateOperationsInfo)(d)}window.setTimeout(function(){a.hitch(c,c._checkOperationsChanges())},5E3)})},_openOperationsPopup:function(){try{dijit.popup.open({popup:this._operationsDialog,
around:this._progressPane})}catch(a){}dijit.focus(this._operationsDialog.domNode)},_switchIconTo:function(c){this._lastIconClass&&a.removeClass(this._progressPane,this._lastIconClass);this._lastIconClass=c;a.addClass(this._progressPane,this._lastIconClass)},_generateOperationsInfo:function(d){this._operationsDialog.setOperations(d,this._myOperations);if(!d.Children||d.Children.length==0)this._switchIconTo("progressPane_empty"),this._progressPane.title=c.Operations,this._progressPane.alt=c.Operations,
a.hasAttr(this._progressPane,"aria-valuetext")&&a.removeAttr(this._progressPane,"aria-valuetext");else{for(var f="",g=0;g<d.Children.length;g++){var k=d.Children[g];if(this._myOperations[k.Id]&&k.Running==!0){f="running";break}}if(f===""&&this._lastOperation!=null&&this._lastOperation.Result)switch(this._operationsDialog.parseProgressResult(this._lastOperation.Result).Severity){case "Warning":f!=="error"&&(f="warning");break;case "Error":f="error"}switch(f){case "running":this._progressPane.title=
c["Operations running"];this._progressPane.alt=c["Operations running"];a.attr(this._progressPane,"aria-valuetext",c["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=c["Some operations finished with warning"];this._progressPane.alt=c["Some operations finished with warning"];a.attr(this._progressPane,"aria-valuetext",c["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=
c["Some operations finished with error"];this._progressPane.alt=c["Some operations finished with error"];a.attr(this._progressPane,"aria-valuetext",c["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=c.Operations,this._progressPane.alt=c.Operations,a.hasAttr(this._progressPane,"aria-valuetext")&&a.removeAttr(this._progressPane,"aria-valuetext"),this._switchIconTo("progressPane_operations")}}},followOperation:function(c,d,f){c.Id&&
(this._myOperations[c.Id]=!0);var g=d?d:new a.Deferred;this.writeOperation(c);var j=this;if(c&&c.Location&&c.Running==!0)window.setTimeout(function(){j._operationsClient.getOperation(c.Location).then(function(d){a.hitch(j,j.followOperation(d,g,c.Location))},function(d,f){a.hitch(j,j.setProgressResult)({Severity:"Error",Message:d});a.hitch(j,j._markOperationAsFailed(c,d,f));g.errback(d,f)})},2E3);else if(c&&c.Result)j._serviceRegistry.getService("orion.page.message").setProgressMessage(""),d=this._operationsDialog.parseProgressResult(c.Result).Severity,
d=="Error"||d=="Warning"?(c.Result.failedOperation={Location:f,Id:c.Id,Name:c.Name},g.callback(c),setTimeout(function(){j._myOperations[c.Id]&&a.hitch(j,j._openOperationsPopup)()},10)):g.callback(c),!c.Failed&&c.Idempotent==!0&&window.setTimeout(function(){a.hitch(j,j.removeOperation)(f,c.Id)},5E3);return g},removeOperation:function(c,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)(c).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 c=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),d=0;d<c.Children.length;d++){var f=c.Children[d];if(f.Id&&f.Id===a){c.Children.splice(d,1);break}}localStorage.setItem("orionOperations",JSON.stringify(c));this._generateOperationsInfo(c)},removeCompletedOperations:function(){for(var a=
JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),c=a.Children.length-1;c>=0;c--)a.Children[c].Running||a.Children.splice(c,1);localStorage.setItem("orionOperations",JSON.stringify(a));this._generateOperationsInfo(a)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(c,d){d&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(d);var f=this;return c.then(function(c){if(c&&c.Location&&
c.Message&&c.Running)return a.hitch(f,f.followOperation)(c,null,c.Location);f._serviceRegistry.getService("orion.page.message").setProgressMessage("");return c},function(c){a.hitch(f,f.setProgressResult)(c);return c})},followTopic:function(a,c){this._topicListeners[a]||(this._topicListeners[a]=[]);this._topicListeners[a].push(c)},writeOperation:function(a){this._lastOperation=a=JSON.parse(JSON.stringify(a));for(var c=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),d=0;d<c.Children.length;d++){var f=
c.Children[d];if(f.Id&&f.Id===a.Id){c.Children.splice(d,1);break}}!a.Running&&!a.Failed&&delete a.Result;a.lastClientDate=new Date;c.Children.push(a);c.lastClientDate=new Date;localStorage.setItem("orionOperations",JSON.stringify(c));this._generateOperationsInfo(c)}};g.prototype.constructor=g;return{ProgressService:g}});
define("orion/auth","i18n!orion/nls/messages,dojo,dijit,orion/globalCommands,dojo/date/locale,orion/widgets/LoginDialog".split(","),function(c,f,a,d){var g,e={};f.addOnLoad(function(){window.dojo=f;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=d});return{handleAuthenticationError:function(f,h){if(f.status===403){typeof g==="undefined"&&(g=new a.Dialog({title:c["Forbidden access"]}));var k=f.message;f.responseText&&(k=JSON.parse(f.responseText).Message||f.message);g.set("content",k);
g.show()}else if(f.status===401)try{var j=JSON.parse(f.responseText);if(!j.SignInKey)return j;var l=localStorage.getItem(j.SignInKey),m=function(){var a=localStorage.getItem(j.SignInKey);l!==a&&(window.removeEventListener("storage",m,!1),delete e[j.SignInKey],d.setPendingAuthentication(e),d.authenticatedService(j.SignInKey),h&&h())};window.addEventListener("storage",m,!1);j.SignInKey&&(e[j.SignInKey]=j,d.setPendingAuthentication(e))}catch(o){}else try{return JSON.parse(f.responseText)}catch(n){return{Message:f.Message,
HttpCode:f.status}}}}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,dojo,dijit,orion/auth,orion/util,orion/searchUtils,dijit/form/Button,dijit/layout/BorderContainer,dijit/layout/ContentPane".split(","),function(c,f,a,d,g,e,i){function h(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;(this._fileService=a.fileService)||console.error("No file service on search client")}h.prototype={search:function(a,c,d){c=i.parseQueryStr(a);try{this._fileService.search(c.location,a).then(function(a){var c=
a.responseHeader.params.q,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(function(a){for(var c=[],d=0;d<a.response.docs.length;d++){var e=a.response.docs[d];c.push({name:e.Name,path:e.Location,folderName:i.path2FolderName(e.Path,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return c}(a),c)},function(a){d(null,null,a)})}catch(e){this.registry.getService("orion.page.message").setErrorMessage(e)}},handleError:function(c,d){console.error(c);var e=document.createTextNode(c);
a.place(e,d,"only");return c},setLocationByMetaData:function(d,e){var f="",g=null;e&&d&&d.Parents&&d.Parents.length>0?g=e.index==="last"?d.Parents[d.Parents.length-1]:d.Parents[0]:d&&d.Directory&&d.Location&&d.Parents&&(g=d);g?(this.setLocationByURL(g.Location),f=g.Name):d&&(f=this._fileService.fileServiceName(d&&d.Location));g=a.byId("search");f||(f="");if(g&&g.placeholder)g.value="",g.placeholder=f.length>23?c["Search "]+f.substring(0,20)+"...":c["Search "]+f;if(g&&g.title)g.title=c["Type a keyword or wild card to search in "]+
f},setLocationByURL:function(a){this.location=a},createSearchQuery:function(a,c,d,e){d||(d="Path");d+=" asc";return c?(a=/\*$/.test(c)?"":"*",i.generateSearchQuery({sort:d,rows:100,start:0,searchStr:"NameLower:"+this._luceneEscape(c,!0)+a})):i.generateSearchQuery({sort:d,rows:40,start:0,searchStr:this._luceneEscape(a,!0),location:e?"":this.location})},_luceneEscape:function(a,c){for(var d="",e='+-&|!(){}[]^"~:\\'+(!c?"*?":""),f=0;f<a.length;f++){var g=a.charAt(f);e.indexOf(g)>=0&&(d+="\\");d+=g}return d},
defaultRenderer:{makeRenderFunction:function(d,e,g,h){return function(i,n,p){if(p)a.place("<div>"+c["Search failed."]+"</div>",d,"only"),typeof g==="function"&&g(d);else{var p=function(){function a(c,d){var e=d.folderName?d.folderName:d.path,f=document.createElement("span");f.id=e.replace(/[^a-zA-Z0-9_\.:\-]/g,"");f.appendChild(document.createTextNode(" - "+e+" "));c.appendChild(f)}var c={};return function(d,e){var f=e.name;if(c.hasOwnProperty(f)){a(d,e);var g=c[f];typeof g==="function"&&(c[f]=null,
g())}else c[f]=function(){a(d,e)}}}(),q=!1;a.empty(d);if(i&&i.length>0){var r=document.createElement("table");r.setAttribute("role","presentation");for(var s=0;s<i.length;s++){var u=i[s],t;if(!q&&(q=!0,e))t=r.insertRow(0).insertCell(0),t.innerHTML=e;t=r.insertRow(-1).insertCell(0);t.colspan=2;h&&h(t);var v=document.createElement("a");a.place(document.createTextNode(u.name),v);u.LineNumber&&a.place(document.createTextNode(" (Line "+u.LineNumber+")"),v);var x=u.location;u.isExternalResource?x=u.path:
(x=u.directory?f.toUrl("navigate/table.html")+"#"+u.path:f.toUrl("edit/edit.html")+"#"+u.path,x==="#"&&(x=""));v.setAttribute("href",x);v.setAttribute("aria-describedby",(u.folderName?u.folderName:u.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));a.style(v,"verticalAlign","middle");t.appendChild(v);p(t,u)}a.place(r,d,"last");typeof g==="function"&&g(d)}!q&&n&&(i=a.place("<div>"+c["No matches found for "]+"</div>",d,"only"),i=a.create("b",null,i,"last"),a.place(document.createTextNode(n),i,"only"),typeof g===
"function"&&g(d))}}}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/auth"],function(c,f,a){function d(d,e,g){if(!d[e])throw e+c[" is not supportted in this file system"];var j=new f;d[e].apply(d,g).then(function(a){j.resolve(a)},function(c){c.status===401?a.handleAuthenticationError(c,function(){d[e].apply(d,g).then(function(a){j.resolve(a)},function(a){j.reject(a)})}):j.reject(c)});return j}function g(a,e,k,j){if(!a.readBlob)throw c["source file service does not support binary read"];if(!k.writeBlob)throw c["target file service does not support binary write"];
if(e[e.length-1]!=="/")return d(a,"readBlob",[e]).then(function(a){return d(k,"writeBlob",[j,a])});var l=j.substring(0,j.length-1),m=decodeURIComponent(l.substring(l.lastIndexOf("/")+1)),l=l.substring(0,l.lastIndexOf("/")+1);return d(k,"createFolder",[l,m]).then(function(){},function(){}).then(function(){e.indexOf("/")===0&&(e+="?depth=1");return d(a,"fetchChildren",[e]).then(function(c){for(var d=[],e=0;e<c.length;++e){var h=c[e].Location,l=h;c[e].Directory&&(l=h.substring(0,h.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+
1));l=j+encodeURIComponent(l);c[e].Directory&&(l+="/");d[e]=g(a,h,k,l)}return(new f).all(d)})})}function e(a,d){function e(a){var d=new f;d.reject(c["No Matching FileService for location:"]+a);return d}var g=a.getServiceReferences("orion.core.file"),l=g;if(d)for(var l=[],m=0;m<g.length;++m)d(g[m])&&l.push(g[m]);for(var o=[],n=[],p=[],q=[],r={fetchChildren:function(){var a=new f;a.resolve(q);return a},createWorkspace:function(){var a=new f;a.reject(c["no file service"]);return a},loadWorkspaces:function(){var a=
new f;a.reject(c["no file service"]);return a},loadWorkspace:function(){var a=new f;window.setTimeout(function(){a.resolve({Directory:!0,Length:0,LocalTimeStamp:0,Name:c["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},g=0;g<l.length;++g)q[g]={Directory:!0,Length:0,LocalTimeStamp:0,Location:l[g].getProperty("top"),ChildrenLocation:l[g].getProperty("top"),Name:l[g].getProperty("Name")},
m=l[g].getProperty("pattern")||".*",m[0]!=="^"&&(m="^"+m),o[g]=RegExp(m),n[g]=a.getService(l[g]),p[g]=l[g].getProperty("Name");this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return n[0]?0:-1;for(var d=0;d<o.length;++d)if(o[d].test(a))return d;throw c["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?r:n[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?r.Name:p[a]}}
e.prototype={fileServiceName:function(a){return this._getServiceName(a)},fetchChildren:function(a){return d(this._getService(a),"fetchChildren",arguments)},createWorkspace:function(a){return d(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(a){return d(this._getService(a),"loadWorkspace",arguments)},createProject:function(a,c,e,f){return d(this._getService(a),"createProject",arguments)},createFolder:function(a,
c){return d(this._getService(a),"createFolder",arguments)},createFile:function(a,c){return d(this._getService(a),"createFile",arguments)},deleteFile:function(a){return d(this._getService(a),"deleteFile",arguments)},moveFile:function(a,c,e){var f=this._getService(a),l=this._getService(c);if(f===l)return d(f,"moveFile",arguments);var m=a[a.length-1]==="/",o=c;o[o.length-1]!=="/"&&(o+="/");if(e)o+=encodeURIComponent(e);else{var n=a;m&&(n=n.substring(0,n.length-1));o+=n.substring(n.lastIndexOf("/")+1)}m&&
o[o.length-1]!=="/"&&(o+="/");return g(f,a,l,o).then(function(){return d(f,"deleteFile",[a])})},copyFile:function(a,c,e){var f=this._getService(a),l=this._getService(c);if(f===l)return d(f,"copyFile",arguments);var m=a[a.length-1]==="/",o=c;o[o.length-1]!=="/"&&(o+="/");if(e)o+=encodeURIComponent(e);else{var n=a;m&&(n=n.substring(0,n.length-1));o+=n.substring(n.lastIndexOf("/")+1)}m&&o[o.length-1]!=="/"&&(o+="/");return g(f,a,l,o)},read:function(a,c){return d(this._getService(a),"read",arguments)},
write:function(a,c,e){return d(this._getService(a),"write",arguments)},remoteImport:function(a,c){return d(this._getService(a),"remoteImport",arguments)},remoteExport:function(a,c){return d(this._getService(a),"remoteExport",arguments)},search:function(a,c){return d(this._getService(a),"search",arguments)}};e.prototype.constructor=e;return{FileClient:e}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/auth","orion/Deferred"],function(c,f,a){function d(c,d,e){var g=new a;c[d].apply(c,e).then(function(a){g.resolve(a)},function(a){a.status===401?f.handleAuthenticationError(a,function(){c[d].apply(c,e).then(function(a){g.resolve(a)},function(a){g.reject(a)})}):g.reject(a)});return g}function g(a){this._location=a}function e(){var d=new a;d.reject(c["No Matching OperationService for location:"]+this._location);return d}function i(a){this._services=
[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var c=a.getServiceReferences("orion.core.operation"),d=0;d<c.length;d++){var e=a.getService(c[d]);this._services[d]=e;e=c[d].getProperty("pattern")||".*";e[0]!=="^"&&(e="^"+e);this._patterns[d]=RegExp(e)}this._getService=function(a){if(!a)return this._services[0];for(var c=0;c<this._patterns.length;++c)if(this._patterns[c].test(a))return this._services[c];return new g(a)}}function h(a){for(var c={Children:[]},d=0;d<
a.length;d++)c.Children=c.Children.concat(a[d].Children);return c}function k(a,c,e){var f=this,g={Longpolling:!0};if(e)g.LongpollingId=e;d(a,"getOperations",[g]).then(function(d){e&&f._currentLongpollingIds.indexOf(e)<0||(c(d,e),d.LongpollingId?(f._currentLongpollingIds.push(d.LongpollingId),k.bind(f)(a,c,d.LongpollingId)):k.bind(f)(a,c,e))},function(d){e&&f._currentLongpollingIds.indexOf(e)<0||("timeout"===d.dojoType?k.bind(f)(a,c,e):setTimeout(function(){k.bind(f)(a,c,e)},2E3))})}function j(a){for(var c=
0;c<this._operationListeners.length;c++)this._operationListeners[c](a)}g.prototype={getOperation:e,getOperations:e,removeCompletedOperations:e,removeOperation:e,cancelOperation:e};g.prototype.constructor=g;i.prototype={getOperations:function(){for(var c=new a,e=[],f=0;f<this._services.length;f++)e[f]=d(this._services[f],"getOperations",[void 0]);(new a).all(e).then(function(a){c.resolve(h(a))});return c},getRunningOperations:function(){for(var c=new a,e=[],f=0;f<this._services.length;f++)e[f]=d(this._services[f],
"getOperations",[{RunningOnly:!0}]);(new a).all(e).then(function(a){c.resolve(h(a))});return c},getOperation:function(a){return d(this._getService(a),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],e=0;e<this._services.length;e++)c[e]=d(this._services[e],"removeCompletedOperations");return(new a).all(c)},removeOperation:function(a){return d(this._getService(a),"removeOperation",arguments)},cancelOperation:function(a){return d(this._getService(a),"cancelOperation",arguments)},
addOperationChangeListener:function(a){this._operationListeners.push(a);if(this._operationListeners.length===1){if(this._services.length<1)throw c["No operations services registered."];for(a=0;a<this._services.length;a++)k.bind(this)(this._services[a],j.bind(this))}},removeOperationChangeListener:function(a){for(var c=0;c<this._operationListeners.length;c++)if(this._operationListeners[c]===a){this._operationListeners.splice(c,1);break}if(this._operationListeners.length===0)this._currentLongpollingIds=
[]},resetChangeListeners:function(){this._currentLongpollingIds=[];if(this._services.length<1)throw c["No operations services registered."];for(var a=0;a<this._services.length;a++)k.bind(this)(this._services[a],j.bind(this))}};i.prototype.constructor=i;return{OperationsClient:i}});
define("orion/git/gitClient",["require","dojo","orion/auth"],function(c,f,a){var d=d||{};d.GitService=function(){function d(a){if(a)this._serviceRegistry=a,this._serviceRegistration=a.registerService("orion.git.provider",this),this._sshService=a.getService("orion.net.ssh")}d.prototype={checkGitService:function(){},cloneGitRepository:function(a,d,g,k,j,l,m,o,n){var p=this,q={};if(a)q.Name=a;if(g)q.Path=g;if(d)q.GitUrl=d;q.Location=k;if(j)q.GitSshUsername=j;if(l)q.GitSshPassword=l;if(m)q.GitSshKnownHost=
m;if(o)q.GitSshPrivateKey=o;if(n)q.GitSshPassphrase=n;var a=c.toUrl("gitapi/clone/._"),a=a.substring(0,a.length-2),r=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson(q),handleAs:"json",timeout:15E3,load:function(a,c){f.hitch(p,p._getGitServiceResponse)(r,a,c)},error:function(a,c){return f.hitch(p,p._handleGitServiceResponseError)(r,this,a,c)}});return r},removeGitRepository:function(a){var c=this,d=new f.Deferred;f.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",
timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){return f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e)}});return d},getDiffContent:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},content:{parts:"diff"},handleAs:"text",timeout:15E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){return f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},getDiffFileURI:function(a){var c=
this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},content:{parts:"uris"},handleAs:"json",timeout:15E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},getGitStatus:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,
c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},stage:function(a){var c=this,d=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e)}});return d},stageMultipleFiles:function(a,c){var d=this,g=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:f.toJson({Path:c}),handleAs:"json",timeout:15E3,
load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},unstageAll:function(a,c){var d=this,g=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:f.toJson({Reset:c}),load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},unstage:function(a,c){var d=this,g=new f.Deferred;
f.xhrPost({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:f.toJson({Path:c}),load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},checkoutPath:function(a,c){var d=this,g=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:f.toJson({Path:c,RemoveUntracked:"true"}),handleAs:"json",timeout:15E3,load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,
c){return f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},commitAll:function(a,c,d){var g=this,j=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:d,load:function(a,c){f.hitch(g,g._getGitServiceResponse)(j,a,c)},error:function(a,c){f.hitch(g,g._handleGitServiceResponseError)(j,this,a,c)}});return j},getGitClone:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,
e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},getGitCloneConfig:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},getGitBranch:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},getGitRemote:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},
checkoutBranch:function(a,c){var d=this,g=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:f.toJson({Branch:c}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},resetIndex:function(a,c){var d=this,g=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({Commit:c,Reset:"HARD"}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(d,
d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},addBranch:function(a,c,d){var g=this,j={};if(c)j.Name=c;if(d)j.Branch=d;var l=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson(j),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(g,g._getGitServiceResponse)(l,a,c)},error:function(a,c){f.hitch(g,g._handleGitServiceResponseError)(l,this,a,c)}});return l},removeBranch:function(a){var c=this,d=
new f.Deferred;f.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e)}});return d},addRemote:function(a,c,d){var g=this,j=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},putData:f.toJson({Remote:c,RemoteURI:d}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(g,g._getGitServiceResponse)(j,a,c)},error:function(a,c){f.hitch(g,
g._handleGitServiceResponseError)(j,this,a,c)}});return j},removeRemote:function(a){var c=this,d=new f.Deferred;f.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e)}});return d},doGitLog:function(a){var c=this,d=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,
a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}});return d},getDiff:function(a,c){var d=this,g=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({New:c}),handleAs:"json",timeout:5E3,load:function(a,c){g.callback(c.xhr.getResponseHeader("Location"))},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c,f.xhrPost)}});return g},doFetch:function(a,c,d,g,j,l,m){var o=this,n=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},
postData:f.toJson({Fetch:"true",Force:c,GitSshUsername:d,GitSshPassword:g,GitSshKnownHost:j,GitSshPrivateKey:l,GitSshPassphrase:m}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(o,o._getGitServiceResponse)(n,a,c)},error:function(a,c){f.hitch(o,o._handleGitServiceResponseError)(n,this,a,c)}});return n},doPull:function(a,c,d,g,j,l,m){var o=this,n=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({Pull:"true",Force:c,GitSshUsername:d,GitSshPassword:g,GitSshKnownHost:j,
GitSshPrivateKey:l,GitSshPassphrase:m}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(o,o._getGitServiceResponse)(n,a,c)},error:function(a,c){f.hitch(o,o._handleGitServiceResponseError)(n,this,a,c)}});return n},doMerge:function(a,c){var d=this,g=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({Merge:c}),handleAs:"json",timeout:5E3,load:function(a,c){var e=new f.Deferred;f.hitch(d,d._getGitServiceResponse)(e,a,c);e.then(function(a){g.callback({jsonData:a})})},
error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},doCherryPick:function(a,c){var d=this,g=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({"Cherry-Pick":c}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},doRebase:function(a,c,d){var g=this,j={};j.Rebase=c;if(d)j.Operation=d;var l=new f.Deferred;f.xhrPost({url:a,
headers:{"Orion-Version":"1"},postData:f.toJson(j),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(g,g._getGitServiceResponse)(l,a,c)},error:function(a,c){f.hitch(g,g._handleGitServiceResponseError)(l,this,a,c)}});return l},doPush:function(a,c,d,g,j,l,m,o,n){var p=this,q=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({PushSrcRef:c,PushTags:d,Force:g,GitSshUsername:j,GitSshPassword:l,GitSshKnownHost:m,GitSshPrivateKey:o,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,
load:function(a,c){f.hitch(p,p._getGitServiceResponse)(q,a,c)},error:function(a,c){f.hitch(p,p._handleGitServiceResponseError)(q,this,a,c)}});return q},getLog:function(a,c){var d=this,g=new f.Deferred,j=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({New:c}),handleAs:"json",timeout:5E3,load:function(a,c){j.callback(c.xhr.getResponseHeader("Location"))},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(j,this,a,c,f.xhrPost)}});j.then(function(a){f.xhrGet({url:a,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c,f.xhrGet)}})});return g},getDefaultRemoteBranch:function(a){var c=this,d=new f.Deferred,g=new f.Deferred;f.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,d){f.hitch(c,c._getGitServiceResponse)(g,a,d)},error:function(a,d){f.hitch(c,c._handleGitServiceResponseError)(g,
this,a,d,f.xhrGet)}});g.then(function(a){if(a.Children[0]==null)return null;f.xhrGet({url:a.Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e,f.xhrGet)}})});return d},doAddTag:function(a,c){var d=this,g=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:f.toJson({Name:c}),handleAs:"json",timeout:5E3,load:function(a,
c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},doRemoveTag:function(a){var c=this,d=new f.Deferred;f.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e)}});return d},checkoutTag:function(a,c,d){var g=this,j=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},
putData:f.toJson({Tag:c,Branch:d}),handleAs:"json",timeout:5E3,load:function(a,c){f.hitch(g,g._getGitServiceResponse)(j,a,c)},error:function(a,c){f.hitch(g,g._handleGitServiceResponseError)(j,this,a,c)}});return j},addCloneConfigurationProperty:function(a,c,d){var g=this,j=new f.Deferred;f.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:f.toJson({Key:c,Value:d}),handleAs:"json",timeout:15E3,load:function(a,c){f.hitch(g,g._getGitServiceResponse)(j,a,c)},error:function(a,c){f.hitch(g,g._handleGitServiceResponseError)(j,
this,a,c)}});return j},editCloneConfigurationProperty:function(a,c){var d=this,g=new f.Deferred;f.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:f.toJson({Value:c}),handleAs:"json",timeout:15E3,load:function(a,c){f.hitch(d,d._getGitServiceResponse)(g,a,c)},error:function(a,c){f.hitch(d,d._handleGitServiceResponseError)(g,this,a,c)}});return g},deleteCloneConfigurationProperty:function(a){var c=this,d=new f.Deferred;f.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,
load:function(a,e){f.hitch(c,c._getGitServiceResponse)(d,a,e)},error:function(a,e){f.hitch(c,c._handleGitServiceResponseError)(d,this,a,e)}});return d},_getGitServiceResponse:function(a,c,d){if(d&&d.xhr.status===202)return d=new f.Deferred,d.callback(c),this._serviceRegistry.getService("orion.page.progress").showWhile(d).then(function(c){a.callback(c.Result.Severity=="Ok"?c.Result.JsonData:c.Result)});a.callback(c)},_handleGitServiceResponseError:function(c,d,g,k,j){c||(c=new f.Deferred);if(g.status===
401||g.status===403)return a.handleAuthenticationError(k.xhr,function(){j?j(d).then(function(a,d){c.callback(a,d)},function(a,d){c.errback(a,d)}):c.errback(g)})!=null&&c.errback(g),c;c.errback(g);return c}};return d}();return d});
define("orion/compare/diff-provider",["i18n!orion/compare/nls/messages","dojo","orion/auth"],function(c,f,a){function d(c,d,g){var k=new f.Deferred;c[d].apply(c,g).then(function(a){k.callback(a)},function(f){f.status===401||f.status===403?a.handleAuthenticationError(f,function(){c[d].apply(c,g).then(function(a){k.callback(a)},function(a){k.errback(a)})}):k.errback(f)});return k}function g(a,d){var f=a.getServiceReferences("orion.core.diff"),g=f;if(d)for(var g=[],j=0;j<f.length;++j)d(f[j])&&g.push(f[j]);
for(var l=[],m=[],j=0;j<g.length;++j)l[j]=RegExp(g[j].getProperty("pattern")||".*"),m[j]=a.getService(g[j]);this._getService=function(a){if(a.indexOf("://")===-1){var d=document.createElement("a");d.href=a;a=d.href}for(d=0;d<l.length;++d)if(l[d].test(a))return m[d];throw c["No Matching DiffService for location:"]+a;}}g.prototype={getDiffContent:function(a){return d(this._getService(a),"getDiffContent",arguments)},getDiffFileURI:function(a){return d(this._getService(a),"getDiffFileURI",arguments)}};
return{DiffProvider:g}});
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(c,f,a,d,g,e,i,h,k){var j={},l=null;j.EditorCommandFactory=function(){function h(a,c,d,e,f,g,i,j){this.serviceRegistry=a;this.commandService=c;this.fileClient=d;this.inputManager=e;this.toolbarId=f;this.pageNavId=i;this.isReadOnly=g;this._searcher=j}h.prototype={generateEditorCommands:function(h){function j(a){if(l)return l;
var c=a.getService("orion.core.contenttypes");c||(c=new e.ContentTypeService(a),c=a.getService("orion.core.contenttypes"));return c.getContentTypes().then(function(a){return l=a})}function p(a){var c=new i.KeyBinding;i.KeyBinding.apply(c,a);return c}if(!this.isReadOnly){h.getTextView().setKeyBinding(new i.KeyBinding("s",!0),"save");this.inputManager.onSave?h.getTextView().setAction("save",f.hitch(this,function(){var a=h.getText();this.inputManager.onSave(this.inputManager.getInput(),a,f.hitch(this,
function(){h.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()}),f.hitch(this,function(a){a.log=!0}));return!0}),{name:c.Save}):h.getTextView().setAction("save",f.hitch(this,function(){var a=h.getText(),d={ETag:this.inputManager.getFileMetadata().ETag};this.fileClient.write(this.inputManager.getInput(),a,d).then(f.hitch(this,function(c){this.inputManager.getFileMetadata().ETag=c.ETag;h.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&
this.inputManager.afterSave()}),f.hitch(this,function(d){d.status===412?confirm(c["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(c){this.inputManager.getFileMetadata().ETag=c.ETag;h.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()})):d.log=!0}));return!0}),{name:c.Save});this.commandService.addCommand(new a.Command({name:c.Save,tooltip:c["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 c=h.getModel().getLineAtOffset(h.getCaretOffset())+1;return[new a.CommandParameter("line","number","Line:",c.toString())]}),q=new a.Command({name:c["Go to Line"],tooltip:c["Go to specified line number"],
id:"orion.gotoLine",parameters:q,callback:function(a){var d=h.getModel();a.parameters&&a.parameters.valueFor("line")?a=a.parameters.valueFor("line"):(a=d.getLineAtOffset(h.getCaretOffset()),(a=prompt(c["Go to line:"],a+1))&&(a=parseInt(a,10)));if(a)h.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"));h.getTextView().setKeyBinding(new i.KeyBinding("l",
!0),"gotoLine");h.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 c=h.getSelection(),d="";c.end>c.start&&(d=h.getModel().getText(c.start,c.end));return[new a.CommandParameter("find","text","Find:",d)]}),m=this,q=new a.Command({name:"Find",tooltip:"Find",id:"orion.editor.find",parameters:q,callback:function(a){if(m._searcher){var c=
"",d=null,e=h.getSelection();if(e.end>e.start)c=h.getModel().getText(e.start,e.end),fromSelection=!0;else if(a.parameters&&a.parameters.valueFor("find"))a=a.parameters.valueFor("find"),d=k.parseFindURLBinding(a),c=d.searchStr;d?(m._searcher.setOptions({useRegExp:d.useRegExp}),d.lineNumber?(a=h.getModel().getLineStart(d.lineNumber-1),h.moveSelection(a,a,function(){m._searcher.buildToolBar(c,d?d.replaceStr:null);m._searcher.findNext(!0)},focus)):(m._searcher.buildToolBar(c,d?d.replaceStr:null),m._searcher.findNext(!0))):
m._searcher.buildToolBar(c);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"));h.getTextView().setKeyBinding(new i.KeyBinding("f",!0),"find");h.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,
t=function(c,d,e){e.callback=f.hitch(h,function(a){h=a?a.items||this:this;var c=h.getSelection(),a=h.getModel(),e=a.getText();d.run(a.getText(c.start,c.end),e,c,u.getInput()).then(function(a){a&&a.text?(h.setText(a.text),a.selection&&(h.setSelection(a.selection.start,a.selection.end),h.getTextView().focus())):typeof a==="string"&&(h.setText(a,c.start,c.end),h.setSelection(c.start,c.start+a.length),h.getTextView().focus())});return!0});return new a.Command(e)};f.when(j(this.serviceRegistry),f.hitch(this,
function(){for(var a=[],c=0;c<s.length;c++){for(var e=s[c],i=this.serviceRegistry.getService(s[c]),j={},n=s[c].getPropertyNames(),k=0;k<n.length;k++)j[n[k]]=s[c].getProperty(n[k]);j.forceSingleItem=!0;e=g._createCommandOptions(j,e,this.serviceRegistry,l,!1,function(){return u.getFileMetadata()});a.push(e);e.then(f.hitch(this,function(a){a=t(j,i,a);this.commandService.addCommand(a);this.commandService.registerCommandContribution(this.toolbarId,a.id,100+c);if(j.key){var d=h.getTextView();d.setKeyBinding(p(j.key),
a.id);d.setAction(a.id,a.callback,a)}}))}(new f.DeferredList(a)).addBoth(f.hitch(this,function(){u.getFileMetadata()&&d.generateDomCommandsInBanner(this.commandService,h)}))}))}}};return h}();j.UndoCommandFactory=function(){function d(a,c,e){this.serviceRegistry=a;this.commandService=c;this.toolbarId=e}d.prototype={createUndoStack:function(d){var e=new h.UndoStack(d.getTextView(),200),f=new a.Command({name:c.Undo,id:"orion.undo",callback:function(a){a.items.getTextView().invokeAction("undo")}});d.getTextView().setKeyBinding(new i.KeyBinding("z",
!0),"undo");d.getTextView().setAction("undo",function(){e.undo();return!0},f);this.commandService.addCommand(f);var f=navigator.platform.indexOf("Mac")!==-1?new i.KeyBinding("z",!0,!0):new i.KeyBinding("y",!0),g=new a.Command({name:c.Redo,id:"orion.redo",callback:function(a){a.items.getTextView().invokeAction("redo")}});d.getTextView().setKeyBinding(f,"redo");d.getTextView().setAction("redo",function(){e.redo();return!0},g);this.commandService.addCommand(g);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,f);return e}};return d}();return j});
define("orion/compare/compare-container","i18n!orion/compare/nls/messages,require,dojo,dijit,orion/compare/diff-parser,orion/compare/compare-rulers,orion/editor/contentAssist,orion/editorCommands,orion/editor/editor,orion/editor/editorFeatures,orion/globalCommands,orion/commands,orion/textview/textModel,orion/textview/textView,orion/compare/compare-features,orion/compare/compareUtils,orion/util,orion/compare/diff-provider,orion/compare/jsdiffAdapter,orion/highlight,orion/compare/diffTreeNavigator,orion/searchAndReplace/textSearcher".split(","),function(c,
f,a,d,g,e,i,h,k,j,l,m,o,n,p,q,r,s,u,t,v,x){var w={};w.DefaultDiffProvider=function(){function c(a){this.serviceRegistry=a;this._diffProvider=new s.DiffProvider(a)}c.prototype={_resolveComplexDiff:function(a,c,d){if(this._diffProvider){var e=this;e._diffProvider.getDiffContent(a).then(function(d){e._diffContent=e._hasConflicts?d.split("diff --git")[1]:d;c?e.callBack({diff:e._diffContent}):e._resolveComplexFileURL(a)},d)}else console.log("A diff provider is needed for compound diff URL")},_resolveFileName:function(a){return a.split("?")[0]},
_getContentType:function(a){a=this._resolveFileName(a);return this.serviceRegistry.getService("orion.core.contenttypes").getFilenameContentType(a)},_resolveComplexFileURL:function(c,d){var e=this;this._diffProvider.getDiffFileURI(c).then(function(c){(new a.DeferredList([e._getContentType(c.Old),e._getContentType(c.New)])).then(function(a){var d=a[0][1],a=a[1][1];e.callBack({baseFile:{URL:c.Old,Name:e._resolveFileName(c.Old),Type:d},newFile:{URL:c.New,Name:e._resolveFileName(c.New),Type:a},diff:e._diffContent})},
d)},d)},provide:function(a,c,d,e,f){this.callBack=e;this._hasConflicts=d;this._resolveComplexDiff(a,c,f)}};return c}();w.CompareStyler=function(){function a(c){this._syntaxHighlither=new t.SyntaxHighlighter(c)}a.prototype={highlight:function(a,c,d,e,f){this._syntaxHighlither.setup(c,d.getTextView(),null,a,!1).then(function(){e&&f&&(d.highlightAnnotations(),d.setAnnotationRulerVisible(!1),e._highlighterLoaded++,e._highlighterLoaded===f&&(e._diffNavigator.renderAnnotations(),e._diffNavigator.gotoBlock(e.options.blockNumber-
1,e.options.changeNumber-1)))})}};return a}();w.CompareContainer=function(){function d(){this._diffParser=new g.DiffParser}d.prototype={_clearOptions:function(){this.options={};this.options.baseFile={URL:"",Name:"",Type:""};this.options.newFile={URL:"",Name:"",Type:""};this.options.blockNumber=1;this.options.changeNumber=0},setOptions:function(a,c){c&&this._clearOptions();if(a)this.options.mapper=a.mapper?a.mapper:this.options.mapper,this.options.commandSpanId=typeof a.commandSpanId==="string"?a.commandSpanId:
this.options.commandSpanId,this.options.generateLink=a.generateLink!==void 0&&a.generateLink!==null?a.generateLink:this.options.generateLink,this.options.editableInComparePage=a.editableInComparePage!==void 0&&a.editableInComparePage!==null?a.editableInComparePage:this.options.editableInComparePage,this.options.gridRenderer=a.gridRenderer||this.options.gridRenderer,this.options.readonly=a.readonly!==void 0&&a.readonly!==null?a.readonly:this.options.readonly,this.options.onPage=a.onPage!==void 0&&
a.onPage!==null?a.onPage:this.options.onPage,this.options.wordLevelNav=a.wordLevelNav!==void 0&&a.wordLevelNav!==null?a.wordLevelNav:this.options.wordLevelNav,this.options.charDiff=a.charDiff!==void 0&&a.charDiff!==null?a.charDiff:this.options.charDiff,this.options.hasConflicts=a.hasConflicts!==void 0&&a.hasConflicts!==null?a.hasConflicts:this.options.hasConflicts,this.options.diffProvider=a.diffProvider?a.diffProvider:this.options.diffProvider,this.options.complexURL=a.complexURL?a.complexURL:this.options.complexURL,
this.options.baseFile.URL=a.baseFile&&a.baseFile.URL?a.baseFile.URL:this.options.baseFile.URL,this.options.baseFile.Name=a.baseFile&&typeof a.baseFile.Name==="string"?a.baseFile.Name:this.options.baseFile.Name,this.options.baseFile.Type=a.baseFile&&a.baseFile.Type?a.baseFile.Type:this.options.baseFile.Type,this.options.baseFile.Content=a.baseFile&&typeof a.baseFile.Content==="string"?a.baseFile.Content:this.options.baseFile.Content,this.options.newFile.URL=a.newFile&&a.newFile.URL?a.newFile.URL:this.options.newFile.URL,
this.options.newFile.Name=a.newFile&&typeof a.newFile.Name==="string"?a.newFile.Name:this.options.newFile.Name,this.options.newFile.Type=a.newFile&&a.newFile.Type?a.newFile.Type:this.options.newFile.Type,this.options.newFile.Content=a.newFile&&typeof a.newFile.Content==="string"?a.newFile.Content:this.options.newFile.Content,this.options.diffURL=a.diffURL?a.diffURL:this.options.diffURL,this.options.diffContent=a.diffContent?a.diffContent:this.options.diffContent,this.options.diffArray=a.diffArray?
a.diffArray:this.options.diffArray,this.options.blockNumber=a.blockNumber?a.blockNumber:this.options.blockNumber,this.options.changeNumber=a.changeNumber?a.changeNumber:this.options.changeNumber,this.options.onSave=a.onSave?a.onSave:this.options.onSave,this.options.callback=a.callback?a.callback:this.options.callback,this._errorCallback=a.errorCallback?a.errorCallback:this._errorCallback,this.options.onSetTitle=a.onSetTitle?a.onSetTitle:this.options.onSetTitle,this.options.toggler=a.toggler?a.toggler:
this.options.toggler},initCommands:function(){var a=this.getCommandSpanId();if(a){var d=new m.Command({tooltip:c["Copy current change from right to left"],imageClass:"core-sprite-leftarrow",id:"orion.compare.copyToLeft",groupId:"orion.compareGroup",callback:function(a){a.items.copyToLeft()}}),e=new m.Command({tooltip:c["Switch to unified diff"],name:c.Unified,imageClass:"core-sprite-link",id:"orion.compare.toggle2Inline",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.toggler&&
a.options.toggler.widgetType==="twoWay"},callback:function(a){a.items.options.toggler.toggle()}}),f=new m.Command({tooltip:c["Switch to side by side diff"],name:c["Side by side"],imageClass:"core-sprite-link",id:"orion.compare.toggle2TwoWay",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.toggler&&a.options.toggler.widgetType==="inline"},callback:function(a){a.items.options.toggler.toggle()}}),g=new m.Command({tooltip:c["Generate link of the current diff"],name:c["Generate Link"],
imageClass:"core-sprite-link",id:"orion.compare.generateLink",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.complexURL&&a.options.generateLink},callback:function(a){a.items.generateLink()}}),h=new m.Command({tooltip:c["Open the compare page"],name:c.Compare,imageClass:"core-sprite-link",id:"orion.compare.openComparePage",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.complexURL&&!a.options.generateLink},hrefCallback:function(a){return a.items.openComparePage()}}),
i=new m.Command({tooltip:c["Next diff block"],imageClass:"core-sprite-move_down",id:"orion.compare.nextDiff",groupId:"orion.compareGroup",callback:function(a){a.items.nextDiff()}}),j=new m.Command({tooltip:c["Previous diff block"],imageClass:"core-sprite-move_up",id:"orion.compare.prevDiff",groupId:"orion.compareGroup",callback:function(a){a.items.prevDiff()}}),l=new m.Command({tooltip:c["Next diff change"],imageClass:"core-sprite-move_down",id:"orion.compare.nextChange",groupId:"orion.compareGroup",
callback:function(a){a.items.nextChange()}}),n=new m.Command({tooltip:c["Previous diff change"],imageClass:"core-sprite-move_up",id:"orion.compare.prevChange",groupId:"orion.compareGroup",callback:function(a){a.items.prevChange(a)}});this._commandService.addCommand(d);this._commandService.addCommand(f);this._commandService.addCommand(e);this._commandService.addCommand(g);this._commandService.addCommand(h);this._commandService.addCommand(i);this._commandService.addCommand(j);this.options.wordLevelNav&&
(this._commandService.addCommand(l),this._commandService.addCommand(n));this._commandService.registerCommandContribution(a,"orion.compare.openComparePage",107);this._commandService.registerCommandContribution(a,"orion.compare.generateLink",108);this.options.readonly||this._commandService.registerCommandContribution(a,"orion.compare.copyToLeft",109);this._commandService.registerCommandContribution(a,"orion.compare.toggle2Inline",110);this._commandService.registerCommandContribution(a,"orion.compare.toggle2TwoWay",
111);this._commandService.registerCommandContribution(a,"orion.compare.nextDiff",112);this._commandService.registerCommandContribution(a,"orion.compare.prevDiff",113);this.options.wordLevelNav&&(this._commandService.registerCommandContribution(a,"orion.compare.nextChange",114),this._commandService.registerCommandContribution(a,"orion.compare.prevChange",115))}},getCommandSpanId:function(){var a=this.options.commandSpanId;!a&&this.getDefaultCommandSpanId&&(a=this.getDefaultCommandSpanId());return a},
renderCommands:function(){var c=this.getCommandSpanId();c&&(a.empty(c),this.options.gridRenderer&&this.options.gridRenderer.navGridHolder?(this.options.gridRenderer.navGridHolder.splice(0,this.options.gridRenderer.navGridHolder.length),this.options.gridRenderer.additionalCmdRender?this.options.gridRenderer.before?(this.options.gridRenderer.additionalCmdRender(this.options.gridRenderer.navGridHolder),this._commandService.renderCommands(c,c,this,this,"button",null,this.options.gridRenderer.navGridHolder)):
(this._commandService.renderCommands(c,c,this,this,"button",null,this.options.gridRenderer.navGridHolder),this.options.gridRenderer.additionalCmdRender(this.options.gridRenderer.navGridHolder)):this._commandService.renderCommands(c,c,this,this,"button",null,this.options.gridRenderer.navGridHolder)):this._commandService.renderCommands(c,c,this,this,"button",null))},generateLink:function(){var a=this.getCurrentDiffPos(),a=q.generateCompareHref(this.options.complexURL,{readonly:this.options.readonly,
conflict:this.options.hasConflicts,block:a.block?a.block:1,change:a.change?a.change:0});prompt(c["Copy the link URL:"],a)},openComparePage:function(){var a=this.getCurrentDiffPos();return q.generateCompareHref(this.options.complexURL,{readonly:!this.options.editableInComparePage,conflict:this.options.hasConflicts,block:a.block?a.block:1,change:a.change?a.change:0})},getCurrentDiffPos:function(){return this._diffNavigator.getCurrentPosition()},nextDiff:function(){this._diffNavigator.nextDiff()},prevDiff:function(){this._diffNavigator.prevDiff()},
nextChange:function(){this._diffNavigator.nextChange()},prevChange:function(){this._diffNavigator.prevChange()},clearContent:function(){if(this.options.baseFile)this.options.baseFile.Content=null;if(this.options.newFile)this.options.newFile.Content=null},_getLineDelim:function(){return"\n"},resolveComplexDiff:function(a){if(this.options.diffProvider){var c=this;c.options.diffProvider.provide(c.options.complexURL,a,c.options.hasConflicts,function(d){c.options.baseFile.URL=d.baseFile&&typeof d.baseFile.URL===
"string"?d.baseFile.URL:c.options.baseFile.URL;c.options.baseFile.Name=d.baseFile&&typeof d.baseFile.Name==="string"?d.baseFile.Name:c.options.baseFile.Name;c.options.baseFile.Type=d.baseFile&&typeof d.baseFile.Type==="object"?d.baseFile.Type:c.options.baseFile.Type;c.options.baseFile.Content=d.baseFile&&typeof d.baseFile.Content==="string"?d.baseFile.Content:c.options.baseFile.Content;c.options.newFile.URL=d.newFile&&typeof d.newFile.URL==="string"?d.newFile.URL:c.options.newFile.URL;c.options.newFile.Name=
d.newFile&&typeof d.newFile.Name==="string"?d.newFile.Name:c.options.newFile.Name;c.options.newFile.Type=d.newFile&&typeof d.newFile.Type==="object"?d.newFile.Type:c.options.newFile.Type;c.options.newFile.Content=d.newFile&&typeof d.newFile.Content==="string"?d.newFile.Content:c.options.newFile.Content;c.options.diffContent=typeof d.diff==="string"?d.diff:c.options.diffContent;a||typeof c.options.baseFile.Content==="string"?c.setEditor(a):(c.options.callback&&c.options.callback(c.options.baseFile.Name,
c.options.newFile.Name),c.getFileContent([c.options.baseFile],0))},c.options.errorCallback)}else console.log("A diff provider is needed for Complex diff URL")},resolveDiffByContents:function(a){if(typeof this.options.baseFile.Content==="string"&&typeof this.options.newFile.Content==="string"){if(!this.options.diffContent&&!this._mapper)this.options.diffContent="";this.setEditor(a);return!0}else return!1},getFileContent:function(a,c){if(this._fileClient){var d=this;d._fileClient.read(a[c].URL).then(function(e){a[c].Content=
e;c<a.length-1?d.getFileContent(a,c+1):(e=d.setEditor(),d._onLoadContents&&d._onLoadContents(e))},function(e,f){if(e.status===404)if(a[c].Content="",c<a.length-1)d.getFileContent(a,c+1);else{var g=d.setEditor();d._onLoadContents&&d._onLoadContents(g)}else d.errorCallback&&d.errorCallback(e,f)})}else console.log("A file client is needed for getting file content")},parseMapper:function(a,c,d,e,f){var g=this._getLineDelim(a,d);if(this.options.mapper&&this.options.toggler)return{delim:g,mapper:this.options.mapper,
output:this.options.newFile.Content,diffArray:this.options.diffArray};if(c){a=(new u.JSDiffAdapter).adapt(a,c);if(this.options.toggler)this.options.mapper=a.mapper,this.options.newFile.Content=c,this.options.diffArray=a.changContents;return{delim:g,mapper:a.mapper,output:c,diffArray:a.changContents}}else{this._diffParser.setLineDelim(g);c=this._diffParser.parse(a,d,e,f);a=this._diffParser.getDiffArray();if(this.options.toggler)this.options.mapper=c.mapper,this.options.newFile.Content=c.outPutFile,
this.options.diffArray=a;return{delim:g,mapper:c.mapper,output:c.outPutFile,diffArray:a}}},startup:function(a,c){this._onLoadContents=c;this.options.complexURL?this.resolveComplexDiff(a):this.resolveDiffByContents(a)}};return d}();w.TwoWayCompareContainer=function(){function f(d,g,h,i){this._diffNavigator=new v.DiffTreeNavigator("word");this._registry=d;this._commandService=this._registry.getService("orion.page.command");this._fileClient=this._registry.getService("orion.core.file");this._searchService=
this._registry.getService("orion.core.search");this._uiFactory=h;if(!this._uiFactory)this._uiFactory=new p.TwoWayCompareUIFactory({parentDivID:g,showTitle:!1,showLineStatus:!1}),this._uiFactory.buildUI();this._viewLoadedCounter=0;this.setOptions(i,!0);var j=this;if(!this.options.callback)this.options.callback=function(c,d){j._uiFactory.getTitleDivId(!0)&&j._uiFactory.getTitleDivId(!1)&&(a.place(document.createTextNode(d),j._uiFactory.getTitleDivId(!0),"only"),a.place(document.createTextNode(c),j._uiFactory.getTitleDivId(!1),
"only"))};if(!this._errorCallback)this._errorCallback=function(c,d){if(j._uiFactory.getTitleDivId(!0)&&j._uiFactory.getTitleDivId(!1)){var e=typeof c.message==="string"?c.message:d.xhr.statusText;a.place(document.createTextNode(e),j._uiFactory.getTitleDivId(!0),"only");a.place(document.createTextNode(e),j._uiFactory.getTitleDivId(!1),"only");a.style(h.getTitleDivId(!0),"color","red");a.style(h.getTitleDivId(!1),"color","red")}};this._leftEditorDivId=this._uiFactory.getEditorParentDivId(!0);this._rightEditorDivId=
this._uiFactory.getEditorParentDivId(!1);this.initCommands();j=this;this._inputManager={filePath:"",getInput:function(){return this.filePath},setDirty:function(a){l.setDirtyIndicator(a)},getFileMetadata:function(){return this._fileMetadata},setInput:function(c){if(this.onSetTitle)this.onSetTitle(c,a.hitch(this,function(a){this.setTitle(a)}),a.hitch(this,function(a){console.error("Error loading file metadata: "+a.message);this.setTitle(c)}));else j._fileClient.read(c,!0).then(a.hitch(this,function(a){this._fileMetadata=
a;this.setTitle(a.Location,a)}),a.hitch(this,function(a){console.error("Error loading file metadata: "+a.message);this.setTitle(c)}));this.lastFilePath=c},setTitle:function(a,e){var f;if(e)f=e.Name;l.setPageTarget({task:c.Compare,name:f,target:e,serviceRegistry:d,commandService:this._commandService,searchService:this._searchService,fileService:this._fileClient});a.charAt(0)==="*"?(l.setDirtyIndicator(!0),a.substring(1)):l.setDirtyIndicator(!1)},afterSave:function(){j.startup(!0)}};if(this.options.onSave)this._inputManager.onSave=
this.options.onSave;if(this.options.onSetTitle)this._inputManager.onSetTitle=this.options.onSetTitle;this._curveRuler=new e.CompareCurveRuler(document.getElementById(this._uiFactory.getDiffCanvasDivId()));this._highlighter=[];this._highlighter.push(new w.CompareStyler(this._registry));this._highlighter.push(new w.CompareStyler(this._registry));this.initEditorContainers("\n",c["fetching..."],c["fetching..."],[])}f.prototype=new w.CompareContainer;f.prototype.initEditorContainers=function(a,d,f,g,h){this._leftEditor=
this.createEditorContainer(d,a,g,0,this._leftEditorDivId,this._uiFactory.getStatusDivId(!0),this.options.readonly,h,this.options.newFile);this.options.onPage&&l.generateDomCommandsInBanner(this._commandService,this._leftEditor,null,null,null,!0,!0);this._leftTextView=this._leftEditor.getTextView();this._rightEditor=this.createEditorContainer(f,a,g,1,this._rightEditorDivId,this._uiFactory.getStatusDivId(!1),!0,h,this.options.baseFile);this._rightTextView=this._rightEditor.getTextView();var i=this;
this._overviewRuler=new e.CompareOverviewRuler("right",{styleClass:"ruler overview"},null,function(a){i._diffNavigator.matchPositionFromOverview(a)});this._rightTextView.addRuler(this._overviewRuler);i=this;window.onbeforeunload=function(){if(i._leftEditor.isDirty())return c["There are unsaved changes."]}};f.prototype.getDefaultCommandSpanId=function(){return this._uiFactory.getCommandSpanId()};f.prototype.gotoMatch=function(a,c,d,e,f,g){if(!this.onScroll)this.onScroll=f;if(!this.onLoad)this.onLoad=
g;a=this._leftTextView.getModel().getLineStart(a)+d.startIndex;this._leftEditor.moveSelection(a,a)};f.prototype.copyToLeft=function(){this._curveRuler.copyToLeft()};f.prototype.createEditorContainer=function(f,g,l,q,m,p,r,s,u){var t=a.byId(m),v=d.byId(m),w=this,z=new o.TextModel(f,g),N="",f=r?new j.UndoFactory:new h.UndoCommandFactory(w._registry,w._commandService,"pageActions"),g=new j.AnnotationFactory,D=new k.Editor({textViewFactory:function(){var c=new n.TextView({parent:t,model:z,readonly:r,
tabSize:4});w._viewLoadedCounter++;w._viewLoadedCounter===2&&w._diffNavigator.matchPositionFromOverview(-1);if(w.onLoad)w.onLoad();a.connect(v,"resize",a.hitch(this,function(){c.resize()}));return c},undoStackFactory:f,annotationFactory:g,contentAssistFactory:{createContentAssistMode:function(a){var a=new i.ContentAssist(a.getTextView()),c=new i.ContentAssistWidget(a,"contentassist");return new i.ContentAssistMode(a,c)}},keyBindingFactory:function(a,c,d,e){if(r)w._commandService.addCommandGroup("pageActions",
"orion.editorActions.unlabeled",200);else{var f=new x.TextSearcher(a,w._commandService,d);(new h.EditorCommandFactory(w._registry,w._commandService,w._fileClient,w._inputManager,"pageActions",r,"pageNavigationActions",f)).generateEditorCommands(a);f=new j.TextActions(a,d);c.push(f);a=new j.SourceCodeActions(a,d,e);c.push(a)}},statusReporter:function(d,e){if(p)N=e?c["ERROR: "]+d:d,a.byId(p).innerHTML=""+N},domNode:t});D.installTextView();D.setOverviewRulerVisible(!1);if(!r){var L=this._inputManager;
D.addEventListener("DirtyChanged",function(){L.setDirty(D.isDirty())})}var P=D.getTextView();s&&u&&typeof u.Name==="string"&&typeof u.Type==="string"&&(D.setInput(u.Name),this._highlighter[q].highlight(u.Name,u.Type,D));P.addRuler(new e.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"}));P.addEventListener("Selection",function(a){!(a.newValue&&a.newValue.start!==a.newValue.end)&&!w._diffNavigator.autoSelecting&&
w._diffNavigator.editorWrapper[0].diffFeeder&&(a=P.getCaretOffset(),w._diffNavigator.gotoDiff(a,P))});q===0?(P.getModel().addEventListener("Changed",function(a){w._curveRuler.onChanged(a)}),P.addEventListener("Scroll",function(){w._curveRuler&&(w._curveRuler.matchPositionFrom(!0),w._curveRuler.render());if(w.onScroll)w.onScroll()})):P.addEventListener("Scroll",function(){w._curveRuler&&w._curveRuler.render()});return D};f.prototype.destroy=function(){this._leftTextView&&(this._diffNavigator.destroy(),
this._leftTextView.destroy(),this._rightTextView.destroy(),this._uiFactory.destroy())};f.prototype.setEditor=function(a){var c=this.options.baseFile.Content,d=this.options.newFile.Content,e=this.options.diffContent;d?e=this.parseMapper(c,d,e,this.options.hasConflicts,!0):(e=this.parseMapper(c,d,e,this.options.hasConflicts,a),d=e.output);this._highlighterLoaded=0;if(this._leftEditor)if(a)this._diffNavigator.initMapper(e.mapper),this._curveRuler.init(e.mapper,this._leftEditor,this._rightEditor,this._diffNavigator),
this.renderCommands(),this._leftTextView.redrawRange(),this._rightTextView.redrawRange();else{var a=new v.TwoWayDiffBlockFeeder(this._rightTextView.getModel(),e.mapper,1),f=new v.TwoWayDiffBlockFeeder(this._leftTextView.getModel(),e.mapper,0);this._diffNavigator.initAll(this.options.charDiff?"char":"word",this._rightEditor,this._leftEditor,a,f,this._overviewRuler,this._curveRuler);this._curveRuler.init(e.mapper,this._leftEditor,this._rightEditor,this._diffNavigator);this._inputManager.filePath=this.options.newFile.URL;
this._rightEditor.setInput(this.options.baseFile.Name,null,c);this._leftEditor.setInput(this.options.newFile.Name,null,d);this._highlighter[0].highlight(this.options.newFile.Name,this.options.newFile.Type,this._leftEditor,this,2);this._highlighter[1].highlight(this.options.baseFile.Name,this.options.baseFile.Type,this._rightEditor,this,2);this.renderCommands();this.options.readonly||this._inputManager.setInput(this.options.newFile.URL,this._leftEditor)}else this.initEditorContainers(e.delim,d,c,e.mapper,
!0);this._viewLoadedCounter>1&&this._diffNavigator.gotoBlock(this.options.blockNumber-1,this.options.changeNumber-1);c=this._leftTextView.getModel().getLineCount()*this._leftTextView.getLineHeight()+5;d=this._rightTextView.getModel().getLineCount()*this._rightTextView.getLineHeight()+5;return c>d?c:d};return f}();w.InlineCompareContainer=function(){function c(e,f,g){this._diffNavigator=new v.DiffTreeNavigator("word");this._registry=e;this._commandService=this._registry.getService("orion.page.command");
this._fileClient=this._registry.getService("orion.core.file");this._statusService=this._registry.getService("orion.page.message");this.setOptions(g,!0);this.setOptions({readonly:!0});var h=this;if(!this.options.callback)this.options.callback=function(){a.place(document.createTextNode(h._diffTitle),"fileNameInViewer","only");a.style("fileNameInViewer","color","#6d6d6d");h._statusService.setProgressMessage("")};if(!this._errorCallback)this._errorCallback=function(a,c){var d=[];d.Severity="Error";d.HTML=
!1;try{var e=JSON.parse(a.responseText);d.Message=e.DetailedMessage?e.DetailedMessage:e.Message}catch(f){d.Message=typeof a.message==="string"?a.message:c.xhr.statusText}this._statusService.setProgressResult(d)};this.initCommands();this._highlighter=[];this._highlighter.push(new w.CompareStyler(this._registry));this._editorDivId=f;d.byId(this._editorDivId)||(q.destroyDijit(this._editorDivId+"_dijit_inline_compare"),e=q.getDijitSizeStyle(this._editorDivId),(new d.layout.BorderContainer({id:this._editorDivId+
"_dijit_inline_compare",style:e,region:"center",gutters:!1,design:"headline",liveSplitters:!1,persist:!1,splitter:!1})).placeAt(this._editorDivId),r.forceLayout(this._editorDivId),this._editorDivId+="_dijit_inline_compare");this.initEditorContainers("","\n",[],[]);this.hasContent=!1}c.prototype=new w.CompareContainer;c.prototype.addRulers=function(){if(this._textView&&!this._hasRuler)this._textView.addRuler(this._rulerOrigin),this._textView.addRuler(this._rulerNew),this._textView.addRuler(this._overviewRuler),
this._hasRuler=!0};c.prototype.removeRulers=function(){if(this._textView&&this._hasRuler)this._textView.removeRuler(this._rulerOrigin),this._textView.removeRuler(this._rulerNew),this._textView.removeRuler(this._overviewRuler),this._hasRuler=!1};c.prototype.destroyEditor=function(){this._textView&&(this._diffNavigator.destroy(),this._textView.setText(""),this.removeRulers());this.hasContent=!1};c.prototype.destroy=function(){this._textView&&(this._diffNavigator.destroy(),this._textView.destroy())};
c.prototype.createEditorContainer=function(c,f,g,h,i,l){var q=a.byId(this._editorDivId),m=d.byId(this._editorDivId),p=this,r=new o.TextModel(c,f),c=new j.UndoFactory,f=new j.AnnotationFactory,c=new k.Editor({textViewFactory:function(){var c=new n.TextView({parent:q,model:r,readonly:!0,tabSize:4});a.connect(m,"resize",a.hitch(this,function(){c.resize()}));return c},undoStackFactory:c,annotationFactory:f,keyBindingFactory:function(){},statusReporter:function(){},domNode:q});c.installTextView();c.setOverviewRulerVisible(!1);
c.setAnnotationRulerVisible(!1);i&&l&&c.setInput(l.Name);var s=c.getTextView();this._rulerOrigin=new e.LineNumberCompareRuler(this._diffNavigator,1,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"});this._rulerNew=new e.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"});p=this;this._overviewRuler=new e.CompareOverviewRuler("right",{styleClass:"ruler overview"},null,
function(a){p._diffNavigator.matchPositionFromOverview(a)});s.addEventListener("Selection",function(a){!(a.newValue&&a.newValue.start!==a.newValue.end)&&!p._diffNavigator.autoSelecting&&p._diffNavigator.editorWrapper[0].diffFeeder&&(a=s.getCaretOffset(),p._diffNavigator.gotoDiff(a,s))});return c};c.prototype.initEditorContainers=function(a,c,d,e){this._editor=this.createEditorContainer(c,a,d,e,this.options.newFile);this._textView=this._editor.getTextView()};c.prototype._initDiffPosition=function(a){var c=
a.getModel();if(c&&c.getAnnotations&&(c=c.getAnnotations(),c.length>0)){var c=c[0][0],d=a.getLineHeight(),e=a.getClientArea(),d=Math.floor(e.height/d/3);a.setTopIndex(c-d>0?c-d:0)}};c.prototype.setDiffTitle=function(a){this._diffTitle=a};c.prototype.setEditor=function(){var a=this.options.baseFile.Content,c=this.options.newFile.Content,d=this.options.diffContent;this.hasContent=!0;c=this.parseMapper(a,c,d,this.options.hasConflicts,!this.options.toggler);this._highlighterLoaded=0;this._textView?(this._textView.getModel().setText(a),
a=new v.inlineDiffBlockFeeder(c.mapper,1),d=new v.inlineDiffBlockFeeder(c.mapper,0),q.mergeDiffBlocks(this._textView.getModel(),d.getDiffBlocks(),c.mapper,c.diffArray.array,c.diffArray.index,this._diffParser._lineDelimiter),a.setModel(this._textView.getModel()),d.setModel(this._textView.getModel()),this._diffNavigator.initAll(this.options.charDiff?"char":"word",this._editor,this._editor,a,d,this._overviewRuler),this._highlighter[0].highlight(this.options.baseFile.Name,this.options.baseFile.Type,this._editor,
this,1),this.renderCommands(),this.addRulers(),a=this._textView.getTopIndex(),this._textView.redrawLines(a,a+1,this._overviewRuler),this._textView.redrawLines(a,a+1,this._rulerOrigin),this._textView.redrawLines(a,a+1,this._rulerNew),this._diffNavigator.gotoBlock(this.options.blockNumber-1,this.options.changeNumber-1)):this.initEditorContainers(c.delim,a,c.mapper,c.diffArray,!0);return this._textView.getLineHeight()*this._textView.getModel().getLineCount()+5};c.prototype.setConflicting=function(a){this._conflcit=
a};return c}();w.toggleableCompareContainer=function(){function c(a,d,e,f){if(f)f.toggler=this;e==="inline"?(this.widgetType="inline",this._widget=new w.InlineCompareContainer(a,d,f)):(this.widgetType="twoWay",this._widget=new w.TwoWayCompareContainer(a,d,null,f));this._parentDivId=d;this._serviceRegistry=a}c.prototype={startup:function(a){this._widget.startup(!1,a)},toggle:function(){var c=this._widget.options,d=this._widget.getCurrentDiffPos();c.blockNumber=d.block;c.changeNumber=d.change;this._widget.destroy();
a.empty(this._parentDivId);this.widgetType==="inline"?(this.widgetType="twoWay",this._widget=new w.TwoWayCompareContainer(this._serviceRegistry,this._parentDivId,null,c)):(this.widgetType="inline",this._widget=new w.InlineCompareContainer(this._serviceRegistry,this._parentDivId,c));this._widget.setEditor()}};return c}();return w});
define("orion/git/widgets/ApplyPatchDialog","i18n!git/nls/gitmessages,dojo,dijit,dojox,dijit/Dialog,dojo/data/ItemFileReadStore,dojox/form/Uploader,dojox/form/uploader/FileList,dojox/form/uploader/plugins/IFrame,dijit/form/Button,dijit/ProgressBar,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/ApplyPatchDialog.html".split(","),function(c,f,a){f.declare("orion.git.widgets.ApplyPatchDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion",
"git/widgets/templates/ApplyPatchDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=c["Apply Patch"]},postCreate:function(){function c(d){a.byId("files").set("disabled",d);a.byId("applyPatchDialog.uploader").set("disabled",d);a.byId("applyPatchDialog.url").set("disabled",!d)}this.inherited(arguments);f.byId("applyPatchDialog.myForm").action=this.options.diffLocation;f.byId("applyPatchDialog.uploader").url=
this.options.diffLocation;c(!0);f.connect(a.byId("applyPatchDialog.urlRadio"),"onclick",f.hitch(this,function(a){a.target.id==="applyPatchDialog.urlRadio"&&c(!0)}));f.connect(a.byId("applyPatchDialog.fileRadio"),"onclick",f.hitch(this,function(a){a.target.id==="applyPatchDialog.fileRadio"&&c(!1)}));f.connect(a.byId("applyPatchDialog.uploader"),"onError",f.hitch(this,function(){setTimeout(f.hitch(this,function(){this.hide()}),2E3)}));f.connect(a.byId("applyPatchDialog.uploader"),"onComplete",f.hitch(this,
function(){setTimeout(f.hitch(this,function(){this.hide()}),2E3)}));f.connect(a.byId("applyPatchDialog.uploader"),"onKeyPress",function(a){a.keyCode===f.keys.ENTER&&a.stopPropagation()})}})});
define("orion/git/widgets/ContentDialog","i18n!git/nls/gitmessages,dojo,dijit,dojox,dijit/Dialog,dojo/data/ItemFileReadStore,dojox/form/Uploader,dojox/form/uploader/FileList,dojox/form/uploader/plugins/IFrame,dijit/form/Button,dijit/ProgressBar,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/ContentDialog.html".split(","),function(c,f,a){f.declare("orion.git.widgets.ContentDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","git/widgets/templates/ContentDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=c.Content},postCreate:function(){var a=this;this.inherited(arguments);for(var g=f.byId("div1"),e=f.query(".sectionAnchor"),i=0;i<e.length;i++){var h=e[i];f.create("li",{id:h.id+"Span"},g);var k=f.create("a",{href:window.location.href,title:f.string.substitute(c["Go to ${0} section"],[h.id]),innerHTML:h.id+"\n"},h.id+"Span");f.connect(k,"onclick",f.hitch(h,
function(){this.scrollIntoView(!0);a.hide();return!1}))}}})});
define("orion/git/gitCommands","i18n!git/nls/gitmessages,require,dojo,orion/commands,orion/util,orion/git/util,orion/compare/compareUtils,orion/git/widgets/CloneGitRepositoryDialog,orion/git/widgets/AddRemoteDialog,orion/git/widgets/GitCredentialsDialog,orion/widgets/NewItemDialog,orion/git/widgets/RemotePrompterDialog,orion/git/widgets/ApplyPatchDialog,orion/git/widgets/OpenCommitDialog,orion/git/widgets/ContentDialog,orion/git/widgets/CommitDialog".split(","),function(c,f,a,d,g,e,i){var h={};(function(){function k(a){var c;
try{c=JSON.parse(a.responseText)}catch(d){c={Result:a.responseText}}c.HttpCode=a.status;return c}var j=!1;h.updateNavTools=function(c,d,e,f,g,h){var i=a.byId(e);if(i)a.empty(i);else throw"could not find toolbar "+e;var k=c.getService("orion.page.command");k.renderCommands(e,i,g,d,"button");if(h&&(e=a.byId(h)))a.empty(e),k.renderCommands(h,e,g,d,"button");if(f&&(g=a.byId(f)))a.empty(f),k.renderCommands(f,g,null,d,"button");j||(j=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",
function(c,e){var g=a.byId(f);g&&(a.empty(g),k.renderCommands(f,g,e,d,"button"))}))};h.getNewItemName=function(c,d,e,f,h,i,j,k){var u,t;if(e)u=a.byId(f);else if(d.makeNewItemPlaceHolder!=null)(c=d.makeNewItemPlaceHolder(c,f,j))?(u=c.refNode,t=c.tempNode):u=a.byId(f);u?g.getUserText(f+"EditBox",u,!1,h,a.hitch(this,function(a){a&&(t&&t.parentNode.removeChild(t),i(a))}),void 0,void 0,void 0,k):(f=window.prompt(h))&&i(f)};h.handleKnownHostsError=function(d,e,f,g){if(confirm(a.string.substitute(c["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],
[e.KeyType,e.Host,e.HostFingerprint]))){var h=d.getService("orion.net.ssh");h.addKnownHosts(e.Host+" "+e.KeyType+" "+e.HostKey).then(function(){h.getKnownHosts().then(function(a){f.knownHosts=a;g(f)});if(f.failedOperation){var c=d.getService("orion.page.progress");a.hitch(c,c.removeOperation)(f.failedOperation.Location,f.failedOperation.Id)}})}};h.handleSshAuthenticationError=function(c,d,e,f,g){d=new orion.git.widgets.GitCredentialsDialog({title:g,serviceRegistry:c,func:f,errordata:e.errordata,failedOperation:e.failedOperation});
d.startup();d.show();e.failedOperation&&(c=c.getService("orion.page.progress"),a.hitch(c,c.removeOperation)(e.failedOperation.Location,e.failedOperation.Id))};h.getDefaultSshOptions=function(c,d){var e=new a.Deferred,f=c.getService("orion.net.ssh"),g=d&&!d.optionsRequested?d.valueFor("sshuser"):"",h=d&&!d.optionsRequested?d.valueFor("sshpassword"):"";f.getKnownHosts().then(function(a){e.callback({knownHosts:a,gitSshUsername:g,gitSshPassword:h,gitPrivateKey:"",gitPassphrase:""})});return e};h.handleProgressServiceResponse=
function(c,d,e,f,g,i){c&&c.status&&(c=k(c));if(!c||!c.HttpCode)f&&f(c);else switch(c.HttpCode){case 200:case 201:case 202:f&&f(c.Result);break;case 401:if(c.JsonData)d.errordata=c.JsonData;if(c.failedOperation)d.failedOperation=c.failedOperation;a.hitch(this,h.handleSshAuthenticationError)(e,c.JsonData,d,g,i);break;case 400:if(c.JsonData&&c.JsonData.HostKey){if(c.failedOperation)d.failedOperation=c.failedOperation;a.hitch(this,h.handleKnownHostsError)(e,c.JsonData,d,g);break}default:d=[];d.Severity=
"Error";d.HTML=!1;try{d.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(j){d.Message=error.message}e.getService("orion.page.message").setProgressResult(d)}};h.gatherSshCredentials=function(d,e,f){var g=new a.Deferred,h=function(a){d.getService("orion.net.ssh").getKnownHosts().then(function(c){g.callback({knownHosts:c,gitSshUsername:a.gitSshUsername,gitSshPassword:a.gitSshPassword,gitPrivateKey:a.gitPrivateKey,gitPassphrase:a.gitPassphrase})})},i=e.errorData;if(i&&i.HostKey)return confirm(a.string.substitute(c["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],
[i.KeyType,i.Host,i.HostFingerprint]))&&d.getService("orion.net.ssh").addKnownHosts(i.Host+" "+i.KeyType+" "+i.HostKey).then(function(){h({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})}),g;if(!e.parameters&&!e.optionsRequested)return h({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""}),g;if(e.parameters&&!e.optionsRequested)return f=e.parameters?e.parameters.valueFor("sshuser"):"",e=e.parameters?e.parameters.valueFor("sshpassword"):"",h({gitSshUsername:f,
gitSshPassword:e,gitPrivateKey:"",gitPassphrase:""}),g;e=new orion.git.widgets.GitCredentialsDialog({title:f,serviceRegistry:d,func:h,errordata:i});e.startup();e.show();return g};h.handleProgressServiceResponse2=function(c,d,e,f){c&&c.status&&(c=k(c));if(!c||!c.HttpCode)e&&e(c);else switch(c.HttpCode){case 200:case 201:case 202:e&&e(c.Result);break;case 401:c.failedOperation&&(d=d.getService("orion.page.progress"),a.hitch(d,d.removeOperation)(c.failedOperation.Location,c.failedOperation.Id));f(c);
break;case 400:if(c.JsonData&&c.JsonData.HostKey){c.failedOperation&&(d=d.getService("orion.page.progress"),a.hitch(d,d.removeOperation)(c.failedOperation.Location,c.failedOperation.Id));f(c);break}default:f=[];f.Severity="Error";f.HTML=!1;try{f.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(g){f.Message=error.message}d.getService("orion.page.message").setProgressResult(f)}};h.createFileCommands=function(g,j,k){function n(a){if(!(a.status===401||a.status===403)){var c=[];c.Severity="Error";
c.HTML=!1;try{var d=JSON.parse(a.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message}catch(e){c.Message=a.message}g.getService("orion.page.message").setProgressResult(c)}}var p=new d.Command({name:c["Link Repository"],imageClass:"core-sprite-link",id:"eclipse.linkRepository",callback:function(a){var d=new orion.widgets.NewItemDialog({title:c["Link Repository"],label:c["Folder name:"],func:function(d){var e=g.getService("orion.core.file");e.loadWorkspace("").then(function(g){e.createProject(g.Location,
d,a.items.ContentLocation,!1).then(function(a){alert(c["Repository was linked to "]+a.Name);e.read(a.ContentLocation,!0).then(function(a){window.location.replace(f.toUrl("navigate/table.html")+"#"+a.ChildrenLocation)})})})},advanced:!1});d.startup();d.show()},visibleWhen:function(a){return a.ContentLocation?!0:!1}});j.addCommand(p);p=new d.Command({name:c.Checkout,tooltip:c["Checkout the current tag, creating a local branch based on its contents."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",
id:"eclipse.checkoutTag",callback:function(d){function e(){if(f.Repository)return f.Repository.BranchLocation;for(var a in f.parent.parent.children)if(f.parent.parent.children[a].Name==="Branches")return f.parent.parent.children[a];return f.parent.parent}var f=d.items;h.getNewItemName(f,k,!1,d.domNode.id,"tag_"+f.Name,function(d){if(d||d!=""){var h;h=f.Repository!=null?f.Repository.Location:f.parent.parent.Location;g.getService("orion.page.message").createProgressMonitor(g.getService("orion.git.provider").checkoutTag(h,
f.Name,d),a.string.substitute(c["Checking out tag ${0}"],[d])).deferred.then(function(){a.hitch(k,k.changedItem)(e())},n)}},void 0,!0)},visibleWhen:function(a){return a.Type==="Tag"}});j.addCommand(p);p=new d.Command({name:c.Checkout,tooltip:c["Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutBranch",
callback:function(d){var e=d.items,f=g.getService("orion.git.provider"),h=g.getService("orion.page.message"),i=new a.Deferred;h.createProgressMonitor(i,e.Name?a.string.substitute(c["Checking out branch ${0}..."],[e.Name]):c["Checking out branch..."]);e.Type==="Branch"?f.checkoutBranch(e.CloneLocation,e.Name).then(function(){a.hitch(k,k.changedItem)(e.parent);i.callback();h.setProgressResult(c["Branch checked out."])},function(a){i.callback();n(a)}):f.addBranch(e.Repository!=null?e.Repository.BranchLocation:
e.parent.parent.BranchLocation,null,e.Name).then(function(d){f.checkoutBranch(d.CloneLocation,d.Name).then(function(){a.hitch(k,k.changedItem)(e.Repository?e.Repository.BranchLocation:e.parent.parent.parent);h.setProgressResult(c["Branch checked out."])},function(a){i.callback();n(a)})},function(a){i.callback();n(a)})},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});j.addCommand(p);p=new d.ParametersDescription([new d.CommandParameter("name","text","Name:")]);
p=new d.Command({name:c["New Branch"],tooltip:c["Add a new local branch to the repository"],imageClass:"core-sprite-add",id:"eclipse.addBranch",parameters:p,callback:function(d){var e=d.items,f=function(c,d){g.getService("orion.git.provider").addBranch(c,d).then(function(){a.hitch(k,k.changedItem)(e)},n)},i;i=e.Type==="Clone"?e.BranchLocation:e.Location;d.parameters.valueFor("name")&&!d.parameters.optionsRequested?f(i,d.parameters.valueFor("name")):h.getNewItemName(e,k,!1,d.domNode.id,c["Branch name"],
function(a){(a||a!="")&&f(i,a)})},visibleWhen:function(a){return a.GroupNode&&a.Name==="Branches"||a.Type==="Clone"&&k.parentId==="artifacts"}});j.addCommand(p);p=new d.Command({name:c.Delete,tooltip:c["Delete the local branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(d){var e=d.items;confirm(a.string.substitute(c["Are you sure you want to delete branch ${0}?"],[e.Name]))&&g.getService("orion.git.provider").removeBranch(e.Location).then(function(){k.changedItem?
a.hitch(k,k.changedItem)(e.parent):k.displayBranches&&a.hitch(k,k.displayBranches)(e.ParentLocation,null)},n)},visibleWhen:function(a){return a.Type==="Branch"&&!a.Current}});j.addCommand(p);p=new d.Command({name:c.Delete,tooltip:c["Delete the remote tracking branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(d){var e=d.items;confirm(a.string.substitute(c["You're going to delete remote branch ${0} and push the change."],[e.Name])+"\n\n"+
c["Are you sure?"])&&h.getDefaultSshOptions(g).then(function(d){var f=arguments.callee,i=g.getService("orion.git.provider");g.getService("orion.page.message").createProgressMonitor(i.doPush(e.Location,"",!1,!1,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Removing remote branch: "]+e.Name).deferred.then(function(i){h.handleProgressServiceResponse(i,d,g,function(c){c.Result.Severity=="Ok"&&a.hitch(k,k.changedItem)(e.parent)},f,c["Delete Remote Branch"])},function(a){h.handleProgressServiceResponse(a,
d,g,function(){},f,c["Removing remote branch: "]+e.Name)})})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});j.addCommand(p);p=new d.ParametersDescription([new d.CommandParameter("name","text","Name:"),new d.CommandParameter("url","url","Url:")]);p=new d.Command({name:c["New Remote"],tooltip:c["Add a new remote to the repository"],imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:p,callback:function(c){var d=c.items,e=function(c,e,f){g.getService("orion.git.provider").addRemote(c,
e,f).then(function(){a.hitch(k,k.changedItem)(d)},n)},f;f=d.Type==="Clone"?d.RemoteLocation:d.Location;c.parameters.valueFor("name")&&c.parameters.valueFor("url")&&!c.parameters.optionsRequested?e(f,c.parameters.valueFor("name"),c.parameters.valueFor("url")):(c=new orion.git.widgets.AddRemoteDialog({func:function(a,c){e(f,a,c)}}),c.startup(),c.show())},visibleWhen:function(a){return a.GroupNode&&a.Name==="Remotes"||a.Type==="Clone"&&k.parentId==="artifacts"}});j.addCommand(p);p=new d.Command({name:c.Delete,
tooltip:c["Delete the remote from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(d){var e=d.items;confirm(a.string.substitute(c["Are you sure you want to delete remote ${0}?"],[e.Name]))&&g.getService("orion.git.provider").removeRemote(e.Location).then(function(){a.hitch(k,k.changedItem)(e.parent)},n)},visibleWhen:function(a){return a.Type==="Remote"}});j.addCommand(p);p=new d.Command({name:c.Pull,tooltip:c["Pull from the repository"],imageClass:"git-sprite-pull",
spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(d){var e=d.items,f=e.Location;h.getDefaultSshOptions(g).then(function(d){var i=arguments.callee,j=g.getService("orion.git.provider");g.getService("orion.page.message").createProgressMonitor(j.doPull(f,!1,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Pulling : "]+f).deferred.then(function(c){h.handleProgressServiceResponse(c,d,g,function(){e.Type==="Clone"&&a.hitch(k,k.changedItem)(e)},
i,"Pull Git Repository")},function(a){h.handleProgressServiceResponse(a,d,g,function(){},i,c["Pull Git Repository"])})})},visibleWhen:function(a){return a.Type==="Clone"}});j.addCommand(p);p=new d.Command({name:c["Git Log"],tooltip:c["Open the log for the branch"],id:"eclipse.openGitLog",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){a=a.items;return f.toUrl("git/git-log.html")+"#"+a.CommitLocation+"?page=1"},visibleWhen:function(a){return a.Type==="Branch"||a.Type===
"RemoteTrackingBranch"}});j.addCommand(p);p=new d.Command({name:c["Git Log"],tooltip:c["Open the log for the repository"],id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){return f.toUrl("git/git-log.html")+"#"+a.items.CommitLocation+"?page=1"},visibleWhen:function(a){return!a.CommitLocation||!a.StatusLocation?!1:!0}});j.addCommand(p);p=new d.Command({name:c["Git Status"],tooltip:c["Open the status for the repository"],id:"eclipse.openGitStatus",
imageClass:"git-sprite-status",spriteClass:"gitCommandSprite",hrefCallback:function(a){return f.toUrl(e.statusUILocation)+"#"+a.items.StatusLocation},visibleWhen:function(a){return!a.StatusLocation?!1:!0}});j.addCommand(p);p=new d.Command({name:c["Show in Navigator"],tooltip:c["Show the repository folder in the file navigator"],id:"eclipse.openCloneContent",hrefCallback:function(a){return f.toUrl("navigate/table.html")+"#"+a.items.ContentLocation+"?depth=1"},visibleWhen:function(a){return!a.ContentLocation?
!1:!0}});j.addCommand(p);p=new d.Command({name:c["Compare With Each Other"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(a){a=a.items;return g.getService("orion.git.provider").getDiff(a[1].DiffLocation,a[0].Name).then(function(a){return i.generateCompareHref(a,{readonly:!0})})},visibleWhen:function(c){return k.isDirectory?!1:a.isArray(c)&&c.length===2&&c[0].Type==="Commit"&&c[1].Type==="Commit"?!0:!1}});j.addCommand(p);p=
new d.Command({name:c["Compare With Working Tree"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(a){return i.generateCompareHref(a.items.DiffLocation,{})},visibleWhen:function(a){return a.Type==="Commit"&&!k.isDirectory}});j.addCommand(p);p=new d.Command({name:c.Open,id:"eclipse.openGitCommit",hrefCallback:function(a){return f.toUrl("edit/edit.html")+"#"+a.items.ContentLocation},visibleWhen:function(a){return a.Type===
"Commit"&&a.ContentLocation!=null&&!k.isDirectory}});j.addCommand(p);p=new d.Command({name:c.Fetch,tooltip:c["Fetch from the remote"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(e){var f=e.items,i=f.Location,p=function(a,e){if(a.JsonData.HostKey)e.parameters=null;else if(!e.optionsRequested)e.parameters=a.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0}):
new d.ParametersDescription([new d.CommandParameter("sshuser","text",c["SSH User Name:"]),new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0});e.errorData=a.JsonData;j.collectParameters(e)};e.parameters&&e.parameters.optionsRequested?(e.parameters=null,e.optionsRequested=!0,j.collectParameters(e)):h.gatherSshCredentials(g,e).then(function(d){var j=g.getService("orion.git.provider");g.getService("orion.page.message").createProgressMonitor(j.doFetch(i,!1,
d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Fetching remote: "]+i).deferred.then(function(d){h.handleProgressServiceResponse2(d,g,function(){j.getGitRemote(i).then(function(d){k.parentId==="explorer-tree"&&(a.place(document.createTextNode(c["Getting git incoming changes..."]),"explorer-tree","only"),j.getLog(d.HeadLocation,d.Id).then(function(a){k.renderer.setIncomingCommits(a.Children);k.loadCommitsList(d.CommitLocation+"?page=1",d,!0)}));a.hitch(k,k.changedItem)(f)},
n)},function(a){p(a,e)})},function(a){h.handleProgressServiceResponse2(a,g,function(){},function(a){p(a,e)})})})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});j.addCommand(p);p=new d.Command({name:c["Force Fetch"],tooltip:c["Fetch from the remote branch into your remote tracking branch overriding its current content"],id:"eclipse.orion.git.fetchForce",callback:function(e){if(confirm(c["You're going to override content of the remote tracking branch. This can cause the branch to lose commits."]+
"\n\n"+c["Are you sure?"])){var f=e.items,i=f.Location,p=function(a,e){if(a.JsonData.HostKey)e.parameters=null;else if(!e.optionsRequested)e.parameters=a.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",c["SSH User Name:"]),new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0});e.errorData=a.JsonData;
j.collectParameters(e)};e.parameters&&e.parameters.optionsRequested?(e.parameters=null,e.optionsRequested=!0,j.collectParameters(e)):h.gatherSshCredentials(g,e).then(function(d){var j=g.getService("orion.git.provider");g.getService("orion.page.message").createProgressMonitor(j.doFetch(i,!0,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Fetching remote: "]+i).deferred.then(function(d){h.handleProgressServiceResponse2(d,g,function(){j.getGitRemote(i).then(function(d){k.parentId===
"explorer-tree"&&(a.place(document.createTextNode(c["Getting git incoming changes..."]),"explorer-tree","only"),j.getLog(d.HeadLocation,d.Id).then(function(a){k.renderer.setIncomingCommits(a.Children);k.loadCommitsList(d.CommitLocation+"?page=1",d,!0)}));a.hitch(k,k.changedItem)(f)},n)},function(a){p(a,e)})},function(a){h.handleProgressServiceResponse2(a,g,function(){},function(a){p(a,e)})})})}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&
a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});j.addCommand(p);p=new d.Command({name:c.Merge,tooltip:c["Merge the content from the branch to your active branch"],imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(d){var h=d.items,d=g.getService("orion.git.provider"),i=g.getService("orion.page.message");d.doMerge(h.HeadLocation,h.Name).then(function(d){var g=[];if(d.jsonData&&(d.jsonData.Result=="FAST_FORWARD"||d.jsonData.Result=="ALREADY_UP_TO_DATE"))a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,
"incomingCommitsdRow",!1)}),g.Severity="Ok",g.HTML=!1,g.Message=d.jsonData.Result,a.hitch(k,k.changedItem)(h);else if(d.jsonData){var j=h.HeadLocation.replace("commit/HEAD","status");g.Severity="Warning";g.HTML=!0;g.Message="<span>"+d.jsonData.Result+a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">'+c["Git Status page"]+"</a>"])+"</span>"}else if(d.error)j=h.HeadLocation.replace("commit/HEAD","status"),g.Severity="Error",d.error.responseText&&JSON.parse(d.error.responseText)?
(d=JSON.parse(d.error.responseText),g.Message=d.DetailedMessage?d.DetailedMessage:d.Message):g.Message=d.error.message,g.HTML=!0,g.Message="<span>"+g.Message+a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">'+c["Git Status page"]+"</a>"])+"</span>";i.setProgressResult(g)},function(d,i){var j=[],n=h.HeadLocation.replace("commit/HEAD","status");j.Severity="Error";j.HTML=!0;j.Message="<span>"+a.fromJson(i.xhr.responseText).DetailedMessage+a.string.substitute(c[". Go to ${0}."],
['<a href="'+f.toUrl(e.statusUILocation)+"#"+n+'">'+c["Git Status page"]+"</a>"])+".</span>";g.getService("orion.page.message").setProgressResult(j)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&!a.Current?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});j.addCommand(p);p=new d.Command({name:c.Rebase,tooltip:c["Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch "]+
"and applying each commit again to the updated active branch.",id:"eclipse.orion.git.rebase",imageClass:"git-sprite-rebase",spriteClass:"gitCommandSprite",callback:function(d){var h=d.items;g.getService("orion.page.message").createProgressMonitor(g.getService("orion.git.provider").doRebase(h.HeadLocation,h.Name,"BEGIN"),h.Name?c["Rebase on top of "]+h.Name:c.Rebase).deferred.then(function(d){var i=[],j=h.HeadLocation.replace("commit/HEAD","status");d.Result=="OK"||d.Result=="FAST_FORWARD"||d.Result==
"UP_TO_DATE"?(i.Severity="Ok",i.HTML=!1,i.Message=d.Result,a.hitch(k,k.changedItem)(h)):d.Result=="STOPPED"?(i.Severity="Warning",i.HTML=!0,i.Message="<span>"+d.Result+c[". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing"]+a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">'+c["Git Status page"]+"</a>"])+".</span>"):d.Result=="FAILED_WRONG_REPOSITORY_STATE"?(i.Severity="Error",i.HTML=!0,i.Message="<span>"+d.Result+c[". Repository state is invalid (i.e. already during rebasing)"]+
a.string.substitute(". Go to ${0}.",['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">'+c["Git Status page"]+"</a>"])+".</span>"):d.Result=="FAILED_UNMERGED_PATHS"?(i.Severity="Error",i.HTML=!0,i.Message="<span>"+d.Result+c[". Repository contains unmerged paths"]+a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">'+c["Git Status page"]+"</a>"])+".</span>"):d.Result=="FAILED_PENDING_CHANGES"?(i.Severity="Error",i.HTML=!0,i.Message="<span>"+d.Result+c[". Repository contains pending changes. Please commit or stash them"]+
a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">Git Status page</a>'])+".</span>"):(i.Severity="Warning",i.HTML=!0,i.Message="<span>"+d.Result+a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+j+'">'+c["Git Status page"]+"</a>"])+".</span>");g.getService("orion.page.message").setProgressResult(i)},n)},visibleWhen:function(a){this.tooltip=c["Rebase your commits by removing them from the active branch, "]+c["starting the active branch again based on the latest state of '"]+
a.Name+"' "+c["and applying each commit again to the updated active branch."];return a.Type==="RemoteTrackingBranch"||a.Type==="Branch"&&!a.Current}});j.addCommand(p);p=new d.Command({name:c["Push All"],tooltip:c["Push commits and tags from your local branch into the remote branch"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.push",callback:function(e){var f=e.items,i=a.hash();if(f.toRef)f=f.toRef;var n=function(a,e){if(a.JsonData.HostKey)e.parameters=null;else if(!e.optionsRequested)e.parameters=
a.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",c["SSH User Name:"]),new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0});e.errorData=a.JsonData;j.collectParameters(e)};e.parameters&&e.parameters.optionsRequested?(e.parameters=null,e.optionsRequested=!0,j.collectParameters(e)):h.gatherSshCredentials(g,
e).then(function(d){var j=g.getService("orion.git.provider");if(f.RemoteLocation.length==1&&f.RemoteLocation[0].Children.length==1)g.getService("orion.page.message").createProgressMonitor(j.doPush(f.RemoteLocation[0].Children[0].Location,"HEAD",!0,!1,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Pushing remote: "]+i).deferred.then(function(c){h.handleProgressServiceResponse2(c,g,function(){k.parentId==="explorer-tree"?(!c||!c.HttpCode)&&a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,
"outgoingCommitsdRow",!1)}):a.hitch(k,k.changedItem)()},function(a){n(a,e)})},function(a){h.handleProgressServiceResponse2(a,g,function(){},function(a){n(a,e)})});else{var p=new orion.git.widgets.RemotePrompterDialog({title:c["Choose Branch"],serviceRegistry:g,gitClient:j,treeRoot:{Children:f.RemoteLocation},hideNewBranch:!0,func:a.hitch(this,function(f,i){g.getService("orion.page.message").createProgressMonitor(j.doPush(f.Location,"HEAD",!0,!0,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,
d.gitPassphrase),c["Pushing remote: "]+i.Name).deferred.then(function(c){h.handleProgressServiceResponse2(c,g,function(){k.parentId==="explorer-tree"?(!c||!c.HttpCode)&&a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,"outgoingCommitsdRow",!1)}):a.hitch(k,k.changedItem)()},function(a){n(a,e)})},function(a){h.handleProgressServiceResponse2(a,g,function(){},function(a){n(a,e)})})})});p.startup();p.show()}})},visibleWhen:function(a){return a.toRef?a.RepositoryPath===""&&a.toRef.Type==="Branch"&&
a.toRef.Current&&a.toRef.RemoteLocation:a.Type==="Branch"&&a.Current&&a.RemoteLocation}});j.addCommand(p);p=new d.Command({name:c["Force Push All"],tooltip:c["Push commits and tags from your local branch into the remote branch overriding its current content"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushForce",callback:function(e){if(confirm(c["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+"\n\n"+
c["Are you sure?"])){var f=e.items,i=a.hash();if(f.toRef)f=f.toRef;var n=function(a,e){if(a.JsonData.HostKey)e.parameters=null;else if(!e.optionsRequested)e.parameters=a.JsonData.User?new d.ParametersDescription([new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0}):new d.ParametersDescription([new d.CommandParameter("sshuser","text",c["SSH User Name:"]),new d.CommandParameter("sshpassword","password",c["SSH Password:"])],{hasOptionalParameters:!0});e.errorData=
a.JsonData;j.collectParameters(e)};e.parameters&&e.parameters.optionsRequested?(e.parameters=null,e.optionsRequested=!0,j.collectParameters(e)):h.gatherSshCredentials(g,e).then(function(d){var j=g.getService("orion.git.provider");if(f.RemoteLocation.length==1&&f.RemoteLocation[0].Children.length==1)g.getService("orion.page.message").createProgressMonitor(j.doPush(f.RemoteLocation[0].Children[0].Location,"HEAD",!0,!0,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Pushing remote: "]+
i).deferred.then(function(c){h.handleProgressServiceResponse2(c,g,function(){k.parentId==="explorer-tree"?(!c||!c.HttpCode)&&a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,"outgoingCommitsdRow",!1)}):a.hitch(k,k.changedItem)()},function(a){n(a,e)})},function(a){h.handleProgressServiceResponse2(a,g,function(){},function(a){n(a,e)})});else{var p=new orion.git.widgets.RemotePrompterDialog({title:c["Choose Branch"],serviceRegistry:g,gitClient:j,treeRoot:{Children:f.RemoteLocation},hideNewBranch:!0,
func:a.hitch(this,function(f,i){g.getService("orion.page.message").createProgressMonitor(j.doPush(f.Location,"HEAD",!0,!0,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Pushing remote: "]+i.Name).deferred.then(function(c){h.handleProgressServiceResponse2(c,g,function(){k.parentId==="explorer-tree"?(!c||!c.HttpCode)&&a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,"outgoingCommitsdRow",!1)}):a.hitch(k,k.changedItem)()},function(a){n(a,e)})},function(a){h.handleProgressServiceResponse2(a,
g,function(){},function(a){n(a,e)})})})});p.startup();p.show()}})}},visibleWhen:function(a){if(a.toRef)return a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation}});j.addCommand(p);p=new d.Command({name:c["< Previous Page"],tooltip:c["Show previous page of git log"],id:"eclipse.orion.git.previousLogPage",hrefCallback:function(a){return f.toUrl("git/git-log.html")+"#"+a.items.PreviousLocation},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef!=
null&&a.toRef.Type==="Branch"||a.RepositoryPath!=null?a.PreviousLocation!==void 0:!1}});j.addCommand(p);p=new d.Command({name:c["Next Page >"],tooltip:c["Show next page of git log"],id:"eclipse.orion.git.nextLogPage",hrefCallback:function(a){return f.toUrl("git/git-log.html")+"#"+a.items.NextLocation},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef!=null&&a.toRef.Type==="Branch"||a.RepositoryPath!=null?a.NextLocation!==void 0:!1}});j.addCommand(p);p=new d.Command({name:c["Push to..."],
tooltip:c["Push from your local branch into the selected remote branch"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushto",callback:function(d){var e=d.items,d={},f;for(f in e.parent.parent.children)e.parent.parent.children[f].Name==="Remote"&&(d=e.parent.parent.children[f]);f=g.getService("orion.git.provider");d=new orion.git.widgets.RemotePrompterDialog({title:c["Choose Branch"],serviceRegistry:g,gitClient:f,treeRoot:d,func:a.hitch(this,function(a,c,d){console.info("Branch "+
a+" remote "+c+" new branch "+d)})});d.startup();d.show()},visibleWhen:function(){return!1}});j.addCommand(p);p=new d.Command({name:c.Reset,tooltip:c["Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes."],id:"eclipse.orion.git.resetIndex",imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(d){var e=d.items;if(confirm(c["The content of your active branch will be replaced with "]+e.Name+". "+c["All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?"])){var d=
g.getService("orion.git.provider"),f=g.getService("orion.page.message");f.createProgressMonitor(d.resetIndex(e.IndexLocation,e.Name),c["Resetting index..."]).deferred.then(function(){a.hitch(k,k.changedItem)(e);f.setProgressResult({Severity:"Info",HTML:!1,Message:"Ok"})},function(a){var c={Severity:"Error",HTML:!1};c.Message=a.message;f.setProgressResult(c)})}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});j.addCommand(p);p=new d.ParametersDescription([new d.CommandParameter("name",
"text",c["Name:"])]);p=new d.Command({name:c.Tag,tooltip:c["Create a tag for the commit"],imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:p,callback:function(d){var e=d.items,f=function(c,d){g.getService("orion.git.provider").doAddTag(c,d).then(function(){a.hitch(k,k.changedItem)(e)},n)},i=e.Location;d.parameters.valueFor("name")&&!d.parameters.optionsRequested?f(i,d.parameters.valueFor("name")):h.getNewItemName(e,k,!1,d.domNode.id,c["Tag name"],
function(a){(a||a!="")&&f(i,a)})},visibleWhen:function(a){return a.Type==="Commit"}});j.addCommand(p);p=new d.Command({name:c.Delete,tooltip:c["Delete the tag from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(d){var e=d.items;confirm(a.string.substitute(c["Are you sure you want to delete tag ${0}?"],[e.Name]))&&g.getService("orion.git.provider").doRemoveTag(e.Location).then(function(){a.hitch(k,k.changedItem)(e.parent)},n)},visibleWhen:function(a){return a.Type===
"Tag"}});j.addCommand(p);p=new d.Command({name:c["Cherry-Pick"],tooltip:c["Apply the change introduced by the commit to your active branch"],id:"eclipse.orion.git.cherryPick",imageClass:"git-sprite-cherry_pick",spriteClass:"gitCommandSprite",callback:function(d){var h=d.items,i=a.hash(),j=g.getService("orion.git.provider"),d=h.Location.replace(h.Name,"HEAD");j.doCherryPick(d,h.Name).then(function(d){var n=[],p=h.Location.replace("commit/"+h.Name,"status");d.Result=="OK"?(n.Severity="Ok",d.HeadUpdated?
(n.HTML=!1,n.Message=d.Result,k.parentId==="explorer-tree"&&j.doGitLog(i).then(function(d){d.HeadLocation?(a.place(document.createTextNode(c["Getting git incoming changes..."]),"explorer-tree","only"),j.getLog(d.HeadLocation,d.Id).then(function(a){k.renderer.setIncomingCommits(a.Children);k.loadCommitsList(d.CommitLocation+"?page=1",d,!0)})):(a.place(document.createTextNode(c["Getting git incoming changes..."]),"explorer-tree","only"),j.getLog(i,"HEAD").then(function(a){k.renderer.setOutgoingCommits(a.Children);
k.loadCommitsList(i,d,!0)}))})):(n.HTML=!0,n.Message="<span>"+c["Nothing changed."]+"</span>")):d.Result=="CONFLICTING"?(n.Severity="Warning",n.HTML=!0,n.Message="<span>"+d.Result+c[". Some conflicts occurred"]+ +a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+"#"+p+'">'+c["Git Status page"]+"</a>"])+".</span>"):d.Result=="FAILED"?(n.Severity="Error",n.HTML=!0,n.Message="<span>"+d.Result+a.string.substitute(c[". Go to ${0}."],['<a href="'+f.toUrl(e.statusUILocation)+
"#"+p+'">'+c["Git Status page"]+"</a>"])+".</span>"):(n.Severity="Warning",n.HTML=!1,n.Message=d.Result);g.getService("orion.page.message").setProgressResult(n)},n)},visibleWhen:function(a){return a.Type==="Commit"}});j.addCommand(p)};h.createStatusCommands=function(e,f,g,i,j){var k=new d.Command({name:c.Fetch,tooltip:c["Fetch from the remote branch into your remote tracking branch"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(d){var f=
d.items.Location,g=e.getService("orion.git.provider");h.getDefaultSshOptions(e).then(function(d){var i=arguments.callee;e.getService("orion.page.message").createProgressMonitor(g.doFetch(f,!1,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Fetching remote: "]+f).deferred.then(function(n){h.handleProgressServiceResponse(n,d,e,function(){g.getGitRemote(f).then(function(c){j._gitCommitNavigatorRem.parentId&&a.place(document.createTextNode("Getting git incoming changes..."),
j._gitCommitNavigatorRem.parentId,"only");g.getLog(c.HeadLocation,c.Id).then(function(a){j._gitCommitNavigatorRem.renderer.setIncomingCommits(a.Children);j._gitCommitNavigatorRem.loadCommitsList(c.CommitLocation+"?page=1&pageSize=5",c,!0)})})},i,c["Fetch Git Repository"])},function(a){h.handleProgressServiceResponse(a,d,e,function(){},i,c["Fetch Git Repository"])})})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});f.addCommand(k);f.registerCommandContribution("itemLevelCommands",
"eclipse.orion.git.fetch",i+1);k=new d.Command({name:c.Merge,tooltip:c["Merge the content from the branch to your active branch"],imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(c){var c=c.items,d=e.getService("orion.git.provider"),f=e.getService("orion.page.message");d.doMerge(c.HeadLocation,c.Name).then(function(c){var d=[];if(c.jsonData&&(c.jsonData.Result=="FAST_FORWARD"||c.jsonData.Result=="ALREADY_UP_TO_DATE"))a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,
"incomingCommitsdRow",!1)}),d.Severity="Ok",d.HTML=!1,d.Message=c.jsonData.Result,g(),f.setProgressResult(d);else if(c.jsonData)d.Severity="Warning",d.HTML=!0,d.Message="<span>"+c.jsonData.Result+"<span>",f.setProgressResult(d);else if(c.error)d.Severity="Error",c.error.responseText&&JSON.parse(c.error.responseText)?(c=JSON.parse(c.error.responseText),d.Message=c.DetailedMessage?c.DetailedMessage:c.Message):d.Message=c.error.message,d.HTML=!0,d.Message="<span>"+d.Message+"<span>",f.setProgressResult(d)},
function(c,d){var e=[];e.Severity="Error";e.HTML=!0;e.Message="<span>"+a.fromJson(d.xhr.responseText).DetailedMessage+"</span>";f.setProgressResult(e)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.Type==="Branch"&&!a.Current}});f.addCommand(k);f.registerCommandContribution("itemLevelCommands","eclipse.orion.git.merge",i+2);k=new d.Command({name:c.Push,tooltip:c["Push from your local branch into the remote branch"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",
id:"eclipse.orion.git.push",callback:function(d){var f=d.items,i=a.hash(),j=e.getService("orion.git.provider");f.RemoteLocation.length==1&&f.RemoteLocation[0].Children.length==1?h.getDefaultSshOptions(e).then(function(d){var n=arguments.callee;e.getService("orion.page.message").createProgressMonitor(j.doPush(f.RemoteLocation[0].Children[0].Location,"HEAD",!0,!1,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase),c["Pushing remote: "]+i).deferred.then(function(c){h.handleProgressServiceResponse(c,
d,e,function(c){if(!c||!c.HttpCode)a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,"outgoingCommitsdRow",!1)}),g()},n,"Push Git Repository")},function(a){h.handleProgressServiceResponse(a,d,e,function(){},n,c["Push Git Repository"])})}):(d=new orion.git.widgets.RemotePrompterDialog({title:c["Choose Branch"],serviceRegistry:e,gitClient:j,treeRoot:{Children:f.RemoteLocation},hideNewBranch:!0,func:a.hitch(this,function(d,f){h.getDefaultSshOptions(e).then(function(i){var n=arguments.callee;
e.getService("orion.page.message").createProgressMonitor(j.doPush(d.Location,"HEAD",!0,!1,i.gitSshUsername,i.gitSshPassword,i.knownHosts,i.gitPrivateKey,i.gitPassphrase),c["Pushing remote: "]+f).deferred.then(function(d){h.handleProgressServiceResponse(d,i,e,function(c){if(!c||!c.HttpCode)a.query(".treeTableRow").forEach(function(c){a.toggleClass(c,"outgoingCommitsdRow",!1)}),g()},n,c["Push Git Repository"])})},function(a){h.handleProgressServiceResponse(a,options,e,function(){},func,c["Pushing remote: "]+
f)})})}),d.startup(),d.show())},visibleWhen:function(a){return a.Type==="LocalBranch"}});f.addCommand(k);f.registerCommandContribution("itemLevelCommands","eclipse.orion.git.push",i+3)};h.createGitClonesCommands=function(e,f,g,i,j,k){function r(a){if(!(a.status===401||a.status===403)){var c=[];c.Severity="Error";c.HTML=!1;try{var d=JSON.parse(a.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message}catch(f){c.Message=a.message}e.getService("orion.page.message").setProgressResult(c)}}
function s(c){a.isArray(c)&&(c=c.length>1?{}:c[0]);return c}i=new d.ParametersDescription([new d.CommandParameter("key","text",c["Key:"]),new d.CommandParameter("value","text",c["Value:"])]);i=new d.Command({name:c["New Configuration Entry"],tooltip:"Add a new entry to the repository configuration",imageClass:"core-sprite-add",id:"eclipse.orion.git.addConfigEntryCommand",parameters:i,callback:function(c){var d=c.items,f=e.getService("orion.git.provider");c.parameters.valueFor("key")&&c.parameters.valueFor("value")&&
f.addCloneConfigurationProperty(d.ConfigLocation,c.parameters.valueFor("key"),c.parameters.valueFor("value")).then(function(){a.hitch(g,g.changedItem)(d)},r)}});f.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("value","text",c["Value:"])]);i=new d.Command({name:c.Edit,tooltip:c["Edit the configuration entry"],imageClass:"core-sprite-edit",id:"eclipse.orion.git.editConfigEntryCommand",parameters:i,callback:function(c){var d=c.items,f=e.getService("orion.git.provider");c.parameters.valueFor("value")&&
f.editCloneConfigurationProperty(d.Location,c.parameters.valueFor("value")).then(function(){a.hitch(g,g.changedItem)(d)},r)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});f.addCommand(i);i=new d.Command({name:c.Delete,tooltip:c["Delete the configuration entry"],imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",callback:a.hitch(this,function(d){var f=d.items,d=e.getService("orion.git.provider");confirm(a.string.substitute(c["Are you sure you want to delete ${0}?"],
[f.Key]))&&d.deleteCloneConfigurationProperty(f.Location).then(function(){a.hitch(g,g.changedItem)(f)},r)}),visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});f.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("url","url",c["Repository URL:"])],{hasOptionalParameters:!0});i=new d.Command({name:c["Clone Repository"],tooltip:c["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepository",parameters:i,callback:function(d){var f=e.getService("orion.git.provider"),
i=function(d,i,j){h.getDefaultSshOptions(e).then(function(n){var k=arguments.callee;e.getService("orion.page.message").createProgressMonitor(f.cloneGitRepository(j,d,i,g.defaultPath,n.gitSshUsername,n.gitSshPassword,n.knownHosts,n.gitPrivateKey,n.gitPassphrase),c["Cloning repository: "]+d).deferred.then(function(d){h.handleProgressServiceResponse(d,n,e,function(){g.changedItem&&a.hitch(g,g.changedItem)()},k,c["Clone Git Repository"])},function(a){h.handleProgressServiceResponse(a,n,e,function(){},
k,c["Clone Git Repository"])})})};d.parameters.valueFor("url")&&!d.parameters.optionsRequested?i(d.parameters.valueFor("url")):(d=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:e,fileClient:k,url:d.parameters.valueFor("url"),alwaysShowAdvanced:d.parameters.optionsRequested,func:i}),d.startup(),d.show())},visibleWhen:function(){return!0}});f.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("folderName","text",c["New folder:"])],{hasOptionalParameters:!0});i=new d.Command({name:c["Init Repository"],
tooltip:c["Create a new Git repository in a new folder"],id:"eclipse.initGitRepository",parameters:i,callback:function(d){var f=e.getService("orion.git.provider"),i=function(d,i,j){h.getDefaultSshOptions(e).then(function(n){var k=arguments.callee;e.getService("orion.page.message").createProgressMonitor(f.cloneGitRepository(j,d,i,g.defaultPath),c["Initializing repository: "]+j).deferred.then(function(d){h.handleProgressServiceResponse(d,n,e,function(){g.changedItem&&a.hitch(g,g.changedItem)()},k,c["Init Git Repository"])},
function(a){h.handleProgressServiceResponse(a,n,e,function(){},k,c["Init Git Repository"])})})};d.parameters.valueFor("folderName")&&!d.parameters.optionsRequested?i(null,null,d.parameters.valueFor("folderName")):(d=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:e,title:c["Init Git Repository"],fileClient:k,advancedOnly:!0,func:i}),d.startup(),d.show())},visibleWhen:function(){return!0}});f.addCommand(i);i=new d.Command({name:c.Delete,tooltip:c["Delete the repository"],imageClass:"core-sprite-delete",
id:"eclipse.git.deleteClone",visibleWhen:function(a){return a.Type==="Clone"},callback:function(d){var f=d.items,d=e.getService("orion.git.provider");if(a.isArray(f)){if(confirm(a.string.substitute(c["Are you sure you want do delete ${0} repositories?"],[f.length])))for(var h=0,i=0;i<f.length;i++)d.removeGitRepository(f[i].Location).then(function(){h++;h>=f.length&&g.changedItem&&a.hitch(g,g.changedItem)()},r)}else confirm(a.string.substitute(c["Are you sure you want to delete ${0}?"],[f.Name]))&&
d.removeGitRepository(f.Location).then(function(){g.changedItem&&a.hitch(g,g.changedItem)()},r)}});f.addCommand(i);i=new d.Command({name:c["Apply Patch"],tooltip:c["Apply a patch on the selected repository"],id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(a){a=s(a.items);a=new orion.git.widgets.ApplyPatchDialog({title:c["Apply Patch"],diffLocation:a.DiffLocation});a.startup();a.show()},visibleWhen:function(a){return a.Type==="Clone"}});
f.addCommand(i);i=new d.Command({name:c["Show content"],tooltip:c["Apply a patch on the selected repository"],id:"eclipse.orion.git.showContent",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(a){a=s(a.items);a=new orion.git.widgets.ContentDialog({title:c.Content,diffLocation:a.DiffLocation});a.startup();a.show()}});f.addCommand(i);i=new d.ParametersDescription([new d.CommandParameter("commitName","text",c["Commit name:"])],{hasOptionalParameters:!0});i=new d.Command({name:c["Open Commit"],
tooltip:c["Open the commit with the given name"],id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",parameters:i,callback:function(d){var f=function(g,h,i){i==null&&(i=new a.Deferred);g.length>0?e.getService("orion.git.provider").doGitLog("/gitapi/commit/"+d.parameters.valueFor("commitName")+g[0].ContentLocation+"?page=1&pageSize=1",null,null,c["Looking for the commit"]).then(function(a){i.callback(a.Children[0].Location)},function(){f(g.slice(1),
h,i)}):i.errback();return i},g=function(a){d.parameters.optionsRequested?(new orion.git.widgets.OpenCommitDialog({repositories:a,serviceRegistry:e,commitName:d.parameters.valueFor("commitName")})).show():(e.getService("orion.page.message").setProgressMessage(c["Looking for the commit"]),f(a,d.parameters.valueFor("commitName")).then(function(a){a!==null&&window.open("/git/git-commit.html#"+a+"?page=1&pageSize=1")},function(){var a=[];a.Severity="warning";a.HTML=!1;a.Message=c["No commits found"];e.getService("orion.page.message").setProgressResult(a)}))};
if(d.items.Type==="Clone"){var h=[d.items];g(h)}else d.items.CloneLocation?e.getService("orion.git.provider").getGitClone(d.items.CloneLocation).then(function(a){g(a.Children)}):(h=d.items,g(h))},visibleWhen:function(a){return a.Type==="Clone"||a.CloneLocation||a.length>1&&a[0].Type==="Clone"}});f.addCommand(i)};h.createGitStatusCommands=function(f,g,h){function i(a){if(!(a.status===401||a.status===403)){var c=[];c.Severity="Error";c.HTML=!1;try{var d=JSON.parse(a.responseText);c.Message=d.DetailedMessage?
d.DetailedMessage:d.Message}catch(e){c.Message=a.message}f.getService("orion.page.message").setProgressResult(c)}}function j(c){a.isArray(c)||(c=[c]);return c}function k(d,e){f.getService("orion.page.message").createProgressMonitor(f.getService("orion.git.provider").doRebase(d,"",e),e).deferred.then(function(d){if(d.Result=="OK"||d.Result=="ABORTED"||d.Result=="FAST_FORWARD"||d.Result=="UP_TO_DATE"){var e=[];e.Severity="Ok";e.HTML=!1;e.Message=d.Result;f.getService("orion.page.message").setProgressResult(e);
a.hitch(h,h.changedItem)({})}if(d.Result=="STOPPED")e=[],e.Severity="Warning",e.HTML=!1,e.Message=d.Result+c[". Repository still contains conflicts."],f.getService("orion.page.message").setProgressResult(e),a.hitch(h,h.changedItem)({});else if(d.Result=="FAILED_UNMERGED_PATHS")e=[],e.Severity="Error",e.HTML=!1,e.Message=d.Result+c[". Repository contains unmerged paths. Resolve conflicts first."],f.getService("orion.page.message").setProgressResult(e)},i)}var r=new d.Command({name:c.Stage,tooltip:c["Stage the change"],
imageClass:"git-sprite-stage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.stageCommand",callback:function(d){var e=j(d.items),g=f.getService("orion.page.message");if(e.length===1)g.createProgressMonitor(f.getService("orion.git.provider").stage(e[0].indexURI),c["Staging changes"]).deferred.then(function(){a.hitch(h,h.changedItem)(e)},i);else{for(var k=[],m=0;m<e.length;m++)k[m]=e[m].name;g.createProgressMonitor(f.getService("orion.git.provider").stageMultipleFiles(d.userData.Clone.IndexLocation,
k),"Staging changes").deferred.then(function(){a.hitch(h,h.changedItem)(e)},i)}},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var c=0;c<a.length;c++)if(!e.isChange(a[c])||e.isStaged(a[c]))return!1;return!0}});g.addCommand(r);r=new d.Command({name:c.Unstage,tooltip:c["Unstage the change"],imageClass:"git-sprite-unstage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.unstageCommand",callback:function(d){var e=j(d.items),g=f.getService("orion.page.message");if(e.length===1)g.createProgressMonitor(f.getService("orion.git.provider").unstage(e[0].indexURI,
e[0].name),c["Staging changes"]).deferred.then(function(){a.hitch(h,h.changedItem)(e)},i);else{for(var k=[],m=0;m<e.length;m++)k[m]=e[m].name;g.createProgressMonitor(f.getService("orion.git.provider").unstage(d.userData.Clone.IndexLocation,k),c["Staging changes"]).deferred.then(function(){a.hitch(h,h.changedItem)(e)},i)}},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var c=0;c<a.length;c++)if(!e.isChange(a[c])||!e.isStaged(a[c]))return!1;return!0}});g.addCommand(r);r=new d.ParametersDescription([new d.CommandParameter("name",
"text",c["Commit message:"],"",4),new d.CommandParameter("amend","boolean",c["Amend:"],!1)],{hasOptionalParameters:!0});r=new d.Command({name:"Commit",tooltip:"Commit",id:"eclipse.orion.git.commitCommand",parameters:r,callback:function(d){var e=d.items.status,g=function(d){f.getService("orion.page.message").createProgressMonitor(f.getService("orion.git.provider").commitAll(e.Clone.HeadLocation,null,a.toJson(d)),c["Committing changes"]).deferred.then(function(){a.hitch(h,h.changedItem)(e)},i)},j={};
j.Message=d.parameters.valueFor("name");j.Amend=d.parameters.valueFor("amend");for(var k=e.Clone.Config,p=0;p<k.length;p++)if(k[p].Key==="user.name")j.CommitterName=k[p].Value,j.AuthorName=k[p].Value;else if(k[p].Key==="user.email")j.CommitterEmail=k[p].Value,j.AuthorEmail=k[p].Value;j.Message&&j.CommitterName&&j.CommitterEmail&&!d.parameters.optionsRequested?g(j):(d=new orion.git.widgets.CommitDialog({body:j,func:g}),d.startup(),d.show())},visibleWhen:function(){return!0}});g.addCommand(r);r=new d.Command({name:c.Reset,
tooltip:c["Reset the branch, discarding all staged and unstaged changes"],imageClass:"core-sprite-refresh",id:"eclipse.orion.git.resetCommand",callback:function(d){var e=d.items;f.getService("orion.page.dialog").confirm(c["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+"\n"+c["Are you sure you want to continue?"],function(d){d&&f.getService("orion.page.message").createProgressMonitor(f.getService("orion.git.provider").unstageAll(e.IndexLocation,
"HARD"),c["Resetting local changes"]).deferred.then(function(){a.hitch(h,h.changedItem)(e)},i)})},visibleWhen:function(a){return e.hasStagedChanges(a)||e.hasUnstagedChanges(a)}});g.addCommand(r);r=new d.Command({name:c.Checkout,tooltip:c["Checkout files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutCommand",callback:function(d){var e=j(d.items);f.getService("orion.page.dialog").confirm(c["Your changes to the selected files will be discarded and cannot be recovered."]+
"\n"+c["Are you sure you want to continue?"],function(g){if(g){for(var g=f.getService("orion.page.message"),j=[],k=0;k<e.length;k++)j[k]=e[k].name;g.createProgressMonitor(f.getService("orion.git.provider").checkoutPath(d.userData.Clone.Location,j),c["Resetting local changes"]).deferred.then(function(){a.hitch(h,h.changedItem)(e)},i)}})},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var c=0;c<a.length;c++)if(!e.isChange(a[c])||e.isStaged(a[c]))return!1;return!0}});g.addCommand(r);r=new d.Command({name:c["Show Patch"],
tooltip:c["Show workspace changes as a patch"],imageClass:"git-sprite-diff",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.showPatchCommand",hrefCallback:function(a){for(var c=j(a.items),a=a.userData.Clone.DiffLocation+"?parts=diff",d=0;d<c.length;d++)a+="&Path=",a+=c[d].name;return a},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var c=0;c<a.length;c++)if(e.isStaged(a[c]))return!1;return!0}});g.addCommand(r);r=new d.Command({name:c.Continue,tooltip:c["Contibue Rebase"],id:"eclipse.orion.git.rebaseContinueCommand",
callback:function(a){return k(a.items.Clone.HeadLocation,"CONTINUE")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!=-1}});g.addCommand(r);r=new d.Command({name:c["Skip Patch"],tooltip:c["Skip Patch"],id:"eclipse.orion.git.rebaseSkipPatchCommand",callback:function(a){return k(a.items.Clone.HeadLocation,"SKIP")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!=-1}});g.addCommand(r);r=new d.Command({name:c.Abort,tooltip:c["Abort Rebase"],id:"eclipse.orion.git.rebaseAbortCommand",
callback:function(a){return k(a.items.Clone.HeadLocation,"ABORT")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!=-1}});g.addCommand(r)}})();return h});
define("orion/git/git-commit-navigator","i18n!git/nls/gitmessages,dojo,orion/explorer,orion/util,orion/git/gitCommands,orion/navigationUtils,orion/git/widgets/CommitTooltipDialog".split(","),function(c,f,a,d,g,e){var i={};i.GitCommitNavigator=function(){function e(a,c,d,f,g,h,p,q,r){this.registry=a;this.selection=c;this.checkbox=d!=null?d.checkbox:!0;this.minimal=d!=null?d.minimal:!1;this.parentId=f;this.pageTitleId=g;this.toolbarId=h;this.pageNavId=q;this.selectionToolsId=p;this.actionScopeId=r||
d.actionScopeId;this.isDirectory=!0;this.myTree=this.model=null;this.renderer=new i.GitCommitRenderer({actionScopeId:this.actionScopeId,cachePrefix:"GitCommitsNavigator",minimal:this.minimal},this)}e.prototype=new a.Explorer;e.prototype.loadCommitsList=function(e,h,i){var m=new f.Deferred;this.renderer._useCheckboxSelection=!1;e=d.makeRelative(e);if(e===this._lastHash&&!i)return m.callback(),m;this._lastHash=e;this._lastTreeRoot=h;var o=f.byId(this.parentId);(i=f.byId(o.id+"progress"))||(i=f.create("div",
{id:o.id+"progress"},o,"only"));f.empty(i);if(h.status&&h.status!=200){e=h.message;try{var n=JSON.parse(h.responseText);if(n.Message)e=n.Message}catch(p){}h.status!=404&&e!==""&&f.create("b",{innerHTML:f.string.substitute(c["Error ${0}: "],[h.status])},i,"only");f.place(document.createTextNode(e),i,"last");this.toolbarId&&this.selectionToolsId&&g.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,h,this.pageNavId);m.callback();return m}b=f.create("b");f.place(document.createTextNode(c["Loading "]),
i,"last");f.place(document.createTextNode(e),b,"last");f.place(b,i,"last");f.place(document.createTextNode("..."),i,"last");this.toolbarId&&this.selectionToolsId&&g.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,h,this.pageNavId);var q=this.registry.getService("orion.git.provider"),n=function(a,c){var d=new f.Deferred;q.doGitLog(a).then(function(a){m.callback();c?c(a.Children):d.callback(a.Children)});return d};h.Children?(this.createTree(this.parentId,new a.ExplorerFlatModel(e,
n,h.Children),{setFocus:!this.minimal}),m.callback()):this.createTree(this.parentId,new a.ExplorerFlatModel(e,n),{setFocus:!this.minimal});return m};return e}();i.GitCommitRenderer=function(){function d(a,c){this._init(a);this.options=a;this.explorer=c}d.prototype=new a.SelectionRenderer;d.prototype.getCellHeaderElement=function(a){if(!this.options.minimal)switch(a){case 0:return f.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>"+c.Message+"</h2>"});case 1:return f.create("th",
{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>"+c.Author+"</h2>"});case 2:return f.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>"+c.Date+"</h2>"});case 3:return f.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>"+c.Actions+"</h2>"});case 4:return f.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>"+c.Branches+"</h2>"});case 5:return f.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>"+
c.Tags+"</h2>"})}};d.prototype.setIncomingCommits=function(a){this.incomingCommits=a};d.prototype.setOutgoingCommits=function(a){this.outgoingCommits=a};d.prototype.getCellElement=function(a,c,d){var g=!1;f.forEach(this.incomingCommits,function(a){c.Name===a.Name&&(g=!0)});var h=!1;f.forEach(this.outgoingCommits,function(a){c.Name===a.Name&&(h=!0)});switch(a){case 0:var i,p,a=document.createElement("td");i=f.create("div",{style:"margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px; padding-left: 20px;"},
a,"only");p=f.create("a",{className:"navlink",href:"/git/git-commit.html#"+c.Location+"?page=1&pageSize=1"},i,"last");f.place(document.createTextNode(c.Message),p,"only");e.addNavGrid(this.explorer.getNavDict(),c,p);var q,r=new orion.git.widgets.CommitTooltipDialog({commit:c,onMouseLeave:function(){dijit.popup.hide&&dijit.popup.hide(r);dijit.popup.close(r)},onMouseEnter:function(){clearTimeout(q)}});f.connect(p,"onmouseover",p,function(){clearTimeout(q);q=setTimeout(function(){dijit.popup.open({popup:r,
around:p,orient:{BR:"TL",TR:"BL"}})},600)});f.connect(p,"onmouseout",p,function(){clearTimeout(q);q=setTimeout(function(){dijit.popup.hide&&dijit.popup.hide(r);dijit.popup.close(r)},200)});g?f.toggleClass(d,"incomingCommitsdRow",!0):h&&f.toggleClass(d,"outgoingCommitsdRow",!0);return a;case 1:return f.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:c.AuthorName+" ("+c.AuthorEmail+")"});case 2:return f.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:f.date.locale.format(new Date(c.Time),
{formatLength:"short"})});case 3:if(this.options.minimal)break;d=this.getActionsColumn(c,d,null,null,!0);f.style(d,"padding-left","5px");f.style(d,"padding-right","5px");return d;case 4:if(this.options.minimal)break;var s=document.createElement("td",{style:"padding-left: 5px; padding-right: 5px"});f.forEach(c.Branches,function(a){f.place(document.createTextNode(a.FullName),f.create("p",{style:"margin: 5px"},s,"last"),"only")});return s;case 5:if(this.options.minimal)break;s=document.createElement("td",
{style:"padding-left: 5px; padding-right: 5px"});f.forEach(c.Tags,function(a){f.place(document.createTextNode(a.Name),f.create("p",{style:"margin: 5px"},s,"last"),"only")});return s}};return d}();return i});
define("orion/git/git-status-table","i18n!git/nls/gitmessages,require,dojo,orion/compare/compare-container,orion/commands,orion/globalCommands,orion/git/git-commit-navigator,orion/git/gitCommands,orion/util,orion/compare/compareUtils,dijit/layout/ContentPane".split(","),function(c,f,a,d,g,e,i,h,k,j){function l(c,d,e,f,g,h,i,j,k){h=h||d+"commands";a.place('<div class="toolComposite" id="'+d+'"><div class="layoutLeft" id="'+d+'"><span class="paneTitle" id="'+(g||d+"heading")+'">'+e+'</span></div><ul class="layoutRight commandList sectionActions" id="'+
h+'"></ul><div id="'+c.id+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+c.id+'slideOut" class="slide"><span id="'+c.id+'pageCommandParameters" class="parameters"></span><span id="'+c.id+'pageCommandDismiss" class="parametersDismiss"></span></span></div></div>',c,"last");f?a.addClass(d,"auxpaneHeading"):a.addClass(d,"paneHeading");i&&i.renderCommands(h,a.byId(h),k||j,j,"button");return a.byId(d)}var m=m||{};m.GitStatusModel=function(){function a(){this.selectedItem=
this.selectedFileId=void 0;this.interestedUnstagedGroup=["Missing","Modified","Untracked","Conflicting"];this.interestedStagedGroup=["Added","Changed","Removed"];this.conflictPatterns=[["Both","Modified","Added","Changed","Missing"],["RemoteDelete","Untracked","Removed"],["LocalDelete","Modified","Added","Missing"]];this.conflictType="Conflicting"}a.prototype={destroy:function(){},interestedCategory:function(){},init:function(a){this.items=a},getModelType:function(a,c){return c},_markConflict:function(a){var c=
this.getGroupData(a[1]);if(c)for(var d=0;d<c.length;d++)if(!c[d].Conflicting){for(var e=c[d].Location,f=[],g=2;g<a.length;g++){var h=this.getGroupData(a[g]);h&&(h=this._findSameFile(e,h))&&f.push(h)}if(f.length===a.length-2){c[d].Conflicting=a[0];for(e=0;e<f.length;e++)f[e].Conflicting="Hide"}}},_findSameFile:function(a,c){for(var d=0;d<c.length;d++)if(!c[d].Conflicting&&a===c[d].Location)return c[d]},getGroupData:function(a){return this.items[a]},isConflict:function(a){return a===this.conflictType},
isStaged:function(a){for(var c=0;c<this.interestedStagedGroup.length;c++)if(a===this.interestedStagedGroup[c])return!0;return!1}};return a}();m.statusTypeMap={Missing:[f.toUrl("git/images/removal.gif"),c["Unstaged removal"],f.toUrl("git/images/stage.gif"),c.Stage],Removed:[f.toUrl("git/images/removal.gif"),c["Staged removal"],f.toUrl("git/images/unstage.gif"),c.Unstage],Modified:[f.toUrl("git/images/modification.gif"),c["Unstaged change"],f.toUrl("git/images/stage.gif"),c.Stage],Changed:[f.toUrl("git/images/modification.gif"),
c["Staged change"],f.toUrl("git/images/unstage.gif"),c.Unstage],Untracked:[f.toUrl("git/images/addition.gif"),c["Unstaged add"],f.toUrl("git/images/stage.gif"),c.Stage],Added:[f.toUrl("git/images/addition.gif"),c["Staged add"],f.toUrl("git/images/unstage.gif"),c.Unstage],Conflicting:[f.toUrl("git/images/conflict-file.gif"),c.Conflicting,f.toUrl("git/images/stage.gif"),c["Resolve Conflict"]]};m.GitStatusContentRenderer=function(){function c(a,d,e,f){this._registry=d;this._useCheckboxSelection=a.useCheckBox===
void 0?!1:a.useCheckBox;this._tableParentDivId=e;this._controller=f}c.prototype={initTable:function(){var c=this._tableParentDivId+"_table",d=a.byId(this._tableParentDivId);a.place(document.createTextNode(""),d,"only");c=a.create("table",{id:c});a.addClass(c,"statusTable");d.appendChild(c);this._table=c},getSelected:function(){var c=[];a.query(".selectionCheckmark"+this._tableParentDivId).forEach(a.hitch(this,function(a){if(a.checked)a=a.parentNode.parentNode,c.push({rowId:a.id,modelItem:a._item})}));
return c},toggleSelectAll:function(c){a.query(".selectionCheckmark"+this._tableParentDivId).forEach(a.hitch(this,function(d){d.checked=c;a.toggleClass(d.parentNode.parentNode,"checkedRow",!!c)}));return[]},getCheckboxColumn:function(c){if(this._useCheckboxSelection){var d=document.createElement("td");a.addClass(d,"secondaryColumn");var e=a.create("input",{type:"checkbox",id:c.id+"selectedState"});a.addClass(e,"selectionCheckmark"+this._tableParentDivId);a.addClass(e,"statusCheckBoxRow");e.itemId=
c.id;d.appendChild(e);a.connect(e,"onclick",a.hitch(this,function(d){a.toggleClass(c,"checkedRow",!!d.target.checked);this._controller._unstagedTableRenderer.renderAction();this._controller._stagedTableRenderer.renderAction();this._controller._stagedTableRenderer.updateCheckbox();this._controller._unstagedTableRenderer.updateCheckbox()}));return d}return null},renderRow:function(c,d){var e=this,f=document.createElement("tr");f.id=c.name+"_"+c.type+"_row";f._item=c;d%2?a.addClass(f,"darkTreeTableRow"):
a.addClass(f,"lightTreeTableRow");this._table.appendChild(f);this._useCheckboxSelection&&f.appendChild(this.getCheckboxColumn(f));var g=document.createElement("td"),h=document.createElement("img");h.src=m.statusTypeMap[c.type][0];a.style(h,"verticalAlign","middle");g.appendChild(h);f.appendChild(g);g=document.createElement("td");g.noWrap=!0;f.appendChild(g);var i=document.createElement("span");a.style(i,"verticalAlign","middle");i.id=f.id+"_nameSpan";a.place(document.createTextNode(c.name),i,"only");
a.style(i,"color","#0000FF");i.title="Click to compare";g.appendChild(i);if(i.id===e._controller._model.selectedFileId)e._controller._model.selectedItem=c,a.toggleClass(i,"fileNameSelectedRow",!0);a.connect(i,"onmouseover",i,function(){i.style.cursor=e._controller.loading?"wait":"pointer";a.toggleClass(i,"fileNameCheckedRow",!0)});a.connect(i,"onmouseout",i,function(){i.style.cursor=e._controller.loading?"wait":"default";a.toggleClass(i,"fileNameCheckedRow",!1)});a.connect(i,"onclick",i,function(){if(c.name!==
e._controller._model.selectedFileId){if(e._controller._model.selectedFileId!==void 0){var d=document.getElementById(e._controller._model.selectedFileId);d&&a.toggleClass(d,"fileNameSelectedRow",!1)}a.toggleClass(i,"fileNameSelectedRow",!0);e._controller._model.selectedFileId=i.id;e._controller.loadDiffContent(c)}});g=a.create("td",{id:f.id+"actionswrapper"},f,"last");a.addClass(g,"statusAction");g.noWrap=!0;g=a.create("span",{id:f.id+"actionsWrapper"},g,"only");this._registry.getService("orion.page.command").renderCommands("itemLevelCommands",
g,{type:"fileItem",object:c,rowId:f.id},this,"tool");this._registry.getService("orion.page.command").renderCommands("itemLevelCommands",g,c,this,"tool");this._controller._model.isStaged(c.type)?this._controller.hasStaged=!0:this._controller.hasUnstaged=!0}};return c}();m.GitStatusTableRenderer=function(){function c(a,d,e,f,g){this._registry=d;this._parentId=e;this._header=f;this._useCheckboxSelection=a.useCheckBox===void 0?!1:a.useCheckBox;this._type=g}c.prototype={render:function(){var c=l(this._parentId,
this._type+"heading",this._header,!0,this._type+"_header",this._type+"commands");a.addClass(c,"paneHeadingFixed");c=a.create("input",{type:"checkbox"},this._type+"_header","after");a.addClass(c,"statusCheckBoxOverall");this.checkBox=c;a.connect(c,"onclick",a.hitch(this,function(a){this.contentRenderer.toggleSelectAll(a.target.checked);this.renderAction()}));var d=a.byId(this._type+"commands"),c=this._type+"commandSpan";this._cmdSpan=a.create("span",{id:c},d,"last");d=this._registry.getService("orion.page.command");
this._type==="stagedItems"?(d.registerCommandContribution(c,"orion.gitUnstage",1),d.registerCommandContribution(c,"orion.gitUnstageAll",2)):(d.registerCommandContribution(c,"orion.gitStage",1),d.registerCommandContribution(c,"orion.gitCheckout",2),d.registerCommandContribution(c,"orion.gitStageAll",3),d.registerCommandContribution(c,"orion.gitCheckoutAll",4),d.registerCommandContribution(c,"orion.gitSavePatch",5));a.addClass(this._cmdSpan,"paneHeadingCommands");this._messageId=this._parentId+"_"+
this._type+"_message";a.create("section",{id:this._messageId,role:"region","aria-labelledby":this._type+"_header"},this._parentId,"last");this._statusContentId=this._parentId+"_"+this._type;a.create("section",{id:this._statusContentId,role:"region","aria-labelledby":this._type+"_header"},this._parentId,"last")},setLoadingMessage:function(c){c?a.place(document.createTextNode(c),this._messageId,"only"):a.empty(this._messageId)},select:function(a){this.checkBox.checked=a},disable:function(a){this.checkBox.disabled=
a},updateCheckbox:function(){this.contentRenderer.totalRow!==0&&(this.contentRenderer.totalRow===this.contentRenderer.getSelected().length?this.select(!0):this.select(!1))},getStatusContentId:function(){return this._statusContentId},renderAction:function(){a.place(document.createTextNode(""),this._cmdSpan,"only");this._registry.getService("orion.page.command").renderCommands(this._cmdSpan.id,this._cmdSpan,{type:this._type},this,"button")}};return c}();m.GitCommitZoneRenderer=function(){function d(a,
c){this._registry=a;this._parentId=c}d.prototype={render:function(){this._commitZone=a.create("section",{role:"region","aria-labelledby":"commitHeader"},this._parentId,"last");var d=a.create("div",{id:"commitHeader"},this._commitZone);a.addClass(d,"auxpaneHeading paneHeadingFixed");a.create("span",{innerHTML:c["Commit message"]},d);var d=a.create("table",{role:"presentation"},this._commitZone),d=a.create("tr",null,d),e=a.create("td",{nowrap:!0},d,"last"),e=a.create("textarea",{id:"commitMessage",
ROWS:6},e,"last");a.addClass(e,"pane");d=a.create("td",{nowrap:!0},d,"last");d=a.create("div",{style:"float: left;",align:"left"},d,"last");d=a.create("table",{role:"presentation"},d);e=a.create("tr",null,d);e=a.create("td",{nowrap:!0},e,"last");a.create("button",{id:"commit",innerHTML:c.Commit,title:c["Record changes in the active branch"]},e,"last");a.create("tr",{width:"100%",height:"20px"},d);d=a.create("tr",null,d);d=a.create("td",{nowrap:!0},d,"last");a.create("input",{id:"amend",type:"checkbox",
value:"Amend",title:c["Amend last commit"]},d,"last");d.appendChild(document.createTextNode(c[" Amend"]))},show:function(){this._commitZone.style.display=""},hide:function(){this._commitZone.style.display="none"}};return d}();m.GitRebaseZoneRenderer=function(){function d(a,c){this._registry=a;this._parentId=c}d.prototype={render:function(d){this._rebaseZone=a.create("div",null,this._parentId,"last");var e=a.create("table",{width:"100%"},this._rebaseZone),e=a.create("tr",null,e),e=a.create("td",{nowrap:!0},
e,"last");a.create("h2",{innerHTML:c["Rebase in progress. Choose action:"]},e,"last");e=a.create("table",null,this._rebaseZone);e=a.create("tr",null,e);e=a.create("td",{nowrap:!0},e,"last");e=a.create("div",{style:"float: left;",align:"left"},e,"last");this._cmdSpan=a.create("span",{id:"rebaseActions"},e,"last");d&&a.create("table",{width:"100%",height:"10px"},this._rebaseZone)},renderAction:function(){a.place(document.createTextNode(""),this._cmdSpan,"only");this._registry.getService("orion.page.command").renderCommands(this._cmdSpan.id,
this._cmdSpan,{type:"rebase"},this,"button")},show:function(){this._rebaseZone.style.display=""},hide:function(){this._rebaseZone.style.display="none"}};return d}();m.GitCommitterAndAuthorZoneRenderer=function(){function d(a,c){this._registry=a;this._parentId=c}d.prototype={render:function(d){this._cmdSpanShow=a.create("span",{id:"personIdentShow"},this._parentId,"last");this._cmdSpanHide=a.create("span",{id:"personIdentHide"},this._parentId,"last");this._personIdentZone=a.create("div",null,this._parentId,
"last");var e=a.create("table",null,this._personIdentZone),f=a.create("tr",null,e),g=a.create("td",{nowrap:!0},f,"last");a.create("h2",{innerHTML:c["Committer name:"]},g,"last");g=a.create("td",{nowrap:!0},f,"last");this._committerName=a.create("input",{id:"committerName",type:"text"},g,"last");g=a.create("td",{nowrap:!0},f,"last");a.create("h2",{innerHTML:c["email:"]},g,"last");f=a.create("td",{nowrap:!0},f,"last");this._committerEmail=a.create("input",{id:"committerEmail",type:"text"},f,"last");
e=a.create("tr",null,e);g=a.create("td",{nowrap:!0},e,"last");a.create("h2",{innerHTML:c["Author name: "]},g,"last");g=a.create("td",{nowrap:!0},e,"last");this._authorName=a.create("input",{id:"authorName",type:"text"},g,"last");g=a.create("td",{nowrap:!0},e,"last");a.create("h2",{innerHTML:c["email:"]},g,"last");f=a.create("td",{nowrap:!0},e,"last");this._authorEmail=a.create("input",{id:"authorEmail",type:"text"},f,"last");d&&a.create("table",{width:"100%",height:"10px"},this._parentId)},renderAction:function(){a.place(document.createTextNode(""),
this._cmdSpanShow,"only");a.place(document.createTextNode(""),this._cmdSpanHide,"only");var c=this._registry.getService("orion.page.command");c.renderCommands(this._cmdSpanShow.id,this._cmdSpanShow,{type:"personIdentShow"},this,"button");c.renderCommands(this._cmdSpanHide.id,this._cmdSpanHide,{type:"personIdentHide"},this,"button")},setDefaultPersonIdent:function(a,c){this._defName=a;this._defEmail=c},show:function(){this._personIdentZone.style.display="";this._cmdSpanHide.style.display="";this._cmdSpanShow.style.display=
"none"},hide:function(){this._personIdentZone.style.display="none";this._cmdSpanHide.style.display="none";this._cmdSpanShow.style.display="";this.resetCommitterAndAuthor()},resetCommitterAndAuthor:function(){this._committerName.value=this._defName;this._committerEmail.value=this._defEmail;this._authorName.value=this._defName;this._authorEmail.value=this._defEmail}};return d}();m.GitLogTableRenderer=function(){function d(a,c,e,f,g){this._controller=a;this._registry=c;this._parentId=e;this._header=
f;this._type=g;this._sectionId=this._parentId+"_"+this._type+"_section"}d.prototype={render:function(){var c=a.create("section",{id:this._sectionId,role:"region","aria-labelledby":this._type+"_header"},this._parentId),d=l(c,this._type+"heading",this._header,!0,this._type+"_header",this._type+"commands");a.addClass(d,"paneHeadingFixed");d=this._type+"commandSpanAdditional";this._cmdSpanAdditional=a.create("span",{id:d},this._type+"commands","last");a.addClass(this._cmdSpanAdditional,"statusLogCmd paneHeadingCommands");
var e=this._type+"commandSpan";this._cmdSpan=a.create("span",{id:e},this._type+"commands","last");var f=this._registry.getService("orion.page.command");this._type==="gitRemote"?(f.registerCommandContribution(e,"orion.openGitRemote",1),f.registerCommandContribution(d,"eclipse.orion.git.fetch",2),f.registerCommandContribution(d,"eclipse.orion.git.merge",3)):(f.registerCommandContribution(e,"orion.openGitLog",1),f.registerCommandContribution(d,"eclipse.orion.git.push",2));a.addClass(this._cmdSpan,"statusLogCmd paneHeadingCommands");
this._logContentId=this._parentId+"_"+this._type+"_content";c=a.create("div",{id:this._logContentId,tabindex:"0"},c,"last");a.addClass(c,"statusLogContent")},getLogContentId:function(){return this._logContentId},getLogSectionId:function(){return this._sectionId},modifyHeader:function(d){a.byId(this._type+"_header")&&a.place(document.createTextNode(a.string.substitute(c["Recent commits on ${0}"],[d])),this._type+"_header","only")},renderAction:function(){a.place(document.createTextNode(""),this._cmdSpan,
"only");this._registry.getService("orion.page.command").renderCommands(this._cmdSpan.id,this._cmdSpan,{type:this._type,model:this._controller._model,branch:this._controller._curBranch},this,"button")},renderAdditionalAction:function(c){a.place(document.createTextNode(""),this._cmdSpanAdditional,"only");this._registry.getService("orion.page.command").renderCommands(this._cmdSpanAdditional.id,this._cmdSpanAdditional,c,this,"button")}};return d}();m.InlineCompareRenderer=function(){function d(a,c){this._registry=
a;this._parentId=c}d.prototype={render:function(d){var e=a.create("table",{width:"100%"}),f=a.create("tr",null,e),g=a.create("td",{nowrap:!0},f,"last");a.create("h2",{id:"fileNameInViewer",innerHTML:c["Select a file on the left to compare..."]},g,"last");g=new dijit.layout.ContentPane({region:"top"});a.addClass(g.domNode,"inlineCompareTitle");g.attr("content",e);var h=new dijit.layout.ContentPane({"class":"mainpane",id:"inline-compare-viewer",splitter:!1,region:"center"});a.addClass(h.domNode,"mainpane");
a.addClass(h.domNode,"inlineCompareContent");var i=dijit.byId(this._parentId);i.addChild(g);i.addChild(h);if(d)d=document.createElement("td"),d.id="inlineCompareCommands",f.appendChild(d),d.noWrap=!0,f.align="right",e.align="right"}};return d}();m.GitStatusController=function(){function k(a,e,f,g){this._registry=e;this._commandService=f;this._statusService=g;this._model=new m.GitStatusModel;this._timerOn=!1;this._renderLog=a.renderLog?!0:!1;this._generateCommands();this._unstagedTableRenderer=new m.GitStatusTableRenderer({useCheckBox:!0},
e,"statusZone",c.Unstaged,"unstagedItems");this._unstagedTableRenderer.render(!0);this._stagedTableRenderer=new m.GitStatusTableRenderer({useCheckBox:!0},e,"statusZone",c.Staged,"stagedItems");this._stagedTableRenderer.render(!0);this._commitZoneRenderer=new m.GitCommitZoneRenderer(e,"statusZone");this._commitZoneRenderer.render(!0);this._rebaseZoneRenderer=new m.GitRebaseZoneRenderer(e,"statusZone");this._rebaseZoneRenderer.render(!0);this._committerAndAuthorZoneRenderer=new m.GitCommitterAndAuthorZoneRenderer(e,
"statusZone");this._committerAndAuthorZoneRenderer.render(!0);if(this._renderLog)this._logTableRenderer=new m.GitLogTableRenderer(this,e,"logZone",c["Recent commits on"],"gitLog"),this._logTableRenderer.render(!0),this._logTableRenderer.renderAction(),this._remoteTableRenderer=new m.GitLogTableRenderer(this,e,"logZone",c["Recent commits on"],"gitRemote"),this._remoteTableRenderer.render(!0),this._remoteTableRenderer.renderAction();(new m.InlineCompareRenderer(e,"viewerZone")).render(!0);this._unstagedContentRenderer=
new m.GitStatusContentRenderer({useCheckBox:!0},e,this._unstagedTableRenderer.getStatusContentId(),this);this._unstagedTableRenderer.contentRenderer=this._unstagedContentRenderer;this._stagedContentRenderer=new m.GitStatusContentRenderer({useCheckBox:!0},e,this._stagedTableRenderer.getStatusContentId(),this);this._stagedTableRenderer.contentRenderer=this._stagedContentRenderer;var h=this,a={commandSpanId:"inlineCompareCommands",diffProvider:new d.DefaultDiffProvider(e)};this._inlineCompareContainer=
new d.InlineCompareContainer(e,"inline-compare-viewer",a);h._staging=!1;h._stagingConflict=!1;this.startTimer();document.getElementById("commit").onclick=function(){h.commit()}}k.prototype={setLoadingStatusMessage:function(c){a.hitch(this._unstagedTableRenderer,this._unstagedTableRenderer.setLoadingMessage(c));a.hitch(this._stagedTableRenderer,this._stagedTableRenderer.setLoadingMessage(c))},loadStatus:function(a){this._staging=!1;this._model.init(a);this._getCloneInfo()},_processStatus:function(){this.initViewer();
this._model.selectedFileId=null;this.setLoadingStatusMessage();this._loadBlock(this._unstagedContentRenderer,this._model.interestedUnstagedGroup);this._loadBlock(this._stagedContentRenderer,this._model.interestedStagedGroup);this._stagedTableRenderer.disable(!this.hasStaged);this._unstagedTableRenderer.disable(!this.hasUnstaged);if(this._renderLog&&this._initializing){var c=this,d=this._registry.getService("orion.page.command");h.createStatusCommands(c._registry,d,function(){c.getGitStatus(c._url,
!0)},9,c);this._renderLogs(!1);this._renderLogs(!0)}this._committerAndAuthorZoneRenderer.renderAction();this._unstagedTableRenderer.renderAction();this._stagedTableRenderer.renderAction();this._renderGlobalActions();if(this._stagingConflict)this._stagingConflict=!1,this.hasStaged||this.commit(a.string.substitute("Resolved deletion conflicts on file ",[this._stagingName]),!1);this._statusService.setProgressMessage("");this._model.items.RepositoryState.indexOf("REBASING")!=-1?(this.rebaseState=!0,this._rebaseZoneRenderer.renderAction(),
this._rebaseZoneRenderer.show(),this._commitZoneRenderer.hide()):(this.rebaseState=!1,this._commitZoneRenderer.show(),this._rebaseZoneRenderer.hide())},_commitReady:function(){var a=document.getElementById("amend");return this.hasStaged?!0:a.checked?!0:!1},_prepareStage:function(c,d){this._staging=!0;if(d)for(var e=0;e<c.length;e++)a.style(c[e].rowId+"_nameSpan","color","#666666");else a.style(c+"_nameSpan","color","#666666")},_renderGlobalActions:function(){var c=a.byId("pageActions");a.place(document.createTextNode(""),
c,"only");this._registry.getService("orion.page.command").renderCommands(c.id,c,{type:"global"},this,"button",!0)},_processCloneInfo:function(){a.byId("logZone").style.display="block";this._curBranch=void 0;for(var d=0;d<this._branchInfo.Children.length;d++)if(this._branchInfo.Children[d].Current)this._curBranch=this._branchInfo.Children[d];this._curRemote=this._remoteInfo&&this._remoteInfo.Children&&this._remoteInfo.Children.length>0?this._remoteInfo.Children[0]:null;this._curClone=this._cloneInfo.Children[0];
d=this._curBranch?this._curBranch.Name:"detached";this._logTableRenderer.modifyHeader(d);this._curBranch&&this._curRemote&&(d=(this._curBranch.RemoteLocation.length>0?this._curBranch.RemoteLocation[0].Name:"")+"/"+this._curBranch.Name,this._remoteTableRenderer.modifyHeader(d));var f={Parents:[]};f.Name=a.string.substitute(c["Status (${0})"],[d]);f.Parents[0]={};f.Parents[0].Name=this._curClone.Name;f.Parents[0].Location=this._curClone.Location;f.Parents[0].ChildrenLocation=this._curClone.Location;
f.Parents[1]={};f.Parents[1].Name="Repositories";e.setPageTarget({task:"Status",target:this._curClone,serviceRegistry:this._registry,commandService:this._commandService,breadcrumbTarget:f,makeBreadcrumbLink:function(a,c){a.href="/git/git-repository.html#"+(c?c:"")},makeAlternate:a.hitch(this._curBranch||this._curRemote,function(){return this})});this._logTableRenderer.renderAction();this._remoteTableRenderer.renderAction();this._committerAndAuthorZoneRenderer.setDefaultPersonIdent(this._userName,
this._userEmail);this._committerAndAuthorZoneRenderer.hide()},_getCloneInfo:function(){var a=this;if(a._initializing){var c=a._model.items.CloneLocation,d=a._registry.getService("orion.git.provider");d.getGitClone(c).then(function(c){a._cloneInfo=c;a._cloneInfo.Children.length===0?(a._renderLog=!1,a._processStatus()):d.getGitBranch(a._cloneInfo.Children[0].BranchLocation).then(function(c){a._branchInfo=c;d.getGitRemote(a._cloneInfo.Children[0].RemoteLocation).then(function(c){a._remoteInfo=c;var c=
a._cloneInfo.Children[0].ConfigLocation.replace("config","config/user.name"),e=function(c){a._userEmail=c;a._processCloneInfo();a._processStatus()};d.getGitCloneConfig(c).then(function(c){a._userName=c.Value;c=a._cloneInfo.Children[0].ConfigLocation.replace("config","config/user.email");d.getGitCloneConfig(c).then(function(a){e(a.Value)},function(){e("")})},function(){a._userName="";var c=a._cloneInfo.Children[0].ConfigLocation.replace("config","config/user.email");d.getGitCloneConfig(c).then(function(a){e(a.Value)},
function(){e("")})})})})})}else a._processStatus()},_renderLogs:function(d){var e=this;if(this._renderLog)if(d)if(!this._curRemote||!this._curBranch||this._curBranch.RemoteLocation.length!==1||this._curBranch.RemoteLocation[0].Children.length!==1)a.empty(this._remoteTableRenderer.getLogSectionId());else{this._gitCommitNavigatorRem=new i.GitCommitNavigator(this._registry,null,{checkbox:!1,actionScopeId:"itemLevelCommands",minimal:!0},this._remoteTableRenderer.getLogContentId());a.byId(this._remoteTableRenderer.getLogContentId())?
a.place(document.createTextNode(""),this._remoteTableRenderer.getLogContentId(),"only"):this._remoteTableRenderer.render(!0);a.place(document.createTextNode("Loading recent commits..."),this._remoteTableRenderer.getLogContentId(),"only");var f=this._curBranch.RemoteLocation[0].Children[0].Location+"?page=1&pageSize=5",g=e._registry.getService("orion.git.provider");g.doGitLog(f).then(function(d){var f=e._registry.getService("orion.git.provider");a.place(document.createTextNode(c["Getting git incoming changes..."]),
e._remoteTableRenderer.getLogContentId(),"only");f.getLog(d.HeadLocation,d.Id).then(function(a){e._gitCommitNavigatorRem.renderer.setIncomingCommits(a.Children);e._gitCommitNavigatorRem.loadCommitsList(d.CommitLocation+"?page=1&pageSize=5",d);e._remoteTableRenderer.renderAdditionalAction(e._gitCommitNavigatorRem._lastTreeRoot)})},function(a,c){e._gitCommitNavigatorRem.loadCommitsList(f,a);console.error("HTTP status code: ",c.xhr.status)})}else this._gitCommitNavigatorLog=new i.GitCommitNavigator(this._registry,
null,{checkbox:!1,minimal:!0},this._logTableRenderer.getLogContentId()),a.place(document.createTextNode(c["Loading recent commits..."]),this._logTableRenderer.getLogContentId(),"only"),f=(e._curBranch?e._curBranch.CommitLocation:e._model.items.CommitLocation)+"?page=1&pageSize=5",g=e._registry.getService("orion.git.provider"),g.doGitLog(f).then(function(a){(function(a){a.toRef==null||a.toRef.RemoteLocation.length!==1||a.toRef.RemoteLocation[0].Children.length!==1||!e._curBranch?(e._gitCommitNavigatorLog.loadCommitsList((e._curBranch?
e._curBranch.CommitLocation:e._model.items.CommitLocation)+"?page=1&pageSize=5",{Type:"LocalBranch",RemoteLocation:a.toRef.RemoteLocation,Children:a.Children}),e._curRemote&&e._curBranch&&e._logTableRenderer.renderAdditionalAction(e._gitCommitNavigatorLog._lastTreeRoot)):g.getGitRemote(a.toRef.RemoteLocation[0].Children[0].Location).then(function(c){g.getLog(c.CommitLocation,"HEAD").then(function(c){e._gitCommitNavigatorLog.renderer.setOutgoingCommits(c.Children);e._gitCommitNavigatorLog.loadCommitsList(e._curBranch.CommitLocation+
"?page=1&pageSize=5",{Type:"LocalBranch",RemoteLocation:a.toRef.RemoteLocation,Children:a.Children});e._curRemote&&e._logTableRenderer.renderAdditionalAction(e._gitCommitNavigatorLog._lastTreeRoot)})},function(c,d){e._gitCommitNavigatorLog.loadCommitsList(f,{Type:"LocalBranch",RemoteLocation:a.toRef.RemoteLocation,Children:a.Children});e._curRemote&&e._curBranch&&e._logTableRenderer.renderAdditionalAction(e._gitCommitNavigatorLog._lastTreeRoot);console.error("HTTP status code: ",d.xhr.status)})})(a)},
function(a,c){console.error("HTTP status code: ",c.xhr.status)})},_generateCommands:function(){var a=this,d=new g.Command({name:c.Compare,tooltip:c["Show the side-by-side compare"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"orion.sbsCompare",hrefCallback:function(c){return a.openCompareEditor(c.items.object)},visibleWhen:function(a){return a.type==="fileItem"}}),e=new g.Command({name:c["Change Committer or Author"],id:"orion.showCommitterAndAuthor",callback:function(){a._committerAndAuthorZoneRenderer.show()},
visibleWhen:function(a){return a.type==="personIdentShow"}}),h=new g.Command({name:c["Use Default Committer and Author"],id:"orion.hideCommitterAndAuthor",callback:function(){a._committerAndAuthorZoneRenderer.hide()},visibleWhen:function(a){return a.type==="personIdentHide"}}),i=new g.Command({name:c.Checkout,tooltip:c["Checkout the file, discarding the unstaged change"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"orion.gitCheckout",callback:function(d){a._registry.getService("orion.page.dialog").confirm(c["Your changes to the file will be lost. Are you sure you want to checkout?"],
function(e){e&&(a._statusService.setProgressMessage(c["Checking out..."]),a.checkout([d.items.object.name]))})},visibleWhen:function(c){return c.type==="fileItem"&&!a._model.isStaged(c.object.type)}}),j=new g.Command({name:c.Stage,tooltip:c["Stage the change"],imageClass:"git-sprite-stage",spriteClass:"gitCommandSprite",id:"orion.gitStage",callback:function(c){a._statusService.setProgressMessage("Staging...");a._prepareStage(c.items.rowId,!1);return a.stage(c.items.object.indexURI,c.items.object)},
visibleWhen:function(c){return c.type==="fileItem"&&!a._model.isStaged(c.object.type)}}),k=new g.Command({name:c.Stage,tooltip:c["Stage the selected changes"],imageClass:"git-sprite-stage_all",spriteClass:"gitCommandSprite",id:"orion.gitStageAll",callback:function(){a._statusService.setProgressMessage(c["Staging..."]);return a.stageSelected()},visibleWhen:function(c){return c.type==="unstagedItems"&&a.hasUnstaged&&a._unstagedContentRenderer.getSelected().length>0}}),l=new g.Command({name:c.Checkout,
tooltip:c["Checkout all the selected files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"orion.gitCheckoutAll",callback:function(){a._registry.getService("orion.page.dialog").confirm(c["Your changes to all the selected files will be lost. Are you sure you want to checkout?"],function(d){d&&(a._statusService.setProgressMessage(c["Checking out..."]),a.checkoutSelected())})},visibleWhen:function(c){return c.type==="unstagedItems"&&a.hasUnstaged&&a._unstagedContentRenderer.getSelected().length>
0}}),m=new g.Command({name:c["Save Patch"],tooltip:c["Save workspace changes as a patch"],imageClass:"git-sprite-diff",spriteClass:"gitCommandSprite",id:"orion.gitSavePatch",hrefCallback:function(){for(var c=a._curClone.DiffLocation+"?parts=diff",d=a._unstagedContentRenderer.getSelected(),e=0;e<d.length;e++)c+="&Path=",c+=d[e].modelItem.path;return c},visibleWhen:function(c){return c.type==="unstagedItems"&&a.hasUnstaged&&a._unstagedContentRenderer.getSelected().length>0}}),o=new g.Command({name:c.Unstage,
tooltip:c["Unstage the change"],imageClass:"git-sprite-unstage",spriteClass:"gitCommandSprite",id:"orion.gitUnstage",callback:function(d){a._statusService.setProgressMessage(c["Unstaging..."]);return a.unstage(d.items.object)},visibleWhen:function(c){return c.type==="fileItem"&&a._model.isStaged(c.object.type)}}),z=new g.Command({name:c.Unstage,tooltip:"Unstage the selected changes",imageClass:"git-sprite-unstage_all",spriteClass:"gitCommandSprite",id:"orion.gitUnstageAll",callback:function(){a._statusService.setProgressMessage(c["Unstaging..."]);
return a.unstageSelected("MIXED")},visibleWhen:function(c){return c.type==="stagedItems"&&a.hasStaged&&a._stagedContentRenderer.getSelected().length>0}}),B=new g.Command({name:c.Reset,tooltip:c["Reset the branch, discarding all staged and unstaged changes"],imageClass:"core-sprite-refresh",spriteClass:"gitCommandSprite",id:"orion.gitResetChanges",callback:function(){a._registry.getService("orion.page.dialog").confirm(c["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+
"\n"+c["Are you sure you want to continue?"],function(d){if(d)return a._statusService.setProgressMessage(c["Resetting local changes..."]),a.unstageAll("HARD")})},visibleWhen:function(){return a.hasStaged||a.hasUnstaged}}),M=new g.Command({name:"Continue",tooltip:"Continue rebase",id:"orion.gitRebaseContinue",callback:function(){a._statusService.setProgressMessage(c["Continue rebase..."]);return a.rebase("CONTINUE")},visibleWhen:function(){return a.rebaseState}}),E=new g.Command({name:"Skip Patch",
tooltip:"Skip patch",id:"orion.gitRebaseSkip",callback:function(){a._statusService.setProgressMessage(c["Skipping patch..."]);return a.rebase("SKIP")},visibleWhen:function(){return a.rebaseState}}),A=new g.Command({name:"Abort",tooltip:"Abort rebase",id:"orion.gitRebaseAbort",callback:function(){a._statusService.setProgressMessage(c["Aborting rebase..."]);return a.rebase("ABORT")},visibleWhen:function(){return a.rebaseState}}),I=new g.Command({name:c["Complete log"],id:"orion.openGitLog",hrefCallback:function(a){return f.toUrl("git/git-log.html")+
"#"+(a.items.branch?a.items.branch.CommitLocation:a.items.model.items.CommitLocation)+"?page=1"},visibleWhen:function(a){return a.type==="gitLog"&&(a.branch&&a.branch.CommitLocation||a.model&&a.model.items&&a.model.items.CommitLocation)}}),C=new g.Command({name:c["Complete log"],id:"orion.openGitRemote",hrefCallback:function(a){return f.toUrl("git/git-log.html")+"#"+a.items.branch.RemoteLocation[0].Children[0].CommitLocation+"?page=1"},visibleWhen:function(a){return a.type==="gitRemote"&&a.branch&&
a.branch.RemoteLocation.length===1&&a.branch.RemoteLocation[0].Children.length===1}}),y=this._registry.getService("orion.page.command");y.addCommand(d);y.addCommand(j);y.addCommand(i);y.addCommand(k);y.addCommand(l);y.addCommand(m);y.addCommand(z);y.addCommand(o);y.addCommand(B);y.addCommand(M);y.addCommand(E);y.addCommand(A);y.addCommand(B);y.addCommand(e);y.addCommand(h);y.addCommand(I);y.addCommand(C);y.registerCommandContribution("itemLevelCommands","orion.gitStage",100);y.registerCommandContribution("itemLevelCommands",
"orion.gitCheckout",101);y.registerCommandContribution("itemLevelCommands","orion.gitUnstage",102);y.registerCommandContribution("itemLevelCommands","orion.sbsCompare",103);y.registerCommandContribution("pageActions","orion.gitResetChanges",1);y.registerCommandContribution("rebaseActions","orion.gitRebaseContinue",2);y.registerCommandContribution("rebaseActions","orion.gitRebaseSkip",3);y.registerCommandContribution("rebaseActions","orion.gitRebaseAbort",4);y.registerCommandContribution("personIdentShow",
"orion.showCommitterAndAuthor",1);y.registerCommandContribution("personIdentHide","orion.hideCommitterAndAuthor",2)},startTimer:function(){if(!this.timerOn)this.timerOn=!0,this.doTimer()},stopTimer:function(){if(this.timerOn&&this._timerId)this.timerOn=!1,clearTimeout(this._timerId)},doTimer:function(){var c=document.getElementById("commitMessage"),d=document.getElementById("commit");this._staging?(d.disabled=!0,c.disabled=!1):(d.disabled=!(this._commitReady()&&c.value!==""),c.disabled=!this._commitReady());
this._timerId=setTimeout(a.hitch(this,function(){this.doTimer()}),150)},initViewer:function(){this._inlineCompareContainer.destroyEditor();this._model.selectedItem=null;this.hasUnstaged=this.hasStaged=!1;a.place(document.createTextNode(c["Select a file on the left to compare..."]),"fileNameInViewer","only");a.style("fileNameInViewer","color","#6d6d6d");a.empty("inlineCompareCommands")},_createImgButton:function(a,c,d,e,f){var g=document.createElement("img");g.src=d;c.appendChild(g);this.modifyImageButton(a,
g,e,f)},_modifyImageButton:function(c,d,e,f,g,h){var i=this;g===void 0||!g?(d.title=e,a.style(d,"opacity","0.4"),a.connect(d,"onmouseover",d,function(){var c=!1;h&&(c=h());d.style.cursor=i.loading?"wait":c?"default":"pointer";c?a.style(d,"opacity","0.4"):a.style(d,"opacity","1")}),a.connect(d,"onmouseout",d,function(){d.style.cursor=i.loading?"wait":"default";a.style(d,"opacity","0.4")}),d.onclick=function(a){var d=!1;h&&(d=h());c&&!d&&(d||f(a))}):(d.title="",d.style.cursor=i.loading?"wait":"default",
a.style(d,"opacity","0.0"),a.connect(d,"onmouseover",d,function(){d.style.cursor=i.loading?"wait":"default";a.style(d,"opacity","0")}),a.connect(d,"onmouseout",d,function(){d.style.cursor=i.loading?"wait":"default";a.style(d,"opacity","0")}),d.onclick=null)},_sortBlock:function(a){for(var c=[],d=0;d<a.length;d++){var e=a[d],f=this._model.getGroupData(e);if(f)for(var g=0;g<f.length;g++){var h=this._model.getModelType(f[g],e);h&&c.push({name:f[g].Name,type:h,location:f[g].Location,path:f[g].Path,commitURI:f[g].Git.CommitLocation,
indexURI:f[g].Git.IndexLocation,diffURI:f[g].Git.DiffLocation,conflicting:this._model.isConflict(h)})}}c.sort(function(a,c){var d=a.name&&a.name.toLowerCase(),e=c.name&&c.name.toLowerCase();return d<e?-1:d>e?1:0});return c},_loadBlock:function(a,c){a.initTable();for(var d=this._sortBlock(c),e=0;e<d.length;e++)a.renderRow(d[e],e);return a.totalRow=d.length},loadDiffContent:function(d){this._statusService.setProgressMessage("Loading diff...");var e=this._model.isStaged(d.type)?c["index VS HEAD"]:c["local VS index"];
this._inlineCompareContainer.setDiffTitle(a.string.substitute(c["Compare(${0} : ${1})"],[m.statusTypeMap[d.type][1],e]));this._inlineCompareContainer.setOptions({hasConflicts:this._model.isConflict(d.type),complexURL:d.diffURI});this._inlineCompareContainer.clearContent();this._inlineCompareContainer.startup()},openCompareEditor:function(a){return j.generateCompareHref(a.diffURI,{readonly:this._model.isStaged(a.type),conflict:this._model.isConflict(a.type)})},handleServerErrors:function(a,c){var d=
[];d.Severity="Error";d.HTML=!1;try{var e=JSON.parse(a.responseText);d.Message=e.DetailedMessage?e.DetailedMessage:e.Message}catch(f){d.Message=typeof a.message==="string"?a.message:c.xhr.statusText}this._statusService.setProgressResult(d)},getGitStatus:function(a,d){this._url=a;if(this._initializing=d?!0:!1)this._cloneInfo=void 0;var e=this;e.setLoadingStatusMessage(c["Loading status..."]);e._registry.getService("orion.git.provider").getGitStatus(a).then(function(a){e.loadStatus(a)},function(a,c){e.setLoadingStatusMessage();
e.handleServerErrors(a,c)})},stage:function(a,c){var d=this;c&&c.conflicting?(d._stagingConflict=!0,d._stagingName=c.name):d._stagingConflict=!1;d._registry.getService("orion.git.provider").stage(a).then(function(){d.getGitStatus(d._url)},function(a,c){d.handleServerErrors(a,c)})},stageSelected:function(){var a=this._unstagedContentRenderer.getSelected();a.length!==0&&(this._prepareStage(a,!0),this._unstagedTableRenderer.select(!1),this._stagedTableRenderer.select(!1),this.stageMultipleFiles(a))},
checkoutSelected:function(){var a=this._unstagedContentRenderer.getSelected();if(a.length!==0){this._prepareStage(a,!0);this._unstagedTableRenderer.select(!1);this._stagedTableRenderer.select(!1);for(var c=[],d=0;d<a.length;d++){var e=a[d].modelItem;e&&e.name&&c.push(e.name)}this.checkout(c)}},stageOneSelection:function(a,c){var d=this,e=a[c].modelItem;if(e&&e.conflicting)d._stagingConflict=!0,d._stagingName=e.name;d._registry.getService("orion.git.provider").stage(e.indexURI).then(function(){c===
a.length-1?d.getGitStatus(d._url):d.stageOneSelection(a,c+1)},function(a,c){d.handleServerErrors(a,c)})},stageMultipleFiles:function(a){for(var c=this,d=[],e=0;e<a.length;e++){var f=a[e].modelItem;if(f&&f.conflicting)c._stagingConflict=!0,c._stagingName=f.name;d.push(f.name)}c._registry.getService("orion.git.provider").stageMultipleFiles(c._model.items.IndexLocation,d).then(function(){c.getGitStatus(c._url)},function(a,d){c.handleServerErrors(a,d)})},checkout:function(a){var c=this,d=this._model.items.CloneLocation;
c._registry.getService("orion.git.provider").checkoutPath(d,a).then(function(){c.getGitStatus(c._url)},function(a,d){c.handleServerErrors(a,d)})},stageAll:function(){this.stage(this._curClone.IndexLocation)},unstageSelected:function(a){var c=this._stagedContentRenderer.getSelected();this._stagedTableRenderer.select(!1);this._unstagedTableRenderer.select(!1);c.length!==0&&(this._stagedContentRenderer.totalRow===c.length?this.unstageAll(a):this.unstageMultipleFiles(c))},unstage:function(a){var c=this;
c._registry.getService("orion.git.provider").unstage(c._model.items.IndexLocation,[a.name]).then(function(){c.getGitStatus(c._url)},function(a,d){c.handleServerErrors(a,d)})},unstageAll:function(a){var c=this;c._registry.getService("orion.git.provider").unstageAll(c._model.items.IndexLocation,a).then(function(){c.getGitStatus(c._url)},function(a,d){c.handleServerErrors(a,d)})},unstageMultipleFiles:function(a){for(var c=this,d=[],e=0;e<a.length;e++)d.push(a[e].modelItem.name);c._registry.getService("orion.git.provider").unstage(c._model.items.IndexLocation,
d).then(function(){c.getGitStatus(c._url)},function(a,d){c.handleServerErrors(a,d)})},commitAll:function(a,d,e){var f=this;document.getElementById("commitMessage").value="";f._statusService.setProgressMessage(c["Committing..."]);f._registry.getService("orion.git.provider").commitAll(a,d,e).then(function(){f.getGitStatus(f._url,!0)},function(a,c){f.handleServerErrors(a,c)})},commit:function(d,e,f,g,h,i){var j={};if(!d)if(d=document.getElementById("commitMessage").value,d!=="")j.Message=d;else return;
if(!e&&(e=document.getElementById("amend").checked))j.Amend="true";if(!f&&(f=document.getElementById("committerName").value,j.CommitterName=f,!f)){this.reportWarning(c["The committer name is required."]);this._committerAndAuthorZoneRenderer.show();return}if(!g&&(g=document.getElementById("committerEmail").value,j.CommitterEmail=g,!g)){this.reportWarning(c["The committer mail is required."]);this._committerAndAuthorZoneRenderer.show();return}if(!h&&(h=document.getElementById("authorName").value,j.AuthorName=
h,!h)){this.reportWarning(c["The author name is required."]);this._committerAndAuthorZoneRenderer.show();return}if(!i&&(i=document.getElementById("authorEmail").value,j.AuthorEmail=i,!i)){this.reportWarning(c["The author mail is required."]);this._committerAndAuthorZoneRenderer.show();return}this.commitAll(this._curClone.HeadLocation,d,a.toJson(j))},reportWarning:function(a){var c=[];c.Severity="Warning";c.Message=a;this._registry.getService("orion.page.message").setProgressResult(c)},rebase:function(a){var d=
this;d._registry.getService("orion.git.provider").doRebase(d._curClone.HeadLocation,"",a,function(a){if(a.Result=="OK"||a.Result=="ABORTED"||a.Result=="FAST_FORWARD"||a.Result=="UP_TO_DATE"){var e=[];e.Severity="Ok";e.HTML=!1;e.Message=a.Result;d._statusService.setProgressResult(e);d.getGitStatus(d._url)}if(a.Result=="STOPPED")e=[],e.Severity="Warning",e.HTML=!1,e.Message=a.Result+c[". Repository still contains conflicts."],d._statusService.setProgressResult(e),d.getGitStatus(d._url);else if(a.Result==
"FAILED_UNMERGED_PATHS")e=[],e.Severity="Error",e.HTML=!1,e.Message=a.Result+c[". Repository contains unmerged paths. Resolve conflicts first."],d._statusService.setProgressResult(e)},function(a,c){d.handleServerErrors(a,c)})}};return k}();return m});
define("git/git-status","dojo,orion/bootstrap,orion/status,orion/progress,orion/commands,orion/searchClient,orion/fileClient,orion/operationsClient,orion/globalCommands,orion/git/gitClient,orion/git/git-status-table,orion/dialogs,orion/ssh/sshTools,orion/contentTypes,dojo/parser,dojo/hash,dijit/layout/BorderContainer,dijit/layout/ContentPane,orion/widgets/eWebBorderContainer".split(","),function(c,f,a,d,g,e,i,h,k,j,l,m,o,n){c.addOnLoad(function(){f.startup().then(function(f){var q=f.serviceRegistry,
f=f.preferences;document.body.style.visibility="visible";c.parser.parse();var r=new g.CommandService({serviceRegistry:q}),s=new i.FileClient(q);new n.ContentTypeService(q);s=new e.Searcher({serviceRegistry:q,commandService:r,fileService:s});new j.GitService(q);new o.SshService(q);new m.DialogService(q);var u=new h.OperationsClient(q),t=new a.StatusReportingService(q,u,"statusPane","notifications","notificationArea");new d.ProgressService(q,u);k.generateBanner("banner",q,r,f,s);k.setPageCommandExclusions(["eclipse.git.status"]);
var v=new l.GitStatusController({renderLog:!0},q,r,t,"unstagedZone","stagedZone");v.getGitStatus(c.hash(),!0);c.subscribe("/dojo/hashchange",v,function(){v.getGitStatus(c.hash(),!0)})})})});