/*

 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
 RequireJS text 0.24.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
 RequireJS i18n 0.24.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) 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). 

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 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) 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, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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,e,f){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var g=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"],h=0,i;i=g[h++];)console[i]||function(){var r=i+"";console[r]="log"in console?function(){var s=Array.apply({},arguments);s.unshift(r+":");console.log(s.join(" "))}:function(){};console[r]._fake=true}()}if(typeof a==
"undefined")a={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};var j=a;if(typeof e=="undefined")e={_scopeName:"dijit"};if(typeof f=="undefined")f={_scopeName:"dojox"};if(!j._scopeArgs)j._scopeArgs=[a,e,f];j.global=this;j.config={isDebug:false,debugAtAllCosts:false};if(g=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var k in g)j.config[k]=g[k];a.locale=j.config.locale;k="$Rev: 24595 $".match(/\d+/);a.version=
{major:1,minor:6,patch:1,flag:"",revision:k?+k[0]:NaN,toString:function(){with(j.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",j.version.toString());var l,m,n={};for(h in{toString:1}){l=[];break}a._extraNames=l=l||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];m=l.length;a._mixin=function(r,s){var o,q,p;for(o in s){q=s[o];
if(!(o in r)||r[o]!==q&&(!(o in n)||n[o]!==q))r[o]=q}if(m&&s)for(p=0;p<m;++p){o=l[p];q=s[o];if(!(o in r)||r[o]!==q&&(!(o in n)||n[o]!==q))r[o]=q}return r};a.mixin=function(r){r||(r={});for(var s=1,o=arguments.length;s<o;s++)j._mixin(r,arguments[s]);return r};a._getProp=function(r,s,o){o=o||j.global;for(var q=0,p;o&&(p=r[q]);q++){if(q==0&&j._scopeMap[p])p=j._scopeMap[p];o=p in o?o[p]:s?(o[p]={}):undefined}return o};a.setObject=function(r,s,o){var q=r.split(".");r=q.pop();return(o=j._getProp(q,true,
o))&&r?(o[r]=s):undefined};a.getObject=function(r,s,o){return j._getProp(r.split("."),s,o)};a.exists=function(r,s){return j.getObject(r,false,s)!==undefined};a.eval=function(r){return j.global.eval?j.global.eval(r):eval(r)};j.deprecated=j.experimental=function(){}})();return{dojo:a,dijit:e,dojox:f}}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 d=c();dojo=d.dojo;dijit=d.dijit;dojox=d.dojox}})();
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap"],function(c,d){var a=["_moduleHasPrefix","_loadPath","_loadUri","_loadUriAndCheck","loaded","_callLoaded","_getModuleSymbols","_loadModule","require","provide","platformRequire","requireIf","requireAfterIf","registerModulePath"],e,f;for(e=0;e<a.length;){f=a[e++];d[f]=function(r){return function(){console.warn("dojo."+r+" not available when using an AMD loader.")}}(f)}var g=function(r){var s=[],o;for(o=0;o<r.length;)s.push(r[o++]);
return s},h=function(r,s){return s?typeof s=="string"?function(){r[s]()}:function(){s.call(r)}:r};d.ready=d.addOnLoad=function(r,s){c.ready(s?h(r,s):r)};d.addOnLoad(function(){d.postLoad=d.config.afterOnLoad=true});if(a=d.config.addOnLoad)d.addOnLoad[a instanceof Array?"apply":"call"](d,a);var i=d._loaders=[],j=function(){var r=i.slice(0);for(Array.prototype.splice.apply(i,[0,i.length]);r.length;)r.shift().call()};i.unshift=function(){Array.prototype.unshift.apply(i,g(arguments));c.ready(j)};i.splice=
function(){Array.prototype.splice.apply(i,g(arguments));c.ready(j)};var k=d._unloaders=[];d.unloaded=function(){for(;k.length;)k.pop().call()};d._onto=function(r,s,o){r.push(o?h(s,o):s)};d._modulesLoaded=function(){};d.loadInit=function(r){r()};var l=function(r){return r.replace(/\./g,"/")};d.getL10nName=function(r,s,o){o=o?o.toLowerCase():d.locale;r="i18n!"+l(r);return/root/i.test(o)?r+"/nls/"+s:r+"/nls/"+o+"/"+s};d.requireLocalization=function(r,s,o){if(c.vendor!="altoviso.com")o=!o||o.toLowerCase()===
d.locale?"root":o;return c(d.getL10nName(r,s,o))};d.i18n={getLocalization:d.requireLocalization,normalizeLocale:function(r){r=r?r.toLowerCase():d.locale;if(r=="root")r="ROOT";return r}};var m=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,n=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;d._Url=function(){for(var r=arguments,s=[r[0]],o=1;o<r.length;o++)if(r[o]){var q=new d._Url(r[o]+"");s=new d._Url(s[0]+"");if(q.path==""&&!q.scheme&&!q.authority&&!q.query){if(q.fragment!=
null)s.fragment=q.fragment;q=s}else if(!q.scheme){q.scheme=s.scheme;if(!q.authority){q.authority=s.authority;if(q.path.charAt(0)!="/"){s=(s.path.substring(0,s.path.lastIndexOf("/")+1)+q.path).split("/");for(var p=0;p<s.length;p++)if(s[p]==".")if(p==s.length-1)s[p]="";else{s.splice(p,1);p--}else if(p>0&&!(p==1&&s[0]=="")&&s[p]==".."&&s[p-1]!="..")if(p==s.length-1){s.splice(p,1);s[p-1]=""}else{s.splice(p-1,2);p-=2}q.path=s.join("/")}}}s=[];q.scheme&&s.push(q.scheme,":");q.authority&&s.push("//",q.authority);
s.push(q.path);q.query&&s.push("?",q.query);q.fragment&&s.push("#",q.fragment)}this.uri=s.join("");o=this.uri.match(m);this.scheme=o[2]||(o[1]?"":null);this.authority=o[4]||(o[3]?"":null);this.path=o[5];this.query=o[7]||(o[6]?"":null);this.fragment=o[9]||(o[8]?"":null);if(this.authority!=null){o=this.authority.match(n);this.user=o[3]||null;this.password=o[4]||null;this.host=o[6]||o[7];this.port=o[9]||null}};d._Url.prototype.toString=function(){return this.uri};d.moduleUrl=function(r,s){if(!r)return null;
r=l(r)+(s?"/"+s:"");s="";var o=r.match(/(.+)(\.[^\/]*)$/);if(o){r=o[1];s=o[2]}return new d._Url(c.nameToUrl(r,s))};return d});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(c){if(typeof window!="undefined"){c.isBrowser=true;c._name="browser";(function(){var a=c;if(document&&document.getElementsByTagName)for(var e=document.getElementsByTagName("script"),f=/dojo(\.xd)?\.js(\W|$)/i,g=0;g<e.length;g++){var h=e[g].getAttribute("src");if(h){var i=h.match(f);if(i){if(!a.config.baseUrl)a.config.baseUrl=h.substring(0,i.index);if(e=e[g].getAttribute("djConfig")||e[g].getAttribute("data-dojo-config")){e=
eval("({ "+e+" })");for(var j in e)c.config[j]=e[j]}break}}}a.baseUrl=a.config.baseUrl;j=navigator;e=j.userAgent;f=j.appVersion;g=parseFloat(f);if(e.indexOf("Opera")>=0)a.isOpera=g;if(e.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=f.indexOf("Konqueror")>=0?g:0;a.isWebKit=parseFloat(e.split("WebKit/")[1])||undefined;a.isChrome=parseFloat(e.split("Chrome/")[1])||undefined;a.isMac=f.indexOf("Macintosh")>=0;if((h=Math.max(f.indexOf("WebKit"),f.indexOf("Safari"),0))&&!c.isChrome){a.isSafari=parseFloat(f.split("Version/")[1]);
if(!a.isSafari||parseFloat(f.substr(h+7))<=419.3)a.isSafari=2}if(e.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=g;if(a.isMoz)a.isFF=parseFloat(e.split("Firefox/")[1]||e.split("Minefield/")[1])||undefined;if(document.all&&!a.isOpera){a.isIE=parseFloat(f.split("MSIE ")[1])||undefined;if((e=document.documentMode)&&e!=5&&Math.floor(a.isIE)!=e)a.isIE=e}if(c.isIE&&window.location.protocol==="file:")c.config.ieForceActiveXXhr=true;a.isQuirks=document.compatMode=="BackCompat";a.locale=
c.config.locale||(a.isIE?j.userLanguage:j.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var o,q;if(!c.isIE||!c.config.ieForceActiveXXhr)try{o=new XMLHttpRequest}catch(p){}if(!o)for(var t=0;t<3;++t){var v=a._XMLHTTP_PROGIDS[t];try{o=new ActiveXObject(v)}catch(w){q=w}if(o){a._XMLHTTP_PROGIDS=[v];break}}if(!o)throw new Error("XMLHTTP not available: "+q);return o};a._isDocumentOk=function(o){o=o.status||0;var q=location.protocol;
return o>=200&&o<300||o==304||o==1223||!o&&(q=="file:"||q=="chrome:"||q=="chrome-extension:"||q=="app:")};var k=window.location+"";var l=(j=document.getElementsByTagName("base"))&&j.length>0;a._getText=function(o,q){var p=a._xhrObj();if(!l&&c._Url)o=(new c._Url(k,o)).toString();if(a.config.cacheBust){o+="";o+=(o.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,"")}p.open("GET",o,false);try{p.send(null);if(!a._isDocumentOk(p)){var t=Error("Unable to load "+o+" status:"+p.status);
t.status=p.status;t.responseText=p.responseText;throw t;}}catch(v){if(q)return null;throw v;}return p.responseText};var m=window,n=function(o,q){var p=m.attachEvent||m.addEventListener;o=m.attachEvent?o:o.substring(2);p(o,function(){q.apply(m,arguments)},false)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var o=a._windowUnloaders;o.length;)o.pop()();a=null};var r=0;a.addOnWindowUnload=function(o,q){a._onto(a._windowUnloaders,o,q);if(!r){r=1;n("onunload",a.windowUnloaded)}};var s=0;a.addOnUnload=
function(o,q){a._onto(a._unloaders,o,q);if(!s){s=1;n("onbeforeunload",c.unloaded)}}})();c._initFired=false;c._loadInit=function(){if(c._scrollIntervalId){clearInterval(c._scrollIntervalId);c._scrollIntervalId=0}if(!c._initFired){c._initFired=true;!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,false);window.addEventListener("load",
c._loadInit,false)}else if(window.attachEvent){window.attachEvent("onload",c._loadInit);if(!c.config.skipIeDomLoaded&&self===self.top)c._scrollIntervalId=setInterval(function(){try{if(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"],e=0,f=1,g=document.createStyleSheet();if(c.isIE>=8){e=
1;f=a.length}for(;e<f;++e)g.addRule("v\\:"+a[e],"behavior:url(#default#VML); display:inline-block")})()}catch(d){}}(function(){var a=c.config.modulePaths;if(a)for(var e in a)c.registerModulePath(e,a[e])})();c.config.isDebug&&c.require("dojo._firebug.firebug");if(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 d=Object.prototype.toString;c.isString=function(j){return typeof j=="string"||j instanceof String};c.isArray=function(j){return j&&(j instanceof Array||typeof j=="array")};c.isFunction=function(j){return d.call(j)==="[object Function]"};c.isObject=function(j){return j!==undefined&&(j===null||typeof j=="object"||c.isArray(j)||c.isFunction(j))};c.isArrayLike=function(j){return j&&j!==undefined&&!c.isString(j)&&!c.isFunction(j)&&
!(j.tagName&&j.tagName.toLowerCase()=="form")&&(c.isArray(j)||isFinite(j.length))};c.isAlien=function(j){return j&&!c.isFunction(j)&&/\{\s*\[native code\]\s*\}/.test(String(j))};c.extend=function(j){for(var k=1,l=arguments.length;k<l;k++)c._mixin(j.prototype,arguments[k]);return j};c._hitchArgs=function(j,k){var l=c._toArray(arguments,2),m=c.isString(k);return function(){var n=c._toArray(arguments),r=m?(j||c.global)[k]:k;return r&&r.apply(j||this,l.concat(n))}};c.hitch=function(j,k){if(arguments.length>
2)return c._hitchArgs.apply(c,arguments);if(!k){k=j;j=null}if(c.isString(k)){j=j||c.global;if(!j[k])throw['dojo.hitch: scope["',k,'"] is null (scope="',j,'")'].join("");return function(){return j[k].apply(j,arguments||[])}}return!j?k:function(){return k.apply(j,arguments||[])}};c.delegate=c._delegate=function(){function j(){}return function(k,l){j.prototype=k;k=new j;j.prototype=null;l&&c._mixin(k,l);return k}}();var a=function(j,k,l){return(l||[]).concat(Array.prototype.slice.call(j,k||0))},e=function(j,
k,l){l=l||[];for(k=k||0;k<j.length;k++)l.push(j[k]);return l};c._toArray=c.isIE?function(j){return(j.item?e:a).apply(this,arguments)}:a;c.partial=function(){return c.hitch.apply(c,[null].concat(c._toArray(arguments)))};var f=c._extraNames,g=f.length,h={};c.clone=function(j){if(!j||typeof j!="object"||c.isFunction(j))return j;if(j.nodeType&&"cloneNode"in j)return j.cloneNode(true);if(j instanceof Date)return new Date(j.getTime());if(j instanceof RegExp)return new RegExp(j);var k,l,m,n;if(c.isArray(j)){k=
[];l=0;for(m=j.length;l<m;++l)l in j&&k.push(c.clone(j[l]))}else k=j.constructor?new j.constructor:{};for(n in j){m=j[n];if(!(n in k)||k[n]!==m&&(!(n in h)||h[n]!==m))k[n]=c.clone(m)}if(g)for(l=0;l<g;++l){n=f[l];m=j[n];if(!(n in k)||k[n]!==m&&(!(n in h)||h[n]!==m))k[n]=m}return k};c.trim=String.prototype.trim?function(j){return j.trim()}:function(j){return j.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var i=/\{([^\}]+)\}/g;c.replace=function(j,k,l){return j.replace(l||i,c.isFunction(k)?k:function(m,
n){return c.getObject(n,false,k)})}})();return c});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var d=function(e,f,g){return[typeof e=="string"?e.split(""):e,f||c.global,typeof g=="string"?new Function("item","index","array",g):g]},a=function(e,f,g,h){var i=d(f,h,g);f=i[0];g=0;for(h=f.length;g<h;++g){var j=!!i[2].call(i[1],f[g],g,f);if(e^j)return j}return e};c.mixin(c,{indexOf:function(e,f,g,h){var i=1,j=e.length||0,k=0;if(h){k=j-1;i=j=-1}if(g!=undefined)k=g;if(h&&k>j||k<j)for(;k!=j;k+=i)if(e[k]==f)return k;
return-1},lastIndexOf:function(e,f,g){return c.indexOf(e,f,g,true)},forEach:function(e,f,g){if(e&&e.length){var h=d(e,g,f);e=h[0];f=0;for(g=e.length;f<g;++f)h[2].call(h[1],e[f],f,e)}},every:function(e,f,g){return a(true,e,f,g)},some:function(e,f,g){return a(false,e,f,g)},map:function(e,f,g,h){var i=d(e,g,f);e=i[0];f=h?new h:[];g=0;for(h=e.length;g<h;++g)f.push(i[2].call(i[1],e[g],g,e));return f},filter:function(e,f,g){var h=d(e,g,f);e=h[0];f=[];g=0;for(var i=e.length;g<i;++g)h[2].call(h[1],e[g],g,
e)&&f.push(e[g]);return f}})})();return c});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(c){(function(){function d(z,F){throw new Error("declare"+(F?" "+F:"")+": "+z);}function a(z,F){for(var G=[],H=[{cls:0,refs:[]}],I={},D=1,E=z.length,J=0,M,Q,P,W,L;J<E;++J){if(M=z[J])t.call(M)!="[object Function]"&&d("mixin #"+J+" is not a callable constructor.",F);else d("mixin #"+J+" is unknown. Did you use dojo.require to pull it in?",F);Q=M._meta?M._meta.bases:[M];P=0;for(M=Q.length-1;M>=0;--M){W=Q[M].prototype;
if(!W.hasOwnProperty("declaredClass"))W.declaredClass="uniqName_"+w++;W=W.declaredClass;if(!I.hasOwnProperty(W)){I[W]={count:0,refs:[],cls:Q[M]};++D}W=I[W];if(P&&P!==W){W.refs.push(P);++P.count}P=W}++P.count;H[0].refs.push(P)}for(;H.length;){P=H.pop();G.push(P.cls);for(--D;L=P.refs,L.length==1;){P=L[0];if(!P||--P.count){P=0;break}G.push(P.cls);--D}if(P){J=0;for(E=L.length;J<E;++J){P=L[J];--P.count||H.push(P)}}}D&&d("can't build consistent linearization",F);M=z[0];G[0]=M?M._meta&&M===G[G.length-M._meta.bases.length]?
M._meta.bases.length:1:0;return G}function e(z,F,G){var H,I,D,E,J,M,Q,P=this._inherited=this._inherited||{};if(typeof z=="string"){H=z;z=F;F=G}G=0;E=z.callee;(H=H||E.nom)||d("can't deduce a name to call inherited()",this.declaredClass);J=this.constructor._meta;D=J.bases;Q=P.p;if(H!=y){if(P.c!==E){Q=0;M=D[0];J=M._meta;if(J.hidden[H]!==E){(I=J.chains)&&typeof I[H]=="string"&&d("calling chained method with inherited: "+H,this.declaredClass);do{J=M._meta;I=M.prototype;if(J&&(I[H]===E&&I.hasOwnProperty(H)||
J.hidden[H]===E))break}while(M=D[++Q]);Q=M?Q:-1}}if(M=D[++Q]){I=M.prototype;if(M._meta&&I.hasOwnProperty(H))G=I[H];else{E=p[H];do{I=M.prototype;if((G=I[H])&&(M._meta?I.hasOwnProperty(H):G!==E))break}while(M=D[++Q])}}G=M&&G||p[H]}else{if(P.c!==E){Q=0;if((J=D[0]._meta)&&J.ctor!==E){I=J.chains;if(!I||I.constructor!=="manual")d("calling chained constructor with inherited",this.declaredClass);for(;M=D[++Q];)if((J=M._meta)&&J.ctor===E)break;Q=M?Q:-1}}for(;M=D[++Q];)if(G=(J=M._meta)?J.ctor:M)break;G=M&&
G}P.c=G;P.p=Q;if(G)return F===true?G:G.apply(this,F||z)}function f(z,F){if(typeof z=="string")return this.inherited(z,F,true);return this.inherited(z,true)}function g(z){for(var F=this.constructor._meta.bases,G=0,H=F.length;G<H;++G)if(F[G]===z)return true;return this instanceof z}function h(z,F){var G,H=0,I=o._extraNames.length;for(G in F)if(G!=y&&F.hasOwnProperty(G))z[G]=F[G];for(;H<I;++H){G=o._extraNames[H];if(G!=y&&F.hasOwnProperty(G))z[G]=F[G]}}function i(z,F){var G,H,I=0,D=o._extraNames.length;
for(G in F){H=F[G];if((H!==p[G]||!(G in p))&&G!=y){if(t.call(H)=="[object Function]")H.nom=G;z[G]=H}}for(;I<D;++I){G=o._extraNames[I];H=F[G];if((H!==p[G]||!(G in p))&&G!=y){if(t.call(H)=="[object Function]")H.nom=G;z[G]=H}}return z}function j(z){i(this.prototype,z);return this}function k(z,F){return function(){var G=arguments,H=G,I=G[0],D,E;E=z.length;var J;if(!(this instanceof G.callee))return s(G);if(F&&(I&&I.preamble||this.preamble)){J=new Array(z.length);J[0]=G;for(D=0;;){if(I=G[0])if(I=I.preamble)G=
I.apply(this,G)||G;I=z[D].prototype;if(I=I.hasOwnProperty("preamble")&&I.preamble)G=I.apply(this,G)||G;if(++D==E)break;J[D]=G}}for(D=E-1;D>=0;--D){I=z[D];if(I=(E=I._meta)?E.ctor:I)I.apply(this,J?J[D]:G)}(I=this.postscript)&&I.apply(this,H)}}function l(z,F){return function(){var G=arguments,H=G,I=G[0];if(!(this instanceof G.callee))return s(G);if(F){if(I)if(I=I.preamble)H=I.apply(this,H)||H;(I=this.preamble)&&I.apply(this,H)}z&&z.apply(this,G);(I=this.postscript)&&I.apply(this,G)}}function m(z){return function(){var F=
arguments,G=0,H,I;if(!(this instanceof F.callee))return s(F);for(;H=z[G];++G)if(H=(I=H._meta)?I.ctor:H){H.apply(this,F);break}(H=this.postscript)&&H.apply(this,F)}}function n(z,F,G){return function(){var H,I,D=0,E=1;if(G){D=F.length-1;E=-1}for(;H=F[D];D+=E){I=H._meta;(H=(I?I.hidden:H.prototype)[z])&&H.apply(this,arguments)}}}function r(z){v.prototype=z.prototype;z=new v;v.prototype=null;return z}function s(z){var F=z.callee,G=r(F);F.apply(G,z);return G}var o=c,q=o._mixin,p=Object.prototype,t=p.toString,
v=new Function,w=0,y="constructor";o.declare=function(z,F,G){if(typeof z!="string"){G=F;F=z;z=""}G=G||{};var H,I,D,E,J,M,Q,P=1,W=F;if(t.call(F)=="[object Array]"){M=a(F,z);D=M[0];P=M.length-D;F=M[P]}else{M=[0];if(F)if(t.call(F)=="[object Function]"){D=F._meta;M=M.concat(D?D.bases:F)}else d("base class is not a callable constructor.",z);else F!==null&&d("unknown base class. Did you use dojo.require to pull it in?",z)}if(F)for(I=P-1;;--I){H=r(F);if(!I)break;D=M[I];(D._meta?h:q)(H,D.prototype);E=new Function;
E.superclass=F;E.prototype=H;F=H.constructor=E}else H={};i(H,G);D=G.constructor;if(D!==p.constructor){D.nom=y;H.constructor=D}for(I=P-1;I;--I)if((D=M[I]._meta)&&D.chains)Q=q(Q||{},D.chains);if(H["-chains-"])Q=q(Q||{},H["-chains-"]);D=!Q||!Q.hasOwnProperty(y);M[0]=E=Q&&Q.constructor==="manual"?m(M):M.length==1?l(G.constructor,D):k(M,D);E._meta={bases:M,hidden:G,chains:Q,parents:W,ctor:G.constructor};E.superclass=F&&F.prototype;E.extend=j;E.prototype=H;H.constructor=E;H.getInherited=f;H.inherited=e;
H.isInstanceOf=g;if(z){H.declaredClass=z;o.setObject(z,E)}if(Q)for(J in Q)if(H[J]&&typeof Q[J]=="string"&&J!=y){D=H[J]=n(J,M,Q[J]==="after");D.nom=J}return E};o.safeMixin=i})();return c.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(c){c._listener={getDispatcher:function(){return function(){var d=Array.prototype,a=arguments.callee,e=a._listeners;a=(a=a.target)&&a.apply(this,arguments);var f;e=[].concat(e);for(f in e)f in d||e[f].apply(this,arguments);return a}},add:function(d,a,e){d=d||c.global;var f=d[a];if(!f||!f._listeners){var g=c._listener.getDispatcher();g.target=f;g._listeners=[];f=d[a]=g}return f._listeners.push(e)},remove:function(d,a,e){(d=(d||
c.global)[a])&&d._listeners&&e--&&delete d._listeners[e]}};c.connect=function(){var d=arguments,a=[],e=0;a.push(c.isString(d[0])?null:d[e++],d[e++]);var f=d[e+1];a.push(c.isString(f)||c.isFunction(f)?d[e++]:null,d[e++]);for(f=d.length;e<f;e++)a.push(d[e]);return c._connect.apply(this,a)};c._connect=function(d,a,e,f){var g=c._listener;e=g.add(d,a,c.hitch(e,f));return[d,a,e,g]};c.disconnect=function(d){if(d&&d[0]!==undefined){c._disconnect.apply(this,d);delete d[0]}};c._disconnect=function(d,a,e,f){f.remove(d,
a,e)};c._topics={};c.subscribe=function(d,a,e){return[d,c._listener.add(c._topics,d,c.hitch(a,e))]};c.unsubscribe=function(d){d&&c._listener.remove(c._topics,d[0],d[1])};c.publish=function(d,a){if(d=c._topics[d])d.apply(this,a||[])};c.connectPublisher=function(d,a,e){var f=function(){c.publish(d,arguments)};return e?c.connect(a,e,f):c.connect(a,f)};return c.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(c){(function(){var d=function(){},a=Object.freeze||function(){},e=function(){var f,g,h,i,j=false,k=function(){};return function(l){if(j)if(f){g.next={task:l,next:null};g=g.next}else g=f={task:l,next:null};else{j=true;do try{for(;l;){l();if(h){if(f)g.next=h;else f=h;g=i}if(f){h=f.next;i=g;l=f.task;f=g=null}else l=null}j=false}catch(m){l=k;console.error(m)}while(j)}}}();c.Deferred=function(f){function g(s){if(j)throw new Error("This deferred has already been resolved");
i=s;j=true;e(h)}function h(){for(var s;!s&&m;){var o=m;m=m.next;if(s=o.progress==d)j=false;var q=k?o.error:o.resolved;if(q)try{var p=q(i);if(p&&typeof p.then==="function")p.then(c.hitch(o.deferred,"resolve"),c.hitch(o.deferred,"reject"),c.hitch(o.deferred,"progress"));else{q=s&&p===undefined;if(s&&!q)k=p instanceof Error;o.deferred[q&&k?"reject":"resolve"](q?i:p)}}catch(t){o.deferred.reject(t)}else k?o.deferred.reject(i):o.deferred.resolve(i)}}var i,j,k,l,m,n=this.promise={};this.resolve=this.callback=
function(s){this.fired=0;this.results=[s,null];g(s)};this.reject=this.errback=function(s){k=true;this.fired=1;g(s);this.results=[null,s];if(!s||s.log!==false)(c.config.deferredOnError||function(o){console.error(o)})(s)};this.progress=function(s){for(var o=m;o;){var q=o.progress;q&&q(s);o=o.next}};this.addCallbacks=function(s,o){this.then(s,o,d);return this};this.then=n.then=function(s,o,q){var p=q==d?this:new c.Deferred(n.cancel);s={resolved:s,error:o,progress:q,deferred:p};if(m)l=l.next=s;else m=
l=s;j&&e(h);return p.promise};var r=this;this.cancel=n.cancel=function(){if(!j){var s=f&&f(r);if(!j){s instanceof Error||(s=new Error(s));s.log=false;r.reject(s)}}};a(n)};c.extend(c.Deferred,{addCallback:function(){return this.addCallbacks(c.hitch.apply(c,arguments))},addErrback:function(){return this.addCallbacks(null,c.hitch.apply(c,arguments))},addBoth:function(){var f=c.hitch.apply(c,arguments);return this.addCallbacks(f,f)},fired:-1})})();c.when=function(d,a,e,f){if(d&&typeof d.then==="function")return d.then(a,
e,f);return a(d)};return c.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(c){c.fromJson=function(d){return eval("("+d+")")};c._escapeString=function(d){return('"'+d.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(d,a,e){if(d===undefined)return"undefined";var f=typeof d;if(f=="number"||f=="boolean")return d+"";if(d===null)return"null";if(c.isString(d))return c._escapeString(d);var g=
arguments.callee,h;e=e||"";var i=a?e+c.toJsonIndentStr:"";h=d.__json__||d.json;if(c.isFunction(h)){h=h.call(d);if(d!==h)return g(h,a,i)}if(d.nodeType&&d.cloneNode)throw new Error("Can't serialize DOM nodes");h=a?" ":"";var j=a?"\n":"";if(c.isArray(d))return"["+c.map(d,function(n){n=g(n,a,i);if(typeof n!="string")n="undefined";return j+i+n}).join(","+h)+j+e+"]";if(f=="function")return null;f=[];var k;for(k in d){var l,m;if(typeof k=="number")l='"'+k+'"';else if(typeof k=="string")l=c._escapeString(k);
else continue;m=g(d[k],a,i);typeof m=="string"&&f.push(j+i+l+":"+h+m)}return"{"+f.join(","+h)+j+e+"}"};return c});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(c){(function(){c.Color=function(d){d&&this.setColor(d)};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(d,a,e,f){this.r=d;this.g=a;this.b=e;this.a=f},setColor:function(d){if(c.isString(d))c.colorFromString(d,this);else if(c.isArray(d))c.colorFromArray(d,this);else{this._set(d.r,d.g,d.b,d.a);d 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(d){d=this[d].toString(16);return d.length<
2?"0"+d:d},this).join("")},toCss:function(d){var a=this.r+", "+this.g+", "+this.b;return(d?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(true)}});c.blendColors=function(d,a,e,f){var g=f||new c.Color;c.forEach(["r","g","b","a"],function(h){g[h]=d[h]+(a[h]-d[h])*e;if(h!="a")g[h]=Math.round(g[h])});return g.sanitize()};c.colorFromRgb=function(d,a){return(d=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&c.colorFromArray(d[1].split(/\s*,\s*/),a)};c.colorFromHex=function(d,
a){var e=a||new c.Color,f=d.length==4?4:8,g=(1<<f)-1;d=Number("0x"+d.substr(1));if(isNaN(d))return null;c.forEach(["b","g","r"],function(h){var i=d&g;d>>=f;e[h]=f==4?17*i:i});e.a=1;return e};c.colorFromArray=function(d,a){a=a||new c.Color;a._set(Number(d[0]),Number(d[1]),Number(d[2]),Number(d[3]));if(isNaN(a.a))a.a=1;return a.sanitize()};c.colorFromString=function(d,a){var e=c.Color.named[d];return e&&c.colorFromArray(e,a)||c.colorFromRgb(d,a)||c.colorFromHex(d,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(d,a){c.global=d;c.doc=a};c.withGlobal=function(d,a,e,f){var g=c.global;try{c.global=d;return c.withDoc.call(null,d.document,a,e,f)}finally{c.global=g}};c.withDoc=function(d,a,e,f){var g=c.doc,h=c._bodyLtr,i=c.isQuirks;try{c.doc=d;delete c._bodyLtr;c.isQuirks=c.doc.compatMode=="BackCompat";if(e&&typeof a=="string")a=
e[a];return a.apply(e,f||[])}finally{c.doc=g;delete c._bodyLtr;if(h!==undefined)c._bodyLtr=h;c.isQuirks=i}};return c});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(c){(function(){var d=c._event_listener={add:function(j,k,l){if(j){k=d._normalizeEventName(k);l=d._fixCallback(k,l);if(!c.isIE&&(k=="mouseenter"||k=="mouseleave")){var m=l;k=k=="mouseenter"?"mouseover":"mouseout";l=function(n){if(!c.isDescendant(n.relatedTarget,j))return m.call(this,n)}}j.addEventListener(k,l,false);return l}},remove:function(j,k,l){if(j){k=d._normalizeEventName(k);if(!c.isIE&&(k=="mouseenter"||k=="mouseleave"))k=
k=="mouseenter"?"mouseover":"mouseout";j.removeEventListener(k,l,false)}},_normalizeEventName:function(j){return j.slice(0,2)=="on"?j.slice(2):j},_fixCallback:function(j,k){return j!="keypress"?k:function(l){return k.call(this,d._fixEvent(l,this))}},_fixEvent:function(j){switch(j.type){case "keypress":d._setKeyChar(j);break}return j},_setKeyChar:function(j){j.keyChar=j.charCode>=32?String.fromCharCode(j.charCode):"";j.charOrCode=j.keyChar||j.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(j,k){return d._fixEvent(j,k)};c.stopEvent=function(j){j.preventDefault();j.stopPropagation()};var a=c._listener;c._connect=function(j,k,l,m,n){n=j&&(j.nodeType||j.attachEvent||j.addEventListener)?n?2:1:0;l=[c._listener,d,a][n].add(j,k,c.hitch(l,m));return[j,k,l,n]};c._disconnect=function(j,k,l,m){[c._listener,d,a][m].remove(j,k,l)};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 e=c.isMac?"metaKey":"ctrlKey";c.isCopyKey=function(j){return j[e]};c.mouseButtons=c.isIE<9||c.isIE&&c.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(j,k){return j.button&k},isLeft:function(j){return j.button&1},isMiddle:function(j){return j.button&4},isRight:function(j){return j.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(j,k){return j.button==k},isLeft:function(j){return j.button==
0},isMiddle:function(j){return j.button==1},isRight:function(j){return j.button==2}};if(c.isIE){var f=function(j,k){try{return j.keyCode=k}catch(l){return 0}},g=c._listener,h=c._ieListenersName="_"+c._scopeName+"_listeners";if(!c.config._allow_leaks){a=g=c._ie_listener={handlers:[],add:function(j,k,l){j=j||c.global;var m=j[k];if(!m||!m[h]){var n=c._getIeDispatcher();n.target=m&&i.push(m)-1;n[h]=[];m=j[k]=n}return m[h].push(i.push(l)-1)},remove:function(j,k,l){k=(j=(j||c.global)[k])&&j[h];if(j&&k&&
l--){delete i[k[l]];delete k[l]}}};var i=g.handlers}c.mixin(d,{add:function(j,k,l){if(j){k=d._normalizeEventName(k);if(k=="onkeypress"){var m=j.onkeydown;if(!m||!m[h]||!m._stealthKeydownHandle){var n=d.add(j,"onkeydown",d._stealthKeyDown);m=j.onkeydown;m._stealthKeydownHandle=n;m._stealthKeydownRefs=1}else m._stealthKeydownRefs++}return g.add(j,k,d._fixCallback(l))}},remove:function(j,k,l){k=d._normalizeEventName(k);g.remove(j,k,l);if(k=="onkeypress"){k=j.onkeydown;if(--k._stealthKeydownRefs<=0){g.remove(j,
"onkeydown",k._stealthKeydownHandle);delete k._stealthKeydownHandle}}},_normalizeEventName:function(j){return j.slice(0,2)!="on"?"on"+j:j},_nop:function(){},_fixEvent:function(j,k){if(!j)j=(k&&(k.ownerDocument||k.document||k).parentWindow||window).event;if(!j)return j;j.target=j.srcElement;j.currentTarget=k||j.srcElement;j.layerX=j.offsetX;j.layerY=j.offsetY;k=(k=j.srcElement)&&k.ownerDocument||document;k=c.isIE<6||k.compatMode=="BackCompat"?k.body:k.documentElement;var l=c._getIeDocumentElementOffset();
j.pageX=j.clientX+c._fixIeBiDiScrollLeft(k.scrollLeft||0)-l.x;j.pageY=j.clientY+(k.scrollTop||0)-l.y;if(j.type=="mouseover")j.relatedTarget=j.fromElement;if(j.type=="mouseout")j.relatedTarget=j.toElement;if(c.isIE<9||c.isQuirks){j.stopPropagation=d._stopPropagation;j.preventDefault=d._preventDefault}return d._fixKeys(j)},_fixKeys:function(j){switch(j.type){case "keypress":var k="charCode"in j?j.charCode:j.keyCode;if(k==10){k=0;j.keyCode=13}else if(k==13||k==27)k=0;else if(k==3)k=99;j.charCode=k;d._setKeyChar(j);
break}return j},_stealthKeyDown:function(j){var k=j.currentTarget.onkeypress;if(k&&k[h]){var l=j.keyCode,m=(l!=13||c.isIE>=9&&!c.isQuirks)&&l!=32&&l!=27&&(l<48||l>90)&&(l<96||l>111)&&(l<186||l>192)&&(l<219||l>222);if(m||j.ctrlKey){m=m?0:l;if(j.ctrlKey)if(l==3||l==13)return;else if(m>95&&m<106)m-=48;else if(!j.shiftKey&&m>=65&&m<=90)m+=32;else m=d._punctMap[m]||m;l=d._synthesizeEvent(j,{type:"keypress",faux:true,charCode:m});k.call(j.currentTarget,l);if(c.isIE<9||c.isIE&&c.isQuirks)j.cancelBubble=
l.cancelBubble;j.returnValue=l.returnValue;f(j,l.keyCode)}}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&f(this,0);this.returnValue=false}});c.stopEvent=c.isIE<9||c.isQuirks?function(j){j=j||window.event;d._stopPropagation.call(j);d._preventDefault.call(j)}:c.stopEvent}d._synthesizeEvent=function(j,k){k=c.mixin({},j,k);d._setKeyChar(k);k.preventDefault=function(){j.preventDefault()};k.stopPropagation=function(){j.stopPropagation()};
return k};c.isOpera&&c.mixin(d,{_fixEvent:function(j){switch(j.type){case "keypress":var k=j.which;if(k==3)k=99;k=k<41&&!j.shiftKey?0:k;if(j.ctrlKey&&!j.shiftKey&&k>=65&&k<=90)k+=32;return d._synthesizeEvent(j,{charCode:k})}return j}});if(c.isWebKit){d._add=d.add;d._remove=d.remove;c.mixin(d,{add:function(j,k,l){if(j){var m=d._add(j,k,l);if(d._normalizeEventName(k)=="keypress")m._stealthKeyDownHandle=d._add(j,"keydown",function(n){var r=n.keyCode,s=r!=13&&r!=32&&(r<48||r>90)&&(r<96||r>111)&&(r<186||
r>192)&&(r<219||r>222);if(s||n.ctrlKey){s=s?0:r;if(n.ctrlKey)if(r==3||r==13)return;else if(s>95&&s<106)s-=48;else if(!n.shiftKey&&s>=65&&s<=90)s+=32;else s=d._punctMap[s]||s;r=d._synthesizeEvent(n,{type:"keypress",faux:true,charCode:s});l.call(n.currentTarget,r)}});return m}},remove:function(j,k,l){if(j){l._stealthKeyDownHandle&&d._remove(j,"keydown",l._stealthKeyDownHandle);d._remove(j,k,l)}},_fixEvent:function(j){switch(j.type){case "keypress":if(j.faux)return j;var k=j.charCode;k=k>=32?k:0;return d._synthesizeEvent(j,
{charCode:k,faux:true})}return j}})}})();if(c.isIE){c._ieDispatcher=function(d,a){var e=Array.prototype,f=c._ie_listener.handlers,g=d.callee,h=g[c._ieListenersName];g=(g=f[g.target])&&g.apply(a,d);h=[].concat(h);for(var i in h){var j=f[h[i]];!(i in e)&&j&&j.apply(a,d)}return g};c._getIeDispatcher=function(){return new Function(c._scopeName+"._ieDispatcher(arguments, this)")};c._event_listener._fixCallback=function(d){var a=c._event_listener._fixEvent;return function(e){return d.call(this,a(e,this))}}}return c.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(c){try{document.execCommand("BackgroundImageCache",false,true)}catch(d){}c.byId=c.isIE?function(a,e){if(typeof a!="string")return a;var f=e||c.doc;if((e=f.getElementById(a))&&(e.attributes.id.value==a||e.id==a))return e;else{var g=f.all[a];if(!g||g.nodeName)g=[g];for(var h=0;e=g[h++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}}:function(a,e){return(typeof a=="string"?(e||c.doc).getElementById(a):
a)||null};(function(){var a=c.byId,e=null,f;c.addOnWindowUnload(function(){e=null});c._destroyElement=c.destroy=function(u){u=a(u);try{var x=u.ownerDocument;if(!e||f!=x){e=x.createElement("div");f=x}e.appendChild(u.parentNode?u.parentNode.removeChild(u):u);e.innerHTML=""}catch(B){}};c.isDescendant=function(u,x){try{u=a(u);for(x=a(x);u;){if(u==x)return true;u=u.parentNode}}catch(B){}return false};c.setSelectable=function(u,x){u=a(u);if(c.isMozilla)u.style.MozUserSelect=x?"":"none";else if(c.isKhtml||
c.isWebKit)u.style.KhtmlUserSelect=x?"auto":"none";else if(c.isIE){x=u.unselectable=x?"":"on";c.query("*",u).forEach("item.unselectable = '"+x+"'")}};var g=function(u,x){var B=x.parentNode;B&&B.insertBefore(u,x)},h=function(u,x){var B=x.parentNode;if(B)B.lastChild==x?B.appendChild(u):B.insertBefore(u,x.nextSibling)};c.place=function(u,x,B){x=a(x);if(typeof u=="string")u=/^\s*</.test(u)?c._toDom(u,x.ownerDocument):a(u);if(typeof B=="number"){var O=x.childNodes;!O.length||O.length<=B?x.appendChild(u):
g(u,O[B<0?0:B])}else switch(B){case "before":g(u,x);break;case "after":h(u,x);break;case "replace":x.parentNode.replaceChild(u,x);break;case "only":c.empty(x);x.appendChild(u);break;case "first":if(x.firstChild){g(u,x.firstChild);break}default:x.appendChild(u)}return u};c.boxModel="content-box";if(c.isIE)c.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var i;i=c.isWebKit?function(u){var x;if(u.nodeType==1){var B=u.ownerDocument.defaultView;x=B.getComputedStyle(u,null);if(!x&&
u.style){u.style.display="";x=B.getComputedStyle(u,null)}}return x||{}}:c.isIE?function(u){return u.nodeType==1?u.currentStyle:{}}:function(u){return u.nodeType==1?u.ownerDocument.defaultView.getComputedStyle(u,null):{}};c.getComputedStyle=i;c._toPixelValue=c.isIE?function(u,x){if(!x)return 0;if(x=="medium")return 4;if(x.slice&&x.slice(-2)=="px")return parseFloat(x);with(u){u=style.left;var B=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=x;x=style.pixelLeft}catch(O){x=0}style.left=
u;runtimeStyle.left=B}return x}:function(u,x){return parseFloat(x)||0};var j=c._toPixelValue,k=function(u,x){try{return u.filters.item("DXImageTransform.Microsoft.Alpha")}catch(B){return x?{}:null}};c._getOpacity=c.isIE<9?function(u){try{return k(u).Opacity/100}catch(x){return 1}}:function(u){return i(u).opacity};c._setOpacity=c.isIE<9?function(u,x){var B=x*100,O=x==1;u.style.zoom=O?"":1;if(k(u))k(u,1).Opacity=B;else{if(O)return x;u.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+
B+")"}k(u,1).Enabled=!O;u.nodeName.toLowerCase()=="tr"&&c.query("> td",u).forEach(function(R){c._setOpacity(R,x)});return x}:function(u,x){return u.style.opacity=x};var l={left:true,top:true},m=/margin|padding|width|height|max|min|offset/,n=function(u,x,B){x=x.toLowerCase();if(c.isIE){if(B=="auto"){if(x=="height")return u.offsetHeight;if(x=="width")return u.offsetWidth}if(x=="fontweight")switch(B){case 700:return"bold";case 400:default:return"normal"}}x in l||(l[x]=m.test(x));return l[x]?j(u,B):B},
r=c.isIE?"styleFloat":"cssFloat",s={cssFloat:r,styleFloat:r,"float":r};c.style=function(u,x,B){var O=a(u),R=arguments.length,U=x=="opacity";x=s[x]||x;if(R==3)return U?c._setOpacity(O,B):(O.style[x]=B);if(R==2&&U)return c._getOpacity(O);U=i(O);if(R==2&&typeof x!="string"){for(var Y in x)c.style(u,Y,x[Y]);return U}return R==1?U:n(O,x,U[x]||O.style[x])};c._getPadExtents=function(u,x){x=x||i(u);var B=j(u,x.paddingLeft),O=j(u,x.paddingTop);return{l:B,t:O,w:B+j(u,x.paddingRight),h:O+j(u,x.paddingBottom)}};
c._getBorderExtents=function(u,x){x=x||i(u);var B=x.borderLeftStyle!="none"?j(u,x.borderLeftWidth):0,O=x.borderTopStyle!="none"?j(u,x.borderTopWidth):0;return{l:B,t:O,w:B+(x.borderRightStyle!="none"?j(u,x.borderRightWidth):0),h:O+(x.borderBottomStyle!="none"?j(u,x.borderBottomWidth):0)}};c._getPadBorderExtents=function(u,x){var B=x||i(u);x=c._getPadExtents(u,B);u=c._getBorderExtents(u,B);return{l:x.l+u.l,t:x.t+u.t,w:x.w+u.w,h:x.h+u.h}};c._getMarginExtents=function(u,x){x=x||i(u);var B=j(u,x.marginLeft),
O=j(u,x.marginTop),R=j(u,x.marginRight);u=j(u,x.marginBottom);if(c.isWebKit&&x.position!="absolute")R=B;return{l:B,t:O,w:B+R,h:O+u}};c._getMarginBox=function(u,x){var B=x||i(u);x=c._getMarginExtents(u,B);var O=u.offsetLeft-x.l,R=u.offsetTop-x.t,U=u.parentNode;if(c.isMoz){var Y=parseFloat(B.left);B=parseFloat(B.top);if(!isNaN(Y)&&!isNaN(B)){O=Y;R=B}else if(U&&U.style){Y=i(U);if(Y.overflow!="visible"){U=c._getBorderExtents(U,Y);O+=U.l;R+=U.t}}}else if(c.isOpera||c.isIE>7&&!c.isQuirks)if(U){U=c._getBorderExtents(U);
O-=U.l;R-=U.t}return{l:O,t:R,w:u.offsetWidth+x.w,h:u.offsetHeight+x.h}};c._getMarginSize=function(u,x){u=a(u);x=c._getMarginExtents(u,x||i(u));u=u.getBoundingClientRect();return{w:u.right-u.left+x.w,h:u.bottom-u.top+x.h}};c._getContentBox=function(u,x){var B=x||i(u);x=c._getPadExtents(u,B);B=c._getBorderExtents(u,B);var O=u.clientWidth;if(O){u=u.clientHeight;B.w=B.h=0}else{O=u.offsetWidth;u=u.offsetHeight}if(c.isOpera){x.l+=B.l;x.t+=B.t}return{l:x.l,t:x.t,w:O-x.w-B.w,h:u-x.h-B.h}};c._getBorderBox=
function(u,x){var B=x||i(u);x=c._getPadExtents(u,B);u=c._getContentBox(u,B);return{l:u.l-x.l,t:u.t-x.t,w:u.w+x.w,h:u.h+x.h}};c._setBox=function(u,x,B,O,R,U){U=U||"px";u=u.style;if(!isNaN(x))u.left=x+U;if(!isNaN(B))u.top=B+U;if(O>=0)u.width=O+U;if(R>=0)u.height=R+U};c._isButtonTag=function(u){return u.tagName=="BUTTON"||u.tagName=="INPUT"&&(u.getAttribute("type")||"").toUpperCase()=="BUTTON"};c._usesBorderBox=function(u){var x=u.tagName;return c.boxModel=="border-box"||x=="TABLE"||c._isButtonTag(u)};
c._setContentSize=function(u,x,B,O){if(c._usesBorderBox(u)){O=c._getPadBorderExtents(u,O);if(x>=0)x+=O.w;if(B>=0)B+=O.h}c._setBox(u,NaN,NaN,x,B)};c._setMarginBox=function(u,x,B,O,R,U){var Y=U||i(u);U=c._usesBorderBox(u)?o:c._getPadBorderExtents(u,Y);if(c.isWebKit)if(c._isButtonTag(u)){var da=u.style;if(O>=0&&!da.width)da.width="4px";if(R>=0&&!da.height)da.height="4px"}Y=c._getMarginExtents(u,Y);if(O>=0)O=Math.max(O-U.w-Y.w,0);if(R>=0)R=Math.max(R-U.h-Y.h,0);c._setBox(u,x,B,O,R)};var o={l:0,t:0,w:0,
h:0};c.marginBox=function(u,x){u=a(u);var B=i(u);return!x?c._getMarginBox(u,B):c._setMarginBox(u,x.l,x.t,x.w,x.h,B)};c.contentBox=function(u,x){u=a(u);var B=i(u);return!x?c._getContentBox(u,B):c._setContentSize(u,x.w,x.h,B)};c._docScroll=function(){var u=c.global;return"pageXOffset"in u?{x:u.pageXOffset,y:u.pageYOffset}:(u=c.isQuirks?c.doc.body:c.doc.documentElement,{x:c._fixIeBiDiScrollLeft(u.scrollLeft||0),y:u.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 u=c.doc.documentElement;if(c.isIE<8){var x=u.getBoundingClientRect(),B=x.left;x=x.top;if(c.isIE<7){B+=u.clientLeft;x+=u.clientTop}return{x:B<0?0:B,y:x<0?0:x}}else return{x:0,y:0}};c._fixIeBiDiScrollLeft=function(u){var x=c.isIE;if(x&&!c._isBodyLtr()){var B=c.isQuirks,O=B?c.doc.body:c.doc.documentElement;if(x==6&&!B&&c.global.frameElement&&O.scrollHeight>O.clientHeight)u+=O.clientLeft;return x<8||
B?u+O.clientWidth-O.scrollWidth:-u}return u};c._abs=c.position=function(u,x){u=a(u);var B=c.body(),O=B.parentNode;u=u.getBoundingClientRect();u={x:u.left,y:u.top,w:u.right-u.left,h:u.bottom-u.top};if(c.isIE){O=c._getIeDocumentElementOffset();u.x-=O.x+(c.isQuirks?B.clientLeft+B.offsetLeft:0);u.y-=O.y+(c.isQuirks?B.clientTop+B.offsetTop:0)}else if(c.isFF==3){B=i(O);u.x-=j(O,B.marginLeft)+j(O,B.borderLeftWidth);u.y-=j(O,B.marginTop)+j(O,B.borderTopWidth)}if(x){x=c._docScroll();u.x+=x.x;u.y+=x.y}return u};
c.coords=function(u,x){u=a(u);var B=i(u);B=c._getMarginBox(u,B);x=c.position(u,x);B.x=x.x;B.y=x.y;return B};var q={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},p={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},t={innerHTML:1,className:1,htmlFor:c.isIE,value:1},v=function(u){return p[u.toLowerCase()]||u},w=function(u,x){return(u=u.getAttributeNode&&u.getAttributeNode(x))&&
u.specified};c.hasAttr=function(u,x){var B=x.toLowerCase();return t[q[B]||x]||w(a(u),p[B]||x)};var y={},z=0,F=c._scopeName+"attrid",G={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};c.attr=function(u,x,B){u=a(u);var O=arguments.length;if(O==2&&typeof x!="string"){for(var R in x)c.attr(u,R,x[R]);return u}var U=x.toLowerCase();R=q[U]||x;var Y=t[R];U=p[U]||x;if(O==3){if(R=="style"&&typeof B!="string")c.style(u,B);else if(R=="innerHTML")if(c.isIE&&u.tagName.toLowerCase()in G){c.empty(u);
u.appendChild(c._toDom(B,u.ownerDocument))}else u[R]=B;else if(c.isFunction(B)){O=c.attr(u,F);if(!O){O=z++;c.attr(u,F,O)}y[O]||(y[O]={});if(Y=y[O][R])c.disconnect(Y);else try{delete u[R]}catch(da){}y[O][R]=c.connect(u,R,B)}else if(Y||typeof B=="boolean")u[R]=B;else u.setAttribute(U,B);return u}B=u[R];if(Y&&typeof B!="undefined")return B;if(R!="href"&&(typeof B=="boolean"||c.isFunction(B)))return B;return w(u,U)?u.getAttribute(U):null};c.removeAttr=function(u,x){a(u).removeAttribute(v(x))};c.getNodeProp=
function(u,x){u=a(u);var B=x.toLowerCase(),O=q[B]||x;if(O in u&&O!="href")return u[O];x=p[B]||x;return w(u,x)?u.getAttribute(x):null};c.create=function(u,x,B,O){var R=c.doc;if(B){B=a(B);R=B.ownerDocument}if(typeof u=="string")u=R.createElement(u);x&&c.attr(u,x);B&&c.place(u,B,O);return u};c.empty=c.isIE?function(u){u=a(u);for(var x;x=u.lastChild;)c.destroy(x)}:function(u){a(u).innerHTML=""};var H={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"]},I=/<\s*([\w\:]+)/,D={},E=0,J="__"+c._scopeName+"ToDomId";for(var M in H)if(H.hasOwnProperty(M)){var Q=H[M];Q.pre=M=="option"?'<select multiple="multiple">':"<"+Q.join("><")+">";Q.post="</"+Q.reverse().join("></")+">"}c._toDom=function(u,x){x=x||c.doc;var B=x[J];if(!B){x[J]=B=++E+"";D[B]=x.createElement("div")}u+="";var O=u.match(I),R=O?O[1].toLowerCase():"";B=D[B];if(O&&H[R]){O=
H[R];B.innerHTML=O.pre+u+O.post;for(u=O.length;u;--u)B=B.firstChild}else B.innerHTML=u;if(B.childNodes.length==1)return B.removeChild(B.firstChild);for(u=x.createDocumentFragment();x=B.firstChild;)u.appendChild(x);return u};var P="className";c.hasClass=function(u,x){return(" "+a(u)[P]+" ").indexOf(" "+x+" ")>=0};var W=/\s+/,L=[""],T={},V=function(u){if(typeof u=="string"||u instanceof String)if(u.indexOf(" ")<0){L[0]=u;return L}else return u.split(W);return u||""};c.addClass=function(u,x){u=a(u);
x=V(x);var B=u[P],O;B=B?" "+B+" ":" ";O=B.length;for(var R=0,U=x.length,Y;R<U;++R)if((Y=x[R])&&B.indexOf(" "+Y+" ")<0)B+=Y+" ";if(O<B.length)u[P]=B.substr(1,B.length-2)};c.removeClass=function(u,x){u=a(u);var B;if(x!==undefined){x=V(x);B=" "+u[P]+" ";for(var O=0,R=x.length;O<R;++O)B=B.replace(" "+x[O]+" "," ");B=c.trim(B)}else B="";if(u[P]!=B)u[P]=B};c.replaceClass=function(u,x,B){u=a(u);T.className=u.className;c.removeClass(T,B);c.addClass(T,x);if(u.className!==T.className)u.className=T.className};
c.toggleClass=function(u,x,B){if(B===undefined)B=!c.hasClass(u,x);c[B?"addClass":"removeClass"](u,x)}})();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 d=Array.prototype,a=d.slice,e=d.concat,f=function(r,s,o){r.sort||(r=a.call(r,0));o=o||this._NodeListCtor||c._NodeListCtor;r.constructor=o;c._mixin(r,o.prototype);r._NodeListCtor=o;return s?r._stash(s):r},g=function(r,s,o){s=[0].concat(a.call(s,0));o=o||c.global;return function(q){s[0]=q;return r.apply(o,s)}},h=function(r,s){return function(){this.forEach(g(r,
arguments,s));return this}},i=function(r,s){return function(){return this.map(g(r,arguments,s))}},j=function(r,s,o){return function(){var q=arguments,p=g(r,q,o);if(s.call(o||c.global,q))return this.map(p);this.forEach(p);return this}},k=function(r){return r.length==1&&typeof r[0]=="string"},l=function(r){var s=r.parentNode;s&&s.removeChild(r)};c.NodeList=function(){return f(Array.apply(null,arguments))};var m=c._NodeListCtor=c.NodeList,n=m.prototype;m._wrap=n._wrap=f;m._adaptAsMap=i;m._adaptAsForEach=
h;m._adaptAsFilter=function(r,s){return function(){return this.filter(g(r,arguments,s))}};m._adaptWithCondition=j;c.forEach(["slice","splice"],function(r){var s=d[r];n[r]=function(){return this._wrap(s.apply(this,arguments),r=="slice"?this:null)}});c.forEach(["indexOf","lastIndexOf","every","some"],function(r){var s=c[r];n[r]=function(){return s.apply(c,[this].concat(a.call(arguments,0)))}});c.forEach(["attr","style"],function(r){n[r]=j(c[r],k)});c.forEach(["connect","addClass","removeClass","replaceClass",
"toggleClass","empty","removeAttr"],function(r){n[r]=h(c[r])});c.extend(c.NodeList,{_normalize:function(r,s){var o=r.parse===true?true:false;if(typeof r.template=="string"){var q=r.templateFunc||c.string&&c.string.substitute;r=q?q(r.template,r):r}q=typeof r;if(q=="string"||q=="number"){r=c._toDom(r,s&&s.ownerDocument);r=r.nodeType==11?c._toArray(r.childNodes):[r]}else if(c.isArrayLike(r))c.isArray(r)||(r=c._toArray(r));else r=[r];if(o)r._runParse=true;return r},_cloneNode:function(r){return r.cloneNode(true)},
_place:function(r,s,o,q){if(!(s.nodeType!=1&&o=="only")){s=s;for(var p,t=r.length,v=t-1;v>=0;v--){var w=q?this._cloneNode(r[v]):r[v];if(r._runParse&&c.parser&&c.parser.parse){p||(p=s.ownerDocument.createElement("div"));p.appendChild(w);c.parser.parse(p);for(w=p.firstChild;p.firstChild;)p.removeChild(p.firstChild)}v==t-1?c.place(w,s,o):s.parentNode.insertBefore(w,s);s=w}}},_stash:function(r){this._parent=r;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(){var r=
c.isArray(this)?this:a.call(this,0),s=c.map(arguments,function(o){return o&&!c.isArray(o)&&(typeof NodeList!="undefined"&&o.constructor===NodeList||o.constructor===this._NodeListCtor)?a.call(o,0):o});return this._wrap(e.apply(r,s),this)},map:function(r,s){return this._wrap(c.map(this,r,s),this)},forEach:function(r,s){c.forEach(this,r,s);return this},coords:i(c.coords),position:i(c.position),place:function(r,s){var o=c.query(r)[0];return this.forEach(function(q){c.place(q,o,s)})},orphan:function(r){return(r?
c._filterQueryResult(this,r):this).forEach(l)},adopt:function(r,s){return c.query(r).place(this[0],s)._stash(this)},query:function(r){if(!r)return this;var s=this.map(function(o){return c.query(r,o).filter(function(q){return q!==undefined})});return this._wrap(e.apply([],s),this)},filter:function(r){var s=arguments,o=this,q=0;if(typeof r=="string"){o=c._filterQueryResult(this,s[0]);if(s.length==1)return o._stash(this);q=1}return this._wrap(c.filter(o,s[q],s[q+1]),this)},addContent:function(r,s){r=
this._normalize(r,this[0]);for(var o=0,q;q=this[o];o++)this._place(r,q,s,o>0);return this},instantiate:function(r,s){var o=c.isFunction(r)?r:c.getObject(r);s=s||{};return this.forEach(function(q){new o(s,q)})},at:function(){var r=new this._NodeListCtor;c.forEach(arguments,function(s){if(s<0)s=this.length+s;this[s]&&r.push(this[s])},this);return r._stash(this)}});m.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove",
"mouseout","mouseover","mouseup","submit"];c.forEach(m.events,function(r){var s="on"+r;n[s]=function(o,q){return this.connect(s,o,q)}})})();return c.NodeList});
(function(){var c=function(a){var e=a.trim,f=a.forEach,g=a._NodeListCtor=a.NodeList,h=function(){return a.doc},i=(a.isWebKit||a.isMozilla)&&h().compatMode=="BackCompat",j=h().firstChild.children?"children":"childNodes",k=false,l=function(){return true},m=function(C){C+=">~+".indexOf(C.slice(-1))>=0?" * ":" ";for(var A=function(pa,qa){return e(C.slice(pa,qa))},K=[],N=-1,S=-1,X=-1,$=-1,Z=-1,aa=-1,ga=-1,ia="",ha="",na,fa=0,ra=C.length,ca=null,la=null,sa=function(){if(ga>=0){var pa=ga==fa?null:A(ga,fa);
ca[">~+".indexOf(pa)<0?"tag":"oper"]=pa;ga=-1}},ta=function(){if(aa>=0){ca.id=A(aa,fa).replace(/\\/g,"");aa=-1}},ua=function(){if(Z>=0){ca.classes.push(A(Z+1,fa).replace(/\\/g,""));Z=-1}},oa=function(){ta();sa();ua()},va=function(){oa();$>=0&&ca.pseudos.push({name:A($+1,fa)});ca.loops=ca.pseudos.length||ca.attrs.length||ca.classes.length;ca.oquery=ca.query=A(na,fa);ca.otag=ca.tag=ca.oper?null:ca.tag||"*";if(ca.tag)ca.tag=ca.tag.toUpperCase();if(K.length&&K[K.length-1].oper){ca.infixOper=K.pop();ca.query=
ca.infixOper.query+" "+ca.query}K.push(ca);ca=null};ia=ha,ha=C.charAt(fa),fa<ra;fa++)if(ia!="\\"){if(!ca){na=fa;ca={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return k?this.otag:this.tag}};ga=fa}if(N>=0)if(ha=="]"){if(la.attr)la.matchFor=A(X||N+1,fa);else la.attr=A(N+1,fa);if(N=la.matchFor)if(N.charAt(0)=='"'||N.charAt(0)=="'")la.matchFor=N.slice(1,-1);ca.attrs.push(la);la=null;N=X=-1}else{if(ha=="="){X="|~^$*".indexOf(ia)>=0?ia:"";la.type=X+ha;la.attr=
A(N+1,fa-X.length);X=fa+1}}else if(S>=0){if(ha==")"){if($>=0)la.value=A(S+1,fa);$=S=-1}}else if(ha=="#"){oa();aa=fa+1}else if(ha=="."){oa();Z=fa}else if(ha==":"){oa();$=fa}else if(ha=="["){oa();N=fa;la={}}else if(ha=="("){if($>=0){la={name:A($+1,fa),value:null};ca.pseudos.push(la)}S=fa}else ha==" "&&ia!=ha&&va()}return K},n=function(C,A){if(!C)return A;if(!A)return C;return function(){return C.apply(window,arguments)&&A.apply(window,arguments)}},r=function(C,A){A=A||[];C&&A.push(C);return A},s=function(C){return 1==
C.nodeType},o=function(C,A){if(!C)return"";if(A=="class")return C.className||"";if(A=="for")return C.htmlFor||"";if(A=="style")return C.style.cssText||"";return(k?C.getAttribute(A):C.getAttribute(A,2))||""},q={"*=":function(C,A){return function(K){return o(K,C).indexOf(A)>=0}},"^=":function(C,A){return function(K){return o(K,C).indexOf(A)==0}},"$=":function(C,A){return function(K){K=" "+o(K,C);return K.lastIndexOf(A)==K.length-A.length}},"~=":function(C,A){var K=" "+A+" ";return function(N){return(" "+
o(N,C)+" ").indexOf(K)>=0}},"|=":function(C,A){var K=" "+A+"-";return function(N){N=" "+o(N,C);return N==A||N.indexOf(K)==0}},"=":function(C,A){return function(K){return o(K,C)==A}}},p=typeof h().firstChild.nextElementSibling=="undefined",t=!p?"nextElementSibling":"nextSibling",v=!p?"previousElementSibling":"previousSibling",w=p?s:l,y=function(C){for(;C=C[v];)if(w(C))return false;return true},z=function(C){for(;C=C[t];)if(w(C))return false;return true},F=function(C){var A=C.parentNode,K=0,N=A[j],
S=C._i||-1,X=A._l||-1;if(!N)return-1;N=N.length;if(X==N&&S>=0&&X>=0)return S;A._l=N;S=-1;for(A=A.firstElementChild||A.firstChild;A;A=A[t])if(w(A)){A._i=++K;if(C===A)S=K}return S},G=function(C){return!(F(C)%2)},H=function(C){return F(C)%2},I={checked:function(){return function(C){return!!("checked"in C?C.checked:C.selected)}},"first-child":function(){return y},"last-child":function(){return z},"only-child":function(){return function(C){if(!y(C))return false;if(!z(C))return false;return true}},empty:function(){return function(C){var A=
C.childNodes;for(C=C.childNodes.length-1;C>=0;C--){var K=A[C].nodeType;if(K===1||K==3)return false}return true}},contains:function(C,A){C=A.charAt(0);if(C=='"'||C=="'")A=A.slice(1,-1);return function(K){return K.innerHTML.indexOf(A)>=0}},not:function(C,A){C=m(A)[0];A={el:1};if(C.tag!="*")A.tag=1;if(!C.classes.length)A.classes=1;var K=E(C,A);return function(N){return!K(N)}},"nth-child":function(C,A){C=parseInt;if(A=="odd")return H;else if(A=="even")return G;if(A.indexOf("n")!=-1){A=A.split("n",2);
var K=A[0]?A[0]=="-"?-1:C(A[0]):1,N=A[1]?C(A[1]):0,S=0,X=-1;if(K>0)if(N<0)N=N%K&&K+N%K;else{if(N>0){if(N>=K)S=N-N%K;N%=K}}else if(K<0){K*=-1;if(N>0){X=N;N%=K}}if(K>0)return function(Z){Z=F(Z);return Z>=S&&(X<0||Z<=X)&&Z%K==N};else A=N}var $=C(A);return function(Z){return F(Z)==$}}},D=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(C){var A=C.toLowerCase();if(A=="class")C="className";return function(K){return k?K.getAttribute(C):K[C]||K[A]}}:function(C){return function(A){return A&&A.getAttribute&&A.hasAttribute(C)}},
E=function(C,A){if(!C)return l;A=A||{};var K=null;"el"in A||(K=n(K,s));if(!("tag"in A))if(C.tag!="*")K=n(K,function(N){return N&&N.tagName==C.getTag()});"classes"in A||f(C.classes,function(N,S){var X=new RegExp("(?:^|\\s)"+N+"(?:\\s|$)");K=n(K,function($){return X.test($.className)});K.count=S});"pseudos"in A||f(C.pseudos,function(N){var S=N.name;if(I[S])K=n(K,I[S](S,N.value))});"attrs"in A||f(C.attrs,function(N){var S,X=N.attr;if(N.type&&q[N.type])S=q[N.type](X,N.matchFor);else if(X.length)S=D(X);
if(S)K=n(K,S)});if(!("id"in A))if(C.id)K=n(K,function(N){return!!N&&N.id==C.id});K||"default"in A||(K=l);return K},J=function(C){return function(A,K,N){for(;A=A[t];)if(!(p&&!s(A))){if((!N||ja(A,N))&&C(A))K.push(A);break}return K}},M=function(C){return function(A,K,N){for(A=A[t];A;){if(w(A)){if(N&&!ja(A,N))break;C(A)&&K.push(A)}A=A[t]}return K}},Q=function(C){C=C||l;return function(A,K,N){for(var S=0,X=A[j];A=X[S++];)if(w(A)&&(!N||ja(A,N))&&C(A,S))K.push(A);return K}},P=function(C,A){for(C=C.parentNode;C;){if(C==
A)break;C=C.parentNode}return!!C},W={},L=function(C){var A=W[C.query];if(A)return A;var K=C.infixOper;K=K?K.oper:"";var N=E(C,{el:1}),S="*"==C.tag,X=h().getElementsByClassName;if(K){X={el:1};if(S)X.tag=1;N=E(C,X);if("+"==K)A=J(N);else if("~"==K)A=M(N);else if(">"==K)A=Q(N)}else if(C.id){N=!C.loops&&S?l:E(C,{el:1,id:1});A=function(Z,aa){var ga=a.byId(C.id,Z.ownerDocument||Z);if(ga&&N(ga))if(9==Z.nodeType)return r(ga,aa);else if(P(ga,Z))return r(ga,aa)}}else if(X&&/\{\s*\[native code\]\s*\}/.test(String(X))&&
C.classes.length&&!i){N=E(C,{el:1,classes:1,id:1});var $=C.classes.join(" ");A=function(Z,aa,ga){aa=r(0,aa);for(var ia,ha=0,na=Z.getElementsByClassName($);ia=na[ha++];)N(ia,Z)&&ja(ia,ga)&&aa.push(ia);return aa}}else if(!S&&!C.loops)A=function(Z,aa,ga){aa=r(0,aa);for(var ia=0,ha=Z.getElementsByTagName(C.getTag());Z=ha[ia++];)ja(Z,ga)&&aa.push(Z);return aa};else{N=E(C,{el:1,tag:1,id:1});A=function(Z,aa,ga){aa=r(0,aa);for(var ia,ha=0,na=Z.getElementsByTagName(C.getTag());ia=na[ha++];)N(ia,Z)&&ja(ia,
ga)&&aa.push(ia);return aa}}return W[C.query]=A},T=function(C,A){C=r(C);for(var K,N,S=A.length,X,$,Z=0;Z<S;Z++){$=[];K=A[Z];N=C.length-1;if(N>0){X={};$.nozip=true}N=L(K);for(var aa=0;K=C[aa];aa++)N(K,$,X);if(!$.length)break;C=$}return $},V={},u={},x=function(C){var A=m(e(C));if(A.length==1){var K=L(A[0]);return function(N){if(N=K(N,new g))N.nozip=true;return N}}return function(N){return T(N,A)}},B=navigator.userAgent;B=a.isWebKit&&B.indexOf("WebKit/")>0&&parseFloat(B.split("WebKit/")[1])>528;var O=
a.isIE?"commentStrip":"nozip",R=!!h().querySelectorAll&&(!a.isSafari||a.isSafari>3.1||B),U=/n\+\d|([^ ])?([>~+])([^ =])?/g,Y=function(C,A,K,N){return K?(A?A+" ":"")+K+(N?" "+N:""):C},da=function(C,A){C=C.replace(U,Y);if(R){var K=u[C];if(K&&!A)return K}if(K=V[C])return K;K=C.charAt(0);var N=-1==C.indexOf(" ");if(C.indexOf("#")>=0&&N)A=true;if(R&&!A&&">~+".indexOf(K)==-1&&(!a.isIE||C.indexOf(":")==-1)&&!(i&&C.indexOf(".")>=0)&&C.indexOf(":contains")==-1&&C.indexOf(":checked")==-1&&C.indexOf("|=")==
-1){var S=">~+".indexOf(C.charAt(C.length-1))>=0?C+" *":C;return u[C]=function($){try{if(!(9==$.nodeType||N))throw"";var Z=$.querySelectorAll(S);Z[O]=true;return Z}catch(aa){return da(C,true)($)}}}else{var X=C.split(/\s*,\s*/);return V[C]=X.length<2?x(C):function($){for(var Z=0,aa=[],ga;ga=X[Z++];)aa=aa.concat(x(ga)($));return aa}}},ba=0,ea=a.isIE?function(C){return k?C.getAttribute("_uid")||C.setAttribute("_uid",++ba)||ba:C.uniqueID}:function(C){return C._uid||(C._uid=++ba)},ja=function(C,A){if(!A)return 1;
C=ea(C);if(!A[C])return A[C]=1;return 0},ka="_zipIdx",ma=function(C){if(C&&C.nozip)return g._wrap?g._wrap(C):C;var A=new g;if(!C||!C.length)return A;C[0]&&A.push(C[0]);if(C.length<2)return A;ba++;if(a.isIE&&k){var K=ba+"";C[0].setAttribute(ka,K);for(var N=1,S;S=C[N];N++){C[N].getAttribute(ka)!=K&&A.push(S);S.setAttribute(ka,K)}}else if(a.isIE&&C.commentStrip)try{for(N=1;S=C[N];N++)s(S)&&A.push(S)}catch(X){}else{if(C[0])C[0][ka]=ba;for(N=1;S=C[N];N++){C[N][ka]!=ba&&A.push(S);S[ka]=ba}}return A};a.query=
function(C,A){g=a._NodeListCtor;if(!C)return new g;if(C.constructor==g)return C;if(typeof C!="string")return new g(C);if(typeof A=="string"){A=a.byId(A);if(!A)return new g}A=A||h();var K=A.ownerDocument||A.documentElement;k=A.contentType&&A.contentType=="application/xml"||a.isOpera&&(A.doctype||K.toString()=="[object XMLDocument]")||!!K&&(a.isIE?K.xml:A.xmlVersion||K.xmlVersion);if((C=da(C)(A))&&C.nozip&&!g._wrap)return C;return ma(C)};a.query.pseudos=I;a._filterQueryResult=function(C,A,K){var N=
new a._NodeListCtor,S=m(A);S=S.length==1&&!/[^\w#\.]/.test(A)?E(S[0]):function(Z){return dojo.query(A,K).indexOf(Z)!=-1};for(var X=0,$;$=C[X];X++)S($)&&N.push($);return N}},d=function(){acme={trim:function(g){g=g.replace(/^\s+/,"");for(var h=g.length-1;h>=0;h--)if(/\S/.test(g.charAt(h))){g=g.substring(0,h+1);break}return g},forEach:function(g,h,i){if(g&&g.length)for(var j=0,k=g.length;j<k;++j)h.call(i||window,g[j],j,g)},byId:function(g,h){return typeof g=="string"?(h||document).getElementById(g):
g},doc:document,NodeList:Array};var a=navigator,e=a.userAgent;a=a.appVersion;var f=parseFloat(a);acme.isOpera=e.indexOf("Opera")>=0?f:undefined;acme.isKhtml=a.indexOf("Konqueror")>=0?f:undefined;acme.isWebKit=parseFloat(e.split("WebKit/")[1])||undefined;acme.isChrome=parseFloat(e.split("Chrome/")[1])||undefined;if((e=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome){acme.isSafari=parseFloat(a.split("Version/")[1]);if(!acme.isSafari||parseFloat(a.substr(e+7))<=419.3)acme.isSafari=
2}if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||undefined;Array._wrap=function(g){return g};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)});if(typeof define!="function")if(this.dojo){dojo.provide("dojo._base.query");dojo.require("dojo._base.NodeList");dojo.require("dojo._base.lang");c(this.queryPortability||this.acme||dojo)}else c(this.queryPortability||
this.acme||d())})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(c){(function(){function d(p,t,v){if(v!==null){var w=p[t];if(typeof w=="string")p[t]=[w,v];else if(a.isArray(w))w.push(v);else p[t]=v}}var a=c,e=a.config;c.fieldToObject=function(p){var t=null;if(p=a.byId(p)){var v=p.name,w=(p.type||"").toLowerCase();if(v&&w&&!p.disabled)if(w=="radio"||w=="checkbox"){if(p.checked)t=p.value}else if(p.multiple){t=[];a.query("option",p).forEach(function(y){y.selected&&
t.push(y.value)})}else t=p.value}return t};c.formToObject=function(p){var t={};a.forEach(c.byId(p).elements,function(v){var w=v.name,y=(v.type||"").toLowerCase();if(w&&y&&"file|submit|image|reset|button|".indexOf(y)==-1&&!v.disabled){d(t,w,a.fieldToObject(v));if(y=="image")t[w+".x"]=t[w+".y"]=t[w].x=t[w].y=0}});return t};c.objectToQuery=function(p){var t=encodeURIComponent,v=[],w={};for(var y in p){var z=p[y];if(z!=w[y]){var F=t(y)+"=";if(a.isArray(z))for(var G=0;G<z.length;G++)v.push(F+t(z[G]));
else v.push(F+t(z))}}return v.join("&")};c.formToQuery=function(p){return a.objectToQuery(a.formToObject(p))};c.formToJson=function(p,t){return a.toJson(a.formToObject(p),t)};c.queryToObject=function(p){var t={};p=p.split("&");var v=decodeURIComponent;a.forEach(p,function(w){if(w.length){var y=w.split("=");w=v(y.shift());y=v(y.join("="));if(typeof t[w]=="string")t[w]=[t[w]];if(a.isArray(t[w]))t[w].push(y);else t[w]=y}});return t};c._blockAsync=false;var f=a._contentHandlers=c.contentHandlers={text:function(p){return p.responseText},
json:function(p){return a.fromJson(p.responseText||null)},"json-comment-filtered":function(p){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.");p=p.responseText;var t=p.indexOf("/*"),v=p.lastIndexOf("*/");if(t==-1||v==-1)throw new Error("JSON was not comment filtered");
return a.fromJson(p.substring(t+2,v))},javascript:function(p){return a.eval(p.responseText)},xml:function(p){var t=p.responseXML;if(a.isIE&&(!t||!t.documentElement)){var v=function(w){return"MSXML"+w+".DOMDocument"};v=["Microsoft.XMLDOM",v(6),v(4),v(3),v(2)];a.some(v,function(w){try{var y=new ActiveXObject(w);y.async=false;y.loadXML(p.responseText);t=y}catch(z){return false}return true})}return t},"json-comment-optional":function(p){return p.responseText&&/^[^{\[]*\/\*/.test(p.responseText)?f["json-comment-filtered"](p):
f.json(p)}};c._ioSetArgs=function(p,t,v,w){var y={args:p,url:p.url},z=null;if(p.form){z=a.byId(p.form);var F=z.getAttributeNode("action");y.url=y.url||(F?F.value:null);z=a.formToObject(z)}F=[{}];z&&F.push(z);p.content&&F.push(p.content);p.preventCache&&F.push({"dojo.preventCache":(new Date).valueOf()});y.query=a.objectToQuery(a.mixin.apply(null,F));y.handleAs=p.handleAs||"text";var G=new a.Deferred(t);G.addCallbacks(v,function(E){return w(E,G)});var H=p.load;H&&a.isFunction(H)&&G.addCallback(function(E){return H.call(p,
E,y)});var I=p.error;I&&a.isFunction(I)&&G.addErrback(function(E){return I.call(p,E,y)});var D=p.handle;D&&a.isFunction(D)&&G.addBoth(function(E){return D.call(p,E,y)});if(e.ioPublish&&a.publish&&y.args.ioPublish!==false){G.addCallbacks(function(E){a.publish("/dojo/io/load",[G,E]);return E},function(E){a.publish("/dojo/io/error",[G,E]);return E});G.addBoth(function(E){a.publish("/dojo/io/done",[G,E]);return E})}G.ioArgs=y;return G};var g=function(p){p.canceled=true;var t=p.ioArgs.xhr,v=typeof t.abort;
if(v=="function"||v=="object"||v=="unknown")t.abort();p=p.ioArgs.error;if(!p){p=new Error("xhr cancelled");p.dojoType="cancel"}return p},h=function(p){p=f[p.ioArgs.handleAs](p.ioArgs.xhr);return p===undefined?null:p},i=function(p,t){t.ioArgs.args.failOk||console.error(p);return p},j=null,k=[],l=0,m=function(p){if(l<=0){l=0;if(e.ioPublish&&a.publish&&(!p||p&&p.ioArgs.args.ioPublish!==false))a.publish("/dojo/io/stop")}},n=function(){var p=(new Date).getTime();if(!a._blockAsync)for(var t=0,v;t<k.length&&
(v=k[t]);t++){var w=v.dfd,y=function(){if(!w||w.canceled||!v.validCheck(w)){k.splice(t--,1);l-=1}else if(v.ioCheck(w)){k.splice(t--,1);v.resHandle(w);l-=1}else if(w.startTime)if(w.startTime+(w.ioArgs.args.timeout||0)<p){k.splice(t--,1);var F=new Error("timeout exceeded");F.dojoType="timeout";w.errback(F);w.cancel();l-=1}};if(c.config.debugAtAllCosts)y.call(this);else try{y.call(this)}catch(z){w.errback(z)}}m(w);if(!k.length){clearInterval(j);j=null}};c._ioCancelAll=function(){try{a.forEach(k,function(t){try{t.dfd.cancel()}catch(v){}})}catch(p){}};
a.isIE&&a.addOnWindowUnload(a._ioCancelAll);a._ioNotifyStart=function(p){if(e.ioPublish&&a.publish&&p.ioArgs.args.ioPublish!==false){l||a.publish("/dojo/io/start");l+=1;a.publish("/dojo/io/send",[p])}};a._ioWatch=function(p,t,v,w){var y=p.ioArgs.args;if(y.timeout)p.startTime=(new Date).getTime();k.push({dfd:p,validCheck:t,ioCheck:v,resHandle:w});j||(j=setInterval(n,50));y.sync&&n()};var r="application/x-www-form-urlencoded",s=function(p){return p.ioArgs.xhr.readyState},o=function(p){return 4==p.ioArgs.xhr.readyState},
q=function(p){var t=p.ioArgs.xhr;if(a._isDocumentOk(t))p.callback(p);else{var v=new Error("Unable to load "+p.ioArgs.url+" status:"+t.status);v.status=t.status;v.responseText=t.responseText;p.errback(v)}};c._ioAddQueryToUrl=function(p){if(p.query.length){p.url+=(p.url.indexOf("?")==-1?"?":"&")+p.query;p.query=null}};c.xhr=function(p,t,v){var w=a._ioSetArgs(t,g,h,i),y=w.ioArgs,z=y.xhr=a._xhrObj(y.args);if(!z){w.cancel();return w}if("postData"in t)y.query=t.postData;else if("putData"in t)y.query=t.putData;
else if("rawBody"in t)y.query=t.rawBody;else if(arguments.length>2&&!v||"POST|PUT".indexOf(p.toUpperCase())==-1)a._ioAddQueryToUrl(y);z.open(p,y.url,t.sync!==true,t.user||undefined,t.password||undefined);if(t.headers)for(var F in t.headers)if(F.toLowerCase()==="content-type"&&!t.contentType)t.contentType=t.headers[F];else t.headers[F]&&z.setRequestHeader(F,t.headers[F]);z.setRequestHeader("Content-Type",t.contentType||r);if(!t.headers||!("X-Requested-With"in t.headers))z.setRequestHeader("X-Requested-With",
"XMLHttpRequest");a._ioNotifyStart(w);if(c.config.debugAtAllCosts)z.send(y.query);else try{z.send(y.query)}catch(G){y.error=G;w.cancel()}a._ioWatch(w,s,o,q);return w};c.xhrGet=function(p){return a.xhr("GET",p)};c.rawXhrPost=c.xhrPost=function(p){return a.xhr("POST",p,true)};c.rawXhrPut=c.xhrPut=function(p){return a.xhr("PUT",p,true)};c.xhrDelete=function(p){return a.xhr("DELETE",p)}})();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 d=c._mixin;c._Line=function(i,j){this.start=i;this.end=j};c._Line.prototype.getValue=function(i){return(this.end-this.start)*i+this.start};c.Animation=function(i){d(this,i);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 i=this._percent,j=this.easing;return j?j(i):i},_fire:function(i,j){j=j||[];if(this[i])if(c.config.debugAtAllCosts)this[i].apply(this,j);else try{this[i].apply(this,j)}catch(k){console.error("exception in animation handler for:",i);console.error(k)}return this},play:function(i,j){var k=this;k._delayTimer&&k._clearTimer();if(j){k._stopTimer();k._active=k._paused=false;k._percent=0}else if(k._active&&!k._paused)return k;k._fire("beforeBegin",[k.node]);i=i||k.delay;var l=c.hitch(k,
"_play",j);if(i>0){k._delayTimer=setTimeout(l,i);return k}l();return k},_play:function(){var i=this;i._delayTimer&&i._clearTimer();i._startTime=(new Date).valueOf();if(i._paused)i._startTime-=i.duration*i._percent;i._active=true;i._paused=false;var j=i.curve.getValue(i._getStep());if(!i._percent){if(!i._startRepeatCount)i._startRepeatCount=i.repeat;i._fire("onBegin",[j])}i._fire("onPlay",[j]);i._cycle();return i},pause:function(){var i=this;i._delayTimer&&i._clearTimer();i._stopTimer();if(!i._active)return i;
i._paused=true;i._fire("onPause",[i.curve.getValue(i._getStep())]);return i},gotoPercent:function(i,j){var k=this;k._stopTimer();k._active=k._paused=true;k._percent=i;j&&k.play();return k},stop:function(i){var j=this;j._delayTimer&&j._clearTimer();if(!j._timer)return j;j._stopTimer();if(i)j._percent=1;j._fire("onStop",[j.curve.getValue(j._getStep())]);j._active=j._paused=false;return j},status:function(){if(this._active)return this._paused?"paused":"playing";return"stopped"},_cycle:function(){var i=
this;if(i._active){var j=((new Date).valueOf()-i._startTime)/i.duration;if(j>=1)j=1;i._percent=j;if(i.easing)j=i.easing(j);i._fire("onAnimate",[i.curve.getValue(j)]);if(i._percent<1)i._startTimer();else{i._active=false;if(i.repeat>0){i.repeat--;i.play(null,true)}else if(i.repeat==-1)i.play(null,true);else if(i._startRepeatCount){i.repeat=i._startRepeatCount;i._startRepeatCount=0}i._percent=0;i._fire("onEnd",[i.node]);!i.repeat&&i._stopTimer()}}return i},_clearTimer:function(){clearTimeout(this._delayTimer);
delete this._delayTimer}});var a=0,e=null,f={run:function(){}};c.extend(c.Animation,{_startTimer:function(){if(!this._timer){this._timer=c.connect(f,"run",this,"_cycle");a++}e||(e=setInterval(c.hitch(f,"run"),this.rate))},_stopTimer:function(){if(this._timer){c.disconnect(this._timer);this._timer=null;a--}if(a<=0){clearInterval(e);e=null;a=0}}});var g=c.isIE?function(i){var j=i.style;if(!j.width.length&&c.style(i,"width")=="auto")j.width="auto"}:function(){};c._fade=function(i){i.node=c.byId(i.node);
var j=d({properties:{}},i);i=j.properties.opacity={};i.start=!("start"in j)?function(){return+c.style(j.node,"opacity")||0}:j.start;i.end=j.end;i=c.animateProperty(j);c.connect(i,"beforeBegin",c.partial(g,j.node));return i};c.fadeIn=function(i){return c._fade(d({end:1},i))};c.fadeOut=function(i){return c._fade(d({end:0},i))};c._defaultEasing=function(i){return 0.5+Math.sin((i+1.5)*Math.PI)/2};var h=function(i){this._properties=i;for(var j in i){var k=i[j];if(k.start instanceof c.Color)k.tempColor=
new c.Color}};h.prototype.getValue=function(i){var j={};for(var k in this._properties){var l=this._properties[k],m=l.start;if(m instanceof c.Color)j[k]=c.blendColors(m,l.end,i,l.tempColor).toCss();else c.isArray(m)||(j[k]=(l.end-m)*i+m+(k!="opacity"?l.units||"px":0))}return j};c.animateProperty=function(i){var j=i.node=c.byId(i.node);if(!i.easing)i.easing=c._defaultEasing;i=new c.Animation(i);c.connect(i,"beforeBegin",i,function(){var k={};for(var l in this.properties){if(l=="width"||l=="height")this.node.display=
"block";var m=this.properties[l];if(c.isFunction(m))m=m(j);m=k[l]=d({},c.isObject(m)?m:{end:m});if(c.isFunction(m.start))m.start=m.start(j);if(c.isFunction(m.end))m.end=m.end(j);var n=l.toLowerCase().indexOf("color")>=0,r=function(s,o){var q={height:s.offsetHeight,width:s.offsetWidth}[o];if(q!==undefined)return q;q=c.style(s,o);return o=="opacity"?+q:n?q:parseFloat(q)};if("end"in m){if(!("start"in m))m.start=r(j,l)}else m.end=r(j,l);if(n){m.start=new c.Color(m.start);m.end=new c.Color(m.end)}else m.start=
l=="opacity"?+m.start:parseFloat(m.start)}this.curve=new h(k)});c.connect(i,"onAnimate",c.hitch(c,"style",i.node));return i};c.anim=function(i,j,k,l,m,n){return c.animateProperty({node:i,duration:k||c.Animation.prototype.duration,properties:j,easing:l,onEnd:m}).play(n||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"],function(c){return c});
define("orion/serviceregistry",["dojo"],function(c){function d(h,i,j){this.serviceId=h;this.name=i;this.properties=j}function a(h,i,j){this.serviceId=h;this.serviceReference=i;this.internalRegistry=j}function e(h,i,j){this.serviceId=h;this.implementation=i;this.internalRegistry=j;var k;for(k in i)if(typeof i[k]==="function")this[k]=function(l){return function(){if(j.isRegistered(h)){var m=new c.Deferred;try{var n=i[l].apply(i,Array.prototype.slice.call(arguments));c.when(n,c.hitch(m,m.resolve),c.hitch(m,
m.reject),c.hitch(m,m.progress))}catch(r){m.reject(r)}return m}throw new Error("Service was unregistered");}}(k)}function f(){this._namedlisteners={}}function g(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new f;var h=this;this.internalRegistry={isRegistered:function(i){return h._entries[i]?true:false},unregisterService:function(i){var j=h._entries[i];if(j){for(var k=j.reference,l=h._namedReferences[k.getName()],m=0;m<l.length;m++)if(l[m]===k){if(l.length===1)delete h._namedReferences[k.getName()];
else l.splice(m,1);break}h._entries[i]=null;h._serviceEventTarget.dispatchEvent("serviceRemoved",k,j.service)}},dispatchEvent:function(i,j){var k=h._entries[i];k&&k.eventTarget.dispatchEvent.apply(k.eventTarget,[j].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(i,j,k){(i=h._entries[i])&&i.eventTarget.addEventListener(j,k)},removeEventListener:function(i,j,k){(i=h._entries[i])&&i.eventTarget.removeEventListener(j,k)}}}d.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames:function(){var h=[],i;for(i in this.properties)this.properties.hasOwnProperty(i)&&h.push(i);return h},getProperty:function(h){return this.properties[h]}};d.prototype.constructor=d;a.prototype={unregister:function(){this.internalRegistry.unregisterService(this.serviceId)},dispatchEvent:function(h){this.internalRegistry.dispatchEvent.apply(this.internalRegistry,[this.serviceId,h].concat(Array.prototype.slice.call(arguments,1)))},getServiceReference:function(){return this.serviceReference}};
a.prototype.constructor=a;e.prototype={addEventListener:function(h,i){this.internalRegistry.addEventListener(this.serviceId,h,i)},removeEventListener:function(h,i){this.internalRegistry.removeEventListener(this.serviceId,h,i)}};e.prototype.constructor=e;f.prototype={dispatchEvent:function(h){var i=this._namedlisteners[h];if(i)for(var j=0;j<i.length;j++)try{var k=Array.prototype.slice.call(arguments,1);i[j].apply(null,k)}catch(l){console.log(l)}},addEventListener:function(h,i){this._namedlisteners[h]=
this._namedlisteners[h]||[];this._namedlisteners[h].push(i)},removeEventListener:function(h,i){var j=this._namedlisteners[h];if(j)for(var k=0;k<j.length;k++)if(j[k]===i){if(j.length===1)delete this._namedlisteners[h];else j.splice(k,1);break}}};f.prototype.constructor=f;g.prototype={getService:function(h){var i;if(typeof h==="string"){if(this._namedReferences[h])for(var j=0;j<this._namedReferences[h].length;j++)if(i=this._entries[this._namedReferences[h][j].getServiceId()].service)break}else i=this._entries[h.getServiceId()].service;
return i},getServiceReferences:function(h){if(h)return this._namedReferences[h]?this._namedReferences[h]:[];h=[];for(var i=0;i<this._entries.length;i++)this._entries[i]&&h.push(this._entries[i].reference);return h},registerService:function(h,i,j){var k=this._entries.length;j=new d(k,h,j);i=new e(k,i,this.internalRegistry);this._namedReferences[h]=this._namedReferences[h]||[];this._namedReferences[h].push(j);this._entries.push({reference:j,service:i,eventTarget:new f});this._serviceEventTarget.dispatchEvent("serviceAdded",
j,i);return new a(k,j,this.internalRegistry)},addEventListener:function(h,i){this._serviceEventTarget.addEventListener(h,i)},removeEventListener:function(h,i){this._serviceEventTarget.removeEventListener(h,i)}};g.prototype.constructor=g;return{ServiceReference:d,ServiceRegistration:a,Service:e,EventTarget:f,ServiceRegistry:g}});define("dijit",["dojo"],function(c){return dijit=c._dijit||{}});
define("orion/commonHTMLFragments",["require"],function(c){var d='<div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+c.toUrl("index.html")+'"><img src="'+c.toUrl("images/orion-small-lightondark.gif")+'" alt="Orion Logo"/></a><div id="primaryNav" class="layoutLeft primaryNav"></div><div id="userMenu" class="layoutRight textless"></div><div id="userInfo" class="layoutRight primaryNav"></div><div class="layoutRight primaryNav">|</div></div><div id="titleArea" class="layoutBlock titleArea"><div id="pageTitle" class="layoutLeft pageTitle"></div><input type="search" id="search" placeholder="Search" title="Type a keyword or wild card to search in root" class="layoutRight searchbox"><div id="relatedLinks" class="layoutRight pageNav"></div><div id="extras" class="layoutRight pageNav"><div id="globalActions" class="pageNav"></div><span id="pageFavorite" tabindex="0" role="button" aria-label="Add this page to the favorites list" class="imageSprite core-sprite-favorite_sml"></span></div><div id="dimension" class="clear dimension"></div><div id="location" class="clear currentLocation"></div></div>';
c='<div class="layoutLeft pageActions" id="pageActions"></div><div class="layoutLeft pageActions" id="selectionTools"></div><img class="layoutRight progressPane" src="'+c.toUrl("images/none.png")+'" id="progressPane"></img><div class="layoutRight status" id="statusPane"></div><div class="layoutRight pageActions" id="pageNavigationActions"></div><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" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div></div><div id="parameterArea" class="layoutBlock slideParameters slideContainer"><span id="pageParameterArea" class="slide"><span id="pageCommandParameters" class="parameters"></span><span id="pageCommandDismiss" class="parametersDismiss"></span></span></div>';
return{topHTMLFragment:d,bottomHTMLFragment:'<div class="layoutBlock"><div class="footerBlock">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">FAQ</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=0.4" target="_blank">Report a Bug</a> | <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a> | <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a> | <a href="http://www.eclipse.org/legal/copyright.php" target="_blank">Copyright Agent</a></div></div>',
toolbarHTMLFragment:c}});
define("dojo/hash",["dojo"],function(c){(function(){function d(m,n){n=m.indexOf(n);return n>=0?m.substring(n+1):""}function a(){return d(location.href,"#")}function e(){c.publish("/dojo/hashchange",[a()])}function f(){if(a()!==i){i=a();e()}}function g(m){if(j)if(j.isTransitioning())setTimeout(c.hitch(null,g,m),l);else{var n=j.iframe.location.href,r=n.indexOf("?");j.iframe.location.replace(n.substring(0,r)+"?"+m)}else{location.replace("#"+m);!k&&f()}}function h(){function m(){i=a();s=t?i:d(v.href,
"?");o=false;q=null}var n=document.createElement("iframe"),r=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");n.id="dojo-hash-iframe";n.src=r+"?"+a();n.style.display="none";document.body.appendChild(n);this.iframe=c.global["dojo-hash-iframe"];
var s,o,q,p,t,v=this.iframe.location;this.isTransitioning=function(){return o};this.pollLocation=function(){if(!t)try{var w=d(v.href,"?");if(document.title!=p)p=this.iframe.document.title=document.title}catch(y){t=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}var z=a();if(o&&i===z)if(t||w===q){m();e()}else{setTimeout(c.hitch(this,this.pollLocation),0);return}else if(!(i===z&&(t||s===w)))if(i!==z){i=z;o=true;q=z;n.src=r+"?"+q;t=false;setTimeout(c.hitch(this,this.pollLocation),
0);return}else if(!t){location.href="#"+v.search.substring(1);m();e()}setTimeout(c.hitch(this,this.pollLocation),l)};m();setTimeout(c.hitch(this,this.pollLocation),l)}c.hash=function(m,n){if(!arguments.length)return a();if(m.charAt(0)=="#")m=m.substring(1);if(n)g(m);else location.href="#"+m;return m};var i,j,k,l=c.config.hashPollFrequency||100;c.addOnLoad(function(){if("onhashchange"in c.global&&(!c.isIE||c.isIE>=8&&document.compatMode!="BackCompat"))k=c.connect(c.global,"onhashchange",e);else if(document.addEventListener){i=
a();setInterval(f,l)}else if(document.attachEvent)j=new h})})();return c.hash});
(function(){var c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=[];define("text",["require","exports","module"],function(){var f,g,h;if(typeof window!=="undefined"&&window.navigator&&window.document)g=function(i,j){var k=f.createXhr();k.open("GET",i,true);k.onreadystatechange=function(){k.readyState===4&&j(k.responseText)};k.send(null)};else if(typeof process!=="undefined"&&process.versions&&
process.versions.node){h=require.nodeRequire("fs");g=function(i,j){j(h.readFileSync(i,"utf8"))}}else if(typeof Packages!=="undefined")g=function(i,j){var k=new java.io.File(i);i=java.lang.System.getProperty("line.separator");k=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(k),"utf-8"));var l,m,n="";try{l=new java.lang.StringBuffer;if((m=k.readLine())&&m.length()&&m.charAt(0)===65279)m=m.substring(1);for(l.append(m);(m=k.readLine())!==null;){l.append(i);l.append(m)}n=
String(l.toString())}finally{k.close()}j(n)};return f={version:"0.24.0",strip:function(i){if(i){i=i.replace(d,"");var j=i.match(a);if(j)i=j[1]}else i="";return i},jsEscape:function(i){return i.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 i,j,k;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(j=0;j<3;j++){k=c[j];try{i=new ActiveXObject(k)}catch(l){}if(i){c=
[k];break}}if(!i)throw new Error("require.getXhr(): XMLHttpRequest not available");return i},get:g,load:function(i,j,k,l){var m=false,n=i.indexOf("."),r=i.substring(0,n),s=i.substring(n+1,i.length);n=s.indexOf("!");if(n!==-1){m=s.substring(n+1,s.length);m=m==="strip";s=s.substring(0,n)}j=j.nameToUrl(r,"."+s);f.get(j,function(o){o=m?f.strip(o):o;if(l.isBuild&&l.inlineText)e[i]=o;k(o)})},write:function(i,j,k){if(j in e){var l=f.jsEscape(e[j]);k("define('"+i+"!"+j+"', function () { return '"+l+"';});\n")}}}})})();
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,d){d.getObject("i18n",true,d);d.i18n.getLocalization=d.i18n.getLocalization||function(a,e,f){f=d.i18n.normalizeLocale(f);var g=f.split("-"),h=[a,"nls",e].join(".");if(typeof d.global.require!=="undefined"){var i=c("i18n!"+[a.replace(/\./g,"/"),"nls",e].join("/"));(d._loadedModules[h]=d._loadedModules[h]||{})[g.join("_")]=i.root||i}if(h=d._loadedModules[h]){var j;for(i=g.length;i>0;i--){var k=g.slice(0,i).join("_");if(h[k]){j=h[k];break}}if(!j)j=h.ROOT;
if(j){a=function(){};a.prototype=j;return new a}}throw new Error("Bundle not found: "+e+" in "+a+" , locale="+f);};d.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():d.locale;if(a=="root")a="ROOT";return a};d.i18n._requireLocalization=function(a,e,f,g){f=d.i18n.normalizeLocale(f);var h=[a,"nls",e].join("."),i="";if(g){for(var j=g.split(","),k=0;k<j.length;k++)if(f.indexOf(j[k])==0)if(j[k].length>i.length)i=j[k];i||(i="ROOT")}j=g?i:f;var l=d._loadedModules[h];k=null;if(l){if(d.config.localizationComplete&&
l._built)return;k=j.replace(/-/g,"_");k=d._loadedModules[h+"."+k]}if(!k){l=d.provide(h);var m=d._getModuleSymbols(a).concat("nls").join("/"),n;d.i18n._searchLocalePath(j,g,function(r){var s=r.replace(/-/g,"_"),o=h+"."+s,q=false;if(d._loadedModules[o])q=true;else{d.provide(o);o=[m];r!="ROOT"&&o.push(r);o.push(e);r=o.join("/")+".js";q=d._loadPath(r,null,function(p){p=p.root||p;var t=function(){};t.prototype=n;l[s]=new t;for(var v in p)l[s][v]=p[v]})}if(q&&l[s])n=l[s];else l[s]=n;if(g)return true})}if(g&&
f!=i)l[f.replace(/-/g,"_")]=l[i.replace(/-/g,"_")]};(function(){var a=d.config.extraLocale;if(a){if(!a instanceof Array)a=[a];var e=d.i18n._requireLocalization;d.i18n._requireLocalization=function(f,g,h,i){e(f,g,h,i);if(!h)for(h=0;h<a.length;h++)e(f,g,a[h],i)}}})();d.i18n._searchLocalePath=function(a,e,f){a=d.i18n.normalizeLocale(a);var g=a.split("-");a=[];for(var h=g.length;h>0;h--)a.push(g.slice(0,h).join("-"));a.push(false);e&&a.reverse();for(e=a.length-1;e>=0;e--)if(f(a[e]||"ROOT"))break};d.i18n._preloadLocalizations=
function(a,e){function f(i){i=d.i18n.normalizeLocale(i);d.i18n._searchLocalePath(i,true,function(j){for(var k=0;k<e.length;k++)if(e[k]==j){d.require(a+"_"+j);return true}return false})}f();for(var g=d.config.extraLocale||[],h=0;h<g.length;h++)f(g[h])};return d.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",true,c);c.window.getBox=function(){var d=c.doc.compatMode=="BackCompat"?c.body():c.doc.documentElement,a=c._docScroll();return{w:d.clientWidth,h:d.clientHeight,l:a.x,t:a.y}};c.window.get=function(d){if(c.isIE&&window!==document.parentWindow){d.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=d._parentWindow;d._parentWindow=null;return a}return d.parentWindow||d.defaultView};c.window.scrollIntoView=function(d,
a){try{d=c.byId(d);var e=d.ownerDocument||c.doc,f=e.body||c.body(),g=e.documentElement||f.parentNode,h=c.isIE,i=c.isWebKit;if((!(c.isMoz||h||i||c.isOpera)||d==f||d==g)&&typeof d.scrollIntoView!="undefined")d.scrollIntoView(false);else{var j=e.compatMode=="BackCompat",k=h>=9&&d.ownerDocument.parentWindow.frameElement?g.clientHeight>0&&g.clientWidth>0&&(f.clientHeight==0||f.clientWidth==0||f.clientHeight>g.clientHeight||f.clientWidth>g.clientWidth)?g:f:j?f:g;e=i?f:k;var l=k.clientWidth,m=k.clientHeight,
n=!c._isBodyLtr(),r=a||c.position(d),s=d.parentNode;a=function(I){return h<=6||h&&j?false:c.style(I,"position").toLowerCase()=="fixed"};if(!a(d))for(;s;){if(s==f)s=e;var o=c.position(s),q=a(s);if(s==e){o.w=l;o.h=m;if(e==g&&h&&n)o.x+=e.offsetWidth-o.w;if(o.x<0||!h)o.x=0;if(o.y<0||!h)o.y=0}else{var p=c._getPadBorderExtents(s);o.w-=p.w;o.h-=p.h;o.x+=p.l;o.y+=p.t;var t=s.clientWidth,v=o.w-t;if(t>0&&v>0){o.w=t;o.x+=n&&(h||s.clientLeft>p.l)?v:0}t=s.clientHeight;v=o.h-t;if(t>0&&v>0)o.h=t}if(q){if(o.y<0){o.h+=
o.y;o.y=0}if(o.x<0){o.w+=o.x;o.x=0}if(o.y+o.h>m)o.h=m-o.y;if(o.x+o.w>l)o.w=l-o.x}var w=r.x-o.x,y=r.y-Math.max(o.y,0),z=w+r.w-o.w,F=y+r.h-o.h;if(z*w>0){var G=Math[w<0?"max":"min"](w,z);if(n&&(h==8&&!j||h>=9))G=-G;r.x+=s.scrollLeft;s.scrollLeft+=G;r.x-=s.scrollLeft}if(F*y>0){r.y+=s.scrollTop;s.scrollTop+=Math[y<0?"max":"min"](y,F);r.y-=s.scrollTop}s=s!=e&&!q&&s.parentNode}}}catch(H){console.error("scrollIntoView: "+H);d.scrollIntoView(false)}};return c.window});
define("dijit/_base/manager",["dojo","dijit"],function(c,d){c.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw new 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){if(this._hash[a]){delete this._hash[a];this.length--}},forEach:function(a,e){e=e||c.global;var f=0,g;for(g in this._hash)a.call(e,this._hash[g],f++,this._hash);return this},
filter:function(a,e){e=e||c.global;var f=new d.WidgetSet,g=0,h;for(h in this._hash){var i=this._hash[h];a.call(e,i,g++,this._hash)&&f.add(i)}return f},byId:function(a){return this._hash[a]},byClass:function(a){var e=new d.WidgetSet,f,g;for(f in this._hash){g=this._hash[f];g.declaredClass==a&&e.add(g)}return e},toArray:function(){var a=[];for(var e in this._hash)a.push(this._hash[e]);return a},map:function(a,e){return c.map(this.toArray(),a,e)},every:function(a,e){e=e||c.global;var f=0,g;for(g in this._hash)if(!a.call(e,
this._hash[g],f++,this._hash))return false;return true},some:function(a,e){e=e||c.global;var f=0,g;for(g in this._hash)if(a.call(e,this._hash[g],f++,this._hash))return true;return false}});(function(){d.registry=new d.WidgetSet;var a=d.registry._hash,e=c.attr,f=c.hasAttr,g=c.style;d.byId=function(k){return typeof k=="string"?a[k]:k};var h={};d.getUniqueId=function(k){var l;do l=k+"_"+(k in h?++h[k]:(h[k]=0));while(a[l]);return d._scopeName=="dijit"?l:d._scopeName+"_"+l};d.findWidgets=function(k){function l(n){for(n=
n.firstChild;n;n=n.nextSibling)if(n.nodeType==1){var r=n.getAttribute("widgetId");if(r)(r=a[r])&&m.push(r);else l(n)}}var m=[];l(k);return m};d._destroyAll=function(){d._curFocus=null;d._prevFocus=null;d._activeStack=[];c.forEach(d.findWidgets(c.body()),function(k){if(!k._destroyed)if(k.destroyRecursive)k.destroyRecursive();else k.destroy&&k.destroy()})};c.isIE&&c.addOnWindowUnload(function(){d._destroyAll()});d.byNode=function(k){return a[k.getAttribute("widgetId")]};d.getEnclosingWidget=function(k){for(;k;){var l=
k.getAttribute&&k.getAttribute("widgetId");if(l)return a[l];k=k.parentNode}return null};var i=d._isElementShown=function(k){var l=g(k);return l.visibility!="hidden"&&l.visibility!="collapsed"&&l.display!="none"&&e(k,"type")!="hidden"};d.hasDefaultTabStop=function(k){switch(k.nodeName.toLowerCase()){case "a":return f(k,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var l;try{var m=k.contentDocument;if("designMode"in m&&m.designMode==
"on")return true;l=m.body}catch(n){try{l=k.contentWindow.document.body}catch(r){return false}}return l.contentEditable=="true"||l.firstChild&&l.firstChild.contentEditable=="true";default:return k.contentEditable=="true"}};var j=d.isTabNavigable=function(k){return e(k,"disabled")?false:f(k,"tabIndex")?e(k,"tabIndex")>=0:d.hasDefaultTabStop(k)};d._getTabNavigable=function(k){function l(w){return w&&w.tagName.toLowerCase()=="input"&&w.type&&w.type.toLowerCase()=="radio"&&w.name&&w.name.toLowerCase()}
function m(w){return t[l(w)]||w}var n,r,s,o,q,p,t={},v=function(w){c.query("> *",w).forEach(function(y){if(!(c.isIE&&y.scopeName!=="HTML"||!i(y))){if(j(y)){var z=e(y,"tabIndex");if(!f(y,"tabIndex")||z==0){n||(n=y);r=y}else if(z>0){if(!s||z<o){o=z;s=y}if(!q||z>=p){p=z;q=y}}z=l(y);if(c.attr(y,"checked")&&z)t[z]=y}y.nodeName.toUpperCase()!="SELECT"&&v(y)}})};i(k)&&v(k);return{first:m(n),last:m(r),lowest:m(s),highest:m(q)}};d.getFirstInTabbingOrder=function(k){k=d._getTabNavigable(c.byId(k));return k.lowest?
k.lowest:k.first};d.getLastInTabbingOrder=function(k){k=d._getTabNavigable(c.byId(k));return k.last?k.last:k.highest};d.defaultDuration=c.config.defaultDuration||200})();return d});
define("dojo/Stateful",["dojo"],function(c){c.declare("dojo.Stateful",null,{postscript:function(d){d&&c.mixin(this,d)},get:function(d){return this[d]},set:function(d,a){if(typeof d==="object"){for(var e in d)this.set(e,d[e]);return this}e=this[d];this[d]=a;this._watchCallbacks&&this._watchCallbacks(d,e,a);return this},watch:function(d,a){var e=this._watchCallbacks;if(!e){var f=this;e=this._watchCallbacks=function(h,i,j,k){var l=function(m){if(m){m=m.slice();for(var n=0,r=m.length;n<r;n++)try{m[n].call(f,
h,i,j)}catch(s){console.error(s)}}};l(e["_"+h]);k||l(e["*"])}}if(!a&&typeof d==="function"){a=d;d="*"}else d="_"+d;var g=e[d];if(typeof g!=="object")g=e[d]=[];g.push(a);return{unwatch:function(){g.splice(c.indexOf(g,a),1)}}}});return c.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(c,d){(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,e){this.create(a,e)},create:function(a,e){this.srcNodeRef=
c.byId(e);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=d.getUniqueId(this.declaredClass.replace(/\./g,"_"));d.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();(a=this.srcNodeRef)&&a.parentNode&&this.domNode!==a&&a.parentNode.replaceChild(this.domNode,a)}this.domNode&&this.domNode.setAttribute("widgetId",this.id);
this.postCreate();this.srcNodeRef&&!this.srcNodeRef.parentNode&&delete this.srcNodeRef;this._created=true},_applyAttributes:function(){var a=function(f,g){if(g.params&&f in g.params||g[f])g.set(f,g[f])};for(var e in this.attributeMap)a(e,this);c.forEach(this._getSetterAttributes(),function(f){f in this.attributeMap||a(f,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var e=a._setterAttrs=[],f,g=a.prototype;for(var h in g)if(c.isFunction(g[h])&&(f=h.match(/^_set([a-zA-Z]*)Attr$/))&&
f[1])e.push(f[1].charAt(0).toLowerCase()+f[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(e){return e+"Rtl"})));c.addClass(this.domNode,a)}},postCreate:function(){},startup:function(){this._started=true},destroyRecursive:function(a){this._beingDestroyed=true;this.destroyDescendants(a);this.destroy(a)},
destroy:function(a){this._beingDestroyed=true;this.uninitialize();var e=c.forEach,f=c.unsubscribe;e(this._connects,function(g){e(g,c.disconnect)});e(this._subscribes,function(g){f(g)});e(this._supportingWidgets||[],function(g){if(g.destroyRecursive)g.destroyRecursive();else g.destroy&&g.destroy()});this.destroyRendering(a);d.registry.remove(this.id);this._destroyed=true},destroyRendering:function(a){if(this.bgIframe){this.bgIframe.destroy(a);delete this.bgIframe}if(this.domNode){a?c.removeAttr(this.domNode,
"widgetId"):c.destroy(this.domNode);delete this.domNode}if(this.srcNodeRef){a||c.destroy(this.srcNodeRef);delete this.srcNodeRef}},destroyDescendants:function(a){c.forEach(this.getChildren(),function(e){e.destroyRecursive&&e.destroyRecursive(a)})},uninitialize:function(){return false},_setClassAttr:function(a){c.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var e=this[this.attributeMap.style||"domNode"];if(c.isObject(a))c.style(e,
a);else if(e.style.cssText)e.style.cssText+="; "+a;else e.style.cssText=a;this._set("style",a)},_attrToDom:function(a,e){var f=this.attributeMap[a];c.forEach(c.isArray(f)?f:[f],function(g){var h=this[g.node||g||"domNode"];switch(g.type||"attribute"){case "attribute":if(c.isFunction(e))e=c.hitch(this,e);g=g.attribute?g.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;c.attr(h,g,e);break;case "innerText":h.innerHTML="";h.appendChild(c.doc.createTextNode(e));break;case "innerHTML":h.innerHTML=
e;break;case "class":c.replaceClass(h,e,this[a]);break}},this)},get:function(a){var e=this._getAttrNames(a);return this[e.g]?this[e.g]():this[a]},set:function(a,e){if(typeof a==="object"){for(var f in a)this.set(f,a[f]);return this}f=this._getAttrNames(a);if(this[f.s])var g=this[f.s].apply(this,Array.prototype.slice.call(arguments,1));else{a in this.attributeMap&&this._attrToDom(a,e);this._set(a,e)}return g||this},_attrPairNames:{},_getAttrNames:function(a){var e=this._attrPairNames;if(e[a])return e[a];
var f=a.charAt(0).toUpperCase()+a.substr(1);return e[a]={n:a+"Node",s:"_set"+f+"Attr",g:"_get"+f+"Attr"}},_set:function(a,e){var f=this[a];this[a]=e;this._watchCallbacks&&this._created&&e!==f&&this._watchCallbacks(a,f,e)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?c.query("[widgetId]",this.containerNode).map(d.byNode):[]},getChildren:function(){return this.containerNode?d.findWidgets(this.containerNode):
[]},connect:function(a,e,f){a=[c._connect(a,e,this,f)];this._connects.push(a);return a},disconnect:function(a){for(var e=0;e<this._connects.length;e++)if(this._connects[e]==a){c.forEach(a,c.disconnect);this._connects.splice(e,1);return}},subscribe:function(a,e){a=c.subscribe(a,this,e);this._subscribes.push(a);return a},unsubscribe:function(a){for(var e=0;e<this._subscribes.length;e++)if(this._subscribes[e]==a){c.unsubscribe(a);this._subscribes.splice(e,1);return}},isLeftToRight:function(){return this.dir?
this.dir=="ltr":c._isBodyLtr()},placeAt:function(a,e){a.declaredClass&&a.addChild?a.addChild(this,e):c.place(this.domNode,a,e);return this}})})();return d._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(c,d){c.mixin(d,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return d.getBookmark().isCollapsed},getBookmark:function(){var a,e,f=c.doc.selection,g=d._curFocus;if(c.global.getSelection){if(f=c.global.getSelection())if(f.isCollapsed){if(a=g?g.tagName:""){a=a.toLowerCase();if(a=="textarea"||a=="input"&&(!g.type||g.type.toLowerCase()=="text")){f={start:g.selectionStart,end:g.selectionEnd,node:g,pRange:true};
return{isCollapsed:f.end<=f.start,mark:f}}}a={isCollapsed:true};if(f.rangeCount)a.mark=f.getRangeAt(0).cloneRange()}else{e=f.getRangeAt(0);a={isCollapsed:false,mark:e.cloneRange()}}}else if(f){a=g?g.tagName:"";a=a.toLowerCase();if(g&&a&&(a=="button"||a=="textarea"||a=="input"))if(f.type&&f.type.toLowerCase()=="none")return{isCollapsed:true,mark:null};else{e=f.createRange();return{isCollapsed:e.text&&e.text.length?false:true,mark:{range:e,pRange:true}}}a={};try{e=f.createRange();a.isCollapsed=!(f.type==
"Text"?e.htmlText.length:e.length)}catch(h){a.isCollapsed=true;return a}if(f.type.toUpperCase()=="CONTROL")if(e.length){a.mark=[];f=0;for(g=e.length;f<g;)a.mark.push(e.item(f++))}else{a.isCollapsed=true;a.mark=null}else a.mark=e.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var e=c.doc;if(a=a.mark)if(c.global.getSelection){var f=c.global.getSelection();if(f&&f.removeAllRanges)if(a.pRange){f=a.node;f.selectionStart=
a.start;f.selectionEnd=a.end}else{f.removeAllRanges();f.addRange(a)}else console.warn("No idea how to restore selection for this browser!")}else if(e.selection&&a){var g;if(a.pRange)g=a.range;else if(c.isArray(a)){g=e.body.createControlRange();c.forEach(a,function(h){g.addElement(h)})}else{g=e.body.createTextRange();g.moveToBookmark(a)}g.select()}},getFocus:function(a,e){a=!d._curFocus||a&&c.isDescendant(d._curFocus,a.domNode)?d._prevFocus:d._curFocus;return{node:a,bookmark:a==d._curFocus&&c.withGlobal(e||
c.global,d.getBookmark),openedForWindow:e}},focus:function(a){if(a){var e="node"in a?a.node:a,f=a.bookmark;a=a.openedForWindow;var g=f?f.isCollapsed:false;if(e){var h=e.tagName.toLowerCase()=="iframe"?e.contentWindow:e;if(h&&h.focus)try{h.focus()}catch(i){}d._onFocusNode(e)}if(f&&c.withGlobal(a||c.global,d.isCollapsed)&&!g){a&&a.focus();try{c.withGlobal(a||c.global,d.moveToBookmark,null,[f])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return d.registerWin(a.contentWindow,a)},unregisterIframe:function(a){d.unregisterWin(a)},
registerWin:function(a,e){var f=function(l){d._justMouseDowned=true;setTimeout(function(){d._justMouseDowned=false},0);c.isIE&&l&&l.srcElement&&l.srcElement.parentNode==null||d._onTouchNode(e||l.target||l.srcElement,"mouse")},g=c.isIE?a.document.documentElement:a.document;if(g)if(c.isIE){a.document.body.attachEvent("onmousedown",f);var h=function(l){l.srcElement.tagName.toLowerCase()!="#document"&&d.isTabNavigable(l.srcElement)?d._onFocusNode(e||l.srcElement):d._onTouchNode(e||l.srcElement)};g.attachEvent("onactivate",
h);var i=function(l){d._onBlurNode(e||l.srcElement)};g.attachEvent("ondeactivate",i);return function(){a.document.detachEvent("onmousedown",f);g.detachEvent("onactivate",h);g.detachEvent("ondeactivate",i);g=null}}else{g.body.addEventListener("mousedown",f,true);var j=function(l){d._onFocusNode(e||l.target)};g.addEventListener("focus",j,true);var k=function(l){d._onBlurNode(e||l.target)};g.addEventListener("blur",k,true);return function(){g.body.removeEventListener("mousedown",f,true);g.removeEventListener("focus",
j,true);g.removeEventListener("blur",k,true);g=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){d._prevFocus=d._curFocus;d._curFocus=null;if(!d._justMouseDowned){d._clearActiveWidgetsTimer&&clearTimeout(d._clearActiveWidgetsTimer);d._clearActiveWidgetsTimer=setTimeout(function(){delete d._clearActiveWidgetsTimer;d._setStack([]);d._prevFocus=null},100)}},_onTouchNode:function(a,e){if(d._clearActiveWidgetsTimer){clearTimeout(d._clearActiveWidgetsTimer);delete d._clearActiveWidgetsTimer}var f=
[];try{for(;a;){var g=c.attr(a,"dijitPopupParent");if(g)a=d.byId(g).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===c.body())break;a=c.window.get(a.ownerDocument).frameElement}else{var h=a.getAttribute&&a.getAttribute("widgetId"),i=h&&d.byId(h);i&&!(e=="mouse"&&i.get("disabled"))&&f.unshift(h);a=a.parentNode}}}catch(j){}d._setStack(f,e)},_onFocusNode:function(a){if(a)if(a.nodeType!=9){d._onTouchNode(a);if(a!=d._curFocus){if(d._curFocus)d._prevFocus=d._curFocus;d._curFocus=a;c.publish("focusNode",
[a])}}},_setStack:function(a,e){var f=d._activeStack;d._activeStack=a;for(var g=0;g<Math.min(f.length,a.length);g++)if(f[g]!=a[g])break;for(var h,i=f.length-1;i>=g;i--)if(h=d.byId(f[i])){h._focused=false;h.set("focused",false);h._hasBeenBlurred=true;h._onBlur&&h._onBlur(e);c.publish("widgetBlur",[h,e])}for(i=g;i<a.length;i++)if(h=d.byId(a[i])){h._focused=true;h.set("focused",true);h._onFocus&&h._onFocus(e);c.publish("widgetFocus",[h,e])}}});c.addOnLoad(function(){var a=d.registerWin(window);c.isIE&&
c.addOnWindowUnload(function(){d.unregisterWin(a);a=null})});return d});
define("dojo/AdapterRegistry",["dojo"],function(c){c.AdapterRegistry=function(d){this.pairs=[];this.returnWrappers=d||false};c.extend(c.AdapterRegistry,{register:function(d,a,e,f,g){this.pairs[g?"unshift":"push"]([d,a,e,f])},match:function(){for(var d=0;d<this.pairs.length;d++){var a=this.pairs[d];if(a[1].apply(this,arguments))return a[3]||this.returnWrappers?a[2]:a[2].apply(this,arguments)}throw new Error("No match found");},unregister:function(d){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
d){this.pairs.splice(a,1);return true}return false}});return c.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(c,d){d.getViewport=function(){return c.window.getBox()};d.placeOnScreen=function(a,e,f,g){f=c.map(f,function(h){var i={corner:h,pos:{x:e.x,y:e.y}};if(g){i.pos.x+=h.charAt(1)=="L"?g.x:-g.x;i.pos.y+=h.charAt(0)=="T"?g.y:-g.y}return i});return d._place(a,f)};d._place=function(a,e,f,g){var h=c.window.getBox();if(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")c.body().appendChild(a);var i=null;
c.some(e,function(k){var l=k.corner,m=k.pos,n=0,r={w:l.charAt(1)=="L"?h.l+h.w-m.x:m.x-h.l,h:l.charAt(1)=="T"?h.t+h.h-m.y:m.y-h.t};if(f){n=f(a,k.aroundCorner,l,r,g);n=typeof n=="undefined"?0:n}var s=a.style,o=s.display,q=s.visibility;s.visibility="hidden";s.display="";var p=c.marginBox(a);s.display=o;s.visibility=q;s=Math.max(h.l,l.charAt(1)=="L"?m.x:m.x-p.w);o=Math.max(h.t,l.charAt(0)=="T"?m.y:m.y-p.h);q=Math.min(h.l+h.w,l.charAt(1)=="L"?s+p.w:m.x);m=Math.min(h.t+h.h,l.charAt(0)=="T"?o+p.h:m.y);q=
q-s;m=m-o;n+=p.w-q+(p.h-m);if(i==null||n<i.overflow)i={corner:l,aroundCorner:k.aroundCorner,x:s,y:o,w:q,h:m,overflow:n,spaceAvailable:r};return!n});i.overflow&&f&&f(a,i.aroundCorner,i.corner,i.spaceAvailable,g);e=c._isBodyLtr();var j=a.style;j.top=i.y+"px";j[e?"left":"right"]=(e?i.x:h.w-i.x-i.w)+"px";return i};d.placeOnScreenAroundNode=function(a,e,f,g){e=c.byId(e);e=c.position(e,true);return d._placeOnScreenAroundRect(a,e.x,e.y,e.w,e.h,f,g)};d.placeOnScreenAroundRectangle=function(a,e,f,g){return d._placeOnScreenAroundRect(a,
e.x,e.y,e.width,e.height,f,g)};d._placeOnScreenAroundRect=function(a,e,f,g,h,i,j){var k=[];for(var l in i)k.push({aroundCorner:l,corner:i[l],pos:{x:e+(l.charAt(1)=="L"?0:g),y:f+(l.charAt(0)=="T"?0:h)}});return d._place(a,k,j,{w:g,h:h})};d.placementRegistry=new c.AdapterRegistry;d.placementRegistry.register("node",function(a,e){return typeof e=="object"&&typeof e.offsetWidth!="undefined"&&typeof e.offsetHeight!="undefined"},d.placeOnScreenAroundNode);d.placementRegistry.register("rect",function(a,
e){return typeof e=="object"&&"x"in e&&"y"in e&&"width"in e&&"height"in e},d.placeOnScreenAroundRectangle);d.placeOnScreenAroundElement=function(){return d.placementRegistry.match.apply(d.placementRegistry,arguments)};d.getPopupAroundAlignment=function(a,e){var f={};c.forEach(a,function(g){switch(g){case "after":f[e?"BR":"BL"]=e?"BL":"BR";break;case "before":f[e?"BL":"BR"]=e?"BR":"BL";break;case "below-alt":e=!e;case "below":f[e?"BL":"BR"]=e?"TL":"TR";f[e?"BR":"BL"]=e?"TR":"TL";break;case "above-alt":e=
!e;case "above":default:f[e?"TL":"TR"]=e?"BL":"BR";f[e?"TR":"TL"]=e?"BR":"BL";break}});return f};return d});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(c,d){d.getDocumentWindow=function(a){return c.window.get(a)};return d});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(c,d){d.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var e=a.declaredClass?a._popupWrapper:a.parentNode&&c.hasClass(a.parentNode,"dijitPopup"),f=a.domNode||a;if(!e){e=c.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},c.body());e.appendChild(f);f=f.style;f.display="";f.visibility="";f.position="";f.top="0px";if(a.declaredClass){a._popupWrapper=
e;c.connect(a,"destroy",function(){c.destroy(e);delete a._popupWrapper})}}return e},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,e=a.length-1;e>0&&a[e].parent===a[e-1].widget;e--);return a[e]},open:function(a){for(var e=this._stack,f=a.popup,g=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"}),h=a.around,i=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;e.length&&(!a.parent||!c.isDescendant(a.parent.domNode,e[e.length-1].widget.domNode));)d.popup.close(e[e.length-1].widget);var j=this._createWrapper(f);c.attr(j,{id:i,style:{zIndex:this._beginZIndex+e.length},"class":"dijitPopup "+(f.baseClass||f["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if(c.isIE||c.isMoz)if(!f.bgIframe)f.bgIframe=
new d.BackgroundIframe(j);g=h?d.placeOnScreenAroundElement(j,h,g,f.orient?c.hitch(f,"orient"):null):d.placeOnScreen(j,a,g=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);j.style.display="";j.style.visibility="visible";f.domNode.style.visibility="visible";h=[];h.push(c.connect(j,"onkeypress",this,function(k){if(k.charOrCode==c.keys.ESCAPE&&a.onCancel){c.stopEvent(k);a.onCancel()}else if(k.charOrCode===c.keys.TAB){c.stopEvent(k);(k=this.getTopPopup())&&k.onCancel&&k.onCancel()}}));f.onCancel&&
h.push(c.connect(f,"onCancel",a.onCancel));h.push(c.connect(f,f.onExecute?"onExecute":"onChange",this,function(){var k=this.getTopPopup();k&&k.onExecute&&k.onExecute()}));e.push({widget:f,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:h});f.onOpen&&f.onOpen(g);return g},close:function(a){for(var e=this._stack;a&&c.some(e,function(i){return i.widget==a})||!a&&e.length;){var f=e.pop(),g=f.widget,h=f.onClose;g.onClose&&g.onClose();c.forEach(f.handlers,c.disconnect);
g&&g.domNode&&this.hide(g);h&&h()}}};d._frames=new (function(){var a=[];this.pop=function(){var e;if(a.length){e=a.pop();e.style.display=""}else{if(c.isIE<9){e="<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\");'>";e=c.doc.createElement(e)}else{e=c.create("iframe");e.src='javascript:""';e.className="dijitBackgroundIframe";c.style(e,"opacity",0.1)}e.tabIndex=
-1;d.setWaiRole(e,"presentation")}return e};this.push=function(e){e.style.display="none";a.push(e)}});d.BackgroundIframe=function(a){if(!a.id)throw new Error("no id");if(c.isIE||c.isMoz){var e=this.iframe=d._frames.pop();a.appendChild(e);if(c.isIE<7||c.isQuirks){this.resize(a);this._conn=c.connect(a,"onresize",this,function(){this.resize(a)})}else c.style(e,{width:"100%",height:"100%"})}};c.extend(d.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}if(this.iframe){d._frames.push(this.iframe);delete this.iframe}}});return d.popup});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(c,d){d.scrollIntoView=function(a,e){c.window.scrollIntoView(a,e)};return d.scrollIntoView});
define("dojo/uacss",["dojo"],function(c){(function(){var d=c.doc.documentElement,a=c.isIE,e=c.isOpera,f=Math.floor,g=c.isFF,h=c.boxModel.replace(/-/,"");a={dj_ie:a,dj_ie6:f(a)==6,dj_ie7:f(a)==7,dj_ie8:f(a)==8,dj_ie9:f(a)==9,dj_quirks:c.isQuirks,dj_iequirks:a&&c.isQuirks,dj_opera:e,dj_khtml:c.isKhtml,dj_webkit:c.isWebKit,dj_safari:c.isSafari,dj_chrome:c.isChrome,dj_gecko:c.isMozilla,dj_ff3:f(g)==3};a["dj_"+h]=true;var i="";for(var j in a)if(a[j])i+=j+" ";d.className=c.trim(d.className+" "+i);c._loaders.unshift(function(){if(!c._isBodyLtr()){var k=
"dj_rtl dijitRtl "+i.replace(/ /g,"-rtl ");d.className=c.trim(d.className+" "+k)}})})();return c});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(c,d){return d});
define("dijit/_base/typematic",["dojo","dijit"],function(c,d){d.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,e,f,g,h,i,j,k){if(h!=this._obj){this.stop();
this._initialDelay=j||500;this._subsequentDelay=i||0.9;this._minDelay=k||10;this._obj=h;this._evt=a;this._node=f;this._count=this._currentTimeout=-1;this._callback=c.hitch(e,g);this._fireEventAndReload();this._evt=c.mixin({faux:true},a)}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null}},addKeyListener:function(a,e,f,g,h,i,j){if(e.keyCode){e.charOrCode=e.keyCode;c.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0")}else if(e.charCode){e.charOrCode=String.fromCharCode(e.charCode);c.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}return[c.connect(a,"onkeypress",this,function(k){if(k.charOrCode==e.charOrCode&&(e.ctrlKey===undefined||e.ctrlKey==k.ctrlKey)&&(e.altKey===undefined||e.altKey==k.altKey)&&(e.metaKey===undefined||e.metaKey==(k.metaKey||false))&&(e.shiftKey===undefined||e.shiftKey==k.shiftKey)){c.stopEvent(k);d.typematic.trigger(k,
f,a,g,e,h,i,j)}else d.typematic._obj==e&&d.typematic.stop()}),c.connect(a,"onkeyup",this,function(){d.typematic._obj==e&&d.typematic.stop()})]},addMouseListener:function(a,e,f,g,h,i){var j=c.connect;return[j(a,"mousedown",this,function(k){c.stopEvent(k);d.typematic.trigger(k,e,a,f,a,g,h,i)}),j(a,"mouseup",this,function(k){c.stopEvent(k);d.typematic.stop()}),j(a,"mouseout",this,function(k){c.stopEvent(k);d.typematic.stop()}),j(a,"mousemove",this,function(k){k.preventDefault()}),j(a,"dblclick",this,
function(k){c.stopEvent(k);if(c.isIE){d.typematic.trigger(k,e,a,f,a,g,h,i);setTimeout(c.hitch(this,d.typematic.stop),50)}})]},addListener:function(a,e,f,g,h,i,j,k){return this.addKeyListener(e,f,g,h,i,j,k).concat(this.addMouseListener(a,g,h,i,j,k))}};return d.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(c,d){d.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()),e=c.getComputedStyle(a);if(e){var f=e.backgroundImage;c[e.borderTopColor==e.borderRightColor||f!=null&&(f=="none"||f=="url(invalid-url:)")?"addClass":"removeClass"](c.body(),
"dijit_a11y");if(c.isIE)a.outerHTML="";else c.body().removeChild(a)}}};if(c.isIE||c.isMoz)c._loaders.unshift(d.wai.onload);c.mixin(d,{hasWaiRole:function(a,e){a=this.getWaiRole(a);return e?a.indexOf(e)>-1:a.length>0},getWaiRole:function(a){return c.trim((c.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,e){c.attr(a,"role",e)},removeWaiRole:function(a,e){var f=c.attr(a,"role");if(f)if(e){e=c.trim((" "+f+" ").replace(" "+e+" "," "));c.attr(a,"role",e)}else a.removeAttribute("role")},
hasWaiState:function(a,e){return a.hasAttribute?a.hasAttribute("aria-"+e):!!a.getAttribute("aria-"+e)},getWaiState:function(a,e){return a.getAttribute("aria-"+e)||""},setWaiState:function(a,e,f){a.setAttribute("aria-"+e,f)},removeWaiState:function(a,e){a.removeAttribute("aria-"+e)}});return d});
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"],function(c,d){return d._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(c,d){c.connect(c,"_connect",function(a,e){a&&c.isFunction(a._onConnect)&&a._onConnect(e)});d._connectOnUseEventHandler=function(){};d._lastKeyDownNode=null;c.isIE?function(){var a=function(e){d._lastKeyDownNode=e.srcElement};c.doc.attachEvent("onkeydown",a);c.addOnWindowUnload(function(){c.doc.detachEvent("onkeydown",a)})}():c.doc.addEventListener("keydown",function(a){d._lastKeyDownNode=a.target},true);(function(){c.declare("dijit._Widget",
d._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:d._connectOnUseEventHandler,onDblClick:d._connectOnUseEventHandler,onKeyDown:d._connectOnUseEventHandler,onKeyPress:d._connectOnUseEventHandler,onKeyUp:d._connectOnUseEventHandler,onMouseDown:d._connectOnUseEventHandler,onMouseMove:d._connectOnUseEventHandler,onMouseOut:d._connectOnUseEventHandler,
onMouseOver:d._connectOnUseEventHandler,onMouseLeave:d._connectOnUseEventHandler,onMouseEnter:d._connectOnUseEventHandler,onMouseUp:d._connectOnUseEventHandler,create:function(){this._deferredConnects=c.clone(this._deferredConnects);for(var a in this.attributeMap)delete this._deferredConnects[a];for(a in this._deferredConnects)this[a]!==d._connectOnUseEventHandler&&delete this._deferredConnects[a];this.inherited(arguments);if(this.domNode)for(a in this.params)this._onConnect(a)},_onConnect:function(a){if(a in
this._deferredConnects){this.connect(this[this._deferredConnects[a]||"domNode"],a.toLowerCase(),a);delete this._deferredConnects[a]}},focused:false,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,e){c.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,e)},attr:function(a){if(c.config.isDebug){var e=
arguments.callee._ach||(arguments.callee._ach={}),f=(arguments.callee.caller||"unknown caller").toString();if(!e[f]){c.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+f,"","2.0");e[f]=true}}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,e,f){var g=c._connect,h=this.inherited(arguments,[a,e=="ondijitclick"?"onclick":e,f]);if(e=="ondijitclick")if(c.indexOf(this.nodesWithKeyClick,
a.nodeName.toLowerCase())==-1){var i=c.hitch(this,f);h.push(g(a,"onkeydown",this,function(j){if((j.keyCode==c.keys.ENTER||j.keyCode==c.keys.SPACE)&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){d._lastKeyDownNode=j.target;"openDropDown"in this&&a==this._buttonNode||j.preventDefault()}}),g(a,"onkeyup",this,function(j){if((j.keyCode==c.keys.ENTER||j.keyCode==c.keys.SPACE)&&j.target==d._lastKeyDownNode&&!j.ctrlKey&&!j.shiftKey&&!j.altKey&&!j.metaKey){d._lastKeyDownNode=null;return i(j)}}))}return h},
_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return true}})})();return d._Widget});
define("dojo/string",["dojo"],function(c){c.getObject("string",true,c);c.string.rep=function(d,a){if(a<=0||!d)return"";for(var e=[];;){a&1&&e.push(d);if(!(a>>=1))break;d+=d}return e.join("")};c.string.pad=function(d,a,e,f){e||(e="0");d=String(d);a=c.string.rep(e,Math.ceil((a-d.length)/e.length));return f?d+a:a+d};c.string.substitute=function(d,a,e,f){f=f||c.global;e=e?c.hitch(f,e):function(g){return g};return d.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(g,h,i){g=c.getObject(h,false,
a);if(i)g=c.getObject(i,false,f).call(f,g,h);return e(g,h).toString()})};c.string.trim=String.prototype.trim?c.trim:function(d){d=d.replace(/^\s+/,"");for(var a=d.length-1;a>=0;a--)if(/\S/.test(d.charAt(a))){d=d.substring(0,a+1);break}return d};return c.string});
define("dojo/date/stamp",["dojo"],function(c){c.getObject("date.stamp",true,c);c.date.stamp.fromISOString=function(d,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 e=c.date.stamp._isoRegExp.exec(d);d=null;if(e){e.shift();e[1]&&e[1]--;if(e[6])e[6]*=1E3;if(a){a=new Date(a);c.forEach(c.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(h){return a["get"+
h]()}),function(h,i){e[i]=e[i]||h})}d=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);if(e[0]<100)d.setFullYear(e[0]||1970);var f=0,g=e[7]&&e[7].charAt(0);if(g!="Z"){f=(e[8]||0)*60+(Number(e[9])||0);if(g!="-")f*=-1}if(g)f-=d.getTimezoneOffset();f&&d.setTime(d.getTime()+f*6E4)}return d};c.date.stamp.toISOString=function(d,a){var e=function(i){return i<10?"0"+i:i};a=a||{};var f=[],g=a.zulu?"getUTC":"get",h="";if(a.selector!="time"){h=d[g+"FullYear"]();h=["0000".substr((h+"").length)+
h,e(d[g+"Month"]()+1),e(d[g+"Date"]())].join("-")}f.push(h);if(a.selector!="date"){h=[e(d[g+"Hours"]()),e(d[g+"Minutes"]()),e(d[g+"Seconds"]())].join(":");g=d[g+"Milliseconds"]();if(a.milliseconds)h+="."+(g<100?"0":"")+e(g);if(a.zulu)h+="Z";else if(a.selector!="time"){d=d.getTimezoneOffset();a=Math.abs(d);h+=(d>0?"-":"+")+e(Math.floor(a/60))+":"+e(a%60)}f.push(h)}return f.join("T")};return c.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(c){c.parser=new (function(){function d(j){if(g.isString(j))return"string";if(typeof j=="number")return"number";if(typeof j=="boolean")return"boolean";if(g.isFunction(j))return"function";if(g.isArray(j))return"array";if(j instanceof Date)return"date";if(j instanceof g._Url)return"url";return"object"}function a(j,k){switch(k){case "string":return j;case "number":return j.length?Number(j):NaN;case "boolean":return typeof j=="boolean"?j:j.toLowerCase()!=
"false";case "function":if(g.isFunction(j)){j=j.toString();j=g.trim(j.substring(j.indexOf("{")+1,j.length-1))}try{return j===""||j.search(/[^\w\.]+/i)!=-1?new Function(j):g.getObject(j,false)||new Function(j)}catch(l){return new Function}case "array":return j?j.split(/\s*,\s*/):[];case "date":switch(j){case "":return new Date("");case "now":return new Date;default:return g.date.stamp.fromISOString(j)}case "url":return g.baseUrl+j;default:return g.fromJson(j)}}function e(j,k){for(var l in j)if(l.charAt(0)!=
"_")l in h||(k[l]=d(j[l]));return k}function f(j,k){var l=i[j];if(l){if(!k&&!l.params)l.params=e(l.cls.prototype,{})}else{j=g.getObject(j);l=null;if(!j)return null;k||(l=e(j.prototype,{}));l={cls:j,params:l}}return l}var g=c,h={},i={};g.connect(g,"extend",function(){i={}});this._functionFromScript=function(j,k){var l="",m="";(k=j.getAttribute(k+"args")||j.getAttribute("args"))&&g.forEach(k.split(/\s*,\s*/),function(n,r){l+="var "+n+" = arguments["+r+"]; "});(k=j.getAttribute("with"))&&k.length&&g.forEach(k.split(/\s*,\s*/),
function(n){l+="with("+n+"){";m+="}"});return new Function(l+j.innerHTML+m)};this.instantiate=function(j,k,l){var m=[];k=k||{};l=l||{};var n=(l.scope||g._scopeName)+"Type",r="data-"+(l.scope||g._scopeName)+"-";g.forEach(j,function(s){if(s){var o,q,p,t,v,w;if(s.node){o=s.node;q=s.type;w=s.fastpath;t=(p=s.clsInfo||q&&f(q,w))&&p.cls;v=s.scripts}else{o=s;v=(t=(p=(q=n in k?k[n]:o.getAttribute(n))&&f(q))&&p.cls)&&(t._noScript||t.prototype._noScript)?[]:g.query("> script[type^='dojo/']",o)}if(!p)throw new Error("Could not load class '"+
q);var y={};l.defaults&&g._mixin(y,l.defaults);s.inherited&&g._mixin(y,s.inherited);if(w){if((p=o.getAttribute(r+"props"))&&p.length)try{p=g.fromJson.call(l.propsThis,"{"+p+"}");g._mixin(y,p)}catch(z){throw new Error(z.toString()+" in data-dojo-props='"+p+"'");}if(p=o.getAttribute(r+"attach-point"))y.dojoAttachPoint=p;if(p=o.getAttribute(r+"attach-event"))y.dojoAttachEvent=p;c.mixin(y,k)}else{s=o.attributes;for(var F in p.params){q=F in k?{value:k[F],specified:true}:s.getNamedItem(F);if(!(!q||!q.specified&&
(!c.isIE||F.toLowerCase()!="value"))){q=q.value;switch(F){case "class":q="className"in k?k.className:o.className;break;case "style":q="style"in k?k.style:o.style&&o.style.cssText}var G=p.params[F];y[F]=typeof q=="string"?a(q,G):q}}}var H=[],I=[];g.forEach(v,function(E){o.removeChild(E);var J=E.getAttribute(r+"event")||E.getAttribute("event"),M=E.getAttribute("type");E=g.parser._functionFromScript(E,r);if(J)if(M=="dojo/connect")H.push({event:J,func:E});else y[J]=E;else I.push(E)});var D=(v=t.markupFactory||
t.prototype&&t.prototype.markupFactory)?v(y,o,t):new t(y,o);m.push(D);(t=o.getAttribute(r+"id")||o.getAttribute("jsId"))&&g.setObject(t,D);g.forEach(H,function(E){g.connect(D,E.event,null,E.func)});g.forEach(I,function(E){E.call(D)})}});k._started||g.forEach(m,function(s){if(!l.noStart&&s&&c.isFunction(s.startup)&&!s._started&&(!s.getParent||!s.getParent()))s.startup()});return m};this.parse=function(j,k){function l(o,q){var p=c.clone(o.inherited);c.forEach(["dir","lang"],function(F){var G=o.node.getAttribute(F);
if(G)p[F]=G});for(var t=o.clsInfo&&!o.clsInfo.cls.prototype._noScript?o.scripts:null,v=!o.clsInfo||!o.clsInfo.cls.prototype.stopParser||k&&k.template,w=o.node.firstChild;w;w=w.nextSibling)if(w.nodeType==1){var y,z=v&&w.getAttribute(n+"type");y=z?z:v&&w.getAttribute(m);z=z==y;if(y){y={type:y,fastpath:z,clsInfo:f(y,z),node:w,scripts:[],inherited:p};q.push(y);l(y,q)}else if(t&&w.nodeName.toLowerCase()=="script")(y=w.getAttribute("type"))&&/^dojo\/\w/i.test(y)&&t.push(w);else v&&l({node:w,inherited:p},
q)}}if(!k&&j&&j.rootNode){k=j;j=k.rootNode}else j=j;j=j?c.byId(j):c.body();k=k||{};var m=(k.scope||g._scopeName)+"Type",n="data-"+(k.scope||g._scopeName)+"-",r={};if(k&&k.inherited)for(var s in k.inherited)if(k.inherited[s])r[s]=k.inherited[s];s=[];l({node:j,inherited:r},s);return this.instantiate(s,k&&k.template?{template:true}:null,k)}});(function(){var d=function(){c.config.parseOnLoad&&c.parser.parse()};c.getObject("dijit.wai.onload")===c._loaders[0]?c._loaders.splice(1,0,d):c._loaders.unshift(d)})();
return c.parser});
define("dojo/cache",["dojo"],function(c){var d={};c.cache=function(a,e,f){if(typeof a=="string")var g=c.moduleUrl(a,e);else{g=a;f=e}g=g.toString();var h=f;if(f!=undefined&&!c.isString(f))h="value"in f?f.value:undefined;f=f&&f.sanitize?true:false;if(typeof h=="string")h=d[g]=f?c.cache._sanitize(h):h;else if(h===null)delete d[g];else{if(!(g in d)){h=undefined;if(c.isFunction(require)&&c.isString(a))try{var i=(a?a.replace(/\./g,"/")+"/":"")+e;h=require("text!"+i)}catch(j){}if(typeof h==="undefined")h=
c._getText(g);d[g]=f?c.cache._sanitize(h):h}h=d[g]}return h};c.cache._sanitize=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var e=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(e)a=e[1]}else a="";return a};return c.cache});
define("dijit/_Templated",["dojo","dijit","dijit/_Widget","dojo/string","dojo/parser","dojo/cache"],function(c,d){c.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var e=this.declaredClass,f=this;return c.string.substitute(a,this,function(g,h){if(h.charAt(0)=="!")g=c.getObject(h.substr(1),false,f);if(typeof g==
"undefined")throw new Error(e+" template:"+h);if(g==null)return"";return h.charAt(0)=="!"?g:g.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=d._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),e;if(c.isString(a)){e=c._toDom(this._stringRepl(a));if(e.nodeType!=1)throw new Error("Invalid template: "+a);}else e=a.cloneNode(true);this.domNode=e;this.inherited(arguments);this._attachTemplateNodes(e);if(this.widgetsInTemplate){a=this._startupWidgets=
c.parser.parse(e,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"});this._supportingWidgets=d.findWidgets(e);this._attachTemplateNodes(a,function(f,g){return f[g]})}this._fillContent(this.srcNodeRef)},_fillContent:function(a){var e=this.containerNode;if(a&&e)for(;a.hasChildNodes();)e.appendChild(a.firstChild)},_attachTemplateNodes:function(a,e){e=e||function(m,n){return m.getAttribute(n)};for(var f=c.isArray(a)?a:a.all||a.getElementsByTagName("*"),
g=c.isArray(a)?0:-1;g<f.length;g++){var h=g==-1?a:f[g];if(!(this.widgetsInTemplate&&(e(h,"dojoType")||e(h,"data-dojo-type")))){var i=e(h,"dojoAttachPoint")||e(h,"data-dojo-attach-point");if(i)for(var j=i.split(/\s*,\s*/);i=j.shift();){if(c.isArray(this[i]))this[i].push(h);else this[i]=h;this._attachPoints.push(i)}if(i=e(h,"dojoAttachEvent")||e(h,"data-dojo-attach-event")){j=i.split(/\s*,\s*/);for(var k=c.trim;i=j.shift();)if(i){var l=null;if(i.indexOf(":")!=-1){l=i.split(":");i=k(l[0]);l=k(l[1])}else i=
k(i);l||(l=i);this._attachEvents.push(this.connect(h,i,l))}}(i=e(h,"waiRole"))&&d.setWaiRole(h,i);(i=e(h,"waiState"))&&c.forEach(i.split(/\s*,\s*/),function(m){if(m.indexOf("-")!=-1){m=m.split("-");d.setWaiState(h,m[0],m[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)}});d._Templated._templateCache={};d._Templated.getCachedTemplate=function(a,e,f){var g=d._Templated._templateCache,h=e||a,i=g[h];if(i){try{if(!i.ownerDocument||i.ownerDocument==c.doc)return i}catch(j){}c.destroy(i)}e||(e=c.cache(a,{sanitize:true}));e=c.string.trim(e);if(f||e.match(/\$\{([^\}]+)\}/g))return g[h]=e;else{a=c._toDom(e);if(a.nodeType!=1)throw new Error("Invalid template: "+e);return g[h]=a}};c.isIE&&c.addOnWindowUnload(function(){var a=
d._Templated._templateCache;for(var e in a){var f=a[e];typeof f=="object"&&c.destroy(f);delete a[e]}});c.extend(d._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return d._Templated});
define("dijit/_CssStateMixin",["dojo","dijit"],function(c,d){c.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);c.forEach(["onmouseenter","onmouseleave","onmousedown"],function(e){this.connect(this.domNode,e,"_cssMouseEvent")},this);c.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(e){this.watch(e,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",true);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":this._set("active",true);this._mouseDown=true;var e=this.connect(c.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(e)});break}},_setStateClass:function(){function a(j){e=
e.concat(c.map(e,function(k){return k+j}),"dijit"+j)}var e=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");this.checked&&a("Checked");this.state&&a(this.state);this.selected&&a("Selected");if(this.disabled)a("Disabled");else if(this.readOnly)a("ReadOnly");else if(this.active)a("Active");else this.hovering&&a("Hover");this._focused&&a("Focused");var f=this.stateNode||this.domNode,g={};c.forEach(f.className.split(" "),function(j){g[j]=true});"_stateClasses"in this&&c.forEach(this._stateClasses,
function(j){delete g[j]});c.forEach(e,function(j){g[j]=true});var h=[];for(var i in g)h.push(i);f.className=h.join(" ");this._stateClasses=e},_trackMouseState:function(a,e){function f(){var l="disabled"in j&&j.disabled||"readonly"in j&&j.readonly;c.toggleClass(a,e+"Hover",g&&!h&&!l);c.toggleClass(a,e+"Active",h&&!l);c.toggleClass(a,e+"Focused",i&&!l)}var g=false,h=false,i=false,j=this,k=c.hitch(this,"connect",a);k("onmouseenter",function(){g=true;f()});k("onmouseleave",function(){h=g=false;f()});
k("onmousedown",function(){h=true;f()});k("onmouseup",function(){h=false;f()});k("onfocus",function(){i=true;f()});k("onblur",function(){i=false;f()});this.watch("disabled",f);this.watch("readOnly",f)}});return d._CssStateMixin});
define("dijit/form/_FormWidget",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin"],function(c,d){c.declare("dijit.form._FormWidget",[d._Widget,d._Templated,d._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:c.delegate(d._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);d.setWaiState(this.focusNode,"disabled",a);if(a){this._set("hovering",false);this._set("active",false);a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode";
c.forEach(c.isArray(a)?a:[a],function(e){e=this[e];c.isWebKit||d.hasDefaultTabStop(e)?e.setAttribute("tabIndex","-1"):e.removeAttribute("tabIndex")},this)}else 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(){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||d.focus(this.focusNode)},compare:function(a,e){return typeof a=="number"&&typeof e=="number"?isNaN(a)&&isNaN(e)?0:a-e:a>e?1:a<e?-1:0},onChange:function(){},_onChangeActive:false,_handleOnChange:function(a,e){if(this._lastValueReported==undefined&&(e===null||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||this.compare(a,
this._lastValueReported)!=0;if((this.intermediateChanges||e||e===undefined)&&this._pendingOnChange){this._lastValueReported=a;this._pendingOnChange=false;if(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=true},destroy:function(){if(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 e=this.connect(c.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(e)})}});c.declare("dijit.form._FormValueWidget",
d.form._FormWidget,{readOnly:false,attributeMap:c.delegate(d.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){c.attr(this.focusNode,"readOnly",a);d.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===undefined)this._lastValueReported=this._resetValue=this.value},
_setValueAttr:function(a,e){this._handleOnChange(a,e)},_handleOnChange:function(a){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,false)},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true)},_onKeyDown:function(a){if(a.keyCode==c.keys.ESCAPE&&!(a.ctrlKey||a.altKey||a.metaKey)){var e;if(c.isIE){a.preventDefault();e=document.createEventObject();e.keyCode=c.keys.ESCAPE;e.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",
e)}}},_layoutHackIE7:function(){if(c.isIE==7)for(var a=this.domNode,e=a.parentNode,f=a.firstChild||a,g=f.style.filter,h=this;e&&e.clientHeight==0;){(function(){var i=h.connect(e,"onscroll",function(){h.disconnect(i);f.style.filter=(new Date).getMilliseconds();setTimeout(function(){f.style.filter=g},0)})})();e=e.parentNode}}});return d.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(c,d){c.declare("dijit.form.TextBox",d.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,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(d.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==d.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,
e,f){var g;if(a!==undefined){g=this.filter(a);if(typeof f!="string")f=g!==null&&(typeof g!="number"||!isNaN(g))?this.filter(this.format(g,this.constraints)):""}if(f!=null&&f!=undefined&&(typeof f!="number"||!isNaN(f))&&this.textbox.value!=f){this.textbox.value=f;this._set("displayedValue",this.get("displayedValue"))}this._updatePlaceHolder();this.inherited(arguments,[g,e])},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){if(a===null||a===undefined)a="";else if(typeof a!="string")a=String(a);this.textbox.value=a;this._setValueAttr(this.get("value"),undefined);this._set("displayedValue",
this.get("displayedValue"))},format:function(a){return a==null||a==undefined?"":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 e=this;setTimeout(function(){e._handleOnChange(e.get("value"),false)},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)if(a=a.fontFamily){var e=this.domNode.getElementsByTagName("INPUT");if(e)for(var f=0;f<e.length;f++)e[f].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(c.isMoz||c.isOpera)this.connect(this.textbox,"oninput","_onInput");else{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;if(this.trim)a=c.trim(a);if(this.uppercase)a=a.toUpperCase();if(this.lowercase)a=a.toLowerCase();if(this.propercase)a=a.replace(/[^\s]+/g,function(e){return e.substring(0,1).toUpperCase()+e.substring(1)});return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),true)},_onBlur:function(){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=undefined;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 e;if(c.isIE){e=c.doc.selection.createRange();e=e.parentElement()==this.textbox&&
e.text.length==0}else e=this.textbox.selectionStart==this.textbox.selectionEnd;e&&d.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});d.selectInputText=function(a,e,f){var g=c.global,h=c.doc;a=c.byId(a);if(isNaN(e))e=0;if(isNaN(f))f=a.value?a.value.length:0;d.focus(a);if(h.selection&&c.body().createTextRange){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveStart("character",
-99999);a.moveStart("character",e);a.moveEnd("character",f-e);a.select()}}else g.getSelection&&a.setSelectionRange&&a.setSelectionRange(e,f)};return d.form.TextBox});define("text!dijit/templates/Tooltip.html",function(){return'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" dojoAttachPoint="connectorNode"></div\n></div>'});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(c,d){c.declare("dijit._MasterTooltip",[d._Widget,d._Templated],{duration:d.defaultDuration,templateString:c.cache("dijit","templates/Tooltip.html"),postCreate:function(){c.body().appendChild(this.domNode);this.bgIframe=new d.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,e,f,g){if(!(this.aroundNode&&this.aroundNode===e)){this.domNode.width="auto";if(this.fadeOut.status()=="playing")this._onDeck=arguments;else{this.containerNode.innerHTML=a;d.placeOnScreenAroundElement(this.domNode,e,d.getPopupAroundAlignment(f&&f.length?f:d.Tooltip.defaultPosition,!g),c.hitch(this,"orient"));c.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=e}}},orient:function(a,e,f,
g,h){this.connectorNode.style.top="";var i=g.w-this.connectorNode.offsetWidth;a.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[e+"-"+f];this.domNode.style.width="auto";var j=c.contentBox(this.domNode),k=Math.min(Math.max(i,1),j.w),l=k<j.w;this.domNode.style.width=k+"px";if(l){this.containerNode.style.overflow=
"auto";l=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(l>k){l=l+c.style(this.domNode,"paddingLeft")+c.style(this.domNode,"paddingRight");this.domNode.style.width=l+"px"}}if(f.charAt(0)=="B"&&e.charAt(0)=="B"){a=c.marginBox(a);e=this.connectorNode.offsetHeight;if(a.h>g.h){this.connectorNode.style.top=g.h-h.h/2-e/2+"px";this.connectorNode.style.bottom=""}else{this.connectorNode.style.bottom=Math.min(Math.max(h.h/2-e/2,0),a.h-e)+"px";this.connectorNode.style.top=""}}else{this.connectorNode.style.top=
"";this.connectorNode.style.bottom=""}return Math.max(0,j.w-i)},_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=false;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}}});d.showTooltip=function(a,e,f,g){if(!d._masterTT)d._masterTT=
new d._MasterTooltip;return d._masterTT.show(a,e,f,g)};d.hideTooltip=function(a){if(!d._masterTT)d._masterTT=new d._MasterTooltip;return d._masterTT.hide(a)};c.declare("dijit.Tooltip",d._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){c.forEach(this._connections||[],function(f){c.forEach(f,c.hitch(this,"disconnect"))},this);var e=c.isArrayLike(a)?a:a?[a]:[];this._connections=c.map(e,function(f){return(f=c.byId(f))?[this.connect(f,"onmouseenter","_onTargetMouseEnter"),
this.connect(f,"onmouseleave","_onTargetMouseLeave"),this.connect(f,"onfocus","_onTargetFocus"),this.connect(f,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=e},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);if(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=true;this._onHover(a)},_onTargetBlur:function(a){this._focus=false;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var e=a.target;this._showTimer=setTimeout(c.hitch(this,function(){this.open(e)}),
this.showDelay)}},_onUnHover:function(){if(!this._focus){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}this.close()}},open:function(a){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer}d.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){if(this._connectNode){d.hideTooltip(this._connectNode);delete this._connectNode;this.onHide()}if(this._showTimer){clearTimeout(this._showTimer);
delete this._showTimer}},onShow:function(){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments)}});d.Tooltip.defaultPosition=["after","before"];return d.Tooltip});
(function(){function c(e,f,g,h,i,j){if(f[e]){g.push(e);if(f[e]===true||f[e]===1)h.push(i+e+"/"+j)}}function d(e,f,g,h,i){f=h+f+"/"+i;require._fileExists(e.nameToUrl(f,null))&&g.push(f)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",{version:"0.24.0",load:function(e,f,g,h){h=h||{};var i=a.exec(e),j=i[1],k=i[4],l=i[5],m=k.split("-"),n=[],r={},s,o,q="";if(i[5]){j=i[1];e=j+l}else{e=e;l=i[4];k=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||
"root").toLowerCase());m=k.split("-")}if(h.isBuild){n.push(e);d(f,"root",n,j,l);for(s=0;o=m[s];s++){q+=(q?"-":"")+o;d(f,q,n,j,l)}f(n);g()}else f([e],function(p){var t=[];c("root",p,t,n,j,l);for(s=0;o=m[s];s++){q+=(q?"-":"")+o;c(q,p,t,n,j,l)}f(n,function(){var v,w;for(v=t.length-1;v>-1&&(o=t[v]);v--){w=p[o];if(w===true||w===1)w=f(j+o+"/"+l);require.mixin(r,w)}g(r)})})}})})();
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:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/form/ValidationTextBox",["dojo","dijit","text!dijit/form/templates/ValidationTextBox.html","dojo/i18n","dijit/form/TextBox","dijit/Tooltip","i18n!dijit/form/nls/validate"],function(c,d){c.declare("dijit.form.ValidationTextBox",d.form.TextBox,{templateString:c.cache("dijit.form","templates/ValidationTextBox.html"),baseClass:"dijitTextBox dijitValidationTextBox",required:false,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,e){return(new RegExp("^(?:"+this.regExpGen(e)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,e)!==undefined)},_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:true,validate:function(a){var e="",f=this.disabled||this.isValid(a);if(f)this._maskValidSubsetError=true;var g=this._isEmpty(this.textbox.value),h=!f&&a&&this._isValidSubset();this._set("state",f?"":((!this._hasBeenBlurred||a)&&g||h)&&this._maskValidSubsetError?
"Incomplete":"Error");d.setWaiState(this.focusNode,"invalid",f?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=a&&h;e=this.getErrorMessage(a)}else if(this.state=="Incomplete"){e=this.getPromptMessage(a);this._maskValidSubsetError=!this._hasBeenBlurred||a}else if(g)e=this.getPromptMessage(a);this.set("message",e);return f},displayMessage:function(a){d.hideTooltip(this.domNode);a&&this._focused&&d.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 e="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(g){switch(g.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":e+=g;break;case ")":e+="|$)";break;
default:e+="(?:"+g+"|$)";break}});try{"".search(e)}catch(f){e=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+e+")$"},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(){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);d.setWaiState(this.focusNode,"required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");
this.inherited(arguments)}});c.declare("dijit.form.MappedTextBox",d.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",d.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,e){return("min"in e?this.compare(a,e.min)>=0:true)&&("max"in e?this.compare(a,e.max)<=0:true)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=
this.get("value"),e=false,f=false;if("min"in this.constraints){e=this.constraints.min;e=this.compare(a,typeof e=="number"&&e>=0&&a!=0?0:e);e=typeof e=="number"&&e<0}if("max"in this.constraints){f=this.constraints.max;f=this.compare(a,typeof f!="number"||f>0?f:0);f=typeof f=="number"&&f>0}return e||f},_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 e=this.get("value");if(e!==null&&e!==""&&e!==undefined&&(typeof e!="number"||!isNaN(e))&&!this.isInRange(a))return this.rangeMessage;return 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(){this.inherited(arguments);if(this.focusNode){this.constraints.min!==
undefined?d.setWaiState(this.focusNode,"valuemin",this.constraints.min):d.removeWaiState(this.focusNode,"valuemin");this.constraints.max!==undefined?d.setWaiState(this.focusNode,"valuemax",this.constraints.max):d.removeWaiState(this.focusNode,"valuemax")}},_setValueAttr:function(a){d.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return d.form.ValidationTextBox});
define("orion/util",["dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(c,d){function a(p){var t="",v=navigator.platform.indexOf("Mac")!==-1;if(p.mod1)t+=v?"Cmd+":"Ctrl+";if(p.mod2)t+="Shift+";if(p.mod3)t+="Alt+";if(p.mod4&&v)t+="Ctrl+";if(p.alphaKey)return t+p.alphaKey;for(var w in c.keys)if(typeof(c.keys[w]==="number"))if(c.keys[w]===p.keyCode)return t+w;var y;switch(p.keyCode){case 59:y=p.mod2?":":";";break;case 61:y=p.mod2?"+":"=";break;case 188:y=p.mod2?"<":",";break;case 190:y=
p.mod2?">":".";break;case 191:y=p.mod2?"?":"/";break;case 192:y=p.mod2?"~":"`";break;case 219:y=p.mod2?"{":"[";break;case 220:y=p.mod2?"|":"\\";break;case 221:y=p.mod2?"}":"]";break;case 222:y=p.mod2?'"':"'";break}if(y)return t+y;return t+String.fromCharCode(p.keyCode)}function e(p,t){p.startup();if(typeof t==="string"){var v=c.byId(t);if(!v)if(v=d.byId(t))v=v.domNode;t=v?v:null}if(t){t=c.position(t);p._setStyleAttr("left:"+(t.x+16)+"px !important;");p._setStyleAttr("top:"+(t.y+16)+"px !important;")}p.show()}
function f(p,t,v,w,y,z,F,G,H){F=function(D){return function(E){var J=d.byId(p),M=J.get("value");if(D&&E.keyCode===c.keys.ESCAPE){v&&c.style(t,"display","inline");J.destroyRecursive();z&&z()}else if(!(D&&E.keyCode!==c.keys.ENTER)){if(!J.isValid()||!H&&M===w)v&&c.style(t,"display","inline");else y(M);J.destroyRecursive();z&&z()}}};var I=new d.form.ValidationTextBox({id:p,required:true,value:w||""});c.place(I.domNode,t,"after");c.addClass(I.domNode,"userEditBoxPrompt");v&&c.style(t,"display","none");
c.connect(I,"onKeyDown",F(true));c.connect(I,"onBlur",F(false));window.setTimeout(function(){I.focus();if(w){var D=c.byId(p),E=G?w.indexOf(G):-1;E>0?d.selectInputText(D,0,E):D.select()}},0)}function g(p){var t=window.navigator.platform.indexOf("Mac")!==-1;return t&&p.metaKey||!t&&p.ctrlKey}function h(p,t){if(t&&g(t))window.open(p);else window.location=p}function i(p){if(!p)return p;var t=window.location.href.split("#")[0];t=t.substring(0,t.length-window.location.pathname.length);if(p.indexOf(t)===
0)return p.substring(t.length);return p}function j(p){if(!p)return p;var t=window.location.href.split("#")[0];return t.substring(0,t.length-window.location.pathname.length)+p}function k(p){return this.makeRelative(p).indexOf("/workspace")===0}function l(p,t){p.children=t;for(var v in t)t[v].parent=p;p.children.sort(function(w,y){var z=w.Directory;if(z!==y.Directory)return z?-1:1;w=w.Name&&w.Name.toLowerCase();y=y.Name&&y.Name.toLowerCase();if(w<y)return-1;if(w>y)return 1;return 0})}function m(p,t){p.Parents&&
p.Parents.length===0&&t.getService("orion.core.preference").getPreferences("/window/recent").then(function(v){var w=v.get("projects");if(typeof w==="string")w=JSON.parse(w);var y=[];if(w&&w.length&&w.length>0)for(var z=0;z<w.length;z++)w[z].location!==p.ChildrenLocation&&w[z].name!==p.Name&&y.push(w[z]);y.push({name:p.Name,location:p.ChildrenLocation});if(y.length>5)y=y.slice(-5,y.length);v.put("projects",y)})}function n(p){return typeof p.textContent!=="undefined"?p.textContent:p.innerText}function r(p){return n(document.createTextNode(p))}
function s(p,t){if(typeof p.textContent!=="undefined")p.textContent=t;else p.innerText=t}function o(p,t,v,w,y,z,F,G){y=y||t+"heading";z=z||t+"commands";c.place('<div class="toolComposite" id="'+t+'"><div class="layoutLeft" id="'+t+'"><span style: "inline-block;" id="'+y+'">'+v+'</span></div><div class="layoutRight sectionActions" id="'+z+'"></div><div id="'+p.id+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+p.id+'slideOut" class="slide"><span id="'+p.id+'pageCommandParameters" class="parameters"></span><span id="'+
p.id+'pageCommandDismiss" class="parametersDismiss"></span></span></div></div>',p,"last");w?c.addClass(t,"auxpaneHeading"):c.addClass(t,"paneHeading");F&&F.renderCommands(c.byId(z),"dom",G,G,"button");return c.byId(t)}function q(p){if(typeof p==="string")p=c.byId(p);for(;p;){var t=d.byId(p.id);if(t&&typeof t.layout==="function"){t.layout();return}p=p.parentNode}}return{getUserKeyString:a,openDialog:e,getUserText:f,openInNewWindow:g,followLink:h,makeRelative:i,makeFullPath:j,isAtRoot:k,processNavigatorParent:l,
rememberSuccessfulTraversal:m,getText:n,safeText:r,setText:s,createPaneHeading:o,forceLayout:q}});
define("orion/PageUtil",["require","exports","module"],function(){function c(d){d=d||window.location.toString();var a={resource:""},e=d.indexOf("#");if(e!==-1){d=d.substring(e+1);if(d.length!==0){d=d.split(",");a.resource=decodeURIComponent(d[0]);for(e=1;e<d.length;e++){var f=d[e].split("="),g=decodeURIComponent(f[0]);f=f.length===2?decodeURIComponent(f[1]):null;if(f!==null&&g!=="resource")a[g]=f}}}return a}return{matchResourceParameters:c}});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,d){c.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,e){var f=this.containerNode;if(e&&typeof e=="number"){var g=this.getChildren();if(g&&g.length>=e){f=g[e-1].domNode;e="after"}}c.place(a.domNode,f,e);this._started&&!a._started&&a.startup()},removeChild:function(a){if(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(e){e.destroyRecursive(a)})},_getSiblingOfChild:function(a,e){a=a.domNode;e=e>0?"nextSibling":"previousSibling";do a=a[e];while(a&&(a.nodeType!=1||!d.byNode(a)));return a&&d.byNode(a)},getIndexOfChild:function(a){return c.indexOf(this.getChildren(),a)},startup:function(){if(!this._started){c.forEach(this.getChildren(),
function(a){a.startup()});this.inherited(arguments)}}});return d._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(c,d){c.declare("dijit._KeyNavContainer",d._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,e){var f=this._keyNavCodes={},g=c.hitch(this,this.focusPrev),h=c.hitch(this,this.focusNext);c.forEach(a,function(i){f[i]=g});c.forEach(e,function(i){f[i]=h});f[c.keys.HOME]=c.hitch(this,"focusFirstChild");f[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._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),true)},focusChild:function(a,e){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(e?"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){if(a.target===
this.domNode){this.focusFirstChild();c.attr(this.domNode,"tabIndex","-1")}},_onBlur:function(){this.tabIndex&&c.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!(a.ctrlKey||a.altKey)){var e=this._keyNavCodes[a.charOrCode];if(e){e();c.stopEvent(a)}}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
e){if(a)a=this._getSiblingOfChild(a,e);for(var f=this.getChildren(),g=0;g<f.length;g++){a||(a=f[e>0?0:f.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,e)}return null}});return d._KeyNavContainer});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,d){c.declare("dijit._Contained",null,{getParent:function(){var a=d.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var e=this.domNode;do e=e[a+"Sibling"];while(e&&e.nodeType!=1);return e&&d.byNode(e)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var a=this.getParent();if(!a||!a.getIndexOfChild)return-1;
return a.getIndexOfChild(this)}});return d._Contained});
define("dijit/MenuItem",["dojo","dijit","text!dijit/templates/MenuItem.html","dijit/_Widget","dijit/_Templated","dijit/_Contained","dijit/_CssStateMixin"],function(c,d){c.declare("dijit.MenuItem",[d._Widget,d._Templated,d._Contained,d._CssStateMixin],{templateString:c.cache("dijit","templates/MenuItem.html"),attributeMap:c.delegate(d._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",
accelKey:"",disabled:false,_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);if(this.accelKeyNode){c.attr(this.accelKeyNode,"id",this.id+"_accel");a+=" "+this.id+"_accel"}d.setWaiState(this.domNode,"labelledby",a);c.setSelectable(this.domNode,false)},_onHover:function(){this.getParent().onItemHover(this)},_onUnhover:function(){this.getParent().onItemUnhover(this);
this._set("hovering",false)},_onClick:function(a){this.getParent().onItemClick(this,a);c.stopEvent(a)},onClick:function(){},focus:function(){try{c.isIE==8&&this.containerNode.focus();d.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(true);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){d.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 d.MenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(c,d){c.declare("dijit.PopupMenuItem",d.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=c.query("*",this.srcNodeRef);d.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=d.byNode(a)}c.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&c.style(this.arrowWrapper,"visibility","");d.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){if(this.popup){this.popup._destroyed||this.popup.destroyRecursive();delete this.popup}this.inherited(arguments)}});return d.PopupMenuItem});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("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(c,d){c.declare("dijit.CheckedMenuItem",d.MenuItem,{templateString:c.cache("dijit","templates/CheckedMenuItem.html"),checked:false,_setCheckedAttr:function(a){c.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);d.setWaiState(this.domNode,"checked",a);this._set("checked",a)},onChange:function(){},_onClick:function(){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked)}this.inherited(arguments)}});
return d.CheckedMenuItem});define("text!dijit/templates/MenuSeparator.html",function(){return'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>'});
define("dijit/MenuSeparator",["dojo","dijit","text!dijit/templates/MenuSeparator.html","dijit/_Widget","dijit/_Templated","dijit/_Contained"],function(c,d){c.declare("dijit.MenuSeparator",[d._Widget,d._Templated,d._Contained],{templateString:c.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);c.setSelectable(this.domNode,false)},isFocusable:function(){return false}});return d.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"],function(c,d){c.declare("dijit._MenuBase",[d._Widget,d._Templated,d._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(!this._started){c.forEach(this.getChildren(),function(a){a.startup()});this.startupKeyNavChildren();this.inherited(arguments)}},onExecute:function(){},
onCancel:function(){},_moveToPopup:function(a){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.focusedChild._onClick(a);else(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(false);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup)}},
onItemHover:function(a){if(this.isActive){this.focusChild(a);if(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(false);var e=a.popup;if(e){this._stopPendingCloseTimer(e);e._pendingClose_timer=setTimeout(function(){e._pendingClose_timer=null;if(e.parentMenu)e.parentMenu.currentPopup=
null;d.popup.close(e)},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,e){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return false;if(a.popup)this._openPopup();else{this.onExecute();a.onClick(e)}},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var e=a.popup;if(!e.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);d.popup.close(this.currentPopup)}e.parentMenu=this;e.from_item=a;var f=this;d.popup.open({parent:this,
popup:e,around:a.domNode,orient:this._orient||(this.isLeftToRight()?{TR:"TL",TL:"TR",BR:"BL",BL:"BR"}:{TL:"TR",TR:"TL",BL:"BR",BR:"BL"}),onCancel:function(){f.focusChild(a);f._cleanUp();a._setSelected(true);f.focusedChild=a},onExecute:c.hitch(this,"_cleanUp")});this.currentPopup=e;e.connect(e.domNode,"onmouseenter",c.hitch(f,"_onPopupHover"));if(e.focus)e._focus_timer=setTimeout(c.hitch(e,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=true;c.replaceClass(this.domNode,
"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=true;this._markActive()},_markInactive:function(){this.isActive=false;c.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){d._curFocus&&c.isDescendant(d._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus();d.popup.close(this.currentPopup);
this.currentPopup=null}if(this.focusedChild){this.focusedChild._setSelected(false);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",d._MenuBase,{constructor:function(){this._bindings=[]},templateString:c.cache("dijit",
"templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(c.body()):c.forEach(this.targetNodeIds,this.bindDomNode,this);var a=c.keys,e=this.isLeftToRight();this._openSubMenuKey=e?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=e?a.LEFT_ARROW:a.RIGHT_ARROW;this.connectKeyNavHandlers([a.UP_ARROW],[a.DOWN_ARROW])},_onKeyPress:function(a){if(!(a.ctrlKey||a.altKey))switch(a.charOrCode){case this._openSubMenuKey:this._moveToPopup(a);
c.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)this.parentMenu._isMenuBar?this.parentMenu.focusPrev():this.onCancel(false);else c.stopEvent(a);break}},_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){a=c.byId(a);var e;if(a.tagName.toLowerCase()=="iframe"){var f=a,g=this._iframeContentWindow(f);e=c.withGlobal(g,c.body)}else e=a==c.body()?c.doc.documentElement:a;var h={node:a,iframe:f};c.attr(a,"_dijitMenu"+this.id,this._bindings.push(h));var i=c.hitch(this,function(j){return[c.connect(j,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(k){c.stopEvent(k);this._scheduleOpen(k.target,f,{x:k.pageX,y:k.pageY})}),c.connect(j,"onkeydown",this,function(k){if(k.shiftKey&&
k.keyCode==c.keys.F10){c.stopEvent(k);this._scheduleOpen(k.target,f)}})]});h.connects=e?i(e):[];if(f){h.onloadHandler=c.hitch(this,function(){var j=this._iframeContentWindow(f);e=c.withGlobal(j,c.body);h.connects=i(e)});f.addEventListener?f.addEventListener("load",h.onloadHandler,false):f.attachEvent("onload",h.onloadHandler)}},unBindDomNode:function(a){var e;try{e=c.byId(a)}catch(f){return}a="_dijitMenu"+this.id;if(e&&c.hasAttr(e,a)){var g=c.attr(e,a)-1,h=this._bindings[g];c.forEach(h.connects,c.disconnect);
var i=h.iframe;if(i)i.removeEventListener?i.removeEventListener("load",h.onloadHandler,false):i.detachEvent("onload",h.onloadHandler);c.removeAttr(e,a);delete this._bindings[g]}},_scheduleOpen:function(a,e,f){if(!this._openTimer)this._openTimer=setTimeout(c.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:e,coords:f})}),1)},_openMyself:function(a){function e(){l.refocus&&d.focus(m);d.popup.close(l)}var f=a.target,g=a.iframe;if(a=a.coords){if(g){f=c.position(g,true);var h=
this._iframeContentWindow(g);h=c.withGlobal(h,"_docScroll",c);var i=c.getComputedStyle(g),j=c._toPixelValue,k=(c.isIE&&c.isQuirks?0:j(g,i.paddingLeft))+(c.isIE&&c.isQuirks?j(g,i.borderLeftWidth):0);g=(c.isIE&&c.isQuirks?0:j(g,i.paddingTop))+(c.isIE&&c.isQuirks?j(g,i.borderTopWidth):0);a.x+=f.x+k-h.x;a.y+=f.y+g-h.y}}else{a=c.position(f,true);a.x+=10;a.y+=10}var l=this,m=d.getFocus(this);d.popup.open({popup:this,x:a.x,y:a.y,onExecute:e,onCancel:e,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=
function(){this.inherited("_onBlur",arguments);d.popup.close(this)}},uninitialize:function(){c.forEach(this._bindings,function(a){a&&this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return d.Menu});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,d){c.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_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 e=this.dropDown,f=false;if(a&&this._opened){var g=c.position(this._buttonNode,true);if(!(a.pageX>=g.x&&a.pageX<=g.x+g.w)||!(a.pageY>=g.y&&a.pageY<=g.y+g.h)){for(g=a.target;g&&!f;)if(c.hasClass(g,"dijitPopup"))f=true;else g=g.parentNode;if(f){g=a.target;if(e.onItemClick){for(var h;g&&!(h=d.byNode(g));)g=g.parentNode;h&&h.onClick&&h.getParent&&h.getParent().onItemClick(h,a)}return}}}this._opened&&e.focus&&e.autoFocus!==false&&window.setTimeout(c.hitch(e,
"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(){if(this.dropDown){this.dropDown._destroyed||this.dropDown.destroyRecursive();delete this.dropDown}this.inherited(arguments)},_onKey:function(a){if(!(this.disabled||
this.readOnly)){var e=this.dropDown,f=a.target;if(e&&this._opened&&e.handleKey)if(e.handleKey(a)===false){c.stopEvent(a);return}if(e&&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==" ")&&((f.tagName||"").toLowerCase()!=="input"||f.type&&f.type.toLowerCase()!=="text"))){this._toggleOnKeyUp=true;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(d._curFocus&&this.dropDown&&c.isDescendant(d._curFocus,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return true},loadDropDown:function(a){a()},toggleDropDown:function(){if(!(this.disabled||this.readOnly))if(this._opened)this.closeDropDown();else this.isLoaded()?this.openDropDown():this.loadDropDown(c.hitch(this,"openDropDown"))},openDropDown:function(){var a=
this.dropDown,e=a.domNode,f=this._aroundNode||this.domNode,g=this;if(!this._preparedNode){this._preparedNode=true;if(e.style.width)this._explicitDDWidth=true;if(e.style.height)this._explicitDDHeight=true}if(this.maxHeight||this.forceWidth||this.autoWidth){var h={display:"",visibility:"hidden"};if(!this._explicitDDWidth)h.width="";if(!this._explicitDDHeight)h.height="";c.style(e,h);h=this.maxHeight;if(h==-1){h=c.window.getBox();var i=c.position(f,false);h=Math.floor(Math.max(i.y,h.h-(i.y+i.h)))}a.startup&&
!a._started&&a.startup();d.popup.moveOffScreen(a);i=c._getMarginSize(e);var j=h&&i.h>h;c.style(e,{overflowX:"hidden",overflowY:j?"auto":"hidden"});if(j){i.h=h;if("w"in i)i.w+=16}else delete i.h;if(this.forceWidth)i.w=f.offsetWidth;else if(this.autoWidth)i.w=Math.max(i.w,f.offsetWidth);else delete i.w;c.isFunction(a.resize)?a.resize(i):c.marginBox(e,i)}a=d.popup.open({parent:this,popup:a,around:f,orient:d.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:
["below"],this.isLeftToRight()),onExecute:function(){g.closeDropDown(true)},onCancel:function(){g.closeDropDown(true)},onClose:function(){c.attr(g._popupStateNode,"popupActive",false);c.removeClass(g._popupStateNode,"dijitHasDropDownOpen");g._opened=false}});c.attr(this._popupStateNode,"popupActive","true");c.addClass(g._popupStateNode,"dijitHasDropDownOpen");this._opened=true;return a},closeDropDown:function(a){if(this._opened){a&&this.focus();d.popup.close(this.dropDown);this._opened=false}}});
return d._HasDropDown});
define("dijit/form/Button",["dojo","dijit","text!dijit/form/templates/Button.html","text!dijit/form/templates/DropDownButton.html","text!dijit/form/templates/ComboButton.html","dijit/form/_FormWidget","dijit/_Container","dijit/_HasDropDown"],function(c,d){c.declare("dijit.form.Button",d.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:c.cache("dijit.form","templates/Button.html"),attributeMap:c.delegate(d.form._FormWidget.prototype.attributeMap,{value:"valueNode"}),
_onClick:function(a){if(this.disabled)return false;this._clicked();return this.onClick(a)},_onButtonClick:function(a){if(this._onClick(a)===false)a.preventDefault();else if(this.type=="submit"&&!(this.valueNode||this.focusNode).form)for(var e=this.domNode;e.parentNode;e=e.parentNode){var f=d.byNode(e);if(f&&typeof f._onSubmit=="function"){f._onSubmit(a);break}}else if(this.valueNode){this.valueNode.click();a.preventDefault()}},buildRendering:function(){this.inherited(arguments);c.setSelectable(this.focusNode,
false)},_fillContent:function(a){if(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 true},_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==false&&!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",[d.form.Button,d._Container,d._HasDropDown],{baseClass:"dijitDropDownButton",templateString:c.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
c.query("*",this.srcNodeRef);d.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=d.byNode(a);delete this.dropDownContainer}this.dropDown&&d.popup.hide(this.dropDown);this.inherited(arguments)}},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(){var a=this.dropDown;
if(a)if(this.isLoaded())this.openDropDown();else{var e=c.connect(a,"onLoad",this,function(){c.disconnect(e);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});c.declare("dijit.form.ComboButton",d.form.DropDownButton,{templateString:c.cache("dijit.form","templates/ComboButton.html"),attributeMap:c.mixin(c.clone(d.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"]){d.focus(this._popupStateNode);c.stopEvent(a)}},_onArrowKeyPress:function(a){if(a.charOrCode==c.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){d.focus(this.titleNode);c.stopEvent(a)}},focus:function(a){this.disabled||d.focus(a=="start"?this.titleNode:this._popupStateNode)}});
c.declare("dijit.form.ToggleButton",d.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:c.mixin(c.clone(d.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,e){this._set("checked",a);c.attr(this.focusNode||this.domNode,"checked",a);d.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,e)},setChecked:function(a){c.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
a+") instead.","","2.0");this.set("checked",a)},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false)}});return d.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(c,d){return d.form.DropDownButton});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/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(c,d){c.declare("dijit.layout._LayoutWidget",[d._Widget,d._Container,d._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,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,e){var f=this.domNode;if(a){c.marginBox(f,a);if(a.t)f.style.top=a.t+"px";if(a.l)f.style.left=a.l+"px"}e=e||{};c.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=c.mixin(c.marginBox(f),e);a=c.getComputedStyle(f);var g=c._getMarginExtents(f,a),h=c._getBorderExtents(f,a);e=this._borderBox={w:e.w-(g.w+h.w),h:e.h-(g.h+h.h)};g=c._getPadExtents(f,a);this._contentBox={l:c._toPixelValue(f,a.paddingLeft),t:c._toPixelValue(f,a.paddingTop),
w:e.w-g.w,h:e.h-g.h};this.layout()},layout:function(){},_setupChild:function(a){c.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a){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)}});d.layout.marginBox2contentBox=function(a,e){var f=c.getComputedStyle(a),g=c._getMarginExtents(a,
f),h=c._getPadBorderExtents(a,f);return{l:c._toPixelValue(a,f.paddingLeft),t:c._toPixelValue(a,f.paddingTop),w:e.w-(g.w+h.w),h:e.h-(g.h+h.h)}};(function(){var a=function(f){return f.substring(0,1).toUpperCase()+f.substring(1)},e=function(f,g){var h=f.resize?f.resize(g):c.marginBox(f.domNode,g);if(h)c.mixin(f,h);else{c.mixin(f,c.marginBox(f.domNode));c.mixin(f,g)}};d.layout.layoutChildren=function(f,g,h,i,j){g=c.mixin({},g);c.addClass(f,"dijitLayoutContainer");h=c.filter(h,function(k){return k.region!=
"center"&&k.layoutAlign!="client"}).concat(c.filter(h,function(k){return k.region=="center"||k.layoutAlign=="client"}));c.forEach(h,function(k){var l=k.domNode,m=k.region||k.layoutAlign,n=l.style;n.left=g.l+"px";n.top=g.t+"px";n.position="absolute";c.addClass(l,"dijitAlign"+a(m));l={};if(i&&i==k.id)l[k.region=="top"||k.region=="bottom"?"h":"w"]=j;if(m=="top"||m=="bottom"){l.w=g.w;e(k,l);g.h-=k.h;if(m=="top")g.t+=k.h;else n.top=g.t+g.h+"px"}else if(m=="left"||m=="right"){l.h=g.h;e(k,l);g.w-=k.w;if(m==
"left")g.l+=k.w;else n.left=g.l+g.w+"px"}else if(m=="client"||m=="center")e(k,g)})}})();return d.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(c,d){c.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){c.forEach(this.getChildren(),function(a){a.startup();a._started=true})},startup:function(){if(!this._started){var a=d._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(g){return g.tagName!=="SCRIPT"}),e=a.filter(function(g){return c.hasAttr(g,"data-dojo-type")||c.hasAttr(g,"dojoType")||c.hasAttr(g,"widgetId")}),f=c.filter(e.map(d.byNode),function(g){return g&&
g.domNode&&g.resize});if(a.length==e.length&&f.length==1)this._singleChild=f[0];else delete this._singleChild;c.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,e){!this._wasShown&&this.open!==false&&this._onShow();this._resizeCalled=true;this._scheduleLayout(a,e)},_scheduleLayout:function(a,e){if(this._isShown())this._layout(a,e);else{this._needLayout=true;this._changeSize=a;this._resultSize=e}},_layout:function(a,e){a&&c.marginBox(this.domNode,
a);var f=this.containerNode;if(f===this.domNode){e=e||{};c.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=c.mixin(c.marginBox(f),e);this._contentBox=d.layout.marginBox2contentBox(f,e)}else this._contentBox=c.contentBox(f);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(e){e.resize&&e.resize()})},_isShown:function(){if(this._childOfLayoutWidget){if(this._resizeCalled&&"open"in this)return this.open;return this._resizeCalled}else if("open"in this)return this.open;else{var a=this.domNode,e=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!c.hasClass(a,"dijitHidden")&&e&&e.style&&e.style.display!="none"}},_onShow:function(){this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments);this._wasShown=
true}});return d.layout._ContentPaneResizeMixin});
define("dojo/html",["dojo","dojo/parser"],function(c){c.getObject("html",true,c);(function(){var d=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,e){c.empty(a);if(e){if(typeof e=="string")e=c._toDom(e,a.ownerDocument);if(!e.nodeType&&c.isArrayLike(e))for(var f=e.length,g=0;g<e.length;g=f==e.length?g+1:0)c.place(e[g],a,"last");else c.place(e,a,"last")}return a};c.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:c._scopeName,startup:true,constructor:function(a,e){c.mixin(this,a||{});e=this.node=c.byId(this.node||e);if(!this.id)this.id=["Setter",e?e.id||e.tagName:"",d++].join("_")},set:function(a,e){if(undefined!==a)this.content=a;e&&this._mixin(e);this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var a=this.node;if(!a)throw new Error(this.declaredClass+": setContent given no node");
try{a=c.html._setNodeContent(a,this.content)}catch(e){var f=this.onContentError(e);try{a.innerHTML=f}catch(g){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+g.message,g)}}this.node=a},empty:function(){if(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)){if(this.cleanContent)a=c.html._secureForInnerHtml(a);
if(this.extractContent){var e=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(e)a=e[1]}}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(a){return"Error occured setting content: "+a},_mixin:function(a){var e={},f;for(f in a)f in e||(this[f]=a[f])},_parse:function(){var a=this.node;try{var e={};c.forEach(["dir","lang","textDir"],
function(g){if(this[g])e[g]=this[g]},this);this.parseResults=c.parser.parse({rootNode:a,noStart:!this.startup,inherited:e,scope:this.parserScope})}catch(f){this._onError("Content",f,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,e,f){a=this["on"+a+"Error"].call(this,e);if(f)console.error(f,e);else a&&c.html._setNodeContent(this.node,a,true)}});c.html.set=function(a,e,f){if(undefined==e){console.warn("dojo.html.set: no cont argument provided, using empty string");e=""}return f?(new c.html._ContentSetter(c.mixin(f,
{content:e,node:a}))).set():c.html._setNodeContent(a,e,true)}})();return c.html});define("dijit/nls/loading",{root:{loadingState:"Loading...",errorState:"Sorry, an error occurred"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
define("dijit/layout/ContentPane",["dojo","dijit","dijit/_Widget","dijit/layout/_ContentPaneResizeMixin","dojo/string","dojo/html","i18n!dijit/nls/loading"],function(c,d){c.declare("dijit.layout.ContentPane",[d._Widget,d.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:c._scopeName,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",
isLoaded:false,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,attributeMap:c.delegate(d._Widget.prototype.attributeMap,{title:[]}),stopParser:true,template:false,create:function(a,e){if((!a||!a.template)&&e&&!("href"in a)&&!("content"in a)){var f=c.doc.createDocumentFragment();for(e=c.byId(e);e.firstChild;)f.appendChild(e.firstChild);a=c.delegate(a,{content:f})}this.inherited(arguments,[a,e])},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")||d.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=true}},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);if(this.preload||this._created&&this._isShown())this._load();else this._hrefChanged=true;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=false;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(){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href)if(!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(),
true);var a=this,e={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};c.isObject(this.ioArgs)&&c.mixin(e,this.ioArgs);var f=this._xhrDfd=(this.ioMethod||c.xhrGet)(e);f.addCallback(function(g){try{a._isDownloaded=true;a._setContent(g,false);a.onDownloadEnd()}catch(h){a._onError("Content",h)}delete a._xhrDfd;return g});f.addErrback(function(g){f.canceled||a._onError("Download",g);delete a._xhrDfd;return g});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
true);try{this.onLoadDeferred.callback(a)}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message)}},_onUnloadHandler:function(){this._set("isLoaded",false);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(e){e.destroyRecursive&&e.destroyRecursive()});if(a){c.forEach(a.parseResults,
function(e){e.destroyRecursive&&e.domNode&&e.domNode.parentNode==c.body()&&e.destroyRecursive()});delete a.parseResults}c.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,e){this.destroyDescendants();var f=this._contentSetter;if(!(f&&f instanceof c.html._ContentSetter))f=this._contentSetter=new c.html._ContentSetter({node:this.containerNode,_onError:c.hitch(this,this._onError),onContentError:c.hitch(this,function(h){h=this.onContentError(h);try{this.containerNode.innerHTML=
h}catch(i){console.error("Fatal "+this.id+" could not change content due to "+i.message,i)}})});var g=c.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang},this._contentSetterParams||{});f.set(c.isObject(a)&&a.domNode?a.domNode:a,g);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();if(!e){if(this._started){this._startChildren();this._scheduleLayout()}this._onLoadHandler(a)}},
_onError:function(a,e,f){this.onLoadDeferred.errback(e);a=this["on"+a+"Error"].call(this,e);if(f)console.error(f,e);else a&&this._setContent(a,true)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}});return d.layout.ContentPane});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(c,d){c.declare("dijit.form._FormMixin",null,{state:"",reset:function(){c.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=false;return c.every(c.map(this.getDescendants(),function(e){e._hasBeenBlurred=true;var f=e.disabled||!e.validate||e.validate();if(!f&&!a){c.window.scrollIntoView(e.containerNode||e.domNode);e.focus();a=true}return f}),function(e){return e})},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 e={};c.forEach(this.getDescendants(),function(i){if(i.name)(e[i.name]||(e[i.name]=[])).push(i)});for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],h=c.getObject(f,false,a);if(h!==undefined){c.isArray(h)||(h=[h]);if(typeof g[0].checked=="boolean")c.forEach(g,function(i){i.set("value",c.indexOf(h,i.value)!=-1)});else g[0].multiple?g[0].set("value",h):c.forEach(g,function(i,
j){i.set("value",h[j])})}}},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(e){var f=e.name;if(!(!f||e.disabled)){var g=e.get("value");if(typeof e.checked=="boolean")if(/Radio/.test(e.declaredClass))if(g!==false)c.setObject(f,g,a);else{g=c.getObject(f,false,a);g===undefined&&c.setObject(f,null,a)}else{e=c.getObject(f,false,a);
if(!e){e=[];c.setObject(f,e,a)}g!==false&&e.push(g)}else{e=c.getObject(f,false,a);if(typeof e!="undefined")c.isArray(e)?e.push(g):c.setObject(f,[e,g],a);else c.setObject(f,g,a)}}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=c.map(this._descendants,function(e){return e.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 e=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(i,j){e[i]=j}:c.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var f=this._childConnections=[],g=this._childWatches=[];c.forEach(c.filter(this._descendants,function(i){return i.validate}),function(i){c.forEach(["state","disabled"],function(j){g.push(i.watch(j,function(){e.set("state",
e._getState())}))})});var h=function(){e._onChangeDelayTimer&&clearTimeout(e._onChangeDelayTimer);e._onChangeDelayTimer=setTimeout(function(){delete e._onChangeDelayTimer;e._set("value",e.get("value"))},10)};c.forEach(c.filter(this._descendants,function(i){return i.onChange}),function(i){f.push(e.connect(i,"onChange",h));g.push(i.watch("disabled",h))})},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(a,e,f){this.onValidStateChange(f=="")})},destroy:function(){this.disconnectChildren();
this.inherited(arguments)}});return d.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(c,d){c.declare("dijit._DialogMixin",null,{attributeMap:d._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=d._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return d._DialogMixin});
define("dijit/TooltipDialog",["dojo","dijit","text!dijit/templates/TooltipDialog.html","dijit/layout/ContentPane","dijit/_Templated","dijit/form/_FormMixin","dijit/_DialogMixin"],function(c,d){c.declare("dijit.TooltipDialog",[d.layout.ContentPane,d._Templated,d.form._FormMixin,d._DialogMixin],{title:"",doLayout:false,autofocus:true,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,e,f){a="dijitTooltipAB"+(f.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(f.charAt(0)=="T"?"Below":"Above");c.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);d.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow()},
onClose:function(){this.onHide()},_onKey:function(a){var e=a.target,f=c.keys;a.charOrCode===f.TAB&&this._getFocusItems(this.containerNode);var g=this._firstFocusItem==this._lastFocusItem;if(a.charOrCode==f.ESCAPE){setTimeout(c.hitch(this,"onCancel"),0);c.stopEvent(a)}else if(e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===f.TAB){g||d.focus(this._lastFocusItem);c.stopEvent(a)}else if(e==this._lastFocusItem&&a.charOrCode===f.TAB&&!a.shiftKey){g||d.focus(this._firstFocusItem);c.stopEvent(a)}else a.charOrCode===
f.TAB&&a.stopPropagation()}});return d.TooltipDialog});
define("orion/commands",["require","dojo","dijit","orion/util","orion/PageUtil","dijit/Menu","dijit/form/DropDownButton","dijit/MenuItem","dijit/PopupMenuItem","dijit/MenuSeparator","dijit/Tooltip","dijit/TooltipDialog"],function(c,d,a,e,f){function g(q,p,t,v,w){this.commandService=q;this.handler=p;this.items=t;this.userData=v;this.command=w;if(w.parameters)this.parameters=w.parameters.makeCopy();this.id=w.id}function h(q){this._domScope={};this._objectScope={};this._globalScope={};this._namedGroups=
{};this._ungrouped={};this._topics={};this._activeBindings={};this._urlBindings={};this._init(q);this._parameterCollector=null}function i(q,p,t){d.addClass(p,"commandImage");var v;if(q.imageClass){v=d.create("span",{},p,"last");d.addClass(v,q.spriteClass);d.addClass(v,q.imageClass)}else{v=new Image;v.alt=q.name;v.name=t;v.id=t;v.src=q.image;d.place(v,p,"last")}return v}function j(q){this._init(q)}function k(q,p,t,v,w){this.keyCode=typeof q==="string"?q.toUpperCase().charCodeAt(0):q;this.mod1=p!==
undefined&&p!==null?p:false;this.mod2=t!==undefined&&t!==null?t:false;this.mod3=v!==undefined&&v!==null?v:false;this.mod4=w!==undefined&&w!==null?w:false}function l(q,p){this.token=q;this.parameterName=p}function m(q,p,t,v){this.name=q;this.type=p;this.label=t;this.value=v}function n(q,p,t){this._storeParameters(q);this.options=p;this.optionsRequested=false;this.getParameters=t}g.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()}};g.prototype.constructor=
g;var r=d.declare(a.MenuItem,{_onClick:function(){this.hrefCallback||this.inherited(arguments)}}),s=d.declare(a.Tooltip,{constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},_onUnHover:function(){if(this._showTimer){window.clearTimeout(this._showTimer);delete this._showTimer}this.polling=false;this.close()},_onHover:function(){this.inherited(arguments);this.polling=true;this.pollForMissingTarget()},pollForMissingTarget:function(){this.polling&&window.setTimeout(d.hitch(this,
function(){if(this._stillInDocument(this._connectNode))this.pollForMissingTarget();else{this.polling=false;this.close()}}),1E3)},_stillInDocument:function(q){for(;q;){if(q===window.document)return true;q=q.parentNode}return false},postMixInProperties:function(){this.inherited(arguments);this.options.commandParent&&a.byId(this.options.commandParent.id)&&d.connect(this.options.commandParent,"onClose",d.hitch(this,function(){this.close()}))}});h.prototype={_init:function(q){this._registry=q.serviceRegistry;
this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._selection=q.selection;d.connect(window.document,"onkeydown",d.hitch(this,function(p){p=p||window.event;var t=p.target.nodeName.toLowerCase();if(t==="input")switch(p.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(t===
"textarea")return;this._processKey(p)}))},_processKey:function(q){function p(z){if(window.document.all)z.keyCode=0;else{z.preventDefault();z.stopPropagation()}}for(var t in this._activeBindings)if(this._activeBindings[t]&&this._activeBindings[t].keyBinding&&this._activeBindings[t].command)if(this._activeBindings[t].keyBinding.match(q)){var v=this._activeBindings[t],w=v.invocation;if(w){var y=v.command;if(y.hrefCallback){p(q);q=y.hrefCallback.call(w.handler||window,w);q.then?q.then(function(z){window.open(z)}):
window.open(q);return}else if(y.callback){p(q);window.setTimeout(d.hitch(this,function(){w.parameters&&this.collectsParameters()?this._collectParameters(w):y.callback.call(w.handler||window,w)}),0);return}}}},processURL:function(q){for(var p in this._urlBindings)if(this._urlBindings[p]&&this._urlBindings[p].urlBinding&&this._urlBindings[p].command){var t=this._urlBindings[p].urlBinding.match(q);if(t){var v=this._urlBindings[p],w=v.command,y=v.invocation;if(y&&y.parameters&&w.callback){y.parameters.setValue(t.parameterName,
t.parameterValue);window.setTimeout(d.hitch(this,function(){this._collectParameters(y)}),0);return}}}},findCommand:function(q){return this._objectScope[q]||this._domScope[q]||this._globalScope[q]},runCommand:function(q){var p=this._urlBindings[q];p&&p.command&&p.command.callback&&window.setTimeout(d.hitch(this,function(){this._collectParameters(p.invocation)}),0)},getSelectionService:function(){return this._selection},setParameterCollector:function(q){this._parameterCollector=q},openParameterCollector:function(q,
p){if(this._parameterCollector){this._parameterCollector.close();this._parameterCollector.open(q,p)}},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_collectParameters:function(q){var p=false;if(this._parameterCollector){q.parameters.updateParameters(q);p=q.parameters.hasParameters()?this._parameterCollector.collectParameters(q):false}if(!p&&q.parameters.hasParameters()){var t=new a.TooltipDialog({onBlur:function(){a.popup.close(t)}}),
v=d.create("div"),w=this._parameterCollector.getFillFunction(q,function(){a.popup.close(t)})(v);t.set("content",v);v=(v=a.byId(q.domParent.id))?d.position(v.eclipseScopeId,true):d.position(q.domNode,true);if(v.x&&v.y&&v.w){a.popup.open({popup:t,x:v.x+v.w-8,y:v.y+8});window.setTimeout(function(){w.focus();w.select()},0);p=true}}if(!p){q.parameters=null;q.command.callback.call(q.handler,q)}},showKeyBindings:function(q){for(var p in this._activeBindings)this._activeBindings[p]&&this._activeBindings[p].keyBinding&&
this._activeBindings[p].command&&d.place('<span role="listitem">'+e.getUserKeyString(this._activeBindings[p].keyBinding)+" = "+this._activeBindings[p].command.name+"<br></span>",q,"last")},addCommand:function(q,p){switch(p){case "dom":this._domScope[q.id]=q;break;case "object":this._objectScope[q.id]=q;break;case "global":this._globalScope[q.id]=q;break;default:throw"unrecognized command scope "+p;}},addCommandGroup:function(q,p,t,v,w){var y=this._namedGroups;if(v)y=this._createEntryForPath(v);if(y[q]){if(t)y[q].title=
t;if(p)y[q].position=p;if(w)y[q].scopeId=w}else{y[q]={title:t,position:p,children:{},scopeId:w};y.sortedCommands=null}},_createEntryForPath:function(q){var p=this._namedGroups;if(q){q=q.split("/");for(var t=0;t<q.length;t++)if(q[t].length>1){p[q[t]]||(p[q[t]]={position:0,children:{}});p=p[q[t]].children}}return p},registerCommandContribution:function(q,p,t,v,w,y,z){v=!t&&!v?this._ungrouped:this._createEntryForPath(v);v[q]={scopeId:t,position:p};if(y)if(p=this._domScope[q]||this._globalScope[q])this._activeBindings[q]=
{command:p,keyBinding:y,bindingOnly:w};if(z)if(p=this._domScope[q]||this._globalScope[q])this._urlBindings[q]={command:p,urlBinding:z,bindingOnly:w};v.sortedCommands=null},_isLastChildSeparator:function(q,p){if(p==="tool"||p==="button")return q.childNodes.length>0&&d.hasClass(q.childNodes[q.childNodes.length-1],"commandSeparator");if(p==="menu"){q=q.getChildren();return q.length>0&&q[q.length-1]instanceof a.MenuSeparator}return false},renderCommands:function(q,p,t,v,w,y,z,F,G){if(typeof q==="string")q=
d.byId(q);if(q){if(!q.id||q.id==="")window.console.log("renderCommands: "+p+","+w+">> WARNING: command parent must have an id")}else throw"no parent";if(t){var H;if(p==="object"){H=this._objectScope;this._render(this._ungrouped,q,p,t,v,w,y,z,H,F,G)}else if(p==="dom")H=this._domScope;else if(p==="global")H=this._globalScope;else throw"Unrecognized command scope "+p;this._render(this._namedGroups,q,p,t,v,w,y,z,H,F,G);if(w==="tool"||w==="button")this._isLastChildSeparator(q,w)&&q.removeChild(q.childNodes[q.childNodes.length-
1]);else if(w==="menu")if(this._isLastChildSeparator(q,w)){t=q.getChildren()[q.getChildren().length-1];q.removeChild(t);t.destroy()}if(p==="dom"||p==="global")e.forceLayout(q)}else{var I=this;this._selection&&this._selection.getSelections(function(D){I.renderCommands(q,p,D,v,w,y,z,F,G)})}},_render:function(q,p,t,v,w,y,z,F,G,H,I){var D=q.sortedCommands;if(!D){D=[];for(var E in q){var J=q[E];if(J&&typeof J.position==="number"){J.id=E;D.push(J)}}D.sort(function(V,u){return V.position-u.position});q.sortedCommands=
D}for(q=0;q<D.length;q++){var M,Q;if(D[q].children){E=D[q];if(!(E.scopeId&&p.id!==E.scopeId)){var P;if(y==="tool"||y==="button")if(E.title){M=new a.Menu({style:"display: none;"});M.eclipseScopeId=p.eclipseScopeId||p.id;this._render(D[q].children,M,t,v,w,"menu",z,F,G,H);P=M.getChildren();if(this._isLastChildSeparator(M,"menu")){J=P[P.length-1];M.removeChild(J);J.destroy();P=M.getChildren()}if(P.length>0){J=P[0].eclipseCommand;if(P.length>1){M=new a.form.DropDownButton({label:E.title==="*"?"Actions":
E.title,showLabel:E.title!=="*",dropDown:M});d.addClass(M.domNode,"commandMenu");d.destroy(M.valueNode);if(E.title==="*"){d.addClass(M.domNode,"textless");new s({connectId:[M.domNode],label:"Actions menu",position:["above","left","right","below"],commandParent:p,commandService:this})}J._setupActivateVisuals(M.domNode,M.focusNode,H,I);d.place(M.domNode,p,"last")}else{M=y+J.id+q;Q=new g(this,w,v,F,J);y==="button"?J._addButton(p,z,M,Q,H,I):J._addTool(p,z,M,Q,H,I)}}}else{var W;if(p.childNodes.length>
0&&!this._isLastChildSeparator(p,y))W=this.generateSeparatorImage(p);this._render(D[q].children,p,t,v,w,y,z,F,G,H,I);if(p.childNodes.length>0)if(p.childNodes[p.childNodes.length-1]!==W)W=this.generateSeparatorImage(p)}else if(E.title){J=new a.Menu;this._render(D[q].children,J,t,v,w,y,z,F,G,H,I);J.getChildren().length>0&&p.addChild(new a.PopupMenuItem({label:E.title,popup:J}))}else{var L;if(p.getChildren().length>0&&!this._isLastChildSeparator(p,y)){L=new a.MenuSeparator;p.addChild(L)}this._render(D[q].children,
p,t,v,w,y,z,F,G,H,I);E=p.getChildren();if(E[E.length-1]!==L){L=new a.MenuSeparator;p.addChild(L)}}}}else{J=(E=G[D[q].id])?true:false;P=P=null;if(E){if(t==="dom"||t==="global")J=y==="tool"||y==="button"?p.id===D[q].scopeId:y==="menu"?p.eclipseScopeId===D[q].scopeId:false;else if(t==="object")J=!D[q].scopeId;var T=J&&(t==="global"||t==="dom");Q=new g(this,w,v,F,E);Q.domParent=p;M=J&&(E.visibleWhen?E.visibleWhen(v):true);if(T&&this._activeBindings[E.id]&&this._activeBindings[E.id].keyBinding){P=this._activeBindings[E.id];
P.invocation=M?Q:null;if(P.bindingOnly)J=false}if(T&&this._urlBindings[E.id]&&this._urlBindings[E.id].urlBinding){P=this._urlBindings[E.id];P.invocation=M?Q:null;if(P.bindingOnly)J=false}J=J&&M}if(J)if(E.choiceCallback){J=new a.Menu({style:"display: none;"});if(y==="tool"||y==="button"){M=new a.form.DropDownButton({label:E.name,dropDown:J});if(E.image){d.addClass(M.iconNode,"commandImage");M.iconNode.src=E.image}d.place(M.domNode,p,"last");M.eclipseCommand=E;M.eclipseChoices=J;d.connect(M,"onClick",
M,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,v,w,F)})}else if(y==="menu"){M=new a.PopupMenuItem({label:E.name,popup:J});p.addChild(M);M.eclipseCommand=E;M.eclipseChoices=J;d.connect(p,"_openPopup",M,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,v,w,F)})}}else if(y==="tool"){M="tool"+E.id+q;E._addTool(p,z,M,Q,H,I)}else if(y==="button"){M="button"+E.id+q;E._addButton(p,z,M,Q,H,I)}else y==="menu"&&E._addMenuItem(p,Q,H,I)}}},whenHidden:function(q,p){q=
typeof q==="string"?q:q.id;if(!this.hidden)this.hidden={};if(this.hidden[q])this.hidden[q].push(p);else this.hidden[q]=[p]},generateSeparatorImage:function(q){q=d.create("span",null,q,"last");d.addClass(q,"core-sprite-sep");d.addClass(q,"imageSprite");d.addClass(q,"commandSeparator");return q}};h.prototype.constructor=h;j.prototype={_init:function(q){this.id=q.id;this.name=q.name;this.tooltip=q.tooltip||q.name;this.callback=q.callback;this.hrefCallback=q.hrefCallback;this.choiceCallback=q.choiceCallback;
this.image=q.image||c.toUrl("images/none.png");this.imageClass=q.imageClass;this.spriteClass=q.spriteClass||"commandSprite";this.visibleWhen=q.visibleWhen;this.parameters=q.parameters},_addTool:function(q,p,t,v,w,y){v.handler=v.handler||this;var z,F;if(this.hrefCallback){z=this._makeLink(v);if(!z)return}else{z=d.create("span",{tabindex:"0",role:"button"});if(p||!this.hasImage()){p=window.document.createTextNode(this.name);d.place(p,z,"last");d.addClass(z,"commandMissingImageButton commandButton")}else{F=
i(this,z,t);this._addAccessibleLabel(z)}this._hookCallback(z,v);this._setupActivateVisuals(z,z,w,y,F?"commandImageOver":"commandButtonOver")}v.domNode=z;v.domParent=q;this.tooltip&&new s({connectId:[z],label:this.tooltip,position:["above","left","right","below"],commandParent:q,commandService:v.commandService});d.place(z,q,"last")},_addButton:function(q,p,t,v,w,y){v.handler=v.handler||this;if(this.hrefCallback){p=this._makeLink(v);if(!p)return}else{p=d.create("span",{tabindex:"0",role:"button"});
this._hookCallback(p,v);var z;if(this.name){d.place(window.document.createTextNode(this.name),p,"last");d.addClass(p,"commandButton");z="commandButtonOver"}else{i(this,p,t);z="commandImageOver";this._addAccessibleLabel(p)}this._setupActivateVisuals(p,p,w,y,z)}p.id=t;this.tooltip&&new s({connectId:[p],label:this.tooltip,position:["above","left","right","below"],commandParent:q,commandService:v.commandService});v.domParent=q;v.domNode=p;d.place(p,q,"last")},_addMenuItem:function(q,p){p.domParent=q.domNode;
var t=new r({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:this.imageClass,hrefCallback:!!this.hrefCallback});this.tooltip&&new s({connectId:[t.domNode],label:this.tooltip,commandParent:q,commandService:p.commandService});if(this.hrefCallback){var v=this.hrefCallback.call(p.handler,p);if(v)if(v.then)v.then(d.hitch(this,function(w){t.set("label","<a href='"+w+"'>"+this.name+"</a>")}));else if(v)t.set("label","<a href='"+v+"'>"+this.name+"</a>");else return}else if(this.callback)t.onClick=
this.parameters&&p.collectsParameters()?d.hitch(this,function(){p.commandService._collectParameters(p)}):d.hitch(this,function(){this.callback.call(p.handler,p)});t.eclipseCommand=this;q.addChild(t);if(this.imageClass)d.addClass(t.iconNode,this.spriteClass);else if(this.image){d.addClass(t.iconNode,"commandMenuItem");t.iconNode.src=this.image}p.domNode=t.domNode},_makeLink:function(q){var p=d.create("a",{tabindex:"0"});d.addClass(p,"commandLink");d.place(window.document.createTextNode(this.name),
p,"last");q=this.hrefCallback.call(q.handler,q);if(q.then)q.then(function(t){p.href=t});else if(q)p.href=q;else return null;return p},_hookCallback:function(q,p){d.connect(q,"onclick",this,function(){if(this.parameters&&p.collectsParameters())p.commandService._collectParameters(p);else this.callback&&this.callback.call(p.handler,p)});d.connect(q,"onkeypress",this,function(t){if(t.keyCode===d.keys.ENTER||t.keyCode===d.keys.SPACE)if(this.parameters&&p.collectsParameters())p.commandService._collectParameters(p);
else this.callback&&this.callback.call(p.handler,p)})},_addAccessibleLabel:function(q){var p=this.name||this.tooltip;p&&d.attr(q,"aria-label",p)},_setupActivateVisuals:function(q,p,t,v,w){v&&d.addClass(q,v);var y=function(){w&&d.addClass(this,w);t&&d.addClass(this,t);v&&d.removeClass(this,v)},z=function(){w&&d.removeClass(this,w);t&&d.removeClass(this,t);v&&d.addClass(this,v)};d.connect(q,"onmouseover",q,y);d.connect(p,"onfocus",q,y);d.connect(q,"onmouseout",q,z);d.connect(p,"onblur",q,z)},populateChoicesMenu:function(q,
p,t,v){q.focusedChild=null;d.forEach(q.getChildren(),function(z){q.removeChild(z);z.destroy()});t=this.getChoices(p,t,v);for(v=0;v<t.length;v++){var w=t[v],y;if(w.name){y=new a.MenuItem({label:w.name,iconClass:w.imageClass,onClick:this.makeChoiceCallback(w,p)});if(w.imageClass)d.addClass(y.iconNode,w.spriteClass||"commandSprite");else if(w.image){d.addClass(y.iconNode,"commandImage");y.iconNode.src=w.image}}else y=new a.MenuSeparator;q.addChild(y)}},getChoices:function(q,p,t){if(this.choiceCallback)return this.choiceCallback.call(p,
q,t);return null},makeChoiceCallback:function(q,p){return function(t){q.callback&&q.callback.call(q,p,t)}},hasImage:function(){return this.imageClass||this.image!==c.toUrl("images/none.png")}};j.prototype.constructor=j;var o=window.navigator.platform.indexOf("Mac")!==-1;k.prototype={match:function(q){if(this.keyCode===q.keyCode){if(this.mod1!==(o?q.metaKey:q.ctrlKey))return false;if(this.mod2!==q.shiftKey)return false;if(this.mod3!==q.altKey)return false;if(o&&this.mod4!==q.ctrlKey)return false;return true}return false},
equals:function(q){if(!q)return false;if(this.keyCode!==q.keyCode)return false;if(this.mod1!==q.mod1)return false;if(this.mod2!==q.mod2)return false;if(this.mod3!==q.mod3)return false;if(this.mod4!==q.mod4)return false;return true}};k.prototype.constructor=k;l.prototype={match:function(q){q=f.matchResourceParameters(q);if(typeof q[this.token]!=="undefined"){this.parameterValue=q[this.token];return this}return null}};l.prototype.constructor=l;m.prototype={optionsRequested:function(){return this.optionsRequested}};
m.prototype.constructor=m;n.prototype={_storeParameters:function(q){this.parameterTable=null;if(q){this.parameterTable={};for(var p=0;p<q.length;p++)this.parameterTable[q[p].name]=q[p]}},updateParameters:function(q){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(q))},hasParameters:function(){return this.parameterTable!==null},parameterNamed:function(q){return this.parameterTable[q]},valueFor:function(q){if(q=this.parameterTable[q])return q.value;return null},setValue:function(q,
p){if(q=this.parameterTable[q])q.value=p},forEach:function(q){for(var p in this.parameterTable)this.parameterTable[p].type&&this.parameterTable[p].name&&q(this.parameterTable[p])},makeCopy:function(){var q=[];this.forEach(function(p){p=new m(p.name,p.type,p.label,p.value);q.push(p)});return new n(q,this.options,this.getParameters)}};n.prototype.constructor=n;return{CommandService:h,CommandKeyBinding:k,Command:j,CommandInvocation:g,CommandMenuItem:r,URLBinding:l,ParametersDescription:n,CommandParameter:m,
CommandTooltip:s}});
define("orion/parameterCollectors",["require","dojo","dijit","orion/commands","orion/util","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton"],function(c,d,a,e,f){function g(){this._activeContainer=null}g.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&d.empty(this._activeElements.parameterArea);if(this._activeElements.parameterContainer){d.removeClass(this._activeElements.parameterContainer,"slideActive");d.removeClass(this._activeElements.slideContainer,"slideContainerActive")}this._activeElements.dismissArea&&
d.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&d.removeClass(this._activeElements.commandNode,"activeCommand");f.forceLayout(this._activeElements.parameterContainer);if(this._oldFocusNode){this._oldFocusNode.focus();this._oldFocusNode=null}}this._activeElements=null},_findParameterElements:function(h){var i={},j=null;if(typeof h==="string")h=d.byId(h);for(var k=h;k;){if(d.hasClass(k,"toolComposite")){j=k;break}k=k.parentNode}if(d.hasClass(h,"commandMarker"))i.commandNode=
h;if(j){i.slideContainer=d.query(".slideParameters",j)[0];i.parameterContainer=d.query(".slide",j)[0];i.parameterArea=d.query(".parameters",j)[0];i.dismissArea=d.query(".parametersDismiss",j)[0]}return i},open:function(h,i){if(typeof h==="string")h=d.byId(h);this.close();this._activeElements=null;if((this._activeElements=this._findParameterElements(h))&&this._activeElements.parameterArea&&this._activeElements.slideContainer&&this._activeElements.parameterContainer){var j=i(this._activeElements.parameterArea);
h=d.query("#closebox",this._activeElements.parameterArea);if(h.length===0){h=d.create("span",{id:"closebox",role:"button",tabindex:"0"},this._activeElements.dismissArea||this._activeElements.parameterArea,"last");d.addClass(h,"imageSprite");d.addClass(h,"core-sprite-close");d.addClass(h,"dismiss");h.title="Close";d.connect(h,"onclick",d.hitch(this,function(){this.close(this._activeElements)}));d.connect(h,"onkeypress",d.hitch(this,function(k){k.keyCode===d.keys.ENTER&&this.close(this._activeElements)}))}d.addClass(this._activeElements.slideContainer,
"slideContainerActive");d.addClass(this._activeElements.parameterContainer,"slideActive");f.forceLayout(this._activeElements.parameterContainer);if(j){this._oldFocusNode=window.document.activeElement;window.setTimeout(function(){j.focus();j.select()},0)}this._activeElements.commandNode&&d.addClass(this._activeElements.commandNode,"activeCommand");return true}return false},_collectAndCall:function(h,i){d.query("input",i).forEach(function(j){j.type!=="button"&&h.parameters.setValue(j.parameterName,
j.value)});h.command.callback&&h.command.callback.call(h.handler,h)},collectParameters:function(h){if(h.parameters){h.domNode&&d.addClass(h.domNode,"commandMarker");return this.open(h.domNode||h.domParent,this.getFillFunction(h))}return false},getFillFunction:function(h,i){return d.hitch(this,function(j){var k=null,l=d.hitch(this,function(){i?i():this.close(h.domNode)}),m=d.hitch(this,function(s){s.keyCode===d.keys.ENTER&&this._collectAndCall(h,j);if(s.keyCode===d.keys.ESCAPE||s.keyCode===d.keys.ENTER){l();
d.stopEvent(s)}});h.parameters.forEach(function(s){s.label&&d.place(document.createTextNode(s.label),j,"last");var o=d.create("input",{type:s.type},j,"last");d.addClass(o,"parameterInput");d.addClass(o,"parameterInput"+s.type);o.setAttribute("speech","speech");o.setAttribute("x-webkit-speech","x-webkit-speech");o.parameterName=s.name;k||(k=o);if(s.value)o.value=s.value;d.connect(o,"onkeypress",m)});var n=function(s){s._collectAndCall(h,j);l()};if(h.parameters.options){h.parameters.optionsRequested=
false;var r=d.create("span",{role:"button",tabindex:"0"},j,"last");d.place(window.document.createTextNode("More"),r,"last");d.addClass(r,"dismiss");d.connect(r,"onclick",d.hitch(this,function(){h.parameters.optionsRequested=true;n(this)}));d.connect(r,"onkeypress",d.hitch(this,function(s){if(s.keyCode===d.keys.ENTER){h.parameters.optionsRequested=true;n(this)}}))}spacer=d.create("span",null,j,"last");d.addClass(spacer,"dismiss");r=d.create("span",{role:"button",tabindex:"0"},j,"last");d.place(window.document.createTextNode("Submit"),
r,"last");d.addClass(r,"dismiss");d.connect(r,"onclick",d.hitch(this,function(){n(this)}));d.connect(r,"onkeypress",d.hitch(this,function(s){s.keyCode===d.keys.ENTER&&n(this)}));spacer=d.create("span",null,j,"last");d.addClass(spacer,"dismiss");r=d.create("span",{id:"closebox",role:"button",tabindex:"0"},j,"last");d.addClass(r,"imageSprite");d.addClass(r,"core-sprite-close");d.addClass(r,"dismiss");r.title="Close";d.connect(r,"onclick",d.hitch(this,function(){l()}));d.connect(r,"onkeypress",d.hitch(this,
function(s){s.keyCode===d.keys.ENTER&&l()}));return k})}};g.prototype.constructor=g;return{CommandParameterCollector:g}});define("orion/editor/regex",[],function(){function c(a){return a.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")}function d(a){if(a=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(a))return{pattern:a[1],flags:a[2]};return null}return{escape:c,parse:d}});
define("orion/contentTypes",[],function(){function c(a){function e(k,l,m,n){m=l.filename.indexOf(m)>=0;var r=l.extension.indexOf(n)>=0;if(m||r)if(!k||m&&k.extension.indexOf(n)>=0)return l;return k}for(var f=a&&a.split(".").pop(),g=this.getContentTypes(),h=null,i=0;i<g.length;i++){var j=g[i];if(e(h,j,a,f)===j)h=j}return h}function d(a){function e(f){function g(m){if(m===null||typeof m==="undefined")return[];return m instanceof Array?m:[m]}f=f.getServiceReferences("orion.file.contenttype");for(var h=
{},i=0;i<f.length;i++)for(var j=g(f[i].getProperty("contentTypes")),k=0;k<j.length;k++){var l=j[k];h[l.id]||(h[l.id]={id:l.id,name:l.name,image:l.image,"extends":l["extends"],extension:g(l.extension),filename:g(l.filename)})}return h}this.serviceRegistry=a;this.map=e(a);a.registerService("orion.file.contenttypes",this)}d.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),e=[];for(var f in a)a.hasOwnProperty(f)&&e.push(a[f]);return e},getContentTypesMap:function(){return this.map},
getFileContentType:function(a){return c.call(this,a.Name)},getFilenameContentType:function(a){return c.call(this,a)},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,e){a=typeof a==="string"?this.getContentType(a):a;e=typeof e==="string"?this.getContentType(e):e;if(!a||!e)return false;if(a.id===e.id)return true;else{a=a;for(var f={};a&&(a=this.getContentType(a["extends"]));){if(a.id===e.id)return true;if(f[a.id])throw new Error("Cycle: "+a.id);f[a.id]=true}}return false},
isSomeExtensionOf:function(a,e){for(var f=0;f<e.length;f++)if(this.isExtensionOf(a,e[f]))return true;return false}};return{ContentTypeService:d}});
define("orion/URITemplate",["require","exports","module"],function(){function c(l){this._text=l}function d(l,m){if(m==="U")return encodeURIComponent(l).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()});if(m==="U+R")return encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]");if(m==="U+R-,")return encodeURI(l).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw new Error("Unknown allowed character set: "+m);}function a(l,m,n){for(var r=[],s=0;s<l.length;s++)typeof l[s]!==
"undefined"&&r.push(d(l[s],m));return r.join(n)}function e(l,m,n,r){for(var s=Object.keys(l),o=[],q=0;q<s.length;q++)typeof l[s[q]]!=="undefined"&&o.push(d(s[q],m)+n+d(l[s[q]],m));return o.join(r)}function f(l){for(var m=[],n=l.split(","),r=0;r<n.length;r++){var s=n[r].match(k);if(s===null)throw new Error("Bad VarSpec: "+l);m.push({name:s[1],explode:!!s[2],prefix:s[3]?parseInt(s[3],10):-1})}return m}function g(l){if(l.length===0)throw new Error("Invalid Expression: 0 length expression");if(this._operator=
j[l[0]])l=l.substring(1);else this._operator=j.NUL;this._varSpecList=f(l)}function h(l){for(var m=[],n=0,r=l.indexOf("{",n);r!==-1;){m.push(new c(l.substring(n,r)));n=l.indexOf("}",r+1);if(n===-1)throw new Error("Invalid template: "+l);m.push(new g(l.substring(r+1,n)));n=n+1;r=l.indexOf("{",n)}m.push(new c(l.substring(n)));return m}function i(l){this._templateComponents=h(l)}var j={NUL:{first:"",sep:",",named:false,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:false,ifemp:"",allow:"U+R"},".":{first:".",
sep:",",named:false,ifemp:"",allow:"U"},"/":{first:"/",sep:"/",named:false,ifemp:"",allow:"U"},";":{first:";",sep:";",named:true,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:true,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:true,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:false,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:false,ifemp:"",allow:"U+R-,"}},k=/^((?:(?:[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(l){for(var m=[],n=0;n<this._varSpecList.length;n++){var r=this._varSpecList[n],s=r.name,o=l[s],q=typeof o;if(q!=="undefined"&&o!==null){var p=m.length===0?this._operator.first:this._operator.sep;if(q==="string"){if(this._operator.named){p+=d(s,"U+R");p+=o.length===0?this._operator.ifemp:"="}if(r.prefix!==-1&&r.prefix<o.length)o=o.substring(0,r.prefix);p+=d(o,this._operator.allow)}else if(Array.isArray(o))if(r.explode)p+=
a(o,this._operator.allow,this._operator.sep);else{if(this._operator.named){p+=d(s,"U+R");p+=o.length===0?this._operator.ifemp:"="}p+=a(o,this._operator.allow,",")}else if(q==="object")if(r.explode)p+=e(o,this._operator.allow,"=",this._operator.sep);else{if(this._operator.named){p+=d(s,"U+R");p+=Object.keys(o).length===0?this._operator.ifemp:"="}p+=e(o,this._operator.allow,",",",")}else throw new Error("bad param type: "+s+" : "+q);m.push(p)}}return m.join("")}};i.prototype={expand:function(l){for(var m=
[],n=0;n<this._templateComponents.length;n++)m.push(this._templateComponents[n].expand(l));return m.join("")}};return i});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",true,c);c.dnd.getCopyKeyState=c.isCopyKey;c.dnd._uniqueId=0;c.dnd.getUniqueId=function(){var d;do d=c._scopeName+"Unique"+ ++c.dnd._uniqueId;while(c.byId(d));return d};c.dnd._empty={};c.dnd.isFormElement=function(d){d=d.target;if(d.nodeType==3)d=d.parentNode;return" button textarea input select option ".indexOf(" "+d.tagName.toLowerCase()+" ")>=0};return c.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(c){c.getObject("dnd",true,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(d){var a=c.window.getBox(),e=0,f=0;if(d.clientX<c.dnd.H_TRIGGER_AUTOSCROLL)e=-c.dnd.H_AUTOSCROLL_VALUE;else if(d.clientX>a.w-c.dnd.H_TRIGGER_AUTOSCROLL)e=c.dnd.H_AUTOSCROLL_VALUE;if(d.clientY<c.dnd.V_TRIGGER_AUTOSCROLL)f=-c.dnd.V_AUTOSCROLL_VALUE;
else if(d.clientY>a.h-c.dnd.V_TRIGGER_AUTOSCROLL)f=c.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(e,f)};c.dnd._validNodes={div:1,p:1,td:1};c.dnd._validOverflow={auto:1,scroll:1};c.dnd.autoScrollNodes=function(d){for(var a=d.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in c.dnd._validNodes){var e=c.getComputedStyle(a);if(e.overflow.toLowerCase()in c.dnd._validOverflow){var f=c._getContentBox(a,e);e=c.position(a,true);var g=Math.min(c.dnd.H_TRIGGER_AUTOSCROLL,f.w/2),h=Math.min(c.dnd.V_TRIGGER_AUTOSCROLL,
f.h/2),i=d.pageX-e.x,j=d.pageY-e.y,k=e=0;if(c.isWebKit||c.isOpera){i+=c.body().scrollLeft;j+=c.body().scrollTop}if(i>0&&i<f.w)if(i<g)e=-g;else if(i>f.w-g)e=g;if(j>0&&j<f.h)if(j<h)k=-h;else if(j>f.h-h)k=h;f=a.scrollLeft;g=a.scrollTop;a.scrollLeft+=e;a.scrollTop+=k;if(f!=a.scrollLeft||g!=a.scrollTop)return}}try{a=a.parentNode}catch(l){a=null}}c.dnd.autoScroll(d)};return c.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(c){c.declare("dojo.dnd.Mover",null,{constructor:function(d,a,e){this.node=c.byId(d);var f=a.touches?a.touches[0]:a;this.marginBox={l:f.pageX,t:f.pageY};this.mouseButton=a.button;a=this.host=e;d=d.ownerDocument;this.events=[c.connect(d,"onmousemove",this,"onFirstMove"),c.connect(d,"ontouchmove",this,"onFirstMove"),c.connect(d,"onmousemove",this,"onMouseMove"),c.connect(d,"ontouchmove",this,"onMouseMove"),c.connect(d,
"onmouseup",this,"onMouseUp"),c.connect(d,"ontouchend",this,"onMouseUp"),c.connect(d,"ondragstart",c.stopEvent),c.connect(d.body,"onselectstart",c.stopEvent)];a&&a.onMoveStart&&a.onMoveStart(this)},onMouseMove:function(d){c.dnd.autoScroll(d);var a=this.marginBox,e=d.touches?d.touches[0]:d;this.host.onMove(this,{l:a.l+e.pageX,t:a.t+e.pageY},d);c.stopEvent(d)},onMouseUp:function(d){if(c.isWebKit&&c.isMac&&this.mouseButton==2?d.button==0:this.mouseButton==d.button)this.destroy();c.stopEvent(d)},onFirstMove:function(d){var a=
this.node.style,e,f=this.host;switch(a.position){case "relative":case "absolute":e=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=c.marginBox(this.node);e=c.doc.body;var g=c.getComputedStyle(e),h=c._getMarginBox(e,g);g=c._getContentBox(e,g);e=a.l-(g.l-h.l);a=a.t-(g.t-h.t);break}this.marginBox.l=e-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;f&&f.onFirstMove&&f.onFirstMove(this,d);c.disconnect(this.events.shift());c.disconnect(this.events.shift())},
destroy:function(){c.forEach(this.events,c.disconnect);var d=this.host;d&&d.onMoveStop&&d.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:false,constructor:function(d,a){this.node=c.byId(d);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(d,a){return new c.dnd.Moveable(a,d)},destroy:function(){c.forEach(this.events,c.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(d){if(!(this.skip&&c.dnd.isFormElement(d))){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=d.touches?d.touches[0]:d;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(d);c.stopEvent(d)}},onMouseMove:function(d){var a=d.touches?d.touches[0]:d;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay){this.onMouseUp(d);this.onDragDetected(d)}c.stopEvent(d)},onMouseUp:function(d){for(var a=0;a<2;++a)c.disconnect(this.events.pop());c.stopEvent(d)},onSelectStart:function(d){if(!this.skip||
!c.dnd.isFormElement(d))c.stopEvent(d)},onDragDetected:function(d){new this.mover(this.node,d,this)},onMoveStart:function(d){c.publish("/dnd/move/start",[d]);c.addClass(c.body(),"dojoMove");c.addClass(this.node,"dojoMoveItem")},onMoveStop:function(d){c.publish("/dnd/move/stop",[d]);c.removeClass(c.body(),"dojoMove");c.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(d,a){this.onMoving(d,a);var e=d.node.style;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(d,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:false,markupFactory:function(d,a){return new c.dnd.move.constrainedMoveable(a,d)},constructor:function(d,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(d){var a=this.constraintBox=this.constraints.call(this,d);a.r=a.l+a.w;a.b=a.t+a.h;if(this.within){d=c._getMarginSize(d.node);a.r-=d.w;
a.b-=d.h}},onMove:function(d,a){var e=this.constraintBox,f=d.node.style;this.onMoving(d,a);a.l=a.l<e.l?e.l:e.r<a.l?e.r:a.l;a.t=a.t<e.t?e.t:e.b<a.t?e.b:a.t;f.left=a.l+"px";f.top=a.t+"px";this.onMoved(d,a)}});c.declare("dojo.dnd.move.boxConstrainedMoveable",c.dnd.move.constrainedMoveable,{box:{},markupFactory:function(d,a){return new c.dnd.move.boxConstrainedMoveable(a,d)},constructor:function(d,a){var e=a&&a.box;this.constraints=function(){return e}}});c.declare("dojo.dnd.move.parentConstrainedMoveable",
c.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(d,a){return new c.dnd.move.parentConstrainedMoveable(a,d)},constructor:function(d,a){var e=a&&a.area;this.constraints=function(){var f=this.node.parentNode,g=c.getComputedStyle(f),h=c._getMarginBox(f,g);if(e=="margin")return h;var i=c._getMarginExtents(f,g);h.l+=i.l;h.t+=i.t;h.w-=i.w;h.h-=i.h;if(e=="border")return h;i=c._getBorderExtents(f,g);h.l+=i.l;h.t+=i.t;h.w-=i.w;h.h-=i.h;if(e=="padding")return h;i=c._getPadExtents(f,g);h.l+=
i.l;h.t+=i.t;h.w-=i.w;h.h-=i.h;return h}}});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 d=c.dnd.Moveable.prototype.onMove;c.declare("dojo.dnd.TimedMoveable",c.dnd.Moveable,{timeout:40,constructor:function(a,e){e||(e={});if(e.timeout&&typeof e.timeout=="number"&&e.timeout>=0)this.timeout=e.timeout},markupFactory:function(a,e){return new c.dnd.TimedMoveable(e,a)},onMoveStop:function(a){if(a._timer){clearTimeout(a._timer);d.call(this,a,a._leftTop)}c.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,e){a._leftTop=e;if(!a._timer){var f=this;a._timer=setTimeout(function(){a._timer=null;d.call(f,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(d){var a=this;c.mixin(a,d);a.node=d.node;a._showArgs=c.mixin({},d);a._showArgs.node=a.node;a._showArgs.duration=a.showDuration;a.showAnim=a.showFunc(a._showArgs);a._hideArgs=c.mixin({},d);a._hideArgs.node=a.node;a._hideArgs.duration=a.hideDuration;a.hideAnim=a.hideFunc(a._hideArgs);c.connect(a.showAnim,"beforeBegin",c.hitch(a.hideAnim,
"stop",true));c.connect(a.hideAnim,"beforeBegin",c.hitch(a.showAnim,"stop",true))},show:function(d){return this.showAnim.play(d||0)},hide:function(d){return this.hideAnim.play(d||0)}});return c.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(c){(function(){var d={_fire:function(f,g){if(this[f])this[f].apply(this,g||[]);return this}},a=function(f){this._index=-1;this._animations=f||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;c.forEach(this._animations,function(g){this.duration+=g.duration;if(g.delay)this.duration+=g.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;if(this._index+1==this._animations.length)this._fire("onEnd");else{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,true)}},play:function(f,g){if(!this._current)this._current=this._animations[this._index=0];if(!g&&this._current.status()=="playing")return this;var h=c.connect(this._current,"beforeBegin",this,
function(){this._fire("beforeBegin")}),i=c.connect(this._current,"onBegin",this,function(){this._fire("onBegin",arguments)}),j=c.connect(this._current,"onPlay",this,function(){this._fire("onPlay",arguments);c.disconnect(h);c.disconnect(i);c.disconnect(j)});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 f=c.connect(this._current,"onPause",this,function(){this._fire("onPause",arguments);c.disconnect(f)});this._current.pause()}return this},gotoPercent:function(f,g){this.pause();var h=this.duration*f;this._current=null;c.some(this._animations,function(i){if(i.duration<=h){this._current=i;return true}h-=i.duration;return false});this._current&&this._current.gotoPercent(h/this._current.duration,g);return this},stop:function(f){if(this._current){if(f){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(true);this._current=this._animations[this._index]}var g=c.connect(this._current,"onStop",this,function(){this._fire("onStop",arguments);c.disconnect(g)});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,d);c.fx.chain=function(f){return new a(f)};
var e=function(f){this._animations=f||[];this._connects=[];this.duration=this._finished=0;c.forEach(f,function(h){var i=h.duration;if(h.delay)i+=h.delay;if(this.duration<i)this.duration=i;this._connects.push(c.connect(h,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new c.Animation({curve:[0,1],duration:this.duration});var g=this;c.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(h){g._connects.push(c.connect(g._pseudoAnimation,h,function(){g._fire(h,
arguments)}))})};c.extend(e,{_doAction:function(f,g){c.forEach(this._animations,function(h){h[f].apply(h,g)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(f,g){var h=this._pseudoAnimation;h[f].apply(h,g)},play:function(){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(f,g){var h=
this.duration*f;c.forEach(this._animations,function(i){i.gotoPercent(i.duration<h?1:h/i.duration,g)});this._call("gotoPercent",arguments);return this},stop:function(){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(e,d);c.fx.combine=function(f){return new e(f)};c.fx.wipeIn=function(f){var g=f.node=c.byId(f.node),h=g.style,i;f=c.animateProperty(c.mixin({properties:{height:{start:function(){i=
h.overflow;h.overflow="hidden";if(h.visibility=="hidden"||h.display=="none"){h.height="1px";h.display="";h.visibility="";return 1}else{var j=c.style(g,"height");return Math.max(j,1)}},end:function(){return g.scrollHeight}}}},f));c.connect(f,"onEnd",function(){h.height="auto";h.overflow=i});return f};c.fx.wipeOut=function(f){var g=(f.node=c.byId(f.node)).style,h;f=c.animateProperty(c.mixin({properties:{height:{end:1}}},f));c.connect(f,"beforeBegin",function(){h=g.overflow;g.overflow="hidden";g.display=
""});c.connect(f,"onEnd",function(){g.overflow=h;g.height="auto";g.display="none"});return f};c.fx.slideTo=function(f){var g=null,h=null,i=function(j){return function(){var k=c.getComputedStyle(j),l=k.position;g=l=="absolute"?j.offsetTop:parseInt(k.top)||0;h=l=="absolute"?j.offsetLeft:parseInt(k.left)||0;if(l!="absolute"&&l!="relative"){k=c.position(j,true);g=k.y;h=k.x;j.style.position="absolute";j.style.top=g+"px";j.style.left=h+"px"}}}(f.node=c.byId(f.node));i();f=c.animateProperty(c.mixin({properties:{top:f.top||
0,left:f.left||0}},f));c.connect(f,"beforeBegin",f,i);return f}})();return c.fx});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(c,d){c.declare("dijit.DialogUnderlay",[d._Widget,d._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,e=this.domNode.style;e.display="none";var f=c.window.getBox();e.top=f.t+"px";e.left=f.l+"px";a.width=f.w+"px";a.height=f.h+"px";e.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new d.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return d.DialogUnderlay});
define("dijit/nls/common",{root:{buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"},zh:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
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"],function(c,d){c.declare("dijit._DialogBase",[d._Templated,d.form._FormMixin,d._DialogMixin,d._CssStateMixin],{templateString:c.cache("dijit","templates/Dialog.html"),
baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:c.delegate(d._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:false,duration:d.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,"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();if(this.autofocus&&d._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);d.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;if(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")}else c.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":c.map(this["class"].split(/\s/),function(e){return e+"_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),e=c.window.getBox();if(a.w>=e.w||a.h>=e.h){var f=Math.min(a.w,Math.floor(e.w*0.75));a=Math.min(a.h,Math.floor(e.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:f,h:a})}else c.style(this.containerNode,{width:f+"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,e=c.window.getBox(),f=this._relativePosition,g=f?null:c._getBorderBox(a),h=Math.floor(e.l+(f?f.x:(e.w-g.w)/2));e=Math.floor(e.t+(f?f.y:(e.h-g.h)/2));c.style(a,{left:h+"px",top:e+"px"})}},_onKey:function(a){if(a.charOrCode){var e=c.keys,f=a.target;a.charOrCode===e.TAB&&this._getFocusItems(this.domNode);var g=
this._firstFocusItem==this._lastFocusItem;if(f==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB){g||d.focus(this._lastFocusItem);c.stopEvent(a)}else if(f==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey){g||d.focus(this._firstFocusItem);c.stopEvent(a)}else{for(;f;){if(f==this.domNode||c.hasClass(f,"dijitPopup"))if(a.charOrCode==e.ESCAPE)this.onCancel();else return;f=f.parentNode}if(a.charOrCode!==e.TAB)c.stopEvent(a);else if(!c.isOpera)try{this._firstFocusItem.focus()}catch(h){}}}},
show:function(){if(!this.open){this._started||this.startup();if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true}this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._modalconnects.push(c.connect(window,"onscroll",this,"layout"));this._modalconnects.push(c.connect(window,"onresize",this,function(){var e=c.window.getBox();if(!this._oldViewport||e.h!=this._oldViewport.h||e.w!=this._oldViewport.w){this.layout();this._oldViewport=e}}));this._modalconnects.push(c.connect(this.domNode,
"onkeypress",this,"_onKey"));c.style(this.domNode,{opacity:0,display:""});this._set("open",true);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(){d._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:c.hitch(this,function(){if(this.autofocus&&d._DialogLevelManager.isTop(this)){this._getFocusItems(this.domNode);
d.focus(this._firstFocusItem)}this._fadeInDeferred.callback(true);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";d._DialogLevelManager.hide(this);this.onHide();
this._fadeOutDeferred.callback(true);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=false;c.forEach(this._modalconnects,c.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",false);return this._fadeOutDeferred}},layout:function(){if(this.domNode.style.display!="none"){d._underlay&&d._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);d._DialogLevelManager.hide(this);this.inherited(arguments)}});c.declare("dijit.Dialog",[d.layout.ContentPane,d._DialogBase],{});d._DialogLevelManager={show:function(a,e){var f=d._dialogStack;f[f.length-1].focus=d.getFocus(a);var g=d._underlay;if(!g||g._destroyed)g=d._underlay=new d.DialogUnderlay(e);else g.set(a.underlayAttrs);var h=
f[f.length-1].dialog?f[f.length-1].zIndex+2:950;f.length==1&&g.show();c.style(d._underlay.domNode,"zIndex",h-1);c.style(a.domNode,"zIndex",h);f.push({dialog:a,underlayAttrs:e,zIndex:h})},hide:function(a){var e=d._dialogStack;if(e[e.length-1].dialog==a){e.pop();var f=e[e.length-1];if(e.length==1)d._underlay._destroyed||d._underlay.hide();else{c.style(d._underlay.domNode,"zIndex",f.zIndex-1);d._underlay.set(f.underlayAttrs)}if(a.refocus){e=f.focus;if(!e||f.dialog&&!c.isDescendant(e.node,f.dialog.domNode)){f.dialog._getFocusItems(f.dialog.domNode);
e=f.dialog._firstFocusItem}try{d.focus(e)}catch(g){}}}else{f=c.indexOf(c.map(e,function(h){return h.dialog}),a);f!=-1&&e.splice(f,1)}},isTop:function(a){var e=d._dialogStack;return e[e.length-1].dialog==a}};d._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return d.Dialog});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/form/ToggleButton",["dojo","dijit","dijit/form/Button"],function(c,d){return d.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(c,d){c.declare("dijit.form.CheckBox",d.form.ToggleButton,{templateString:c.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:false,attributeMap:c.delegate(d.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);c.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,
"readonly",a)},_setValueAttr:function(a,e){if(typeof a=="string"){this._set("value",a);c.attr(this.focusNode,"value",a);a=true}this._created&&this.set("checked",a,e)},_getValueAttr:function(){return this.checked?this.value:false},_setLabelAttr:undefined,postMixInProperties:function(){if(this.value=="")this.value="on";this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments)},_fillContent:function(){},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||
false);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){if(this.readOnly){c.stopEvent(a);return false}return this.inherited(arguments)}});c.declare("dijit.form.RadioButton",d.form.CheckBox,{type:"radio",
baseClass:"dijitRadio",_setCheckedAttr:function(a){this.inherited(arguments);if(this._created)if(a){var e=this;c.query("INPUT[type=radio]",this.focusNode.form||c.doc).forEach(function(f){if(f.name==e.name&&f!=e.focusNode&&f.form==e.focusNode.form)(f=d.getEnclosingWidget(f))&&f.checked&&f.set("checked",false)})}},_clicked:function(){this.checked||this.set("checked",true)}});return d.form.CheckBox});
define("dijit/form/Form",["dojo","dijit","dijit/_Widget","dijit/_Templated","dijit/form/_FormMixin","dijit/layout/_ContentPaneResizeMixin"],function(c,d){c.declare("dijit.form.Form",[d._Widget,d._Templated,d.form._FormMixin,d.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:c.delegate(d._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 e={returnValue:true,preventDefault:function(){this.returnValue=false},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(e)!==false&&e.returnValue&&this.inherited(arguments,[])},onReset:function(){return true},_onReset:function(a){this.reset(a);c.stopEvent(a);return false},_onSubmit:function(a){var e=d.form.Form.prototype;if(this.execute!=e.execute||this.onExecute!=
e.onExecute){c.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues())}this.onSubmit(a)===false&&c.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==false&&this.containerNode.submit()}});return d.form.Form});
define("dojo/data/util/filter",["dojo"],function(c){c.getObject("data.util.filter",true,c);c.data.util.filter.patternToRegExp=function(d,a){for(var e="^",f=null,g=0;g<d.length;g++){f=d.charAt(g);switch(f){case "\\":e+=f;g++;e+=d.charAt(g);break;case "*":e+=".*";break;case "?":e+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":e+="\\";default:e+=f}}e+="$";return a?new RegExp(e,"mi"):new RegExp(e,"m")};return c.data.util.filter});
define("dojo/data/util/sorter",["dojo"],function(c){c.getObject("data.util.sorter",true,c);c.data.util.sorter.basicComparator=function(d,a){var e=-1;if(d===null)d=undefined;if(a===null)a=undefined;if(d==a)e=0;else if(d>a||d==null)e=1;return e};c.data.util.sorter.createSortFunction=function(d,a){function e(m,n,r,s){return function(o,q){o=s.getValue(o,m);q=s.getValue(q,m);return n*r(o,q)}}for(var f=[],g,h=a.comparatorMap,i=c.data.util.sorter.basicComparator,j=0;j<d.length;j++){g=d[j];var k=g.attribute;
if(k){g=g.descending?-1:1;var l=i;if(h){if(typeof k!=="string"&&"toString"in k)k=k.toString();l=h[k]||i}f.push(e(k,g,l,a))}}return function(m,n){for(var r=0;r<f.length;){var s=f[r++](m,n);if(s!==0)return s}return 0}};return c.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(c){c.getObject("data.util.simpleFetch",true,c);c.data.util.simpleFetch.fetch=function(d){d=d||{};if(!d.store)d.store=this;var a=this,e=function(g,h){if(h.onError)h.onError.call(h.scope||c.global,g,h)},f=function(g,h){var i=h.abort||null,j=false,k=h.start?h.start:0,l=h.count&&h.count!==Infinity?k+h.count:g.length;h.abort=function(){j=true;i&&i.call(h)};var m=h.scope||c.global;if(!h.store)h.store=a;h.onBegin&&h.onBegin.call(m,
g.length,h);h.sort&&g.sort(c.data.util.sorter.createSortFunction(h.sort,a));if(h.onItem)for(var n=k;n<g.length&&n<l;++n){var r=g[n];j||h.onItem.call(m,r,h)}if(h.onComplete&&!j){n=null;h.onItem||(n=g.slice(k,l));h.onComplete.call(m,n,h)}};this._fetchItems(d,f,e);return d};return c.data.util.simpleFetch});
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(d){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this.url=this._ccUrl=this._jsonFileUrl=d.url;this._jsonData=d.data;this.data=null;this._datatypeMap=d.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return c.date.stamp.fromISOString(a)}});
this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(d.urlPreventCache!==undefined)this.urlPreventCache=d.urlPreventCache?true:false;if(d.hierarchical!==undefined)this.hierarchical=d.hierarchical?true:false;if(d.clearOnClose)this.clearOnClose=true;if("failOk"in d)this.failOk=d.failOk?true:
false},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(d){if(!this.isItem(d))throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");},_assertIsAttribute:function(d){if(typeof d!=="string")throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");},getValue:function(d,a,e){d=this.getValues(d,a);return d.length>0?d[0]:e},getValues:function(d,a){this._assertIsItem(d);this._assertIsAttribute(a);
return(d[a]||[]).slice(0)},getAttributes:function(d){this._assertIsItem(d);var a=[];for(var e in d)e!==this._storeRefPropName&&e!==this._itemNumPropName&&e!==this._rootItemPropName&&e!==this._reverseRefMap&&a.push(e);return a},hasAttribute:function(d,a){this._assertIsItem(d);this._assertIsAttribute(a);return a in d},containsValue:function(d,a,e){var f=undefined;if(typeof e==="string")f=c.data.util.filter.patternToRegExp(e,false);return this._containsValue(d,a,e,f)},_containsValue:function(d,a,e,f){return c.some(this.getValues(d,
a),function(g){if(g!==null&&!c.isObject(g)&&f){if(g.toString().match(f))return true}else if(e===g)return true})},isItem:function(d){if(d&&d[this._storeRefPropName]===this)if(this._arrayOfAllItems[d[this._itemNumPropName]]===d)return true;return false},isItemLoaded:function(d){return this.isItem(d)},loadItem:function(d){this._assertIsItem(d.item)},getFeatures:function(){return this._features},getLabel:function(d){if(this._labelAttr&&this.isItem(d))return this.getValue(d,this._labelAttr)},getLabelAttributes:function(){if(this._labelAttr)return[this._labelAttr];
return null},_fetchItems:function(d,a,e){var f=this,g=function(k,l){var m=[],n,r;if(k.query){var s;n=k.queryOptions?k.queryOptions.ignoreCase:false;var o={};for(r in k.query){s=k.query[r];if(typeof s==="string")o[r]=c.data.util.filter.patternToRegExp(s,n);else if(s instanceof RegExp)o[r]=s}for(n=0;n<l.length;++n){var q=true,p=l[n];if(p===null)q=false;else for(r in k.query){s=k.query[r];f._containsValue(p,r,s,o[r])||(q=false)}q&&m.push(p)}}else for(n=0;n<l.length;++n){r=l[n];r!==null&&m.push(r)}a(m,
k)};if(this._loadFinished)g(d,this._getItemsArray(d.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:d,
filter:g});else{this._loadInProgress=true;var h=c.xhrGet({url:f._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});h.addCallback(function(k){try{f._getItemsFromLoadedData(k);f._loadFinished=true;f._loadInProgress=false;g(d,f._getItemsArray(d.queryOptions));f._handleQueuedFetches()}catch(l){f._loadFinished=true;f._loadInProgress=false;e(l,d)}});h.addErrback(function(k){f._loadInProgress=false;e(k,d)});var i=null;if(d.abort)i=d.abort;d.abort=function(){h&&
h.fired===-1&&h.cancel();i&&i.call(d)}}else if(this._jsonData)try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;g(d,this._getItemsArray(d.queryOptions))}catch(j){e(j,d)}else e(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),d)}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var d=0;d<this._queuedFetches.length;d++){var a=this._queuedFetches[d],e=a.args;(a=a.filter)?
a(e,this._getItemsArray(e.queryOptions)):this.fetchItemByIdentity(e)}this._queuedFetches=[]}},_getItemsArray:function(d){if(d&&d.deep)return this._arrayOfAllItems;return this._arrayOfTopLevelItems},close:function(){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){if((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=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[]}},_getItemsFromLoadedData:function(d){function a(o){return o!==null&&typeof o==="object"&&(!c.isArray(o)||f)&&!c.isFunction(o)&&(o.constructor==Object||c.isArray(o))&&typeof o._reference==="undefined"&&typeof o._type==="undefined"&&typeof o._value==="undefined"&&g.hierarchical}function e(o){g._arrayOfAllItems.push(o);for(var q in o){var p=o[q];
if(p)if(c.isArray(p))for(var t=0;t<p.length;++t){var v=p[t];a(v)&&e(v)}else a(p)&&e(p)}}var f=false,g=this;this._labelAttr=d.label;var h,i;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=d.items;for(h=0;h<this._arrayOfTopLevelItems.length;++h){i=this._arrayOfTopLevelItems[h];if(c.isArray(i))f=true;e(i);i[this._rootItemPropName]=true}var j={},k;for(h=0;h<this._arrayOfAllItems.length;++h){i=this._arrayOfAllItems[h];for(k in i){if(k!==this._rootItemPropName){var l=i[k];if(l!==null)c.isArray(l)||
(i[k]=[l]);else i[k]=[null]}j[k]=k}}for(;j[this._storeRefPropName];)this._storeRefPropName+="_";for(;j[this._itemNumPropName];)this._itemNumPropName+="_";for(;j[this._reverseRefMap];)this._reverseRefMap+="_";if(j=d.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=j;for(h=0;h<this._arrayOfAllItems.length;++h){i=this._arrayOfAllItems[h];d=i[j];d=d[0];if(Object.hasOwnProperty.call(this._itemsByIdentity,d))if(this._jsonFileUrl)throw new Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+
this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+j+"].  Value collided: ["+d+"]");else{if(this._jsonData)throw new Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+j+"].  Value collided: ["+d+"]");}else this._itemsByIdentity[d]=i}}else this._features["dojo.data.api.Identity"]=Number;for(h=0;h<this._arrayOfAllItems.length;++h){i=this._arrayOfAllItems[h];i[this._storeRefPropName]=
this;i[this._itemNumPropName]=h}for(h=0;h<this._arrayOfAllItems.length;++h){i=this._arrayOfAllItems[h];for(k in i){d=i[k];for(j=0;j<d.length;++j){l=d[j];if(l!==null&&typeof l=="object"){if("_type"in l&&"_value"in l){var m=l._type,n=this._datatypeMap[m];if(n)if(c.isFunction(n))d[j]=new n(l._value);else if(c.isFunction(n.deserialize))d[j]=n.deserialize(l._value);else throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
else throw new 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){n=this._arrayOfAllItems[m];var r=true;for(var s in l)if(n[s]!=l[s])r=false;if(r)d[j]=n}else d[j]=this._getItemByIdentity(l);if(this.referenceIntegrity){l=d[j];this.isItem(l)&&this._addReferenceToMap(l,i,k)}}else this.isItem(l)&&this.referenceIntegrity&&this._addReferenceToMap(l,
i,k)}}}}},_addReferenceToMap:function(){},getIdentity:function(d){var a=this._features["dojo.data.api.Identity"];if(a===Number)return d[this._itemNumPropName];else if(d=d[a])return d[0];return null},fetchItemByIdentity:function(d){var a,e;if(this._loadFinished){a=this._getItemByIdentity(d.identity);if(d.onItem){e=d.scope?d.scope:c.global;d.onItem.call(e,a)}}else{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==null){this._jsonData=this.data;this.data=null}if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:d});else{this._loadInProgress=true;e=c.xhrGet({url:f._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});e.addCallback(function(g){var h=d.scope?d.scope:c.global;try{f._getItemsFromLoadedData(g);
f._loadFinished=true;f._loadInProgress=false;a=f._getItemByIdentity(d.identity);d.onItem&&d.onItem.call(h,a);f._handleQueuedFetches()}catch(i){f._loadInProgress=false;d.onError&&d.onError.call(h,i)}});e.addErrback(function(g){f._loadInProgress=false;if(d.onError)d.onError.call(d.scope?d.scope:c.global,g)})}else if(this._jsonData){f._getItemsFromLoadedData(f._jsonData);f._jsonData=null;f._loadFinished=true;a=f._getItemByIdentity(d.identity);if(d.onItem){e=d.scope?d.scope:c.global;d.onItem.call(e,a)}}}},
_getItemByIdentity:function(d){var a=null;if(this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,d))a=this._itemsByIdentity[d];else if(Object.hasOwnProperty.call(this._arrayOfAllItems,d))a=this._arrayOfAllItems[d];if(a===undefined)a=null;return a},getIdentityAttributes:function(){var d=this._features["dojo.data.api.Identity"];return d===Number?null:[d]},_forceLoad:function(){var d=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:true});a.addCallback(function(e){try{if(d._loadInProgress!==true&&!d._loadFinished){d._getItemsFromLoadedData(e);d._loadFinished=true}else if(d._loadInProgress)throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");
}catch(f){console.log(f);throw f;}});a.addErrback(function(e){throw e;})}else if(this._jsonData){d._getItemsFromLoadedData(d._jsonData);d._jsonData=null;d._loadFinished=true}}});c.extend(c.data.ItemFileReadStore,c.data.util.simpleFetch);return c.data.ItemFileReadStore});
define("orion/widgets/_OrionDialogMixin",["dojo","dijit"],function(c,d){c.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||"Information Needed";this.buttonCancel="Cancel"},postCreate:function(){this.inherited(arguments);c.connect(this,"onKeyPress",c.hitch(this,function(a){a.keyCode===c.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(c.hitch(this,function(){if(c.isDescendant(d._curFocus,
this.domNode))d._curFocus=null;if(c.isDescendant(d._prevFocus,this.domNode))d._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("orion/widgets/NewItemDialog",["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"],function(c,d){c.declare("orion.widgets.NewItemDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/NewItemDialog.html"),constructor:function(a){this.options=
a||{};this.options.advanced=this.options.advanced||false},postMixInProperties:function(){this.inherited(arguments);this.itemNameLabelText=this.options.label||"Name:"},postCreate:function(){this.inherited(arguments);if(this.options.advanced){this.itemAdvancedInfo.style.display="table-row";this.itemAdvancedInfo1.style.display="table-row";c.connect(this.itemURL,"onkeyup",null,c.hitch(this,this.onURLChange))}else{this.itemAdvancedInfo.style.display="none";this.itemAdvancedInfo1.style.display="none"}},
execute:function(){var a,e;this.newItemButton.focus();if(this.options.advanced){a=this.itemURL.value.replace(/^\s+|\s+$/g,"");e=this.createCheckbox.get("disabled")?false:this.createCheckbox.get("checked")}this.options.func(this.itemName.value,a&&a!==""?a:undefined,e)},onURLChange:function(){var a=this.itemURL.value;if(a.match(/^file:\/\//))this.createCheckbox.set("disabled",false);else a.match(/^[a-zA-Z][a-zA-Z]+:\/\/.+/)?this.createCheckbox.set("disabled",true):this.createCheckbox.set("disabled",
false)}})});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(d,a,e,f){var g=[];c.Deferred.call(this);var h=this;d.length===0&&!a&&this.resolve([0,[]]);var i=0;c.forEach(d,function(j,k){function l(m,n){g[k]=[m,n];i++;i===d.length&&h.resolve(g)}j.then(function(m){a?h.resolve([k,m]):l(true,m)},function(m){e?h.reject(m):l(false,m);if(f)return null;throw m;})})};c.DeferredList.prototype=new c.Deferred;c.DeferredList.prototype.gatherResults=function(d){d=new c.DeferredList(d,false,true,false);
d.addCallback(function(a){var e=[];c.forEach(a,function(f){e.push(f[1])});return e});return d};return c.DeferredList});
define("dojo/regexp",["dojo"],function(c){c.getObject("regexp",true,c);c.regexp.escapeString=function(d,a){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(e){if(a&&a.indexOf(e)!=-1)return e;return"\\"+e})};c.regexp.buildGroupRE=function(d,a,e){if(!(d instanceof Array))return a(d);for(var f=[],g=0;g<d.length;g++)f.push(a(d[g]));return c.regexp.group(f.join("|"),e)};c.regexp.group=function(d,a){return"("+(a?"?:":"")+d+")"};return c.regexp});
define("dojo/cookie",["dojo","dojo/regexp"],function(c){c.cookie=function(d,a,e){var f=document.cookie;if(arguments.length==1){var g=f.match(new RegExp("(?:^|; )"+c.regexp.escapeString(d)+"=([^;]*)"));return g?decodeURIComponent(g[1]):undefined}else{e=e||{};f=e.expires;if(typeof f=="number"){var h=new Date;h.setTime(h.getTime()+f*24*60*60*1E3);f=e.expires=h}if(f&&f.toUTCString)e.expires=f.toUTCString();a=encodeURIComponent(a);f=d+"="+a;for(g in e){f+="; "+g;h=e[g];if(h!==true)f+="="+h}document.cookie=
f}};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,d){c.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(a){c.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw new 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,e){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:c.hitch(this,function(f){if(f.length!=1)throw new Error(this.declaredClass+": query "+c.toJson(this.query)+" returned "+f.length+" items, but must return exactly one item");this.root=f[0];a(this.root)}),onError:e})},mayHaveChildren:function(a){return c.some(this.childrenAttrs,
function(e){return this.store.hasAttribute(a,e)},this)},getChildren:function(a,e,f){var g=this.store;if(g.isItemLoaded(a)){for(var h=[],i=0;i<this.childrenAttrs.length;i++){var j=g.getValues(a,this.childrenAttrs[i]);h=h.concat(j)}var k=0;this.deferItemLoadingUntilExpand||c.forEach(h,function(m){g.isItemLoaded(m)||k++});k==0?e(h):c.forEach(h,function(m,n){g.isItemLoaded(m)||g.loadItem({item:m,onItem:function(r){h[n]=r;--k==0&&e(h)},onError:f})})}else{var l=c.hitch(this,arguments.callee);g.loadItem({item:a,
onItem:function(m){l(m,e,f)},onError:f})}},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,e,f){var g={parent:e,attribute:this.childrenAttrs[0]},h;if(this.newItemIdAttr&&a[this.newItemIdAttr])this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(i){if(i)this.pasteItem(i,null,e,true,f);else(h=this.store.newItem(a,g))&&f!=undefined&&this.pasteItem(h,e,e,false,f)}});else(h=this.store.newItem(a,g))&&f!=undefined&&this.pasteItem(h,e,e,false,f)},pasteItem:function(a,e,f,g,h){var i=this.store,j=this.childrenAttrs[0];e&&c.forEach(this.childrenAttrs,function(l){if(i.containsValue(e,l,a)){if(!g){var m=c.filter(i.getValues(e,l),function(n){return n!=a});i.setValues(e,l,m)}j=l}});if(f)if(typeof h=="number"){var k=i.getValues(f,j).slice();
k.splice(h,0,a);i.setValues(f,j,k)}else i.setValues(f,j,i.getValues(f,j).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,e){e&&this.getChildren(e.item,c.hitch(this,function(f){this.onChildrenChange(e.item,f)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,e){c.indexOf(this.childrenAttrs,e)!=-1?this.getChildren(a,c.hitch(this,function(f){this.onChildrenChange(a,f)})):this.onChange(a)}});return d.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(c,d){c.declare("dijit.tree.ForestStoreModel",d.tree.TreeStoreModel,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(a){this.root={store:this,root:true,id:a.rootId,label:a.rootLabel,children:a.rootChildren}},mayHaveChildren:function(a){return a===this.root||this.inherited(arguments)},getChildren:function(a,e,f){if(a===this.root)this.root.children?e(this.root.children):this.store.fetch({query:this.query,
onComplete:c.hitch(this,function(g){this.root.children=g;e(g)}),onError:f});else this.inherited(arguments)},isItem:function(a){return a===this.root?true:this.inherited(arguments)},fetchItemByIdentity:function(a){if(a.identity==this.root.id){var e=a.scope?a.scope:c.global;a.onItem&&a.onItem.call(e,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,e){if(e===this.root){this.onNewRootItem(a);return this.store.newItem(a)}else return this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,e,f,g,h){if(e===this.root)g||this.onLeaveRoot(a);d.tree.TreeStoreModel.prototype.pasteItem.call(this,a,e===this.root?null:e,f===this.root?null:f,g,h);f===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(e){this.root.children=e;if(a.length!=e.length||c.some(a,function(f,g){return e[g]!=f}))this.onChildrenChange(this.root,e)})})},onNewItem:function(){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){c.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(){this._requeryTop();this.inherited(arguments)}});return d.tree.ForestStoreModel});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(c){c.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(d,a){this.node=c.byId(d);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(d){return this.map[d]},setItem:function(d,a){this.map[d]=a},delItem:function(d){delete this.map[d]},forInItems:function(d,a){a=a||c.global;var e=this.map,f=c.dnd._empty;for(var g in e)g in f||d.call(a,e[g],g,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return c.query("> .dojoDndItem",this.parent)},
sync:function(){var d={};this.getAllNodes().forEach(function(a){if(a.id){var e=this.getItem(a.id);if(e){d[a.id]=e;return}}else a.id=c.dnd.getUniqueId();e=a.getAttribute("dndType");var f=a.getAttribute("dndData");d[a.id]={data:f||a.innerHTML,type:e?e.split(/\s*,\s*/):["text"]}},this);this.map=d;return this},insertNodes:function(d,a,e){if(this.parent.firstChild)if(a){if(!e)e=this.parent.firstChild}else{if(e)e=e.nextSibling}else e=null;if(e)for(a=0;a<d.length;++a){var f=this._normalizedCreator(d[a]);
this.setItem(f.node.id,{data:f.data,type:f.type});this.parent.insertBefore(f.node,e)}else for(a=0;a<d.length;++a){f=this._normalizedCreator(d[a]);this.setItem(f.node.id,{data:f.data,type:f.type});this.parent.appendChild(f.node)}return this},destroy:function(){c.forEach(this.events,c.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(d,a){d._skipStartup=true;return new c.dnd.Container(a,d)},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()==
"table"){var d=this.parent.getElementsByTagName("tbody");if(d&&d.length)this.parent=d[0]}}this.defaultCreator=c.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(d){for(var a=d.relatedTarget;a;){if(a==this.node)break;try{a=a.parentNode}catch(e){a=null}}if(!a){this._changeState("Container","Over");this.onOverEvent()}a=this._getChildByEvent(d);if(this.current!=a){this.current&&this._removeItemClass(this.current,"Over");a&&this._addItemClass(a,"Over");this.current=a}},onMouseOut:function(d){for(d=
d.relatedTarget;d;){if(d==this.node)return;try{d=d.parentNode}catch(a){d=null}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null}this._changeState("Container","");this.onOutEvent()},onSelectStart:function(d){if(!this.skipForm||!c.dnd.isFormElement(d))c.stopEvent(d)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(d,a){var e="dojoDnd"+d;d=d.toLowerCase()+"State";c.replaceClass(this.node,e+a,e+this[d]);this[d]=a},_addItemClass:function(d,a){c.addClass(d,
"dojoDndItem"+a)},_removeItemClass:function(d,a){c.removeClass(d,"dojoDndItem"+a)},_getChildByEvent:function(d){if(d=d.target)for(var a=d.parentNode;a;d=a,a=d.parentNode)if(a==this.parent&&c.hasClass(d,"dojoDndItem"))return d;return null},_normalizedCreator:function(d,a){d=(this.creator||this.defaultCreator).call(this,d,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(d){if(!d)return c.dnd._createSpan;
return function(a){return c.create(d,{innerHTML:a})}};c.dnd._createTrTd=function(d){var a=c.create("tr");c.create("td",{innerHTML:d},a);return a};c.dnd._createSpan=function(d){return c.create("span",{innerHTML:d})};c.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};c.dnd._defaultCreator=function(d){d=d.tagName.toLowerCase();var a=d=="tbody"||d=="thead"?c.dnd._createTrTd:c.dnd._createNode(c.dnd._defaultCreatorNodes[d]);return function(e,f){var g=e&&c.isObject(e),h;if(g&&e.tagName&&e.nodeType&&
e.getAttribute){h=e.getAttribute("dndData")||e.innerHTML;g=(g=e.getAttribute("dndType"))?g.split(/\s*,\s*/):["text"];e=e}else{h=g&&e.data?e.data:e;g=g&&e.type?e.type:["text"];e=(f=="avatar"?c.dnd._createSpan:a)(String(h))}if(!e.id)e.id=c.dnd.getUniqueId();return{node:e,data:h,type:g}}};return c.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(c,d){c.getObject("tree",true,c);d.tree._compareNodes=function(a,e){if(a===e)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-e.sourceIndex;else if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(e)&2?1:-1;else if(document.createRange){var f=doc.createRange();f.setStartBefore(a);a=doc.createRange();a.setStartBefore(e);return f.compareBoundaryPoints(f.END_TO_END,
a)}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,e){this.tree=a;this.node=a.domNode;c.mixin(this,e);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,e){var f="dojoDnd"+a;a=a.toLowerCase()+"State";c.replaceClass(this.node,f+e,f+this[a]);
this[a]=e},_addItemClass:function(a,e){c.addClass(a,"dojoDndItem"+e)},_removeItemClass:function(a,e){c.removeClass(a,"dojoDndItem"+e)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return d.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(c,d){c.declare("dijit.tree._dndSelector",d.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;d.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:false,
getSelectedTreeNodes:function(){var a=[],e=this.selection;for(var f in e)a.push(e[f]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,e){this.setSelection(this.getSelectedTreeNodes().concat([a]));if(e)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 e=this.getSelectedTreeNodes();c.forEach(this._setDifference(e,a),c.hitch(this,function(f){f.setSelected(false);this.anchor==f&&delete this.anchor;delete this.selection[f.id]}));c.forEach(this._setDifference(a,e),c.hitch(this,function(f){f.setSelected(true);this.selection[f.id]=f}));this._updateSelectionProperties()},_setDifference:function(a,e){c.forEach(e,function(f){f.__exclude__=true});a=c.filter(a,function(f){return!f.__exclude__});c.forEach(e,function(f){delete f.__exclude__});
return a},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),e=[],f=[];c.forEach(a,function(g){f.push(g);e.push(g.getTreePath())});a=c.map(f,function(g){return g.item});this.tree._set("paths",e);this.tree._set("path",e[0]||[]);this.tree._set("selectedNodes",f);this.tree._set("selectedNode",f[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)))if(a.button!=
c.mouseButtons.RIGHT){c.stopEvent(a);var e=this.current,f=c.isCopyKey(a),g=e.id;if(!this.singular&&!a.shiftKey&&this.selection[g])this._doDeselect=true;else{this._doDeselect=false;this.userSelect(e,f,a.shiftKey)}}},onMouseUp:function(a){if(this._doDeselect){this._doDeselect=false;this.userSelect(this.current,c.isCopyKey(a),a.shiftKey)}},onMouseMove:function(){this._doDeselect=false},userSelect:function(a,e,f){if(this.singular)if(this.anchor==a&&e)this.selectNone();else{this.setSelection([a]);this.anchor=
a}else if(f&&this.anchor){f=this.anchor;if(d.tree._compareNodes(this.anchor.rowNode,a.rowNode)<0){e=f;a=a}else{e=a;a=f}for(nodes=[];e!=a;){nodes.push(e);e=this.tree._getNextNode(e)}nodes.push(a);this.setSelection(nodes)}else if(this.selection[a.id]&&e)this.removeTreeNode(a);else if(e)this.addTreeNode(a,true);else{this.setSelection([a]);this.anchor=a}},forInSelectedItems:function(a,e){e=e||c.global;for(var f in this.selection)a.call(e,this.getItem(f),f,this)}});return d.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"],function(c,d){c.declare("dijit._TreeNode",[d._Widget,d._Templated,d._Container,d._Contained,d._CssStateMixin],{item:null,isTreeNode:true,label:"",isExpandable:null,isExpanded:false,
state:"UNCHECKED",templateString:c.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:c.delegate(d._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&&d.setWaiState(this.labelNode,"expanded",this.isExpanded);
this.setSelected(false)},_setIndentAttr:function(a){var e=Math.max(a,0)*this.tree._nodePixelIndent+"px";c.style(this.domNode,"backgroundPosition",e+" 0px");c.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",e);c.forEach(this.getChildren(),function(f){f.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="LOADING";this._setExpando(true)},unmarkProcessing:function(){this._setExpando(false)},_updateItemClasses:function(a){var e=this.tree,f=e.model;if(e._v10Compat&&
a===f.root)a=null;this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,e,f){var g="_"+e+"Class";e=e+"Node";var h=this[g];this[g]=this.tree["get"+f+"Class"](a,this.isExpanded);c.replaceClass(this[e],this[g]||"",h||"");c.style(this[e],this.tree["get"+f+"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 e=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],f=["*","-","+","*"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;c.replaceClass(this.expandoNode,e[a],e);this.expandoNodeText.innerHTML=f[a]},expand:function(){if(this._expandDeferred)return this._expandDeferred;this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;d.setWaiState(this.labelNode,"expanded",
"true");if(this.tree.showRoot||this!==this.tree.rootNode)d.setWaiRole(this.containerNode,"group");c.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","true");var a,e=c.fx.wipeIn({node:this.containerNode,duration:d.defaultDuration,onEnd:function(){a.callback(true)}});a=this._expandDeferred=new c.Deferred(function(){e.stop()});e.play();return a},collapse:function(){if(this.isExpanded){if(this._expandDeferred){this._expandDeferred.cancel();
delete this._expandDeferred}this.isExpanded=false;d.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&d.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:d.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var e=this.tree,f=e.model,g=[];c.forEach(this.getChildren(),
function(h){d._Container.prototype.removeChild.call(this,h)},this);this.state="LOADED";if(a&&a.length>0){this.isExpandable=true;c.forEach(a,function(h){var i=f.getIdentity(h),j=e._itemNodesMap[i],k;if(j)for(var l=0;l<j.length;l++)if(j[l]&&!j[l].getParent()){k=j[l];k.set("indent",this.indent+1);break}if(!k){k=this.tree._createTreeNode({item:h,tree:e,isExpandable:f.mayHaveChildren(h),label:e.getLabel(h),tooltip:e.getTooltip(h),dir:e.dir,lang:e.lang,indent:this.indent+1});if(j)j.push(k);else e._itemNodesMap[i]=
[k]}this.addChild(k);if(this.tree.autoExpand||this.tree._state(h))g.push(e._expandNode(k))},this);c.forEach(this.getChildren(),function(h){h._updateLayout()})}else this.isExpandable=false;this._setExpando&&this._setExpando(false);this._updateItemClasses(this.item);if(this==e.rootNode)if(a=this.tree.showRoot?this:this.getChildren()[0]){a.setFocusable(true);e.lastFocused=a}else e.domNode.setAttribute("tabIndex","0");return new c.DeferredList(g)},getTreePath:function(){for(var a=this,e=[];a&&a!==this.tree.rootNode;){e.unshift(a.item);
a=a.getParent()}e.unshift(this.tree.rootNode.item);return e},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(){this.inherited(arguments);var a=this.getChildren();if(a.length==0){this.isExpandable=false;this.collapse()}c.forEach(a,function(e){e._updateLayout()})},makeExpandable:function(){this.isExpandable=true;this._setExpando(false)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){d.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",[d._Widget,d._Templated],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],
path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:c.cache("dijit","templates/Tree.html"),persist:true,autoExpand:false,dndController:"dijit.tree._dndSelector",dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,
e){c.publish(this.id,[c.mixin({tree:this,event:a},e||{})])},postMixInProperties:function(){this.tree=this;if(this.autoExpand)this.persist=false;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={},e=0;e<this.dndParams.length;e++)if(this[this.dndParams[e]])a[this.dndParams[e]]=this[this.dndParams[e]];this.dndController=new this.dndController(this,a)}},_store2model:function(){this._v10Compat=true;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(e,f,g){this.getItemChildren(this._v10Compat&&e===this.model.root?null:e,f,g)});this.model=new d.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(c.hitch(this,function(a){var e=this.rootNode=this.tree._createTreeNode({item:a,
tree:this,isExpandable:true,label:this.label||this.getLabel(a),indent:this.showRoot?0:-1});if(!this.showRoot){e.rowNode.style.display="none";d.setWaiRole(this.domNode,"presentation");d.setWaiRole(e.labelNode,"presentation");d.setWaiRole(e.containerNode,"tree")}this.domNode.appendChild(e.domNode);a=this.model.getIdentity(a);if(this._itemNodesMap[a])this._itemNodesMap[a].push(e);else this._itemNodesMap[a]=[e];e._updateLayout();this._expandNode(e).addCallback(c.hitch(this,function(){this._loadDeferred.callback(true);
this.onLoad()}))}),function(a){console.error(this,": error loading root: ",a)})},getNodesByItem:function(a){if(!a)return[];return[].concat(this._itemNodesMap[c.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var e=this;this._loadDeferred.addCallback(c.hitch(this,function(){var f=c.map(a,function(h){return!h||c.isString(h)?h:e.model.getIdentity(h)}),g=[];c.forEach(f,function(h){g=g.concat(e._itemNodesMap[h]||
[])});this.set("selectedNodes",g)}))},_setPathAttr:function(a){return a.length?this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function e(h,i,j){var k=h.shift(),l=c.filter(i,function(m){return m.getIdentity()==k})[0];if(l)h.length?g._expandNode(l).addCallback(function(){e(h,l.getChildren(),j)}):j.callback(l);else j.errback("Could not expand path at "+k)}function f(h){g.set("selectedNodes",c.map(c.filter(h,function(i){return i[0]}),function(i){return i[1]}))}var g=this;return(new c.DeferredList(c.map(a,
function(h){var i=new c.Deferred;h=c.map(h,function(j){return c.isString(j)?j:g.model.getIdentity(j)});h.length?g._loadDeferred.addCallback(function(){e(h,[g.rootNode],i)}):i.errback("Empty path");return i}))).addCallback(f)},_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,e){return!a||this.model.mayHaveChildren(a)?e?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onKeyPress:function(a){if(!a.altKey){var e=c.keys,f=d.getEnclosingWidget(a.target);if(f){var g=a.charOrCode;if(typeof g=="string"&&g!=" "){if(!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey){this._onLetterKeyNav({node:f,
key:g.toLowerCase()});c.stopEvent(a)}}else{if(this._curSearch){clearTimeout(this._curSearch.timer);delete this._curSearch}var h=this._keyHandlerMap;if(!h){h={};h[e.ENTER]="_onEnterKey";h[e.SPACE]=h[" "]="_onEnterKey";h[this.isLeftToRight()?e.LEFT_ARROW:e.RIGHT_ARROW]="_onLeftArrow";h[this.isLeftToRight()?e.RIGHT_ARROW:e.LEFT_ARROW]="_onRightArrow";h[e.UP_ARROW]="_onUpArrow";h[e.DOWN_ARROW]="_onDownArrow";h[e.HOME]="_onHomeKey";h[e.END]="_onEndKey";this._keyHandlerMap=h}if(this._keyHandlerMap[g]){this[this._keyHandlerMap[g]]({node:f,
item:f.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){a=a.node;var e=a.getPreviousSibling();if(e)for(a=e;a.isExpandable&&a.isExpanded&&a.hasChildren();){a=a.getChildren();a=a[a.length-1]}else{e=a.getParent();!this.showRoot&&
e===this.rootNode||(a=e)}a&&a.isTreeNode&&this.focusNode(a)},_onRightArrow:function(a){a=a.node;if(a.isExpandable&&!a.isExpanded)this._expandNode(a);else if(a.hasChildren())(a=a.getChildren()[0])&&a.isTreeNode&&this.focusNode(a)},_onLeftArrow:function(a){a=a.node;if(a.isExpandable&&a.isExpanded)this._collapseNode(a);else(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 e=this._curSearch;if(e){e.pattern+=a.key;clearTimeout(e.timer)}else e=this._curSearch={pattern:a.key,startNode:a.node};var f=this;e.timer=setTimeout(function(){delete f._curSearch},this.multiCharSearchDuration);a=e.startNode;do(a=this._getNextNode(a))||(a=this._getRootOrFirstNode());while(a!==e.startNode&&a.label.toLowerCase().substr(0,e.pattern.length)!=
e.pattern);a&&a.isTreeNode&&a!==e.startNode&&this.focusNode(a)},isExpandoNode:function(a,e){return c.isDescendant(a,e.expandoNode)},_onClick:function(a,e){var f=this.isExpandoNode(e.target,a);if(this.openOnClick&&a.isExpandable||f)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:e});this.onClick(a.item,a,e);this.focusNode(a)}c.stopEvent(e)},_onDblClick:function(a,e){var f=e.target;f=f==a.expandoNode||f==a.expandoNodeText;if(this.openOnDblClick&&a.isExpandable||
f)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:e});this.onDblClick(a.item,a,e);this.focusNode(a)}c.stopEvent(e)},_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 e=a.getNextSibling();
if(e)return e;a=a.getParent()}return null}},_getRootOrFirstNode:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_collapseNode:function(a){a._expandNodeDeferred&&delete a._expandNodeDeferred;if(a.isExpandable)if(a.state!="LOADING"){a.collapse();this.onClose(a.item,a);if(a.item){this._state(a.item,false);this._saveState()}}},_expandNode:function(a,e){if(a._expandNodeDeferred&&!e)return a._expandNodeDeferred;e=this.model;var f=a.item,g=this;switch(a.state){case "UNCHECKED":a.markProcessing();
var h=a._expandNodeDeferred=new c.Deferred;e.getChildren(f,function(i){a.unmarkProcessing();i=a.setChildItems(i);var j=g._expandNode(a,true);i.addCallback(function(){j.addCallback(function(){h.callback()})})},function(i){console.error(g,": error loading root children: ",i)});break;default:h=a._expandNodeDeferred=a.expand();this.onOpen(a.item,a);if(f){this._state(f,true);this._saveState()}}return h},focusNode:function(a){d.focus(a.labelNode)},_onNodeFocus:function(a){if(a&&a!=this.lastFocused){this.lastFocused&&
!this.lastFocused._destroyed&&this.lastFocused.setFocusable(false);a.setFocusable(true);this.lastFocused=a}},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(a){var e=this._itemNodesMap[this.model.getIdentity(a)];if(e){var f=this.getLabel(a),g=this.getTooltip(a);c.forEach(e,function(h){h.set({item:a,label:f,tooltip:g});h._updateItemClasses(a)})}},_onItemChildrenChange:function(a,e){(a=this._itemNodesMap[this.model.getIdentity(a)])&&c.forEach(a,function(f){f.setChildItems(e)})},
_onItemDelete:function(a){a=this.model.getIdentity(a);var e=this._itemNodesMap[a];if(e){c.forEach(e,function(f){this.dndController.removeTreeNode(f);var g=f.getParent();g&&g.removeChild(f);f.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(e){this._openedItemIds[e]=true},this)}},_state:function(a,e){if(!this.persist)return false;var f=this.model.getIdentity(a);if(arguments.length===
1)return this._openedItemIds[f];if(e)this._openedItemIds[f]=true;else delete this._openedItemIds[f]},_saveState:function(){if(this.persist){var a=[];for(var e in this._openedItemIds)a.push(e);c.cookie(this.cookieName,a.join(","),{expires:365})}},destroy:function(){if(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;if(this.tree.rootNode)this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new d._TreeNode(a)}});return d.Tree});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("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(c,d){c.declare("orion.widgets._ExplorerTreeNode",[d._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",
[d.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(e,f){a.push(f.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(e,f){a.push(f)});
return a},_forEachSelectedNode:function(a){var e=this.selectedNodes;for(var f in e)e.hasOwnProperty(f)&&a(f,e[f])},_createTreeNode:function(a){return new orion.widgets._ExplorerTreeNode(a)},_eatSelectionEvent:function(a){if(c.isCopyKey(a)||a.shiftKey)c.stopEvent(a)},_onClick:function(a,e){var f=e.target,g=f===a.expandoNode||f===a.expandoNodeText;f=f===a.followNode;if(c.isCopyKey(e)){this._toggleSelectNode(a);this.focusNode(a)}else if(e.shiftKey){if(this.selectedNode){this._selectRange(this.selectedNode,
a);this.focusNode(a)}}else{if(f)this.onFollowClick(a.item,a,e);else if(this.openOnClick&&a.isExpandable||g)a.isExpandable&&this._onExpandoClick({node:a});else{this._publish("execute",{item:a.item,node:a,evt:e});this.onClick(a.item,a,e);this.focusNode(a)}!g&&!f&&this._selectNode(a)}f||c.stopEvent(e)},_onItemDelete:function(a){var e=this._itemNodesMap[this.model.getIdentity(a)];if(e){var f=this;c.forEach(e,function(g){f._removeFromSelection(g)})}this.inherited(arguments)},_getVisibleAncestor:function(a){if(!a)return null;
for(var e=a.getParent();e&&!(e.isExpandable&&e.isExpanded);){a=e;e=e.getParent()}return a},_toggleSelectNode:function(a){if(this.selectedNodes[a.get("id")]){a.setSelected(false);this._removeFromSelection(a)}else{a.setSelected(true);this._addToSelection(a)}},_addToSelection:function(a){this.selectedNodes[a.get("id")]=a},_removeFromSelection:function(a){delete this.selectedNodes[a.get("id")]},_selectRange:function(a,e){function f(i,j){var k=[];i=i;do{k.push(i);i=g._getNextNode(i)}while(i&&i!==j);if(i===
j){k.push(j);return k}return null}a=this._getVisibleAncestor(a);e=this._getVisibleAncestor(e);if(a&&e)if(a===e)this._selectNode(a);else{var g=this,h=f(a,e);if(h)this._selectNodes(h.reverse(),true);else(h=f(e,a))?this._selectNodes(h,true):console.debug("Warning: couldn't select range from "+a.label+" to "+e.label)}},_selectNode:function(a){this._selectNodes(a?[a]:null)},_selectNodes:function(a){this._forEachSelectedNode(function(g,h){h._destroyed||h.setSelected(false)});this.selectedNodes={};if(a)for(var e=
0;e<a.length;e++){var f=a[e];f.setSelected(true);this._addToSelection(f);this.selectedNode=f}}})});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("orion/widgets/DirectoryPrompterDialog",["dojo","dijit","orion/util","dijit/Dialog","dijit/form/Button","orion/widgets/ExplorerTree","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/DirectoryPrompterDialog.html"],function(c,d,a){c.declare("orion.widgets.DirectoryPrompterDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:c.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||"Choose a Folder";this.buttonOk="OK";this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("/");this.message||c.style(this.messageCell,{display:"none"})},loadFolderList:function(e){e=a.makeRelative(e);this.treeRoot.Location=e;this.options.fileClient.loadWorkspace(e).then(c.hitch(this,function(f){for(var g in f)this.treeRoot[g]=
f[g];a.processNavigatorParent(this.treeRoot,f.Children);this.createTree()}))},createTree:function(){var e=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:e,showRoot:false,persist:true,openOnClick:false,getLabel:function(f){return f.Name},getIconClass:function(){return"folderItem"}});this.treeWidget.startup();c.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},
execute:function(){var e=this.treeWidget.getSelectedItems();this.onHide();this.options.func(e[0])}});orion.widgets.DirectoryTreeModel=function(){function e(f,g,h){this.registry=f;this.root=g;this.fileClient=h}e.prototype={destroy:function(){},getRoot:function(f){f(this.root)},mayHaveChildren:function(){return true},getChildren:function(f,g){if(f.children)g(f.children);else if(f.Directory!==undefined&&f.Directory===false)g([]);else f.Location?this.fileClient.fetchChildren(f.ChildrenLocation).then(c.hitch(this,
function(h){for(var i=[],j=0;j<h.length;j++)h[j].Directory&&i.push(h[j]);a.processNavigatorParent(f,i);g(i)})):g([])},getIdentity:function(f){return f.Name?f.Location:"ROOT"},getLabel:function(f){return f.Name},onChildrenChange:function(){}};return e}()});define("dojox",["dojo"],function(c){return dojox=c._dojox||{}});
define("dojox/form/uploader/Base",["dojo","dijit","dojox","dojox/form/uploader/Base","dijit/_Widget","dijit/_Templated"],function(c,d){c.declare("dojox.form.uploader.Base",[d._Widget,d._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=true;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")return false;a=c.attr(this._hascache.testInput,"multiple");return a===true||a===false}return false},getMimeType:function(){return"application/octet-stream"},getFileType:function(a){return a.substring(a.lastIndexOf(".")+1).toUpperCase()},convertBytes:function(a){var e=Math.round(a/1024*1E5)/1E5,f=Math.round(a/1048576*1E5)/1E5,g=Math.round(a/1073741824*1E5)/1E5,h=a;if(e>
1)h=e.toFixed(1)+" kb";if(f>1)h=f.toFixed(1)+" mb";if(g>1)h=g.toFixed(1)+" gb";return{kb:e,mb:f,gb:g,bytes:a,value:h}}})});
define("dojox/form/Uploader",["dojo","dijit","dojox","dojox/form/uploader/Base"],function(c,d,a){c.declare("dojox.form.Uploader",[a.form.uploader.Base],{uploadOnSelect:false,tabIndex:0,multiple:false,label:"Upload...",url:"",name:"uploadedfile",flashFieldName:"",uploadType:"form",_nameIndex:0,widgetsInTemplate:true,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 e=false,f=this._getNodePosition(this.domNode);if(!this.btnSize.w||!this.btnSize.h){c.body().appendChild(this.domNode);this._getButtonStyle(this.domNode);e=true}this._setButtonStyle();e&&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 e=[];this.supports("multiple")?c.forEach(this.inputNode.files,function(f,g){e.push({index:g,name:f.name,size:f.size,type:f.type})},this):c.forEach(this._inputs,function(f,g){e.push({index:g,name:f.value.substring(f.value.lastIndexOf("\\")+1),size:0,type:f.value.substring(f.value.lastIndexOf(".")+1)})},this);return e},_getValueAttr:function(){return this.getFileList()},
_setValueAttr:function(){console.error("Uploader value is read only")},_getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(e){if(this._disabled!=e){this.button.set("disabled",e);c.style(this.inputNode,"display",e?"none":"block")}},_getNodePosition:function(e){if(e.previousSibling)return{node:e.previousSibling,pos:"after"};return{node:e.nextSibling,pos:"before"}},_getButtonStyle:function(e){this.btnSize=e?c.marginBox(e):{w:80,h:25}},_setButtonStyle:function(){var e=true;if(!this.domNode.parentNode||
!this.domNode.parentNode.tagName){document.body.appendChild(this.domNode);e=false}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"});e||document.body.removeChild(this.domNode)},
_createInput:function(){if(this._inputs.length){c.style(this.inputNode,{top:"500px"});this._disconnectButton();this._nameIndex++}var e;e=this.supports("multiple")?this.name+"s[]":this.name+(this.multiple?this._nameIndex:"");this.inputNode=c.create("input",{type:"file",name:e,className:"dojoxInputNode"},this.domNode,"first");this.supports("multiple")&&this.multiple&&c.attr(this.inputNode,"multiple",true);this._inputs.push(this.inputNode);c.style(this.inputNode,{fontSize:this.inputNodeFontSize+"em"});
e=c.marginBox(this.inputNode);c.style(this.inputNode,{position:"absolute",top:"-2px",left:"-"+(e.w-this.btnSize.w-2)+"px",opacity:0});this._connectButton()},_connectButton:function(){this._cons=[];var e=c.hitch(this,function(g){this._cons.push(c.connect(this.inputNode,g,this,function(){this.button._cssMouseEvent({type:g})}))});e("mouseover");e("mouseout");e("mousedown");this._cons.push(c.connect(this.inputNode,"change",this,function(g){this.onChange(this.getFileList(g));!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 e=[a.form.UploaderOrg];a.form.addUploaderPlugin=function(f){e.push(f);c.declare("dojox.form.Uploader",e,{})}})()});
define("dojox/form/uploader/FileList",["dojo","dijit","dojox","dojox/form/uploader/Base","dijit/_Widget","dijit/_Templated"],function(c,d,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 e=0;e<this.rowAmt;e++)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=d.byId(this.uploaderId);else if(this._upCheckCnt>4){console.warn("uploader not found for ID ",this.uploaderId);return}if(this.uploader){this.connect(this.uploader,"onChange","_onUploaderChange");
this.connect(this.uploader,"reset","reset");this.connect(this.uploader,"onBegin",function(){this.showProgress(true)});this.connect(this.uploader,"onProgress","_progress");this.connect(this.uploader,"onComplete",function(){setTimeout(c.hitch(this,function(){this.hideProgress(true)}),1250)})}else{this._upCheckCnt++;setTimeout(c.hitch(this,"setUploader"),250)}},hideProgress:function(e){this._hideShowProgress(e?{ani:true,endDisp:"none",beg:15,end:0}:{endDisp:"none",ani:false})},showProgress:function(e){this._hideShowProgress(e?
{ani:true,endDisp:"block",beg:0,end:15}:{endDisp:"block",ani:false})},_progress:function(e){this.percentTextNode.innerHTML=e.percent;c.style(this.percentBarNode,"width",e.percent)},_hideShowProgress:function(e){var f=this.progressNode,g=function(){c.style(f,"display",e.endDisp)};if(e.ani){c.style(f,"display","block");c.animateProperty({node:f,properties:{height:{start:e.beg,end:e.end,units:"px"}},onEnd:g}).play()}else g()},_onUploaderChange:function(e){this.reset();c.forEach(e,function(f,g){this._addRow(g+
1,this.getFileType(f.name),f.name,f.size)},this)},_addRow:function(e,f,g,h){var i,j=this.listNode.insertRow(-1);i=j.insertCell(-1);c.addClass(i,"dojoxUploaderIndex");i.innerHTML=e;i=j.insertCell(-1);c.addClass(i,"dojoxUploaderIcon");i.innerHTML=f;i=j.insertCell(-1);c.addClass(i,"dojoxUploaderFileName");i.innerHTML=g;i=j.insertCell(-1);c.addClass(i,"dojoxUploaderSize");i.innerHTML=this.convertBytes(h).value;this.rowAmt++}})});
define("dojo/io/iframe",["dojo"],function(c){c.getObject("io",true,c);c.io.iframe={create:function(d,a,e){if(window[d])return window[d];if(window.frames[d])return window.frames[d];var f=null;e=e;if(!e){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");e=c.config.dojoBlankHtmlUrl||c.moduleUrl("dojo",
"resources/blank.html")}f=c.place('<iframe id="'+d+'" name="'+d+'" src="'+e+'" onload="'+a+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',c.body());return window[d]=f},setSrc:function(d,a,e){try{if(e){var f;if(f=c.isIE||c.isWebKit?d.contentWindow.document:d.contentWindow)f.location.replace(a);else d.location=a}else if(c.isWebKit)d.location=a;else frames[d.name].location=a}catch(g){console.log("dojo.io.iframe.setSrc: ",g)}},doc:function(d){return d.contentDocument||
d.name&&d.document&&c.doc.getElementsByTagName("iframe")[d.name].contentWindow&&c.doc.getElementsByTagName("iframe")[d.name].contentWindow.document||d.name&&c.doc.frames[d.name]&&c.doc.frames[d.name].document||null},send:function(d){if(!this._frame)this._frame=this.create(this._iframeName,c._scopeName+".io.iframe._iframeOnload();");d=c._ioSetArgs(d,function(a){a.canceled=true;a.ioArgs._callNext()},function(a){var e=null;try{var f=a.ioArgs,g=c.io.iframe,h=g.doc(g._frame),i=f.handleAs;e=h;if(i!="html")if(i==
"xml"){if(c.isIE<9||c.isIE&&c.isQuirks){c.query("a",g._frame.contentWindow.document.documentElement).orphan();var j=g._frame.contentWindow.document.documentElement.innerText;j=j.replace(/>\s+</g,"><");j=c.trim(j);e=c._contentHandlers.xml({responseText:j})}}else{e=h.getElementsByTagName("textarea")[0].value;if(i=="json")e=c.fromJson(e);else if(i=="javascript")e=c.eval(e)}}catch(k){e=k}finally{f._callNext()}return e},function(a,e){e.ioArgs._hasError=true;e.ioArgs._callNext();return a});d.ioArgs._callNext=
function(){if(!this._calledNext){this._calledNext=true;c.io.iframe._currentDfd=null;c.io.iframe._fireNextRequest()}};this._dfdQueue.push(d);this._fireNextRequest();c._ioWatch(d,function(a){return!a.ioArgs._hasError},function(a){return!!a.ioArgs._finished},function(a){a.ioArgs._finished?a.callback(a):a.errback(new Error("Invalid dojo.io.iframe request state"))});return d},_currentDfd:null,_dfdQueue:[],_iframeName:c._scopeName+"IoIframe",_fireNextRequest:function(){try{if(!(this._currentDfd||this._dfdQueue.length==
0)){do var d=this._currentDfd=this._dfdQueue.shift();while(d&&d.canceled&&this._dfdQueue.length);if(!d||d.canceled)this._currentDfd=null;else{var a=d.ioArgs,e=a.args;a._contentToClean=[];var f=c.byId(e.form),g=e.content||{};if(f){if(g){var h=function(s,o){c.create("input",{type:"hidden",name:s,value:o},f);a._contentToClean.push(s)};for(var i in g){var j=g[i];if(c.isArray(j)&&j.length>1){var k;for(k=0;k<j.length;k++)h(i,j[k])}else if(f[i])f[i].value=j;else h(i,j)}}var l=f.getAttributeNode("action"),
m=f.getAttributeNode("method"),n=f.getAttributeNode("target");if(e.url){a._originalAction=l?l.value:null;if(l)l.value=e.url;else f.setAttribute("action",e.url)}if(!m||!m.value)if(m)m.value=e.method?e.method:"post";else f.setAttribute("method",e.method?e.method:"post");a._originalTarget=n?n.value:null;if(n)n.value=this._iframeName;else f.setAttribute("target",this._iframeName);f.target=this._iframeName;c._ioNotifyStart(d);f.submit()}else{h=e.url+(e.url.indexOf("?")>-1?"&":"?")+a.query;c._ioNotifyStart(d);
this.setSrc(this._frame,h,true)}}}}catch(r){d.errback(r)}},_iframeOnload:function(){var d=this._currentDfd;if(d){d=d.ioArgs;var a=c.byId(d.args.form);if(a){for(var e=d._contentToClean,f=0;f<e.length;f++)for(var g=e[f],h=0;h<a.childNodes.length;h++){var i=a.childNodes[h];if(i.name==g){c.destroy(i);break}}d._originalAction&&a.setAttribute("action",d._originalAction);if(d._originalTarget){a.setAttribute("target",d._originalTarget);a.target=d._originalTarget}}d._finished=true}else this._fireNextRequest()}};
return c.io.iframe});
define("dojox/form/uploader/plugins/HTML5",["dojo","dijit","dojox","dojox/form/Uploader"],function(c,d,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(e){this.onBegin(this.getFileList());if(this.supports("FormData"))this.uploadWithFormData(e);else this.supports("sendAsBinary")&&this.sendAsBinary(e)},
submit:function(e){e=e?e.tagName?e:this.getForm():this.getForm();e=c.formToObject(e);console.log("form data:",e);this.upload(e)},sendAsBinary:function(e){if(this.getUrl()){var f="---------------------------"+(new Date).getTime(),g=this.createXhr();g.setRequestHeader("Content-Type","multipart/form-data; boundary="+f);(e=this._buildRequestBody(e,f))?g.sendAsBinary(e):this.onError(this.errMsg)}else console.error("No upload url found.",this)},uploadWithFormData:function(e){if(this.getUrl()){var f=new FormData;
c.forEach(this.inputNode.files,function(h){f.append(this.name+"s[]",h)},this);if(e)for(var g in e)f.append(g,e[g]);this.createXhr().send(f)}else console.error("No upload url found.",this)},_xhrProgress:function(e){if(e.lengthComputable){var f={bytesLoaded:e.loaded,bytesTotal:e.total,type:e.type,timeStamp:e.timeStamp};if(e.type=="load"){f.percent="100%";f.decimal=1}else{f.decimal=e.loaded/e.total;f.percent=Math.ceil(e.loaded/e.total*100)+"%"}this.onProgress(f)}},createXhr:function(){var e=new XMLHttpRequest,
f;e.upload.addEventListener("progress",c.hitch(this,"_xhrProgress"),false);e.addEventListener("load",c.hitch(this,"_xhrProgress"),false);e.addEventListener("error",c.hitch(this,function(g){this.onError(g);clearInterval(f)}),false);e.addEventListener("abort",c.hitch(this,function(g){this.onAbort(g);clearInterval(f)}),false);e.onreadystatechange=c.hitch(this,function(){if(e.readyState===4){console.info("COMPLETE");clearInterval(f);this.onComplete(c.eval(e.responseText))}});e.open("POST",this.getUrl());
f=setInterval(c.hitch(this,function(){}),250);return e},_buildRequestBody:function(e,f){var g="";f="--"+f;var h=[];c.forEach(this.inputNode.files,function(j,k){j=this.name+"s[]";var l=this.inputNode.files[k].fileName,m;try{m=this.inputNode.files[k].getAsBinary()+"\r\n";g+=f+"\r\n";g+="Content-Disposition: form-data; ";g+='name="'+j+'"; ';g+='filename="'+l+'"\r\n';g+="Content-Type: "+this.getMimeType()+"\r\n\r\n";g+=m}catch(n){h.push({index:k,name:l})}},this);if(h.length)if(h.length>=this.inputNode.files.length){this.onError({message:this.errMsg,
filesInError:h});g=false}if(!g)return false;if(e)for(var i in e){g+=f+"\r\n";g+="Content-Disposition: form-data; ";g+='name="'+i+'"\r\n\r\n';g+=e[i]+"\r\n"}g+=f+"--\r\n";return g}});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"],function(c,d,a){c.declare("dojox.form.uploader.plugins.IFrame",[],{force:"",postMixInProperties:function(){this.inherited(arguments);if(!this.supports("multiple"))this.uploadType="iframe"},upload:function(e){if(!this.supports("multiple")||this.force=="iframe"){this.uploadIFrame(e);c.stopEvent(e)}},uploadIFrame:function(){this.getUrl();c.io.iframe.send({url:this.getUrl(),
form:this.form,handleAs:"json",error:c.hitch(this,function(e){console.error("HTML Upload Error:"+e.message)}),load:c.hitch(this,function(e){this.onComplete(e)})})}});a.form.addUploaderPlugin(a.form.uploader.plugins.IFrame)});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:true,ca:true,cs:true,da:true,de:true,el:true,en:true,"en-au":true,"en-gb":true,es:true,fi:true,fr:true,"fr-ch":true,he:true,hu:true,it:true,ja:true,ko:true,nb:true,nl:true,pl:true,pt:true,"pt-pt":true,ro:true,ru:true,sk:true,sl:true,sv:true,th:true,tr:true,zh:true,"zh-hant":true,"zh-hk":true});
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",true,c);c.number.format=function(d,a){a=c.mixin({},a||{});var e=c.i18n.normalizeLocale(a.locale);e=c.i18n.getLocalization("dojo.cldr","number",e);a.customs=e;e=a.pattern||e[(a.type||"decimal")+"Format"];if(isNaN(d)||Math.abs(d)==Infinity)return null;return c.number._applyPattern(d,e,a)};c.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;c.number._applyPattern=function(d,
a,e){e=e||{};var f=e.customs.group,g=e.customs.decimal;a=a.split(";");var h=a[0];a=a[d<0?1:0]||"-"+h;if(a.indexOf("%")!=-1)d*=100;else if(a.indexOf("\u2030")!=-1)d*=1E3;else if(a.indexOf("\u00a4")!=-1){f=e.customs.currencyGroup||f;g=e.customs.currencyDecimal||g;a=a.replace(/\u00a4{1,3}/,function(j){return e[["symbol","currency","displayName"][j.length-1]]||e.currency||""})}else if(a.indexOf("E")!=-1)throw new Error("exponential notation not supported");var i=c.number._numberPatternRE;h=h.match(i);
if(!h)throw new Error("unable to find a number expression in pattern: "+a);if(e.fractional===false)e.places=0;return a.replace(i,c.number._formatAbsolute(d,h[0],{decimal:g,group:f,places:e.places,round:e.round}))};c.number.round=function(d,a,e){e=10/(e||10);return(e*+d).toFixed(a)/e};(0.9).toFixed()==0&&function(){var d=c.number.round;c.number.round=function(a,e,f){var g=Math.pow(10,-e||0),h=Math.abs(a);if(!a||h>=g||h*Math.pow(10,e+1)<5)g=0;return d(a,e,f)+(a>0?g:-g)}}();c.number._formatAbsolute=
function(d,a,e){e=e||{};if(e.places===true)e.places=0;if(e.places===Infinity)e.places=6;a=a.split(".");var f=typeof e.places=="string"&&e.places.indexOf(","),g=e.places;if(f)g=e.places.substring(f+1);else if(!(g>=0))g=(a[1]||[]).length;e.round<0||(d=c.number.round(d,g,e.round));d=String(Math.abs(d)).split(".");var h=d[1]||"";if(a[1]||e.places){if(f)e.places=e.places.substring(0,f);f=e.places!==undefined?e.places:a[1]&&a[1].lastIndexOf("0")+1;if(f>h.length)d[1]=c.string.pad(h,f,"0",true);if(g<h.length)d[1]=
h.substr(0,g)}else d[1]&&d.pop();g=a[0].replace(",","");f=g.indexOf("0");if(f!=-1){f=g.length-f;if(f>d[0].length)d[0]=c.string.pad(d[0],f);if(g.indexOf("#")==-1)d[0]=d[0].substr(d[0].length-f)}g=a[0].lastIndexOf(",");var i,j;if(g!=-1){i=a[0].length-g-1;a=a[0].substr(0,g);g=a.lastIndexOf(",");if(g!=-1)j=a.length-g-1}a=[];for(g=d[0];g;){f=g.length-i;a.push(f>0?g.substr(f):g);g=f>0?g.slice(0,f):"";if(j){i=j;delete j}}d[0]=a.reverse().join(e.group||",");return d.join(e.decimal||".")};c.number.regexp=
function(d){return c.number._parseInfo(d).regexp};c.number._parseInfo=function(d){d=d||{};var a=c.i18n.normalizeLocale(d.locale);a=c.i18n.getLocalization("dojo.cldr","number",a);var e=d.pattern||a[(d.type||"decimal")+"Format"],f=a.group,g=a.decimal,h=1;if(e.indexOf("%")!=-1)h/=100;else if(e.indexOf("\u2030")!=-1)h/=1E3;else{var i=e.indexOf("\u00a4")!=-1;if(i){f=a.currencyGroup||f;g=a.currencyDecimal||g}}a=e.split(";");a.length==1&&a.push("-"+a[0]);a=c.regexp.buildGroupRE(a,function(j){j="(?:"+c.regexp.escapeString(j,
".")+")";return j.replace(c.number._numberPatternRE,function(k){var l={signed:false,separator:d.strict?f:[f,""],fractional:d.fractional,decimal:g,exponent:false};k=k.split(".");var m=d.places;if(k.length==1&&h!=1)k[1]="###";if(k.length==1||m===0)l.fractional=false;else{if(m===undefined)m=d.pattern?k[1].lastIndexOf("0")+1:Infinity;if(m&&d.fractional==undefined)l.fractional=true;if(!d.places&&m<k[1].length)m+=","+k[1].length;l.places=m}k=k[0].split(",");if(k.length>1){l.groupSize=k.pop().length;if(k.length>
1)l.groupSize2=k.pop().length}return"("+c.number._realNumberRegexp(l)+")"})},true);if(i)a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(j,k,l,m){j=c.regexp.escapeString(d[["symbol","currency","displayName"][l.length-1]]||d.currency||"");k=k?"[\\s\\xa0]":"";m=m?"[\\s\\xa0]":"";if(!d.strict){if(k)k+="*";if(m)m+="*";return"(?:"+k+j+m+")?"}return k+j+m});return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:f,decimal:g,factor:h}};c.number.parse=function(d,a){a=c.number._parseInfo(a);d=(new RegExp("^"+
a.regexp+"$")).exec(d);if(!d)return NaN;var e=d[1];if(!d[1]){if(!d[2])return NaN;e=d[2];a.factor*=-1}e=e.replace(new RegExp("["+a.group+"\\s\\xa0]","g"),"").replace(a.decimal,".");return e*a.factor};c.number._realNumberRegexp=function(d){d=d||{};if(!("places"in d))d.places=Infinity;if(typeof d.decimal!="string")d.decimal=".";if(!("fractional"in d)||/^0/.test(d.places))d.fractional=[true,false];if(!("exponent"in d))d.exponent=[true,false];if(!("eSigned"in d))d.eSigned=[true,false];var a=c.number._integerRegexp(d),
e=c.regexp.buildGroupRE(d.fractional,function(g){var h="";if(g&&d.places!==0){h="\\"+d.decimal;if(d.places==Infinity)h="(?:"+h+"\\d+)?";else h+="\\d{"+d.places+"}"}return h},true),f=c.regexp.buildGroupRE(d.exponent,function(g){if(g)return"([eE]"+c.number._integerRegexp({signed:d.eSigned})+")";return""});a=a+e;if(e)a="(?:(?:"+a+")|(?:"+e+"))";return a+f};c.number._integerRegexp=function(d){d=d||{};if(!("signed"in d))d.signed=[true,false];if("separator"in d){if(!("groupSize"in d))d.groupSize=3}else d.separator=
"";var a=c.regexp.buildGroupRE(d.signed,function(f){return f?"[-+]":""},true),e=c.regexp.buildGroupRE(d.separator,function(f){if(!f)return"(?:\\d+)";f=c.regexp.escapeString(f);if(f==" ")f="\\s";else if(f=="\u00a0")f="\\s\\xa0";var g=d.groupSize,h=d.groupSize2;if(h){f="(?:0|[1-9]\\d{0,"+(h-1)+"}(?:["+f+"]\\d{"+h+"})*["+f+"]\\d{"+g+"})";return g-h>0?"(?:"+f+"|(?:0|[1-9]\\d{0,"+(g-1)+"}))":f}return"(?:0|[1-9]\\d{0,"+(g-1)+"}(?:["+f+"]\\d{"+g+"})*)"},true);return a+e};return c.number});
define("dijit/ProgressBar",["dojo","dijit","text!dijit/templates/ProgressBar.html","dojo/fx","dojo/number","dijit/_Widget","dijit/_Templated"],function(c,d){c.declare("dijit.ProgressBar",[d._Widget,d._Templated],{progress:"0",value:"",maximum:100,places:0,indeterminate:false,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||{});a=this.internalProgress;var e=this.domNode,f=1;if(this.indeterminate){d.removeWaiState(e,"valuenow");d.removeWaiState(e,"valuemin");d.removeWaiState(e,"valuemax")}else{if(String(this.progress).indexOf("%")!=
-1){f=Math.min(parseFloat(this.progress)/100,1);this.progress=f*this.maximum}else{this.progress=Math.min(this.progress,this.maximum);f=this.progress/this.maximum}d.setWaiState(e,"describedby",this.labelNode.id);d.setWaiState(e,"valuenow",this.progress);d.setWaiState(e,"valuemin",0);d.setWaiState(e,"valuemax",this.maximum)}this.labelNode.innerHTML=this.report(f);c.toggleClass(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);a.style.width=f*100+"%";this.onChange()},_setValueAttr:function(a){this._set("value",
a);a==Infinity?this.update({indeterminate:true}):this.update({indeterminate:false,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 d.ProgressBar});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("orion/widgets/ImportDialog",["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"],function(c,d){c.declare("orion.widgets.ImportDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","widgets/templates/ImportDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="Import from zip"},postCreate:function(){this.inherited(arguments);c.byId("importDialog.myForm").action=this.options.importLocation;c.byId("importDialog.uploader").url=this.options.importLocation;c.connect(d.byId("importDialog.uploader"),"onError",c.hitch(this,function(){setTimeout(c.hitch(this,function(){this.hide()}),2E3)}));c.connect(d.byId("importDialog.uploader"),
"onComplete",c.hitch(this,function(){setTimeout(c.hitch(this,function(){this.hide();this.options.func()}),2E3)}))}})});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:true,"zh-tw":true,tr:true,th:true,sv:true,sl:true,sk:true,ru:true,ro:true,pt:true,"pt-pt":true,pl:true,nl:true,nb:true,ko:true,kk:true,ja:true,it:true,hu:true,he:true,fr:true,fi:true,es:true,el:true,de:true,da:true,cs:true,ca:true,ar:true});
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"],function(c,d){c.declare("dijit.form.ComboBoxMixin",d._HasDropDown,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:true,highlightMatch:"first",searchDelay:100,searchAttr:"name",
labelAttr:"",labelType:"text",queryExpr:"${0}*",ignoreCase:true,hasDownArrow:true,templateString:c.cache("dijit.form","templates/DropDownBox.html"),baseClass:"dijitTextBox dijitComboBox",dropDownClass:"dijit.form._ComboBoxMenu",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(a){var e=0;if(typeof a.selectionStart=="number")e=a.selectionStart;else if(c.isIE){var f=c.doc.selection.createRange().duplicate();a=a.createTextRange();f.move("character",
0);a.move("character",0);try{a.setEndPoint("EndToEnd",f);e=String(a.text).replace(/\r/g,"").length}catch(g){}}return e},_setCaretPos:function(a,e){e=parseInt(e);d.selectInputText(a,e,e)},_setDisabledAttr:function(a){this.inherited(arguments);d.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 e=a.charOrCode;if(!(a.altKey||(a.ctrlKey||a.metaKey)&&e!="x"&&e!="v"||e==c.keys.SHIFT)){var f=false,g=this.dropDown,h=c.keys,i=null;this._prev_key_backspace=false;this._abortQuery();this.inherited(arguments);if(this._opened)i=g.getHighlightedOption();switch(e){case h.PAGE_DOWN:case h.DOWN_ARROW:case h.PAGE_UP:case h.UP_ARROW:this._opened&&
this._announceOption(i);c.stopEvent(a);break;case h.ENTER:if(i)if(i==g.nextButton){this._nextSearch(1);c.stopEvent(a);break}else{if(i==g.previousButton){this._nextSearch(-1);c.stopEvent(a);break}}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length)}if(this._opened||this._fetchHandle)a.preventDefault();case h.TAB:e=this.get("displayedValue");if(g&&(e==g._messages.previousMessage||e==g._messages.nextMessage))break;i&&this._selectOption();if(this._opened){this._lastQuery=
null;this.closeDropDown()}break;case " ":if(i){c.stopEvent(a);this._selectOption();this.closeDropDown()}else f=true;break;case h.DELETE:case h.BACKSPACE:f=this._prev_key_backspace=true;break;default:f=typeof e=="string"||e==229}if(f){this.item=undefined;this.searchTimer=setTimeout(c.hitch(this,"_startSearchFromInput"),1)}}},_autoCompleteText:function(a){var e=this.focusNode;d.selectInputText(e,e.value.length);var f=this.ignoreCase?"toLowerCase":"substr";if(a[f](0).indexOf(this.focusNode.value[f](0))==
0){f=this._getCaretPos(e);if(f+1>e.value.length){e.value=a;d.selectInputText(e,f)}}else{e.value=a;d.selectInputText(e)}},_openResultList:function(a,e){this._fetchHandle=null;if(!(this.disabled||this.readOnly||e.query[this.searchAttr]!=this._lastQuery)){var f=this.dropDown._highlighted_option&&c.hasClass(this.dropDown._highlighted_option,"dijitMenuItemSelected");this.dropDown.clearResultList();if(!a.length&&!this._maxOptions)this.closeDropDown();else{e._maxOptions=this._maxOptions;a=this.dropDown.createOptions(a,
e,c.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if(e.direction){if(1==e.direction)this.dropDown.highlightFirstOption();else-1==e.direction&&this.dropDown.highlightLastOption();f&&this._announceOption(this.dropDown.getHighlightedOption())}else this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(e.query[this.searchAttr])&&this._announceOption(a[1])}}},_showResultList:function(){this.closeDropDown(true);this.displayMessage("");this.openDropDown();d.setWaiState(this.domNode,"expanded",
"true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return false},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);d.setWaiState(this.domNode,"expanded","false");d.removeWaiState(this.focusNode,"activedescendant")}},_setBlurValue:function(){var a=this.get("displayedValue"),e=this.dropDown;if(e&&(a==e._messages.previousMessage||a==e._messages.nextMessage))this._setValueAttr(this._lastValueReported,true);else if(typeof this.item=="undefined"){this.item=
null;this.set("displayedValue",a)}else{this.value!=this._lastValueReported&&d.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true);this._refreshState()}},_onBlur:function(){this.closeDropDown();this.inherited(arguments)},_setItemAttr:function(a,e,f){f||(f=this.store.getValue(a,this.searchAttr));var g=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):f;this._set("item",a);d.form.ComboBox.superclass._setValueAttr.call(this,g,e,f)},_announceOption:function(a){if(a){var e;
if(a==this.dropDown.nextButton||a==this.dropDown.previousButton){e=a.innerHTML;this.item=undefined;this.value=""}else{e=this.store.getValue(a.item,this.searchAttr).toString();this.set("item",a.item,false,e)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);d.setWaiState(this.focusNode,"activedescendant",c.attr(a,"id"));this._autoCompleteText(e)}},_selectOption:function(a){a&&this._announceOption(a.target);this.closeDropDown();this._setCaretPos(this.focusNode,this.focusNode.value.length);
d.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,true)},_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 e=this.id+"_popup";this.dropDown=new (c.getObject(this.dropDownClass,false))({onChange:c.hitch(this,this._selectOption),id:e,dir:this.dir});d.removeWaiState(this.focusNode,
"activedescendant");d.setWaiState(this.textbox,"owns",e)}e=c.clone(this.query);this._lastInput=a;this._lastQuery=e[this.searchAttr]=this._getQueryString(a);this.searchTimer=setTimeout(c.hitch(this,function(f,g){this.searchTimer=null;f={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:f,onBegin:c.hitch(this,"_setMaxOptions"),onComplete:c.hitch(this,"_openResultList"),onError:function(h){g._fetchHandle=null;console.error("dijit.form.ComboBox: "+h);g.closeDropDown()},start:0,count:this.pageSize};
c.mixin(f,g.fetchProperties);this._fetchHandle=g.store.fetch(f);this._nextSearch=this.dropDown.onPage=c.hitch(this,function(h,i){h.start+=h.count*i;h.direction=i;this._fetchHandle=this.store.fetch(h);this.focus()},this._fetchHandle)},e,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 d.form._ComboBoxDataStore(this.srcNodeRef);
if(!("value"in this.params)){var a=this.item=this.store.fetchSelectedItem();if(a){var e=this._getValueField();this.value=this.store.getValue(a,e)}}}this.inherited(arguments)},postCreate:function(){var a=c.query('label[for="'+this.id+'"]');if(a.length){a[0].id=this.id+"_label";d.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){a=this.labelFunc(a,
this.store);var e=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){a=this.doHighlight(a,this._escapeHtml(this._lastInput));e="html"}return{html:e=="html",label:a}},doHighlight:function(a,e){var f=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),g=this.queryExpr.indexOf("${0}");e=c.regexp.escapeString(e);return this._escapeHtml(a).replace(new RegExp((g==0?"^":"")+"("+e+")"+(g==this.queryExpr.length-4?"$":""),f),'<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,e){return e.getValue(a,this.labelAttr||this.searchAttr).toString()}});c.declare("dijit.form._ComboBoxMenu",[d._Widget,d._Templated,d._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,
e){var f=c.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"});e=e(a);if(e.html)f.innerHTML=e.label;else f.appendChild(c.doc.createTextNode(e.label));if(f.innerHTML=="")f.innerHTML="&nbsp;";f.item=a;return f},createOptions:function(a,e,f){this.previousButton.style.display=e.start==0?"none":"";c.attr(this.previousButton,"id",this.id+"_prev");c.forEach(a,function(h,i){h=this._createOption(h,f);c.attr(h,"id",this.id+i);this.domNode.insertBefore(h,
this.nextButton)},this);var g=false;if(e._maxOptions&&e._maxOptions!=-1)if(e.start+e.count<e._maxOptions)g=true;else{if(e.start+e.count>e._maxOptions&&e.count==a.length)g=true}else if(e.count==a.length)g=true;this.nextButton.style.display=g?"":"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},true)}},_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,e=a.nextSibling;this._focusOptionNode(e.style.display=="none"?a:e);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 e=0,f=this.domNode.scrollTop,g=c.style(this.domNode,"height");for(this.getHighlightedOption()||this._highlightNextOption();e<g;){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 h=this.domNode.scrollTop;e+=(h-f)*(a?-1:1);f=h}},pageUp:function(){this._page(true)},pageDown:function(){this._page(false)},getHighlightedOption:function(){var a=this._highlighted_option;return a&&a.parentNode?a:null},handleKey:function(a){switch(a.charOrCode){case c.keys.DOWN_ARROW:this._highlightNextOption();
return false;case c.keys.PAGE_DOWN:this.pageDown();return false;case c.keys.UP_ARROW:this._highlightPrevOption();return false;case c.keys.PAGE_UP:this.pageUp();return false;default:return true}}});c.declare("dijit.form.ComboBox",[d.form.ValidationTextBox,d.form.ComboBoxMixin],{_setValueAttr:function(a,e,f){this._set("item",null);a||(a="");d.form.ValidationTextBox.prototype._setValueAttr.call(this,a,e,f)}});c.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(a){this.root=a;if(a.tagName!=
"SELECT"&&a.firstChild){a=c.query("select",a);if(a.length>0)a=a[0];else{this.root.innerHTML="<SELECT>"+this.root.innerHTML+"</SELECT>";a=this.root.firstChild}this.root=a}c.query("> option",a).forEach(function(e){e.innerHTML=c.trim(e.innerHTML)})},getValue:function(a,e){return e=="value"?a.value:a.innerText||a.textContent||""},isItemLoaded:function(){return true},getFeatures:function(){return{"dojo.data.api.Read":true,"dojo.data.api.Identity":true}},_fetchItems:function(a,e){if(!a.query)a.query={};
if(!a.query.name)a.query.name="";if(!a.queryOptions)a.queryOptions={};var f=c.data.util.filter.patternToRegExp(a.query.name,a.queryOptions.ignoreCase),g=c.query("> option",this.root).filter(function(h){return(h.innerText||h.textContent||"").match(f)});a.sort&&g.sort(c.data.util.sorter.createSortFunction(a.sort,this));e(g,a)},close:function(){},getLabel:function(a){return a.innerHTML},getIdentity:function(a){return c.attr(a,"value")},fetchItemByIdentity:function(a){var e=c.query("> option[value='"+
a.identity+"']",this.root)[0];a.onItem(e)},fetchSelectedItem:function(){var a=this.root,e=a.selectedIndex;return typeof e=="number"?c.query("> option:nth-child("+(e!=-1?e+1:1)+")",a)[0]:null}});c.extend(d.form._ComboBoxDataStore,c.data.util.simpleFetch);return d.form.ComboBox});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/widgets/SFTPConnectionDialog",["dojo","dijit","dijit/Dialog","dijit/form/CheckBox","dijit/form/ComboBox","dojo/data/ItemFileReadStore","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/SFTPConnectionDialog.html"],function(c,d){localStorage.getItem("orion.sftpConnections")||localStorage.setItem("orion.sftpConnections",JSON.stringify({identifier:"name",label:"name",items:[]}));window.sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"));c.declare("orion.widgets.SFTPConnectionDialog",
[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.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="Remote host:";this.sftpPathLabelText="Remote path:";this.sftpUserLabelText="User name:";this.sftpPasswordLabelText="Password:";this.buttonOk="Start Transfer";this.locationLabelText=
"Location:";sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"))},postCreate:function(){this.inherited(arguments);c.connect(this.addSFTPConnection,"onClick",null,c.hitch(this,this.onAddConnection))},execute:function(){var a=this.sftpConnectionList.value.split("@");if(a.length===2){var e=a[0],f=a[1].indexOf("/");if(!(f<=0)){var g=a[1].substring(0,f);a=a[1].substring(f);this.options.func(g,a,e,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},e=JSON.parse(localStorage.getItem("orion.sftpConnections")),f=false,g=0;g<e.items.length;g++)if(e.items[g].name===a.name){f=true;break}if(!f){e.items.unshift(a);localStorage.setItem("orion.sftpConnections",JSON.stringify(e));this.sftpConnectionList.set("value",a.name)}}})});
define("orion/extensionCommands",["require","dojo","orion/util","orion/commands","orion/editor/regex","orion/contentTypes","orion/URITemplate","orion/widgets/NewItemDialog","orion/widgets/DirectoryPrompterDialog","orion/widgets/ImportDialog","orion/widgets/SFTPConnectionDialog"],function(c,d,a,e,f,g,h){var i={};i._cloneItemWithoutChildren=function j(k){if(k===null||typeof k!=="object")return k;var l=k.constructor();for(var m in k)if(m!=="children"&&m!=="Children")l[m]=j(k[m]);return l};i._createOpenWithCommands=
function(j,k){function l(){for(var H=j.getServiceReferences("orion.edit.editor"),I=[],D=0;D<H.length;D++){var E=H[D],J=E.getProperty("id");I.push({id:J,name:E.getProperty("name"),uriTemplate:new h(E.getProperty("orionTemplate")||E.getProperty("uriTemplate"))})}return I}function m(H,I){H=H.map(function(D){return f.escape(D)});I=I.map(function(D){return f.escape(D)});H=H.length&&"(*\\.("+H.join("|")+")$)";I=I.length&&"(^("+I.join("|")+")$)";return H&&I?H+"|"+I:H?H:I?I:null}function n(H,I){H=H.getServiceReferences("orion.navigate.openWith");
for(var D=[],E=0;E<H.length;E++){var J=H[E];if(J.getProperty("editor")===I.id){J=J.getProperty("contentType");if(J instanceof Array)D=D.concat(J);else J!==null&&typeof J!=="undefined"&&D.push(J)}}return D}function r(H){for(H=H.getServiceReferences("orion.navigate.openWith.default");0<H.length;)return{editor:H[0].getProperty("editor")};return null}for(var s=l(),o=r(j),q=[],p=0;p<s.length;p++){var t=s[p],v=o&&o.editor===t.id,w=n(j,t);if(w.length){for(var y=[],z=[],F=0;F<w.length;F++){var G=k[w[F]];
if(G){y=y.concat(G.extension);z=z.concat(G.filename)}}w=t.uriTemplate;y={Directory:false,Name:m(y,z)};t={name:t.name||t.id,id:"eclipse.openWithCommand."+t.id,tooltip:t.name,validationProperties:y,href:true,forceSingleItem:true,isEditor:v?"default":"editor"};v={run:d.hitch(w,w.expand)};q.push({properties:t,service:v})}}return q};i._makeValidationFunction=function(j,k){function l(r){for(var s="^",o=0;o<r.length;o++){var q=r.charAt(o);switch(q){case "?":s+=".";break;case "*":s+=".*";break;default:s+=
q}}s+="$";return new RegExp(s)}function m(r,s,o){var q,p;if(s.indexOf(":")>=0){q=l(s.substring(0,s.indexOf(":")));var t=s.substring(s.indexOf(":")+1);for(p in r)if(q.test(p))if(m(r[p],t,o))return true}q=l(s);for(p in r)if(q.test(p))if(typeof o==="string"){if(l(o).test(r[p]))return true}else if(o===r[p])return true;return false}function n(r,s){for(var o in s)if(!m(r,o,s[o]))return false;return true}return d.hitch(j,function(r){if(typeof k==="function")r=k(r);if(d.isArray(r)){if((this.forceSingleItem||
this.href)&&r.length!==1)return false;if(!this.forceSingleItem&&r.length<1)return false}else r=[r];if(!this.validationProperties)return true;for(var s in r)if(!n(r[s],this.validationProperties))return false;return true})};i._createCommandOptions=function(j,k,l,m,n){var r={name:j.name,image:j.image,id:j.id||j.name,tooltip:j.tooltip,isEditor:j.isEditor};r.visibleWhen=i._makeValidationFunction(j,n);if(m)if(j.href)r.hrefCallback=d.hitch(j,function(s){s=d.isArray(s.items)?s.items[0]:s.items;s=i._cloneItemWithoutChildren(s);
if(k.run)return k.run(s);else if(l)return l.getService(k).run(s)});else r.callback=d.hitch(j,function(s){var o;if(this.forceSingleItem){s=d.isArray()?s.items[0]:s.items;o=i._cloneItemWithoutChildren(s)}else if(d.isArray(s.items)){o=[];for(var q=0;q<s.items.length;q++)o.push(i._cloneItemWithoutChildren(s.items[q]))}else o=i._cloneItemWithoutChildren(s.items);if(k.run)k.run(o);else l&&l.getService(k).run(o)});return r};i.getOpenWithCommands=function(j){var k=[];for(var l in j._objectScope){var m=j._objectScope[l];
m.isEditor&&k.push(m)}return k};return i});
define("orion/textview/keyBinding",[],function(){function c(a,e,f,g,h){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=e!==undefined&&e!==null?e:false;this.mod2=f!==undefined&&f!==null?f:false;this.mod3=g!==undefined&&g!==null?g:false;this.mod4=h!==undefined&&h!==null?h:false}var d=window.navigator.platform.indexOf("Mac")!==-1;c.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(d?a.metaKey:a.ctrlKey))return false;if(this.mod2!==a.shiftKey)return false;
if(this.mod3!==a.altKey)return false;if(d&&this.mod4!==a.ctrlKey)return false;return true}return false},equals:function(a){if(!a)return false;if(this.keyCode!==a.keyCode)return false;if(this.mod1!==a.mod1)return false;if(this.mod2!==a.mod2)return false;if(this.mod3!==a.mod3)return false;if(this.mod4!==a.mod4)return false;return true}};return{KeyBinding:c}});
define("orion/favorites",["require","dojo","orion/util"],function(c,d,a){function e(f){this._favorites=[];this._searches=[];this._init(f);this._initializeFavorites()}e.prototype={_init:function(f){this._registry=f.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this._serviceRegistration.dispatchEvent("favoritesChanged",{navigator:this._favorites,search:this._searches,registry:this._registry})},makeFavorites:function(f){f=
d.isArray(f)?f:[f];for(var g=0;g<f.length;g++){var h=f[g],i=h.ChildrenLocation?h.ChildrenLocation:h.Location;i=a.makeRelative(i);this.addFavorite(h.Name,i,h.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(f){this.addFavorite(f,f,false,true)},addFavorite:function(f,g,h,i){this._favorites.push({name:f,path:g,directory:h,isFavorite:true,isExternalResource:i});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(f){for(var g in this._favorites)if(this._favorites[g].path===
f){this._favorites.splice(g,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(f,g){var h=false;for(var i in this._favorites)if(this._favorites[i].path===f){var j=this._favorites[i];if(j.name!==g){j.name=g;h=true}}if(h){this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()}},addFavoriteSearch:function(f,g){this._searches.push({name:f,query:g,isSearch:true});this._searches.sort(this._sorter);this._storeSearches();
this._notifyListeners()},hasFavorite:function(f){for(var g in this._favorites)if(this._favorites[g].path===f)return true;return false},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(f){var g;if(!f)return this._favorites;var h="";for(g=0;g<f.length;g++){var i=f.charAt(g);h+=i==="*"?".*":i==="?"?".?":this._SPECIAL_CHARS.indexOf(i)>=0?"\\"+i:i}h+=".*";f=new RegExp(h);h=[];for(g in this._favorites)this._favorites[g].name.search(f)===0&&h.push(this._favorites[g]);return h},removeSearch:function(f){for(var g in this._searches)if(this._searches[g].query===
f){this._searches.splice(g,1);break}this._searches.sort(this._sorter);this._storeSearches();this._notifyListeners()},renameSearch:function(f,g){var h=false;for(var i in this._searches)if(this._searches[i].query===f){var j=this._searches[i];if(j.name!==g){j.name=g;h=true}}if(h){this._searches.sort(this._sorter);this._storeSearches();this._notifyListeners()}},_initializeFavorites:function(){var f=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(g){var h,
i=g.get("navigate");if(typeof i==="string")i=JSON.parse(i);if(i)for(h in i){i[h].isFavorite=true;f._favorites.push(i[h])}g=g.get("search");if(typeof g==="string")g=JSON.parse(g);if(g)for(h in g){g[h].isSearch=true;f._searches.push(g[h])}f._favorites.sort(f._sorter);f._notifyListeners()})},_storeFavorites:function(){var f=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(g){g.put("navigate",f)})},_storeSearches:function(){var f=this._searches;
this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(g){g.put("search",f)})},_sorter:function(f,g){f=f.name.toLowerCase();g=g.name.toLowerCase();return f>g?1:f<g?-1:0},getFavorites:function(){return{navigator:this._favorites,search:this._searches}}};e.prototype.constructor=e;return{FavoritesService: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">\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="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;"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="statusbar" style="display:table-cell;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/OpenResourceDialog",["require","dojo","dijit","dijit/Dialog","dijit/form/TextBox","orion/widgets/_OrionDialogMixin","text!orion/widgets/templates/OpenResourceDialog.html"],function(c,d,a){return d.declare("orion.widgets.OpenResourceDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:d.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 new Error("Missing required argument: searcher");this.searchRenderer=this.options&&this.options.searchRenderer;if(!this.searchRenderer||typeof this.searchRenderer.makeRenderFunction!=="function")throw new Error("Missing required argument: searchRenderer");this.favService=this.options.favoriteService;if(!this.favService)throw new Error("Missing required argument: favService");
},postMixInProperties:function(){this.options.title=this.options.title||"Find File Named";this.selectFile="Type the name of a file to open (? = any character, * = any string):";this.searchPlaceHolder="Search";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);d.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(d.hitch(this,this.checkSearch),0)});d.connect(this.resourceName,"onKeyPress",this,function(e){if(e.keyCode===
d.keys.ENTER&&this.results){e=d.query("a",this.results);if(e.length>0){window.open(e[0].href);this.hide()}}});d.connect(this,"onKeyPress",this,function(e){var f,g,h,i,j;h=function(l,m,n){return m<l.length-1?l[m+1]:n};var k=function(l,m,n){return m>0?l[m-1]:n};if(e.keyCode===d.keys.DOWN_ARROW||e.keyCode===d.keys.UP_ARROW){g=d.query("a",this.results);f=d.query("a",this.favresults);i=a.getFocus();j=g.indexOf(i.node);i=f.indexOf(i.node);if(e.keyCode===d.keys.DOWN_ARROW)if(i>=0)a.focus(h(f,i,g.length>
0?g[0]:f[0]));else if(j>=0)a.focus(h(g,j,f.length>0?f[0]:g[0]));else{if(g.length>0||f.length>0)a.focus(h(f,-1,g[0]))}else if(i>=0){h=this.resourceName&&this.resourceName.get("textbox");a.focus(k(f,i,h))}else if(j>=0){h=this.resourceName&&this.resourceName.get("textbox");a.focus(k(g,j,f.length>0?f[f.length-1]:h))}else if(g.length>0)a.focus(g[g.length-1]);else f.length>0&&a.focus(f[f.length-1]);d.stopEvent(e)}});d.connect(this,"onMouseUp",function(e){e.target.focus()});this.populateFavorites()},populateFavorites:function(){d.place("<div>Populating favorites&#x2026;</div>",
this.favresults,"only");this.favService.getFavorites().then(this.showFavorites());this.favService.addEventListener("favoritesChanged",this.showFavorites())},showFavorites:function(){var e=this;return function(f){if(f.navigator)f=f.navigator;e.searchRenderer.makeRenderFunction(e.favresults,false,d.hitch(e,e.decorateResult),e.showFavoritesImage)(f);f&&f.length>0&&d.place("<hr/>",e.favresults,"last")}},showFavoritesImage:function(e){var f=new Image;d.addClass(f,"commandSprite");d.addClass(f,"core-sprite-makeFavorite");
d.addClass(f,"commandImage");f.src=c.toUrl("images/none.png");f.title="Favorite";e.appendChild(f);d.style(f,"verticalAlign","middle")},checkSearch:function(){clearTimeout(this.timeoutId);var e=(new Date).getTime();if(e-this.time>this.SEARCH_DELAY){this.time=e;this.doSearch()}else this.timeoutId=setTimeout(d.hitch(this,"checkSearch"),50)},doSearch:function(){var e=this.resourceName&&this.resourceName.get("value"),f=this.showFavorites();this.favService.queryFavorites(e).then(function(h){f(h)});if(e){d.place("<div>Searching&#x2026;</div>",
this.results,"only");var g=this;setTimeout(function(){var h=g.searcher.createSearchQuery(null,e,"Name"),i=g.searchRenderer.makeRenderFunction(g.results,false,d.hitch(g,g.decorateResult));g.searcher.search(h,false,i)},0)}},decorateResult:function(e){var f=this;d.query("a",e).forEach(function(g){d.connect(g,"onmouseup",function(h){!d.mouseButtons.isMiddle(h)&&!d.isCopyKey(h)&&f.hide()});d.connect(g,"onkeyup",f,function(h){h.keyCode===d.keys.ENTER&&f.hide()})})},show:function(){this.inherited(arguments);
this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});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/LoginDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog","text!orion/widgets/templates/LoginDialog.html"],function(c,d,a){d.declare("orion.widgets.LoginDialog",[a.TooltipDialog],{widgetsInTemplate:true,templateString:d.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 e=
this;d.addClass(this.closeLink,"imageSprite");d.addClass(this.closeLink,"core-sprite-close");d.connect(this.closeLink,"onmouseover",this.closeLink,function(){e.closeLink.style.cursor="pointer"});d.connect(this.closeLink,"onmouseout",this.closeLink,function(){e.closeLink.style.cursor="default"});d.connect(this.closeLink,"onclick",function(){d.hitch(e,e.closeDialog)()})},setPendingAuthentication:function(e){for(var f in this.unauthenticatedServices)delete this.unauthenticatedServices[f].pending;for(f in e)if(this.unauthenticatedServices[e[f].SignInKey])this.unauthenticatedServices[e[f].SignInKey].pending=
true;else if(this.authenticatedServices[e[f].SignInKey]){this.unauthenticatedServices[e[f].SignInKey]=this.authenticatedServices[e[f].SignInKey];this.unauthenticatedServices[e[f].SignInKey].pending=true;delete this.authenticatedServices[e[f].SignInKey]}else this.unauthenticatedServices[e[f].SignInKey]={label:e[f].label,SignInLocation:e[f].SignInLocation,pending:true};this.renderUnauthenticatedServices();this.renderAuthenticatedServices()},authenticatedService:function(e){if(this.unauthenticatedServices[e]&&
!this.unauthenticatedServices[e].authService){this.authenticatedServices[e]=this.unauthenticatedServices[e];delete this.unauthenticatedServices[e]}},addUserItem:function(e,f,g,h){if(h){this.unauthenticatedServices[e]&&delete this.unauthenticatedServices[e];this.authenticatedServices[e]={authService:f,label:g,data:h}}else{this.authenticatedServices[e]&&delete this.authenticatedServices[e];this.unauthenticatedServices[e]=this.unauthenticatedServices[e]?{authService:f,label:g,pending:this.unauthenticatedServices[e].pending}:
{authService:f,label:g}}d.hitch(this,this.renderAuthenticatedServices)();d.hitch(this,this.renderUnauthenticatedServices)()},renderAuthenticatedServices:function(){d.empty(this.authenticatedList);this.authenticated.style.display=this.isEmpty(this.authenticatedServices)?"none":"";var e=this,f=true;for(var g in this.authenticatedServices){if(!f){var h=d.create("tr",null,this.authenticatedList);d.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)}f=false;h=d.create("tr",{className:"navTableHeading"});var i=this.authenticatedServices[g].authService,j=d.create("td",null,h,"only"),k=d.create("h2",null,j,"only");if(i)if(i.getAuthForm)d.hitch(e,function(n,r){i.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(s){if(e.authenticatedServices[r].label)n.innerHTML=e.authenticatedServices[r].label+"<br>";n.innerHTML+=e.getHostname(s)})})(k,g);else k.innerHTML=this.authenticatedServices[g].label?this.authenticatedServices[g].label:
g;else{var l=this.authenticatedServices[g].SignInLocation;if(this.authenticatedServices[g].label)k.innerHTML=this.authenticatedServices[g].label+"<br>";k.innerHTML+=this.getHostname(l)}d.addClass(j,"LoginWindowLeft");j=d.create("td",{style:"text-align: right"},h,"last");d.addClass(j,"LoginWindowRight");k=this.authenticatedServices[g].data;i=this.authenticatedServices[g].authService;if(!i){d.place(h,this.authenticatedList,"last");return}k.Location&&d.create("a",{href:c.toUrl("profile/user-profile.html")+
"#"+k.Location,innerHTML:"Profile"},j,"last");d.place(document.createTextNode(" "),j,"last");if(i.logout){var m=d.create("a",{innerHTML:"Sign out"},j,"last");d.connect(m,"onmouseover",m,function(){m.style.cursor="pointer"});d.connect(m,"onmouseout",m,function(){m.style.cursor="default"});d.connect(m,"onclick",d.hitch(e,function(n,r){return function(){n.logout().then(d.hitch(e,function(){this.addUserItem(r,n,this.authenticatedServices[r].label);this.isSingleService()&&this.closeDialog();localStorage.removeItem(r)}))}})(i,
g))}d.place(h,this.authenticatedList,"last");j="N/A";if(k&&k.lastlogintimestamp)j=d.date.locale.format(new Date(k.lastlogintimestamp),{formatLength:"short"});k=k.Name&&k.Name.replace(/^\s+|\s+$/g,"")!==""?k.Name:k.login;h=d.create("tr");j=k.length>40?d.create("td",{innerHTML:k.substring(0,30)+"... logged in since "+j,colspan:2,title:k+" logged in since "+j},h,"only"):d.create("td",{innerHTML:k+" logged in since "+j,colspan:2},h,"only");d.addClass(j,"LoginWindowLeft");d.addClass(j,"LoginWindowRight");
d.addClass(j,"LoginWindowComment");d.place(h,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){this.emptyListInfo.style.display=this.unauthenticatedServices.length===0&&this.authenticatedServices.length===0?"":"none";d.empty(this.otherUnauthenticatedList);var e=this;this.otherUnauthenticated.style.display=this.isEmpty(this.unauthenticatedServices)?"none":"";var f=true;for(var g in this.unauthenticatedServices){if(!f||!this.isEmpty(this.authenticatedServices)){var h=d.create("tr",
null,this.otherUnauthenticatedList);d.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)}f=false;h=d.create("tr",{className:"navTableHeading"});var i=d.create("td",null,h,"only");d.addClass(i,"LoginWindowLeft");var j=d.create("h2",null,i,"only");i=d.create("td",{style:"text-align: right"},h,"last");d.addClass(i,"LoginWindowRight");var k=this.unauthenticatedServices[g].authService;
if(k)if(k.getAuthForm)d.hitch(e,function(n,r){k.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(s){s.indexOf("?")==-1?d.create("a",{target:"_blank",href:s+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+r,innerHTML:"Sign in"},n,"last"):d.create("a",{target:"_blank",href:s+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+r,innerHTML:"Sign in"},n,"last");if(e.unauthenticatedServices[r].label)j.innerHTML=e.unauthenticatedServices[r].label+
"<br>";j.innerHTML+=e.getHostname(s)})})(i,g);else{if(k.login){d.place(document.createTextNode(this.unauthenticatedServices[g].label?this.unauthenticatedServices[g].label:g),j,"only");var l=d.create("a",{innerHTML:"Sign in",style:"cursor: hand;"},i,"last");d.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});d.connect(l,"onmouseout",l,function(){l.style.cursor="default"});d.connect(l,"onclick",d.hitch(e,function(n){return function(){n.login(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(){e.isSingleService()&&
a.popup.hide&&a.popup.hide(e);a.popup.close(e)})}})(k))}}else{var m=this.unauthenticatedServices[g].SignInLocation;m.indexOf("?")==-1?d.create("a",{target:"_blank",href:m+"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+g,innerHTML:"Sign in"},i,"last"):d.create("a",{target:"_blank",href:m+"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+g,innerHTML:"Sign in"},i,"last");if(this.unauthenticatedServices[g].label)j.innerHTML=this.unauthenticatedServices[g].label+
"<br>";j.innerHTML+=this.getHostname(m)}d.place(h,this.otherUnauthenticatedList,"last");if(this.unauthenticatedServices[g].pending){h=d.create("tr");i=d.create("td",{innerHTML:"Authentication required!",style:"padding-left: 10px",colspan:2},h,"only");d.addClass(i,"LoginWindowLeft");d.addClass(i,"LoginWindowRight");d.create("img",{src:c.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},i,"first");d.place(h,this.otherUnauthenticatedList,"last")}}},
isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},isEmpty:function(e){for(var f in e)if(e.hasOwnProperty(f))return false;return true},length:function(e){var f=0;for(var g in e)e.hasOwnProperty(g)&&f++;return f},getHostname:function(e){var f=document.createElement("img");f.src=e;e=f.src;f.src=null;return e.match(/^(?:f|ht)tp(?:s)?:\/\/([^\/]+)/im)[1].toString()},closeDialog:function(){a.popup.hide&&a.popup.hide(this);a.popup.close(this)}})});
define("orion/widgets/UserMenu",["require","dojo","dijit","orion/util","dijit/Menu"],function(c,d,a){d.declare("orion.widgets.UserMenu",[a.Menu],{widgetsInTemplate:false,id:"userMenu",postCreate:function(){this.inherited(arguments)},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(e){var f=0;for(var g in e)e.hasOwnProperty(g)&&f++;return f},_renderAuthenticatedService:function(e,f,g){var h=this,i=this.authenticatedServices[e].authService;if(i&&i.logout)this.addChild(new a.MenuItem({label:g?"Sign Out "+g:"Sign Out",onClick:d.hitch(this,function(j,k){return function(){j.logout().then(d.hitch(h,function(){this.addUserItem(k,j,this.authenticatedServices[k].label);localStorage.removeItem(k)}))}})(i,e)}),f)},_renderUnauthenticatedService:function(e,
f,g){var h=this,i=this.unauthenticatedServices[e].authService;if(i)if(i.getAuthForm)d.hitch(h,function(k){i.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(l){l+=l.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k;h.addChild(new a.MenuItem({label:g?"<a target='_blank' href="+l+">Sign In To "+g+"</a>":"<a target='_blank' href="+l+">Sign In</a>",onKeyDown:function(m){m.keyCode===
13&&window.open(l)},_onClick:function(m){this.getParent().onItemClick(this,m)}}),f)})})(e);else{if(i.login)this.addChild(new a.MenuItem({label:g?"Sign In To "+g:"Sign In",onClick:d.hitch(h,function(k){return function(){k.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(i)}),f)}else{var j=this.unauthenticatedServices[e].SignInLocation;j+=j.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+e:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+e;this.addChild(new a.MenuItem({label:g?"<a target='_blank' href="+j+">Sign In To "+g+"</a>":"<a target='_blank' href="+j+">Sign In</a>",onKeyDown:function(k){k.keyCode===13&&window.open(j)},_onClick:function(k){this.getParent().onItemClick(this,k)}}),f)}},renderServices:function(){for(var e=this.getChildren(),f=0;f<e.length;f++)this.removeChild(e[f]);if(this.isSingleService())for(f in this.authenticatedServices)this._renderAuthenticatedService(f,0);this.addChild(new a.MenuItem({label:"<a href="+
c.toUrl("settings/settings.html")+">Settings</a>",onKeyDown:function(g){if(g.keyCode===13)window.location=c.toUrl("settings/settings.html")},_onClick:function(g){this.getParent().onItemClick(this,g)}}));this.addChild(new a.MenuItem({label:"<a href="+c.toUrl("operations/list.html")+">Background Operations</a>",onKeyDown:function(g){if(g.keyCode===13)window.location=c.toUrl("operations/list.html")},_onClick:function(g){this.getParent().onItemClick(this,g)}}));this.addChild(new a.MenuSeparator);this.addChild(new a.MenuItem({label:"<a href="+
c.toUrl("help/index.jsp")+">Help</a>",onKeyDown:function(g){if(g.keyCode===13)window.location=c.toUrl("help/index.jsp")},_onClick:function(g){this.getParent().onItemClick(this,g)}}));this.keyAssistFunction&&this.addChild(new a.MenuItem({label:"Keyboard Help",onClick:this.keyAssistFunction}));this.addChild(new a.MenuItem({label:"<a href='"+c.toUrl("help/about.html")+"'>About Orion</a>",onKeyDown:function(g){if(g.keyCode===13)window.location=c.toUrl("help/about.html")},_onClick:function(g){this.getParent().onItemClick(this,
g)}}))},getUserLabel:function(e){if(e.data){var f=e.data.Name&&e.data.Name.replace(/^\s+|\s+$/g,"")!==""?e.data.Name:e.data.login;if(f.length>40)f=f.substring(0,30)+"...";f+=" ("+e.label+")";return f}else return e.label},setKeyAssist:function(e){this.keyAssistFunction=e;this.renderServices()},addUserItem:function(e,f,g,h){var i=this;if(h){this.unauthenticatedServices[e]&&delete this.unauthenticatedServices[e];this.authenticatedServices[e]={authService:f,label:g,data:h}}else{this.authenticatedServices[e]&&
delete this.authenticatedServices[e];this.unauthenticatedServices[e]=this.unauthenticatedServices[e]?{authService:f,label:g,pending:this.unauthenticatedServices[e].pending}:{authService:f,label:g}}d.hitch(this,this.renderServices)();if(d.byId("userInfo"))if(this.isSingleService()&&h){g=e=h.Name&&h.Name.replace(/^\s+|\s+$/g,"")!==""?h.Name:h.login;if(g.length>40)g=g.substring(0,30)+"...";d.create("a",{innerHTML:g,href:c.toUrl("profile/user-profile.html")+"#"+h.Location,title:"View profile of "+e,style:"margin-right: 0px"},
d.byId("userInfo"),"only")}else if(this.isSingleService()&&!h)if(f.getAuthForm)d.hitch(this,function(k){f.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(l){l+=l.indexOf("?")==-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+k;d.create("a",{innerHTML:"Sign In",href:l,title:"Sign In",style:"margin-right: 0px",target:"_blank"},d.byId("userInfo"),"only")})})(e);else{if(f.login){var j=
d.create("a",{innerHTML:"Sign In",title:"Sign In",style:"margin-right: 0px"},d.byId("userInfo"),"only");d.connect(j,"onmouseover",j,function(){j.style.cursor="pointer"});d.connect(j,"onmouseout",j,function(){j.style.cursor="default"});d.connect(j,"onclick",function(){f.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else if(this.hasServices()){j=d.create("a",{innerHTML:"Profiles",style:"margin-right: 0px"},d.byId("userInfo"),"only");d.connect(j,"onmouseover",j,function(){j.style.cursor=
"pointer"});d.connect(j,"onmouseout",j,function(){j.style.cursor="default"});d.connect(j,"onclick",function(){try{a.popup.open({popup:i.options.loginDialog,around:d.byId("userInfo")})}catch(k){}a.focus(i.options.loginDialog.domNode)})}else d.empty(d.byId("userInfo"))}})});
define("orion/globalCommands",["require","dojo","dijit","orion/commonHTMLFragments","orion/commands","orion/parameterCollectors","orion/extensionCommands","orion/util","orion/textview/keyBinding","orion/favorites","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton","orion/widgets/OpenResourceDialog","orion/widgets/LoginDialog","orion/widgets/UserMenu"],function(c,d,a,e,f,g,h,i,j,k){function l(L){var T=document.createElement("a");T.href=L;return T.href}function m(L,T){if(L.getLabel)return L.getLabel();
else{L=new d.Deferred;L.callback(T.properties.name);return L}}function n(){return J}function r(L){(L=L.getService("orion.page.progress"))&&d.hitch(L,L.init)("progressPane")}function s(L){var T=L.getServiceReferences("orion.core.auth");J=[];var V=d.byId("userMenu");if(V){if(!a.byId("logins")){var u=new a.form.DropDownButton({id:"logins",dropDown:E,label:"Options",showLabel:false,alt:"Options"});d.place(u.domNode,V,"only");u.valueNode&&d.destroy(u.valueNode)}for(V=0;V<T.length;V++){u=T[V];var x=L.getService(u);
d.hitch(this,function(B,O){m(B,O).then(function(R){B.getKey().then(function(U){J.push(U);B.getUser().then(function(Y){D.addUserItem(U,B,R,Y);E.addUserItem(U,B,R,Y)},function(){D.addUserItem(U,B,R);E.addUserItem(U,B,R,jsonData)});window.addEventListener("storage",function(){if(I[U]!==localStorage.getItem(U)){I[U]=localStorage.getItem(U);B.getUser().then(function(Y){D.addUserItem(U,B,R,Y);E.addUserItem(U,B,R,Y)},function(){D.addUserItem(U,B,R);E.addUserItem(U,B,R)})}},false)})})})(x,u)}}}function o(L){D.setPendingAuthentication(L);
var T;for(T in L)if(L.hasOwnProperty(T)){if(d.byId("userInfo").innerHTML)try{a.popup.open({popup:D,around:d.byId("userInfo")})}catch(V){}else window.setTimeout(function(){try{a.popup.open({popup:D,around:d.byId("userInfo")})}catch(u){}},500);return}a.popup.hide&&a.popup.hide(D);a.popup.close(D)}function q(L){D.authenticatedService(L)}function p(L,T,V,u,x,B,O){L.closeParameterCollector();if(B=d.byId("pageActions")){d.empty(B);(B=L.renderCommands(B,"dom",V||T,T,"button"))&&B.then?B.then(function(){L.processURL(window.location.href)}):
L.processURL(window.location.href)}if(!O)if(B=d.byId("pageNavigationActions")){d.empty(B);L.renderCommands(B,"dom",x||V||T,u||T,"button")}}function t(){if(d.byId("relatedLinks")){if(M){M.focusedChild=null;d.forEach(M.getChildren(),function(L){M.removeChild(L);L.destroy()});M.destroy()}return M=new a.Menu({style:"display: none;",id:"relatedLinksMenu"})}}function v(L,T){M||(M=new a.Menu({style:"display: none;",id:"relatedLinksMenu"}));L._addMenuItem(M,T);L=a.byId("related");if((T=d.byId("relatedLinks"))&&
!L){L=new a.form.DropDownButton({id:"related",label:"Related pages",dropDown:M});d.place(L.domNode,T,"only");i.forceLayout(T)}}function w(L,T,V,u,x){var B=L.getServiceReferences("orion.page.link.related");if(!(B.length<=0)){var O=d.byId("relatedLinks");if(O){for(var R=t(),U=false,Y=0;Y<B.length;Y++){for(var da={},ba=B[Y].getPropertyNames(),ea=0;ea<ba.length;ea++)da[ba[ea]]=B[Y].getProperty(ba[ea]);if(da.id)if(d.indexOf(V,da.id)<0){ba=u.findCommand(da.id);if(!ba){var ja=L.getServiceReferences("orion.navigate.command");
for(ea=0;ea<ja.length;ea++)if(ja[ea].getProperty("id")===da.id){da={};ba=ja[ea].getPropertyNames();for(var ka=0;ka<ba.length;ka++)da[ba[ka]]=ja[ea].getProperty(ba[ka]);ea=h._createCommandOptions(da,ja[ea],L,true);ba=new f.Command(ea);break}}if(ba)if(!ba.visibleWhen||ba.visibleWhen(T)){U=true;ea=new f.CommandInvocation(u,T,T,null,ba);ba._addMenuItem(R,ea)}else typeof x==="function"&&window.setTimeout(d.hitch(ba,function(){d.when(x(),d.hitch(this,function(ma){ma&&T===Q&&this.visibleWhen(ma)&&v(this,
new f.CommandInvocation(u,ma,ma,null,this))}))}),0)}}(L=a.byId("related"))&&L.destroy();if(U){L=new a.form.DropDownButton({id:"related",label:"Related pages",dropDown:R});d.place(L.domNode,O,"only")}i.forceLayout(O)}}}function y(L,T,V){var u=d.byId("globalActions");if(u){d.empty(u);V=(V=d.isArray(V)?V[0]:V)||T||{};L.renderCommands(u,"global",V,T,"tool")}}function z(L){P=L}function F(L,T,V,u,x){Q=L;w(T,L,P,V,u);W=x}function G(L,T,V,u,x,B,O,R){function U(){var A=T.getService("orion.core.favorite");
if(!A){A=new k.FavoritesService({serviceRegistry:T});A=T.getService("orion.core.favorite")}if(W&&W.Location)A.hasFavorite(W.ChildrenLocation||W.Location).then(function(N){if(N)T.getService("orion.page.message").setMessage(W.Name+" is already a favorite.",2E3);else{A.makeFavorites([W]);T.getService("orion.page.message").setMessage(W.Name+" has been added to the favorites list.",2E3)}});else{var K=window.location.pathname+window.location.hash;A.hasFavorite(K).then(function(N){if(N)T.getService("orion.page.message").setMessage(K+
" is already a favorite.",2E3);else{A.addFavoriteUrl(K);T.getService("orion.page.message").setMessage(K+" has been added to the favorites list.",2E3)}})}}var Y,da=d.byId(L);if(!da)throw"could not find banner parent, id was "+L;d.place(e.topHTMLFragment,da,"only");if(L=d.byId("pageToolbar")){d.place(e.toolbarHTMLFragment,L,"only");d.addClass(L,"toolComposite")}else{L=d.create("div",{id:"pageToolbar","class":"toolbar toolComposite layoutBlock"},"titleArea","after");d.place(e.toolbarHTMLFragment,L,"only")}V.setParameterCollector(new g.CommandParameterCollector);
d.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',document.body,"last");if(L=d.byId("primaryNav")){u=T.getServiceReferences("orion.page.link");for(var ba=0;ba<u.length;ba++){Y={};for(var ea=u[ba].getPropertyNames(),ja=0;ja<ea.length;ja++)Y[ea[ja]]=u[ba].getProperty(ea[ja]);if(Y.href&&Y.name){ea=d.create("a",{href:Y.href},L,"last");Y=document.createTextNode(Y.name);d.place(Y,ea,"only")}}}var ka=d.byId("search");if(!ka)throw"failed to generate HTML for banner";
d.connect(ka,"onkeypress",function(A){if(A.charOrCode===d.keys.ENTER)if(x){if(ka.value.length>0){A=x.createSearchQuery(ka.value);window.location=c.toUrl("search/search.html")+"#"+A}}else window.alert("Can't search: no search service is available")});if(L=d.byId("pageTitle")){Y=document.createTextNode(document.title);d.place(Y,L,"last")}if(L=d.byId("pageFavorite")){d.addClass(L,"commandButton");d.connect(L,"onclick",this,function(){U()});d.connect(L,"onkeypress",this,function(A){if(A.keyCode===d.keys.ENTER||
A.keyCode===d.keys.SPACE)U()});d.connect(L,"onmouseover",L,function(){d.addClass(this,"commandButtonOver")});d.connect(L,"onfocus",L,function(){d.addClass(this,"commandButtonOver")});d.connect(L,"onmouseout",L,function(){d.removeClass(this,"commandButtonOver")});d.connect(L,"onblur",L,function(){d.removeClass(this,"commandButtonOver")});new f.CommandTooltip({connectId:[L],label:"Add this page to the favorites list",position:["below","left","right","above"],commandParent:da,commandService:V})}L=new f.Command({name:"Make Favorite",
tooltip:"Add to the favorites list",imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(A){A=d.isArray(A)?A:[A];for(var K=0;K<A.length;K++)if(!A[K].Location)return false;return true},callback:function(A){A=d.isArray(A.items)?A.items:[A.items];for(var K=T.getService("orion.core.favorite"),N=function($){return function(Z){Z?T.getService("orion.page.message").setMessage($.Name+" is already a favorite.",2E3):K.makeFavorites($)}},S=0;S<A.length;S++){var X=A[S];K.hasFavorite(X.ChildrenLocation||
X.Location).then(N(X))}}});V.addCommand(L,"dom");var ma=function(A,K,N){var S=K.getService("orion.core.favorite");if(!S){S=new k.FavoritesService({serviceRegistry:K});S=K.getService("orion.core.favorite")}var X=new orion.widgets.OpenResourceDialog({searcher:A,searchRenderer:A.defaultRenderer,favoriteService:S});N&&d.connect(X,"onHide",function(){N.getTextView().focus()});window.setTimeout(function(){X.show()},0)};L=new f.Command({name:"Find File Named...",tooltip:"Choose a file by name and open an editor on it",
id:"eclipse.openResource",callback:function(){ma(x,T,O)}});if(O){O.getTextView().setKeyBinding(new j.KeyBinding("f",true,true,false),"Find File Named...");O.getTextView().setAction("Find File Named...",function(){ma(x,T,O);return true})}V.addCommand(L,"global");V.registerCommandContribution("eclipse.openResource",100,"globalActions",null,true,new f.CommandKeyBinding("f",true,true));L=new f.Command({name:"Toggle banner and footer",tooltip:"Hide or show the page banner and footer",id:"orion.toggleTrim",
callback:function(){var A=a.byId(da.parentNode.id);if(A){var K=d.byId("footer");if(da.style.display==="none"){da.style.display="block";K.style.display="block"}else{da.style.display="none";K.style.display="none"}A.layout()}return true}});V.addCommand(L,"global");V.registerCommandContribution("orion.toggleTrim",100,"globalActions",null,true,new f.CommandKeyBinding("m",true,true));if(O){O.getTextView().setKeyBinding(new f.CommandKeyBinding("m",true,true),"Toggle Trim");O.getTextView().setAction("Toggle Trim",
L.callback)}var C=d.byId("keyAssist");d.connect(document,"onkeypress",d.hitch(this,function(A){if(A.charOrCode===d.keys.ESCAPE)C.style.display="none"}));d.connect(document,"onclick",d.hitch(this,function(A){if((A=A.target||A.originalTarget||A.srcElement)&&A.id!=="keyAssist")C.style.display="none"}));O&&O.getTextView().addEventListener("MouseDown",function(){C.style.display="none"});R&&R.addHandler({isActive:function(){return C.style.display==="block"},cancel:function(){if(this.isActive()){C.style.display=
"none";return true}return false}});R=new f.Command({name:"Show Keys",tooltip:"Show a list of all the keybindings on this page",id:"eclipse.keyAssist",callback:function(){if(C.style.display==="none"){d.empty(C);if(O){d.place("<h2>Editor</h2>",C,"last");for(var A=O.getTextView().getActions(false),K=0;K<A.length;K++)for(var N=A[K],S=O.getTextView().getKeyBindings(N),X=0;X<S.length;X++)d.place('<span role="listitem">'+i.getUserKeyString(S[X])+" = "+N+"<br></span>",C,"last")}d.place("<h2>Global</h2>",
C,"last");V.showKeyBindings(C);C.style.display="block"}else C.style.display="none";return true}});V.addCommand(R,"global");V.registerCommandContribution("eclipse.keyAssist",100,"globalActions",null,true,new f.CommandKeyBinding(191,false,true));if(O){L=window.navigator.platform.indexOf("Mac")!==-1;O.getTextView().setKeyBinding(new f.CommandKeyBinding(191,false,true,!L,L),"Show Keys");O.getTextView().setAction("Show Keys",R.callback)}E.setKeyAssist(R.callback);y(V,B,Q);if(d.indexOf(P,"eclipse.openWith")<
0)(B=T.getService("orion.file.contenttypes"))&&B.getContentTypesMap().then(function(A){A=h._createOpenWithCommands(T,A);for(var K=0;K<A.length;K++){var N=A[K].properties,S=h._createCommandOptions(N,A[K].service,T,true);S=new f.Command(S);S.isEditor=N.isEditor;V.addCommand(S,"object");V.addCommandGroup("eclipse.openWith",1E3,"Open With");V.registerCommandContribution(S.id,K,null,"eclipse.openWith")}});s(T);if(e.bottomHTMLFragment)(B=d.byId("footer"))&&d.place(e.bottomHTMLFragment,B,"only");r(T);i.forceLayout(da.parentNode);
d.subscribe("/dojo/hashchange",V,function(){V.processURL(window.location.href)})}var H=l(c.toUrl("auth/NotifyAuthentication.html")),I={},D=new orion.widgets.LoginDialog,E=new orion.widgets.UserMenu({loginDialog:D}),J=[],M,Q,P=[],W=null;return{generateUserInfo:s,generateRelatedLinks:w,generateDomCommandsInBanner:p,generateBanner:G,notifyAuthenticationSite:H,setPendingAuthentication:o,getAuthenticationIds:n,setPageTarget:F,setPageCommandExclusions:z,authenticatedService:q}});
define("dojo/date",["dojo"],function(c){c.getObject("date",true,c);c.date.getDaysInMonth=function(d){var a=d.getMonth();if(a==1&&c.date.isLeapYear(d))return 29;return[31,28,31,30,31,30,31,31,30,31,30,31][a]};c.date.isLeapYear=function(d){d=d.getFullYear();return!(d%400)||!(d%4)&&!!(d%100)};c.date.getTimezoneName=function(d){var a=d.toString(),e="",f=a.indexOf("(");if(f>-1)e=a.substring(++f,a.indexOf(")"));else{f=/([A-Z\/]+) \d{4}$/;if(a=a.match(f))e=a[1];else{a=d.toLocaleString();f=/ ([A-Z\/]+)$/;
if(a=a.match(f))e=a[1]}}return e=="AM"||e=="PM"?"":e};c.date.compare=function(d,a,e){d=new Date(+d);a=new Date(+(a||new Date));if(e=="date"){d.setHours(0,0,0,0);a.setHours(0,0,0,0)}else if(e=="time"){d.setFullYear(0,0,0);a.setFullYear(0,0,0)}if(d>a)return 1;if(d<a)return-1;return 0};c.date.add=function(d,a,e){var f=new Date(+d),g=false,h="Date";switch(a){case "day":break;case "weekday":var i;if(a=e%5){a=a;i=parseInt(e/5)}else{a=e>0?5:-5;i=e>0?(e-5)/5:(e+5)/5}var j=d.getDay(),k=0;if(j==6&&e>0)k=1;
else if(j==0&&e<0)k=-1;j=j+a;if(j==0||j==6)k=e>0?2:-2;e=7*i+a+k;break;case "year":h="FullYear";g=true;break;case "week":e*=7;break;case "quarter":e*=3;case "month":g=true;h="Month";break;default:h="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}h&&f["set"+h](f["get"+h]()+e);g&&f.getDate()<d.getDate()&&f.setDate(0);return f};c.date.difference=function(d,a,e){a=a||new Date;e=e||"day";var f=a.getFullYear()-d.getFullYear(),g=1;switch(e){case "quarter":d=d.getMonth();a=a.getMonth();d=Math.floor(d/3)+
1;a=Math.floor(a/3)+1;a+=f*4;g=a-d;break;case "weekday":f=Math.round(c.date.difference(d,a,"day"));e=parseInt(c.date.difference(d,a,"week"));g=f%7;if(g==0)f=e*5;else{var h=0,i=d.getDay();a=a.getDay();e=parseInt(f/7);g=f%7;d=new Date(d);d.setDate(d.getDate()+e*7);d=d.getDay();if(f>0)switch(true){case i==6:h=-1;break;case i==0:h=0;break;case a==6:h=-1;break;case a==0:h=-2;break;case d+g>5:h=-2}else if(f<0)switch(true){case i==6:h=0;break;case i==0:h=1;break;case a==6:h=2;break;case a==0:h=1;break;case d+
g<0:h=2}f+=h;f-=e*2}g=f;break;case "year":g=f;break;case "month":g=a.getMonth()-d.getMonth()+f*12;break;case "week":g=parseInt(c.date.difference(d,a,"day")/7);break;case "day":g/=24;case "hour":g/=60;case "minute":g/=60;case "second":g/=1E3;case "millisecond":g*=a.getTime()-d.getTime()}return Math.round(g)};return c.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(c){c.getObject("cldr.supplemental",true,c);c.cldr.supplemental.getFirstDayOfWeek=function(d){d={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(d)];return d===undefined?
1:d};c.cldr.supplemental._region=function(d){d=c.i18n.normalizeLocale(d);d=d.split("-");var a=d[1];if(a){if(a.length==4)a=d[2]}else 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"}[d[0]];return a};c.cldr.supplemental.getWeekend=function(d){var a=c.cldr.supplemental._region(d);d={"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];if(d===undefined)d=6;if(a===undefined)a=0;return{start:d,end:a}};return c.cldr.supplemental});
define("dojo/cldr/nls/gregorian",{root:{"months-format-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"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"],"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"],"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"],"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"],"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"],"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"],"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"],"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"],"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"],eraNames:["BCE","CE"],"days-format-narrow":["1","2","3","4","5","6","7"],"days-standAlone-narrow":["1","2","3","4","5","6","7"],"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:true,ca:true,cs:true,da:true,de:true,el:true,en:true,"en-au":true,"en-ca":true,"en-gb":true,es:true,fi:true,fr:true,"fr-ch":true,he:true,hu:true,it:true,ja:true,ko:true,nb:true,nl:true,pl:true,pt:true,"pt-pt":true,ro:true,ru:true,sk:true,sl:true,sv:true,th:true,tr:true,zh:true,"zh-hant":true,"zh-hk":true,"zh-tw":true});
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"],
"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"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"],"dateFormatItem-yMMM":"MMM y","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","days-standAlone-narrow":["S",
"M","T","W","T","F","S"],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"],"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"],"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"],"dateFormatItem-M":"L","days-format-narrow":["S",
"M","T","W","T","F","S"],"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"],"dateFormatItem-hm":"h:mm a","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"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"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eraNarrow:["B","A"]});
define("dojo/date/locale",["dojo","dojo/date","dojo/cldr/supplemental","dojo/regexp","dojo/string","dojo/i18n","i18n!dojo/cldr/nls/gregorian"],function(c){c.getObject("date.locale",true,c);(function(){function d(f,g,h,i){return i.replace(/([a-z])\1*/ig,function(j){var k,l,m=j.charAt(0);j=j.length;var n=["abbr","wide","narrow"];switch(m){case "G":k=g[j<4?"eraAbbr":"eraNames"][f.getFullYear()<0?0:1];break;case "y":k=f.getFullYear();switch(j){case 1:break;case 2:if(!h.fullYear){k=String(k);k=k.substr(k.length-
2);break}default:l=true}break;case "Q":case "q":k=Math.ceil((f.getMonth()+1)/3);l=true;break;case "M":k=f.getMonth();if(j<3){k=k+1;l=true}else{m=["months-format",n[j-3]].join("-");k=g[m][k]}break;case "w":k=c.date.locale._getWeekOfYear(f,0);l=true;break;case "d":k=f.getDate();l=true;break;case "D":k=c.date.locale._getDayOfYear(f);l=true;break;case "E":k=f.getDay();if(j<3){k=k+1;l=true}else{m=["days-format",n[j-3]].join("-");k=g[m][k]}break;case "a":k=f.getHours()<12?"am":"pm";k=h[k]||g["dayPeriods-format-wide-"+
k];break;case "h":case "H":case "K":case "k":l=f.getHours();switch(m){case "h":k=l%12||12;break;case "H":k=l;break;case "K":k=l%12;break;case "k":k=l||24;break}l=true;break;case "m":k=f.getMinutes();l=true;break;case "s":k=f.getSeconds();l=true;break;case "S":k=Math.round(f.getMilliseconds()*Math.pow(10,j-3));l=true;break;case "v":case "z":if(k=c.date.locale._getZone(f,true,h))break;j=4;case "Z":k=c.date.locale._getZone(f,false,h);k=[k<=0?"+":"-",c.string.pad(Math.floor(Math.abs(k)/60),2),c.string.pad(Math.abs(k)%
60,2)];if(j==4){k.splice(0,0,"GMT");k.splice(3,0,":")}k=k.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+i);}if(l)k=c.string.pad(k,j);return k})}function a(f,g,h,i){var j=function(m){return m};g=g||j;h=h||j;i=i||j;var k=f.match(/(''|[^'])+/g),l=f.charAt(0)=="'";c.forEach(k,function(m,n){if(m){k[n]=(l?h:g)(m.replace(/''/g,"'"));l=!l}else k[n]=""});return i(k.join(""))}function e(f,g,h,i){i=c.regexp.escapeString(i);h.strict||(i=i.replace(" a"," ?a"));return i.replace(/([a-z])\1*/ig,
function(j){var k;k=j.charAt(0);var l=j.length,m="",n="";if(h.strict){if(l>1)m="0{"+(l-1)+"}";if(l>2)n="0{"+(l-2)+"}"}else{m="0?";n="0{0,2}"}switch(k){case "y":k="\\d{2,4}";break;case "M":k=l>2?"\\S+?":"1[0-2]|"+m+"[1-9]";break;case "D":k="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+n+"[1-9][0-9]|"+m+"[1-9]";break;case "d":k="3[01]|[12]\\d|"+m+"[1-9]";break;case "w":k="[1-4][0-9]|5[0-3]|"+m+"[1-9]";break;case "E":k="\\S+";break;case "h":k="1[0-2]|"+m+"[1-9]";break;case "k":k="1[01]|"+m+"\\d";break;case "H":k=
"1\\d|2[0-3]|"+m+"\\d";break;case "K":k="1\\d|2[0-4]|"+m+"[1-9]";break;case "m":case "s":k="[0-5]\\d";break;case "S":k="\\d{"+l+"}";break;case "a":l=h.am||g["dayPeriods-format-wide-am"];m=h.pm||g["dayPeriods-format-wide-pm"];k=l+"|"+m;if(!h.strict){if(l!=l.toLowerCase())k+="|"+l.toLowerCase();if(m!=m.toLowerCase())k+="|"+m.toLowerCase();if(k.indexOf(".")!=-1)k+="|"+k.replace(/\./g,"")}k=k.replace(/\./g,"\\.");break;default:k=".*"}f&&f.push(j);return"("+k+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}c.date.locale._getZone=
function(f,g){return g?c.date.getTimezoneName(f):f.getTimezoneOffset()};c.date.locale.format=function(f,g){g=g||{};var h=c.i18n.normalizeLocale(g.locale),i=g.formatLength||"short";h=c.date.locale._getGregorianBundle(h);var j=[];f=c.hitch(this,d,f,h,g);if(g.selector=="year")return a(h["dateFormatItem-yyyy"]||"yyyy",f);var k;if(g.selector!="date")(k=g.timePattern||h["timeFormat-"+i])&&j.push(a(k,f));if(g.selector!="time")(k=g.datePattern||h["dateFormat-"+i])&&j.push(a(k,f));return j.length==1?j[0]:
h["dateTimeFormat-"+i].replace(/\{(\d+)\}/g,function(l,m){return j[m]})};c.date.locale.regexp=function(f){return c.date.locale._parseInfo(f).regexp};c.date.locale._parseInfo=function(f){f=f||{};var g=c.i18n.normalizeLocale(f.locale);g=c.date.locale._getGregorianBundle(g);var h=f.formatLength||"short",i=f.datePattern||g["dateFormat-"+h],j=f.timePattern||g["timeFormat-"+h];h=f.selector=="date"?i:f.selector=="time"?j:g["dateTimeFormat-"+h].replace(/\{(\d+)\}/g,function(l,m){return[j,i][m]});var k=[];
return{regexp:a(h,c.hitch(this,e,k,g,f)),tokens:k,bundle:g}};c.date.locale.parse=function(f,g){var h=/[\u200E\u200F\u202A\u202E]/g,i=c.date.locale._parseInfo(g),j=i.tokens,k=i.bundle;f=(new RegExp("^"+i.regexp.replace(h,"")+"$",i.strict?"":"i")).exec(f&&f.replace(h,""));if(!f)return null;var l=["abbr","wide","narrow"],m=[1970,0,1,0,0,0,0],n="";f=c.every(f,function(s,o){if(!o)return true;o=j[o-1];var q=o.length;switch(o.charAt(0)){case "y":if(q!=2&&g.strict)m[0]=s;else if(s<100){s=Number(s);q=""+(new Date).getFullYear();
o=q.substring(0,2)*100;q=Math.min(Number(q.substring(2,4))+20,99);m[0]=s<q?o+s:o-100+s}else{if(g.strict)return false;m[0]=s}break;case "M":if(q>2){o=k["months-format-"+l[q-3]].concat();if(!g.strict){s=s.replace(".","").toLowerCase();o=c.map(o,function(t){return t.replace(".","").toLowerCase()})}s=c.indexOf(o,s);if(s==-1)return false}else s--;m[1]=s;break;case "E":case "e":o=k["days-format-"+l[q-3]].concat();if(!g.strict){s=s.toLowerCase();o=c.map(o,function(t){return t.toLowerCase()})}s=c.indexOf(o,
s);if(s==-1)return false;break;case "D":m[1]=0;case "d":m[2]=s;break;case "a":o=g.am||k["dayPeriods-format-wide-am"];q=g.pm||k["dayPeriods-format-wide-pm"];if(!g.strict){var p=/\./g;s=s.replace(p,"").toLowerCase();o=o.replace(p,"").toLowerCase();q=q.replace(p,"").toLowerCase()}if(g.strict&&s!=o&&s!=q)return false;n=s==q?"p":s==o?"a":"";break;case "K":if(s==24)s=0;case "h":case "H":case "k":if(s>23)return false;m[3]=s;break;case "m":m[4]=s;break;case "s":m[5]=s;break;case "S":m[6]=s}return true});
h=+m[3];if(n==="p"&&h<12)m[3]=h+12;else if(n==="a"&&h==12)m[3]=0;h=new Date(m[0],m[1],m[2],m[3],m[4],m[5],m[6]);g.strict&&h.setFullYear(m[0]);var r=j.join("");i=r.indexOf("d")!=-1;r=r.indexOf("M")!=-1;if(!f||r&&h.getMonth()>m[1]||i&&h.getDate()>m[2])return null;if(r&&h.getMonth()<m[1]||i&&h.getDate()<m[2])h=c.date.add(h,"hour",1);return h}})();(function(){var d=[];c.date.locale.addCustomFormats=function(a,e){d.push({pkg:a,name:e})};c.date.locale._getGregorianBundle=function(a){var e={};c.forEach(d,
function(f){f=c.i18n.getLocalization(f.pkg,f.name,a);e=c.mixin(e,f)},this);return e}})();c.date.locale.addCustomFormats("dojo.cldr","gregorian");c.date.locale.getNames=function(d,a,e,f){var g;f=c.date.locale._getGregorianBundle(f);d=[d,e,a];if(e=="standAlone"){e=d.join("-");g=f[e];if(g[0]==1)g=undefined}d[1]="format";return(g||f[d.join("-")]).concat()};c.date.locale.isWeekend=function(d,a){a=c.cldr.supplemental.getWeekend(a);d=(d||new Date).getDay();if(a.end<a.start){a.end+=7;if(d<a.start)d+=7}return d>=
a.start&&d<=a.end};c.date.locale._getDayOfYear=function(d){return c.date.difference(new Date(d.getFullYear(),0,1,d.getHours()),d)+1};c.date.locale._getWeekOfYear=function(d,a){if(arguments.length==1)a=0;var e=(new Date(d.getFullYear(),0,1)).getDay(),f=(e-a+7)%7;f=Math.floor((c.date.locale._getDayOfYear(d)+f-1)/7);e==a&&f++;return f};return c.date.locale});
define("orion/auth",["dojo","dijit","orion/globalCommands","dojo/date/locale","orion/widgets/LoginDialog"],function(c,d,a){function e(h,i){if(h.status===403){if(typeof f==="undefined")f=new d.Dialog({title:"Forbidden access"});var j=h.message;if(h.responseText)j=JSON.parse(h.responseText).Message||h.message;f.set("content",j);f.show()}else if(h.status===401)try{var k=JSON.parse(h.responseText);if(!k.SignInKey)return k;var l=localStorage.getItem(k.SignInKey),m=function(){var s=localStorage.getItem(k.SignInKey);
if(l!==s){window.removeEventListener("storage",m,false);delete g[k.SignInKey];a.setPendingAuthentication(g);a.authenticatedService(k.SignInKey);i&&i()}};window.addEventListener("storage",m,false);if(k.SignInKey){g[k.SignInKey]=k;a.setPendingAuthentication(g)}}catch(n){}else try{return JSON.parse(h.responseText)}catch(r){return{Message:h.Message,HttpCode:h.status}}}var f,g={};c.addOnLoad(function(){window.dojo=c;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=a});return{handleAuthenticationError:e}});
define("orion/preferences",["require","dojo","orion/auth","dojo/DeferredList"],function(c,d,a){function e(k,l){this._name=k;this._providers=l;this._flushPending=false;this._cached=null;this._stores=[];this._dirty=[]}function f(k,l){return{get:function(m,n){if(l===0)return null;m=localStorage.getItem(k+m);if(m===null)return null;m=JSON.parse(m);if(n||l===-1||m._expires&&m._expires>(new Date).getTime()){delete m._expires;return m}return null},set:function(m,n){if(l!==0){if(l!==-1)n._expires=(new Date).getTime()+
1E3*l;if(Object.keys(n).length===0)localStorage.removeItem(k+m);else{var r=JSON.stringify(n);localStorage.setItem(k+m,r);delete n._expires}}},remove:function(m){localStorage.removeItem(k+m)}}}function g(k){this._currentPromises={};this._cache=new f("/orion/preferences/user",0);this._service=null;this.available=function(){if(!this._service){var l=k.getServiceReferences("orion.core.preference.provider");if(l.length>0)this._service=k.getService(l[0])}return!!this._service}}function h(k){this._location=
k;this._currentPromise=null;this._cache=new f("/orion/preferences/default",3600)}function i(){this._cache=new f("/orion/preferences/local",-1)}function j(k,l){this._userProvider=new g(k);this._localProvider=new i;l=l||"defaults.pref";if(l.indexOf("://")===-1)l=c.toUrl(l);this._defaultsProvider=new h(l);this._serviceRegistration=k.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var k=[],l=0;l<this._stores.length;++l){var m=this._stores[l];this._dirty.indexOf(m)!==-1&&
k.push(this._providers[l].put(this._name,m))}this._dirty=[];return new d.DeferredList(k)},_scheduleFlush:function(k){this._dirty.indexOf(k)===-1&&this._dirty.push(k);if(!this._flushPending){this._flushPending=true;window.setTimeout(d.hitch(this,function(){if(this._flushPending){this._flushPending=false;this._flush()}}),0)}},_getCached:function(){if(!this._cached){this._cached={};for(var k=0;k<this._stores.length;++k){var l=this._stores[k];for(var m in l)if(l.hasOwnProperty(m)&&typeof this._cached[m]===
"undefined")this._cached[m]=l[m]}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(k){return this._getCached()[k]},put:function(k,l){if(this._stores.length!==0){var m=this._stores[0];if(m[k]!==l){m[k]=l;this._cached=null;this._scheduleFlush(m)}}},remove:function(k){for(var l=0;l<this._stores.length;++l){var m=this._stores[l];if(m.hasOwnProperty(k)){delete m[k];this._cached=null;this._scheduleFlush(m);return true}}return false},clear:function(){for(var k=0;k<
this._stores.length;++k){this._stores[k]={};this._scheduleFlush(this._stores[k])}this._cached=null},sync:function(k){if(this._flushPending){this._flushPending=false;return this._flush()}for(var l=this,m=[],n=0;n<this._providers.length;++n)m.push(this._providers[n].get(this._name,k).then(function(r){return function(s){l._stores[r]=s}}(n)));return(new d.DeferredList(m)).then(function(){l._cached=null;l._getCached()})},flush:function(){this._flush()}};g.prototype={get:function(k,l){if(this._currentPromises[k])return this._currentPromises[k];
var m=new d.Deferred,n=null;if(l)this._cache.remove(k);else n=this._cache.get(k);if(n!==null)m.resolve(n);else{this._currentPromises[k]=m;var r=this;this._service.get(k).then(function(s){r._cache.set(k,s);delete r._currentPromises[k];m.resolve(s)},function(s){if(s.status===401){delete r._currentPromises[k];m.resolve({});a.handleAuthenticationError(s,function(){r.get(k)})}else if(s.status===404){s={};r._cache.set(k,s);delete r._currentPromises[k];m.resolve(s)}else{delete r._currentPromises[k];m.resolve(r._cache.get(k,
true)||{})}})}return m},put:function(k,l){var m=new d.Deferred;this._cache.set(k,l);var n=this;this._service.put(k,l).then(function(){m.resolve()},function(r){r.status===401?a.handleAuthenticationError(r,function(){n._service.put(k,l).then(function(){m.resolve()},function(){m.resolve()})}):m.resolve()});return m}};h.prototype={get:function(k,l){if(this._currentPromise)return this._currentPromise;var m=new d.Deferred,n=null;if(l)this._cache.remove(k);else n=this._cache.get(k);if(n!==null)m.resolve(n);
else{this._currentPromise=m;var r=this;d.xhrGet({url:this._location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(s){r._cache.set(k,s[k]||{});r._currentPromise=null;m.resolve(s[k]||{})},error:function(s,o){if(o.xhr.status===401){r._currentPromise=null;m.resolve({});m=new d.Deferred;r._currentPromise=m;var q=this;a.handleAuthenticationError(o.xhr,function(){d.xhrGet(q)})}else if(o.xhr.status===404){r._cache.set(k,{});r._currentPromise=null;m.resolve({})}else{r._currentPromise=
null;s=r._cache.get(k,true);s!==null?m.resolve(s[k]||{}):m.resolve({})}}})}return m},put:function(){var k=new d.Deferred;k.resolve();return k}};i.prototype={get:function(k){var l=new d.Deferred;k=this._cache.get(k);k!==null?l.resolve(k):l.resolve({});return l},put:function(k,l){var m=new d.Deferred;this._cache.set(k,l);m.resolve();return m}};j.DEFAULT_SCOPE=1;j.LOCAL_SCOPE=2;j.USER_SCOPE=4;j.prototype={getPreferences:function(k,l){if(!l||typeof l!=="number"||l>7||l<1)l=j.DEFAULT_SCOPE|j.LOCAL_SCOPE|
j.USER_SCOPE;var m=[];j.USER_SCOPE&l&&this._userProvider.available()&&m.push(this._userProvider);j.LOCAL_SCOPE&l&&m.push(this._localProvider);j.DEFAULT_SCOPE&l&&m.push(this._defaultsProvider);var n=new e(k,m);return n.sync().then(function(){return n})}};return{PreferencesService:j}});
define("orion/pluginregistry",["dojo","orion/serviceregistry","dojo/DeferredList"],function(c,d){var a=a||{};a.Plugin=function(e,f,g){function h(t,v,w,y){if(!m)throw new Error("plugin not connected");var z=o++;q[String(z)]=y;g.postMessage({id:z,serviceId:t,method:v,params:w},m)}function i(t){var v={};if(t.methods)for(var w=0;w<t.methods.length;w++){var y=t.methods[w];v[y]=function(z){return function(){var F=Array.prototype.slice.call(arguments),G=new c.Deferred;l._load().then(function(){h(t.serviceId,
z,F,G)});return G.promise}}(y)}return v}function j(){var t=f.services;if(t)for(var v=0;v<t.length;v++){var w=t[v],y=i(w);p[w.serviceId]=g.registerService(w.type,y,w.properties)}}function k(t){try{if(t.method)if("plugin"===t.method){if(f){if(JSON.stringify(f)!==JSON.stringify(t.params[0])){for(var v in p)if(p.hasOwnProperty(v)){p[v].unregister();delete p[v]}f=t.params[0];j();g.updatePlugin(l)}}else{f=t.params[0];j()}if(!s){s=true;n.resolve(l)}if(r){r.resolve(l);r=null}}else if("dispatchEvent"===t.method){var w=
p[t.serviceId];w.dispatchEvent.apply(w,t.params)}else if("progress"===t.method){var y=q[String(t.requestId)];y.progress.apply(y,t.params)}else throw new Error("Bad response method: "+t.method);else{y=q[String(t.id)];delete q[String(t.id)];t.error?y.reject(t.error):y.resolve(t.result)}}catch(z){console.log(z)}}var l=this,m=null,n=new c.Deferred,r=null,s=false,o=0,q={},p={};this.getLocation=function(){return e};this.getData=function(){return f};this.uninstall=function(){for(var t in p)if(p.hasOwnProperty(t)){p[t].unregister();
delete p[t]}if(m){g.disconnect(m);m=null}g.uninstallPlugin(this)};this.getServiceReferences=function(){var t=[],v;for(v in p)p.hasOwnProperty(v)&&t.push(p[v].getServiceReference());return t};this.update=function(){if(!s)return this._load();var t;if(r===null){t=r=new c.Deferred;g.disconnect(m);m=g.connect(e,k);setTimeout(function(){r===t&&r.reject(new Error("Load timeout for plugin: "+e))},15E3)}return r};this._load=function(t){if(!m){m=g.connect(e,k);setTimeout(function(){if(!s){if(!t){f={};g.updatePlugin(l)}n.reject(new Error("Load timeout for plugin: "+
e))}},15E3)}return n.promise};if(typeof e!=="string")throw new Error("invalid url:"+e);f&&j()};a.PluginRegistry=function(e,f,g){function h(o){if(o.indexOf("://")===-1){var q=document.createElement("a");q.href=o;return q.href}return o}function i(o){delete l["plugin."+o.getLocation()]}function j(o){o.getData()._expires=(new Date).getTime()+36E5;l["plugin."+o.getLocation()]=JSON.stringify(o.getData())}function k(o){o=h(o);for(var q=0,p=m.length;q<p;q++){var t=m[q];if(o===t.getLocation())return t}return null}
var l=f||localStorage||{},m=[],n=[],r=new d.EventTarget;addEventListener("message",function(o){for(var q=0,p=o.source;q<n.length;q++)if(p===n[q].target){if(typeof n[q].useStructuredClone==="undefined")n[q].useStructuredClone=typeof o.data!=="string";n[q].handler(n[q].useStructuredClone?o.data:JSON.parse(o.data));break}},false);var s={registerService:c.hitch(e,e.registerService),connect:function(o,q){var p=document.createElement("iframe");p.id=o;p.name=o;if(!g){p.style.display="none";p.style.visibility=
"hidden"}p.src=o;document.body.appendChild(p);o={iframe:p,target:p.contentWindow,handler:q,url:o};n.push(o);return o},disconnect:function(o){for(var q=0;q<n.length;q++)if(o===n[q]){n.splice(q,1);try{document.body.removeChild(o.iframe)}catch(p){}break}},uninstallPlugin:function(o){i(o);for(var q=0;q<m.length;q++)if(o===m[q]){m.splice(q,1);r.dispatchEvent("pluginRemoved",o);break}},updatePlugin:function(o){j(o);r.dispatchEvent("pluginUpdated",o)},postMessage:function(o,q){q.target.postMessage(q.useStructuredClone?
o:JSON.stringify(o),q.url)}};this.startup=function(o){for(var q=[],p=0;p<o.length;++p){var t=o[p];t=h(t);var v="plugin."+t,w=l[v]?JSON.parse(l[v]):null;if(w&&w._expires&&w._expires>(new Date).getTime()){if(k(t)===null){delete w._expires;m.push(new a.Plugin(t,w,s))}}else{l[v]="{}";t=new a.Plugin(t,{},s);m.push(t);q.push(t._load(false))}}return new c.DeferredList(q)};this.shutdown=function(){for(var o=0;o<n.length;o++)try{document.body.removeChild(n[o].iframe)}catch(q){}};this.installPlugin=function(o,
q){o=h(o);var p=new c.Deferred,t=k(o);if(t)if(t.getData())p.resolve(t);else{var v=function(w){if(w.getLocation()===o){p.resolve(w);r.removeEventListener("pluginAdded",v)}};r.addEventListener("pluginAdded",v)}else{t=new a.Plugin(o,q,s);m.push(t);if(t.getData()){j(t);r.dispatchEvent("pluginAdded",t);p.resolve(t)}else t._load(true).then(function(){j(t);r.dispatchEvent("pluginAdded",t);p.resolve(t)},function(w){p.reject(w)})}return p.promise};this.getPlugins=function(){for(var o=[],q=0;q<m.length;q++)m[q].getData()&&
o.push(m[q]);return o};this.getPlugin=function(o){if((o=k(o))&&o.getData())return o;return null};this.addEventListener=function(o,q){r.addEventListener(o,q)};this.removeEventListener=function(o,q){r.removeEventListener(o,q)}};return a});
define("orion/bootstrap",["require","dojo","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(c,d,a,e,f){function g(){var h=new a.ServiceRegistry,i=new e.PreferencesService(h),j=new f.PluginRegistry(h);return i.getPreferences("/plugins").then(function(k){k=k.keys();for(var l=0;l<k.length;++l)if(k[l].indexOf("://")===-1)k[l]=c.toUrl(k[l]);return j.startup(k)}).then(function(){if(h.getServiceReferences("orion.core.preference.provider").length>0)return i.getPreferences("/plugins",
i.USER_SCOPE).then(function(k){k=k.keys();for(var l=0;l<k.length;++l)if(k[l].indexOf("://")===-1)k[l]=c.toUrl(k[l]);return j.startup(k)})}).then(function(){d.addOnWindowUnload(function(){j.shutdown()})}).then(function(){return{serviceRegistry:h,preferences:i,pluginRegistry:j}})}return{startup:g}});
define("orion/status",["require","dojo","orion/util"],function(c,d,a){function e(f,g,h,i,j){this._serviceRegistry=f;this._serviceRegistration=f.registerService("orion.page.message",this);this._operationsClient=g;this.notificationContainerDomId=j;this.domId=h;this.progressDomId=i||h;this._hookedClose=false}e.prototype={_init:function(){var f=d.byId("closeNotifications");if(f&&!this._hookedClose){d.connect(f,"onclick",this,function(){this.setProgressMessage("");d.removeClass(this.notificationContainerDomId,
"slideContainerActive")});d.connect(f,"onkeypress",this,function(g){if(g.keyCode===d.keys.ENTER||g.keyCode===d.keys.SPACE){this.setProgressMessage("");d.removeClass(this.notificationContainerDomId,"slideContainerActive")}})}},setMessage:function(f,g){this._init();d.place(window.document.createTextNode(f),this.domId,"only");if(typeof g==="number"){var h=this;window.setTimeout(function(){var i=d.byId(h.domId);(typeof i.textContent==="string"?i.textContent:i.innerText)===f&&d.place(window.document.createTextNode(""),
h.domId,"only")},g)}},setErrorMessage:function(f){this._init();var g=f.responseText||f.message||f;try{g=JSON.parse(g)}catch(h){}f=g.Message||g;var i="red";if(g.Severity)switch(g.Severity){case "Warning":i="#FFCC00";break;case "Error":i="red";break;case "Info":case "Ok":i="green";break}g=d.create("span",{style:{color:i}});d.place(window.document.createTextNode(f),g);d.place(g,this.domId,"only")},setProgressMessage:function(f){this._init();var g=d.create("span",{"class":"imageSprite core-sprite-progress"});
d.place(g,this.progressDomId,"only");d.place(window.document.createTextNode(f),this.progressDomId,"last");d.addClass(this.notificationContainerDomId,"progressNormal");f.length>0?d.addClass(this.notificationContainerDomId,"slideContainerActive"):d.removeClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},setProgressResult:function(f){f=f.responseText||f;try{f=JSON.parse(f)}catch(g){}this._init();var h=f.Message||f,i="imageSprite core-sprite-info",
j="progressInfo",k="progressWarning progressError progressNormal";if(f.Severity)switch(f.Severity){case "Warning":i="imageSprite core-sprite-warning";j="progressWarning";k="progressInfo progressError progressNormal";break;case "Error":i="imageSprite core-sprite-error";j="progressError";k="progressWarning progressInfo progressNormal";break}i=d.create("span",{"class":i});d.place(i,this.progressDomId,"only");if(f.HTML)d.place(h,this.progressDomId,"last");else{d.place(window.document.createTextNode("   "+
h),this.progressDomId,"last");if(j&&this.progressDomId!==this.domId){d.addClass(this.notificationContainerDomId,j);d.removeClass(this.notificationContainerDomId,k)}}d.addClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},showWhile:function(f,g){var h=this;h.setProgressMessage(g);return f.then(function(i){if(i&&i.Location&&i.Message&&i.Running)return d.hitch(h,h._doProgressWhile)(i);h.setProgressMessage("");i&&i.Result&&h.setProgressResult(i.Result);
return i})},_doProgressWhile:function(f){var g=new d.Deferred,h=this;window.setTimeout(function(){h._operationsClient.getOperation(f.Location).then(function(i){g.callback(i)})},2E3);return this.showWhile(g,f.Message)}};e.prototype.constructor=e;return{StatusReportingService:e}});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="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><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/widgets/OperationsDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog","text!orion/widgets/templates/OperationsDialog.html"],function(c,d,a){d.declare("orion.widgets.OperationsDialog",[a.TooltipDialog],{widgetsInTemplate:true,closable:true,templateString:d.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=c.toUrl("operations/list.html");this._setOperationsVisibility()},setOperations:function(e,f){this._operations=[];f=f||{};this._myOperations=[];if(e.Children)for(var g=0;g<e.Children.length;g++)f[e.Children[g].Id]?this._myOperations.push(e.Children[g]):this._operations.push(e.Children[g]);this._operations.sort(function(h,i){return parseInt(i.Modified)-parseInt(h.Modified)});this._myOperations.sort(function(h,i){return parseInt(i.Modified)-parseInt(h.Modified)});this._renderOperations()},
parseProgressResult:function(e){if(!e)return{};e=e.responseText||e;try{e=JSON.parse(e)}catch(f){}var g={Message:e.Message||e,Severity:e.Severity};if(e.DetailedMessage&&e.DetailedMessage!==g.Message)g.DetailedMessage=e.DetailedMessage;return g},_renderOperations:function(){this._renderOperationsTable(this.myOperationsList,this._myOperations);this._renderOperationsTable(this.operationsList,this._operations)},_renderOperationsTable:function(e,f){d.empty(e);for(var g=0;g<f.length;g++){var h=f[g],i=d.create("tr"),
j=d.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:h.Name},i);j=d.create("div",null,j,"only");link=d.create("span",{innerHTML:h.Name,className:"primaryColumn"},j,"last");d.place(document.createTextNode(h.Name),link,"only");var k=d.create("span",null,j,"first");d.addClass(k,"imageSprite");var l=this.parseProgressResult(h.Result);switch(l.Severity){case "Warning":d.addClass(k,"core-sprite-warning");break;case "Error":d.addClass(k,"core-sprite-error");break;default:if(h.Running===
true)d.addClass(k,"core-sprite-start");else if(h.Canceled===true)d.addClass(k,"core-sprite-stop");else h.Failed===true?d.addClass(k,"core-sprite-error"):d.addClass(k,"core-sprite-ok")}if(l.Message||h.Message){h=l.Message||h.Message;if(l.DetailedMessage&&l.DetailedMessage!=="")h+=": "+l.DetailedMessage;d.create("br",null,j,"last");d.create("span",{className:"secondaryColumn",style:"margin-left: 18px;",innerHTML:h},j,"last")}d.place(i,e,"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);
a.popup.hide&&a.popup.hide(this);a.popup.close(this)}})});
define("orion/progress",["require","dojo","orion/globalCommands","orion/widgets/OperationsDialog"],function(c,d,a){function e(f,g){this._serviceRegistry=f;this._serviceRegistration=f.registerService("orion.page.progress",this);this._operationsClient=g;this._initDone=false;this._topicListeners={};this._myOperations={};this._lastIconClass=this._lastOperation=null}e.prototype={init:function(f){if(!this._progressPane){this._progressPane=d.byId(f);this._operationsDialog=new orion.widgets.OperationsDialog;
d.connect(this._progressPane,"onclick",d.hitch(this,this._openOperationsPopup));var g=this;if(new Date-this.getLastListUpdate()>3E5)this._operationsClient.getRunningOperations().then(function(h){d.hitch(g,g._loadOperationsList)(h);window.setTimeout(function(){d.hitch(g,g._checkOperationsChanges())},5E3)},function(h){console.error(h)});else{d.hitch(g,g._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')));window.setTimeout(function(){d.hitch(g,g._checkOperationsChanges())},
5E3)}window.addEventListener("storage",function(h){a.getAuthenticationIds().indexOf(h.key)>=0&&g._operationsClient.getRunningOperations().then(function(i){d.hitch(g,g._loadOperationsList)(i)},function(i){console.error(i)})},false);window.addEventListener("storage",function(h){if(h.key==="orionOperations")d.hitch(g,g._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')))})}},_loadOperationsList:function(f){f.lastClientDate=new Date;if(f.lastClientDate-this.getLastListUpdate()>
3E5){localStorage.setItem("orionOperations",JSON.stringify(f));this._generateOperationsInfo(f)}},getLastListUpdate:function(){var f=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}');return f.lastClientDate?new Date(f.lastClientDate):new Date(0)},_markOperationAsFailed:function(f,g,h){f.Message="Operation status is unknown";f.Running=false;f.Failed=true;f.Result={HttpCode:h?h.xhr.staus:500,Severity:g,Message:g.Message?g.Message:g};this.writeOperation(f)},_checkOperationsChanges:function(){for(var f=
this,g=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),h=[],i=[],j=0;j<g.Children.length;j++){var k=g.Children[j];if(k.Running==true&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>5E3){var l=this._operationsClient.getOperation(k.Location);i.push(l);d.hitch(this,function(m){l.then(function(n){n.lastClientDate=new Date;d.hitch(f,f.writeOperation)(n)},function(n,r){if(n.status==404){h.push(m);return n}d.hitch(f,f._markOperationAsFailed(g.Children[m],n,r))})})(j)}if(!k.Running&&
new Date-new Date(k.lastClientDate?k.lastClientDate:0)>3E5)h.push(j)}(new d.DeferredList(i)).addBoth(function(){if(h.length>0){g.lastClientDate=new Date;for(var m=h.length-1;m>=0;m--)g.Children.splice(h[m],1);localStorage.setItem("orionOperations",JSON.stringify(g));d.hitch(f,f._generateOperationsInfo)(g)}window.setTimeout(function(){d.hitch(f,f._checkOperationsChanges())},5E3)})},_openOperationsPopup:function(){try{dijit.popup.open({popup:this._operationsDialog,around:this._progressPane})}catch(f){}dijit.focus(this._operationsDialog.domNode)},
_switchIconTo:function(f){this._lastIconClass&&d.removeClass(this._progressPane,this._lastIconClass);this._lastIconClass=f;d.addClass(this._progressPane,this._lastIconClass)},_generateOperationsInfo:function(f){this._operationsDialog.setOperations(f,this._myOperations);if(!f.Children||f.Children.length==0){this._switchIconTo("progressPane_empty");this._progressPane.title="Operations"}else{for(var g="",h=0;h<f.Children.length;h++){var i=f.Children[h];if(this._myOperations[i.Id])if(i.Running==true){g=
"running";break}}if(g===""&&this._lastOperation!=null)if(this._lastOperation.Result)switch(this._operationsDialog.parseProgressResult(this._lastOperation.Result).Severity){case "Warning":if(g!=="error")g="warning";break;case "Error":g="error"}switch(g){case "running":this._progressPane.title="Operations running";this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title="Some operations finished with warning";this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=
"Some operations finished with error";this._switchIconTo("progressPane_error");break;default:this._progressPane.title="Operations";this._switchIconTo("progressPane_operations")}}},followOperation:function(f,g,h){if(f.Id)this._myOperations[f.Id]=true;var i=g?g:new d.Deferred;this.writeOperation(f);var j=this;if(f&&f.Location&&f.Running==true)window.setTimeout(function(){j._operationsClient.getOperation(f.Location).then(function(k){d.hitch(j,j.followOperation(k,i,f.Location))},function(k,l){d.hitch(j,
j.setProgressResult)({Severity:"Error",Message:k});d.hitch(j,j._markOperationAsFailed(f,k,l));i.errback(k,l)})},2E3);else if(f&&f.Result){j._serviceRegistry.getService("orion.page.message").setProgressMessage("");g=this._operationsDialog.parseProgressResult(f.Result).Severity;if(g=="Error"||g=="Warning"){f.Result.failedOperation={Location:h,Id:f.Id,Name:f.Name};i.callback(f);setTimeout(function(){j._myOperations[f.Id]&&d.hitch(j,j._openOperationsPopup)()},10)}else i.callback(f);!f.Failed&&f.Idempotent==
true&&window.setTimeout(function(){d.hitch(j,j.removeOperation)(h,f.Id)},5E3)}return i},removeOperation:function(f,g){that=this;if(g){if(this._lastOperation!=null&&this._lastOperation.Id===g)this._lastOperation=null;delete this._myOperations[g]}d.hitch(that._operationsClient,that._operationsClient.removeOperation)(f).then(function(){d.hitch(that,that.removeOperationFromTheList)(g)})},removeOperationFromTheList:function(f){if(this._lastOperation!=null&&this._lastOperation.Id===f)this._lastOperation=
null;delete this._myOperations[f];for(var g=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),h=0;h<g.Children.length;h++){var i=g.Children[h];if(i.Id&&i.Id===f){g.Children.splice(h,1);break}}localStorage.setItem("orionOperations",JSON.stringify(g));this._generateOperationsInfo(g)},removeCompletedOperations:function(){for(var f=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),g=f.Children.length-1;g>=0;g--)f.Children[g].Running||f.Children.splice(g,1);
localStorage.setItem("orionOperations",JSON.stringify(f));this._generateOperationsInfo(f)},setProgressResult:function(f){this._serviceRegistry.getService("orion.page.message").setProgressResult(f)},showWhile:function(f,g){g&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(g);var h=this;return f.then(function(i){if(i&&i.Location&&i.Message&&i.Running)return d.hitch(h,h.followOperation)(i,null,i.Location);h._serviceRegistry.getService("orion.page.message").setProgressMessage("");
return i},function(i){d.hitch(h,h.setProgressResult)(i);return i})},followTopic:function(f,g){this._topicListeners[f]||(this._topicListeners[f]=[]);this._topicListeners[f].push(g)},writeOperation:function(f){this._lastOperation=f=JSON.parse(JSON.stringify(f));for(var g=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),h=0;h<g.Children.length;h++){var i=g.Children[h];if(i.Id&&i.Id===f.Id){g.Children.splice(h,1);break}}!f.Running&&!f.Failed&&delete f.Result;f.lastClientDate=new Date;
g.Children.push(f);g.lastClientDate=new Date;localStorage.setItem("orionOperations",JSON.stringify(g));this._generateOperationsInfo(g)}};e.prototype.constructor=e;return{ProgressService:e}});define("orion/dialogs",[],function(){function c(d){this._serviceRegistry=d;this._serviceRegistration=d.registerService("orion.page.dialog",this)}c.prototype={confirm:function(d,a){a(window.confirm(d))},openFiles:function(){}};c.prototype.constructor=c;return{DialogService:c}});
define("orion/selection",["dojo"],function(c){function d(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.selection",this);this._selections=[]}d.prototype={getSelection:function(a){a(this._getSingleSelection())},getSelections:function(a){a(this._selections)},_getSingleSelection:function(){if(this._selections&&this._selections.length>0)return this._selections[0];return null},setSelections:function(a){this._selections=c.isArray(a)?a:a?[a]:null;this._serviceRegistration.dispatchEvent("selectionChanged",
this._getSingleSelection(),this._selections)}};d.prototype.constructor=d;return{Selection:d}});
define("orion/fileClient",["dojo","orion/auth","dojo/DeferredList"],function(c,d){function a(g,h,i){if(!g[h])throw h+" is not supportted in this file system";var j=new c.Deferred;g[h].apply(g,i).then(function(k){j.callback(k)},function(k){k.status===401?d.handleAuthenticationError(k,function(){g[h].apply(g,i).then(function(l){j.callback(l)},function(l){j.errback(l)})}):j.errback(k)});return j}function e(g,h,i,j){if(!g.readBlob)throw"source file service does not support binary read";if(!i.writeBlob)throw"target file service does not support binary write";
if(h[h.length-1]!=="/")return a(g,"readBlob",[h]).then(function(m){return a(i,"writeBlob",[j,m])});var k=j.substring(0,j.length-1),l=decodeURIComponent(k.substring(k.lastIndexOf("/")+1));k=k.substring(0,k.lastIndexOf("/")+1);return a(i,"createFolder",[k,l]).then(function(){},function(){}).then(function(){if(h.indexOf("/")===0)h+="?depth=1";return a(g,"fetchChildren",[h]).then(function(m){for(var n=[],r=0;r<m.length;++r){var s=m[r].Location,o=s;if(m[r].Directory)o=s.substring(0,s.length-1);o=decodeURIComponent(o.substring(o.lastIndexOf("/")+
1));o=j+encodeURIComponent(o);if(m[r].Directory)o+="/";n[r]=e(g,s,i,o)}return new c.DeferredList(n)})})}function f(g,h){function i(q){var p=new c.Deferred;p.reject("No Matching FileService for location:"+q);return p}var j=g.getServiceReferences("orion.core.file"),k=j;if(h){k=[];for(var l=0;l<j.length;++l)h(j[l])&&k.push(j[l])}var m=[],n=[],r=[],s=[],o={fetchChildren:function(){var q=new c.Deferred;q.resolve(s);return q},createWorkspace:function(){var q=new c.Deferred;q.reject("no file service");return q},
loadWorkspaces:function(){var q=new c.Deferred;q.reject("no file service");return q},loadWorkspace:function(){var q=new c.Deferred;window.setTimeout(function(){q.resolve({Directory:true,Length:0,LocalTimeStamp:0,Name:"File Servers",Location:"/",Children:s,ChildrenLocation:"/"})},100);return q},search:i,createProject:i,createFolder:i,createFile:i,deleteFile:i,moveFile:i,copyFile:i,read:i,write:i};for(h=0;h<k.length;++h){s[h]={Directory:true,Length:0,LocalTimeStamp:0,Location:k[h].getProperty("top"),
ChildrenLocation:k[h].getProperty("top"),Name:k[h].getProperty("Name")};j=k[h].getProperty("pattern")||".*";if(j[0]!=="^")j="^"+j;m[h]=new RegExp(j);n[h]=g.getService(k[h]);r[h]=k[h].getProperty("Name")}this._getServiceIndex=function(q){if(q==="/")return-1;else if(!q||q.length&&q.length===0)return 0;for(var p=0;p<m.length;++p)if(m[p].test(q))return p;throw"No Matching FileService for location:"+q;};this._getService=function(q){q=this._getServiceIndex(q);return q===-1?o:n[q]};this._getServiceName=
function(q){q=this._getServiceIndex(q);return q===-1?o.Name:r[q]}}f.prototype={fileServiceName:function(g){return this._getServiceName(g)},fetchChildren:function(g){return a(this._getService(g),"fetchChildren",arguments)},createWorkspace:function(){return a(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return a(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(g){return a(this._getService(g),"loadWorkspace",arguments)},createProject:function(g){return a(this._getService(g),
"createProject",arguments)},createFolder:function(g){return a(this._getService(g),"createFolder",arguments)},createFile:function(g){return a(this._getService(g),"createFile",arguments)},deleteFile:function(g){return a(this._getService(g),"deleteFile",arguments)},moveFile:function(g,h,i){var j=this._getService(g),k=this._getService(h);if(j===k)return a(j,"moveFile",arguments);var l=g[g.length-1]==="/",m=h;if(m[m.length-1]!=="/")m+="/";if(i)m+=encodeURIComponent(i);else{var n=g;if(l)n=n.substring(0,
n.length-1);m+=n.substring(n.lastIndexOf("/")+1)}if(l&&m[m.length-1]!=="/")m+="/";return e(j,g,k,m).then(function(){return a(j,"deleteFile",[g])})},copyFile:function(g,h){var i=this._getService(g),j=this._getService(h);if(i===j)return a(i,"copyFile",arguments);var k=g[g.length-1]==="/",l=h;if(l[l.length-1]!=="/")l+="/";var m=g;if(k)m=m.substring(0,m.length-1);l+=m.substring(m.lastIndexOf("/")+1);if(k&&l[l.length-1]!=="/")l+="/";return e(i,g,j,l)},read:function(g){return a(this._getService(g),"read",
arguments)},write:function(g){return a(this._getService(g),"write",arguments)},remoteImport:function(g){return a(this._getService(g),"remoteImport",arguments)},remoteExport:function(g){return a(this._getService(g),"remoteExport",arguments)},search:function(g){return a(this._getService(g),"search",arguments)}};f.prototype.constructor=f;return{FileClient:f}});
define("orion/operationsClient",["dojo","orion/auth","dojo/DeferredList"],function(c,d){function a(l,m,n){var r=new c.Deferred;l[m].apply(l,n).then(function(s){r.callback(s)},function(s){s.status===401?d.handleAuthenticationError(s,function(){l[m].apply(l,n).then(function(o){r.callback(o)},function(o){r.errback(o)})}):r.errback(s)});return r}function e(l,m){return a(l,"getOperations",[m])}function f(l){this._location=l}function g(){var l=new c.Deferred;l.errback("No Matching OperationService for location:"+
this._location);return l}function h(l){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var m=l.getServiceReferences("orion.core.operation"),n=0;n<m.length;n++){var r=l.getService(m[n]);this._services[n]=r;r=m[n].getProperty("pattern")||".*";if(r[0]!=="^")r="^"+r;this._patterns[n]=new RegExp(r)}this._getService=function(s){if(!s)return this._services[0];for(var o=0;o<this._patterns.length;++o)if(this._patterns[o].test(s))return this._services[o];return new f(s)}}
function i(l){if(l.length===1){if(l[0][0])return l[0][1];console.error(l[0][1]);return{Children:[]}}for(var m={Children:[]},n=0;n<l.length;n++)if(l[n][0]){if(l[n][1]&&l[n][1].Children)m.Children=m.Children.concat(l[n][1].Children)}else console.error(l[n][1]);return m}function j(l,m,n){var r=this,s={Longpolling:true};if(n)s.LongpollingId=n;a(l,"getOperations",[s]).then(function(o){if(!(n&&r._currentLongpollingIds.indexOf(n)<0)){m(o,n);if(o.LongpollingId){r._currentLongpollingIds.push(o.LongpollingId);
c.hitch(r,j)(l,m,o.LongpollingId)}else c.hitch(r,j)(l,m,n)}},function(o){n&&r._currentLongpollingIds.indexOf(n)<0||("timeout"===o.dojoType?c.hitch(r,j)(l,m,n):setTimeout(function(){c.hitch(r,j)(l,m,n)},2E3))})}function k(l){for(var m=0;m<this._operationListeners.length;m++)this._operationListeners[m](l)}f.prototype={getOperation:g,getOperations:g,removeCompletedOperations:g,removeOperation:g,cancelOperation:g};f.prototype.constructor=f;h.prototype={getOperations:function(){var l=new c.Deferred,m=
[];if(this._services.length<1){l.errback("No operations services registered.");return l}for(var n=0;n<this._services.length;n++)m[n]=e(this._services[n]);(new c.DeferredList(m)).then(function(r){l.resolve(i(r))});return l},getRunningOperations:function(){var l=new c.Deferred,m=[];if(this._services.length<1){l.errback("No operations services registered.");return l}for(var n=0;n<this._services.length;n++)m[n]=e(this._services[n],{RunningOnly:true});(new c.DeferredList(m)).then(function(r){l.resolve(i(r))});
return l},getOperation:function(l){return a(this._getService(l),"getOperation",arguments)},removeCompletedOperations:function(){var l=[];if(this._services.length<1){result.errback("No operations services registered.");return result}for(var m=0;m<this._services.length;m++)l[m]=a(this._services[m],"removeCompletedOperations");return new c.DeferredList(l)},removeOperation:function(l){return a(this._getService(l),"removeOperation",arguments)},cancelOperation:function(l){return a(this._getService(l),"cancelOperation",
arguments)},addOperationChangeListener:function(l){this._operationListeners.push(l);if(this._operationListeners.length===1){if(this._services.length<1)throw"No operations services registered.";for(l=0;l<this._services.length;l++)c.hitch(this,j)(this._services[l],c.hitch(this,k))}},removeOperationChangeListener:function(l){for(var m=0;m<this._operationListeners.length;m++)if(this._operationListeners[m]===l){this._operationListeners.splice(m,1);break}if(this._operationListeners.length===0)this._currentLongpollingIds=
[]},resetChangeListeners:function(){this._currentLongpollingIds=[];if(this._services.length<1)throw"No operations services registered.";for(var l=0;l<this._services.length;l++)c.hitch(this,j)(this._services[l],c.hitch(this,k))}};h.prototype.constructor=h;return{OperationsClient:h}});
define("orion/searchUtils",["require","dojo","orion/editor/regex"],function(c,d,a){var e=e||{};e.searchUtils=e.searchUtils||{};e.searchUtils.parseQueryStr=function(f){var g=f.indexOf("?"),h=f.indexOf("q=");if(g<h&&h>0)f=f.substring(g+1);g=f.split("&");f={queryStr:f,start:0,rows:10,sort:"Path asc",replace:null};for(h=0;h<g.length;h++){var i=g[h].indexOf("q="),j=g[h].indexOf("replace=");if(i>=0)e.searchUtils.parseLocationAndSearchStr(g[h].substring(i+2),f);else if(j>=0)f.replace=g[h].substring(j+8);
else{i=g[h].split("=");if(i.length===2)if(i[0]==="rows")f.rows=parseInt(i[1]);else if(i[0]==="start")f.start=parseInt(i[1]);else if(i[0]==="sort")f.sort=i[1]}}return f};e.searchUtils.copyQueryParams=function(f,g){return{sort:f.sort,rows:f.rows,start:f.start,searchStr:f.searchStr,location:f.location,replace:g?f.replace:null}};e.searchUtils.generateSearchHref=function(f){return c.toUrl("search/search.html")+"#"+e.searchUtils.generateSearchQuery(f)};e.searchUtils.generateSearchQuery=function(f){var g=
"Path asc",h=40,i=0,j="",k="",l="";if(f){if(f.sort)g=f.sort;if(f.rows)h=f.rows;if(f.start)i=f.start;if(f.searchStr){j=f.searchStr;j=j.split(" ").join("")}if(f.location){k=f.location;if(k.length>0&&k[k.length-1]!=="*")k+="*";if(k!=="")k="+Location:"+k}if(f.replace!==null&&f.replace!==undefined)l="&replace="+f.replace}return"?sort="+g+"&rows="+h+"&start="+i+"&q="+j+k+l};e.searchUtils.parseLocationAndSearchStr=function(f,g){var h=f.indexOf("+Location:")>-1;g.location="";g.searchStr=f;if(h){f=f.split("+Location:");
if(f.length===2){h=f[1];if(h.length>0&&h[h.length-1]==="*")h=h.substring(0,h.length-1);g.location=h;g.searchStr=f[0].split(" ").join("")}}g.searchStrTitle=g.searchStr.split("\\").join("");g.inFileQuery=e.searchUtils.generateInFileQuery(g.searchStr)};e.searchUtils.generateInFileQuery=function(f){var g={},h=f.indexOf("*")>-1,i=f.indexOf("?")>-1;if(h)f=f.split("*").join(".*");if(i)f=f.split("?").join(".");if(!h&&!i){g.searchStr=f.split("\\").join("").toLowerCase();g.wildCard=false}else{g.searchStr=f.toLowerCase();
if(h=a.parse("/"+g.searchStr+"/")){f=h.pattern;h=h.flags;h+=h.indexOf("i")===-1?"i":"";g.regExp={pattern:f,flags:h};g.wildCard=true}}g.searchStrLength=g.searchStr.length;return g};e.searchUtils.replaceRegEx=function(f,g,h){return f.replace(new RegExp(g.pattern,g.flags),h)};e.searchUtils.replaceStringLiteral=function(f,g,h){g=a.parse("/"+g+"/gim");return e.searchUtils.replaceRegEx(f,g,h)};e.searchUtils.searchOnelineLiteral=function(f,g,h){var i;i=0;for(var j=false,k=[];;){i=g.indexOf(f.searchStr,i);
if(i<0)break;else{k.push({startIndex:i});j=true;if(h)break;i=i+f.searchStrLength}}if(j)return k;return null};e.searchUtils.findRegExp=function(f,g,h,i){if(!g)return null;h=h||"";h+=(h.indexOf("g")===-1?"g":"")+(h.indexOf("m")===-1?"m":"");var j=null;return(j=(new RegExp(g,h)).exec(f.substring(i)))&&{startIndex:j.index+i,length:j[0].length}};e.searchUtils.searchOnelineRegEx=function(f,g,h){for(var i=0,j=false,k=[];;)if(i=e.searchUtils.findRegExp(g,f.regExp.pattern,f.regExp.flags,i)){k.push(i);j=true;
if(h)break;i=i.startIndex+i.length}else break;if(j)return k;return null};e.searchUtils.generateNewContents=function(f,g,h,i,j){if(h&&f){var k;k=g.length>0?true:false;for(var l=0;l<f.length;l++){for(var m=f[l],n=false,r=false,s=[],o,q=0,p=0;p<h.children.length;p++)if(h.children[p].lineNumber-1===l){q=p;for(n=0;n<h.children[p].matches.length;n++)h.children[p+n].checked!==false&&s.push(n);r=s.length>0;o=h.children[p].matches;n=true;break}if(n){if(r){s=e.searchUtils.replaceCheckedMatches(m,i,o,s,j);m=
s.replacedStr;for(n=0;n<h.children[q].matches.length;n++)h.children[q+n].newMatches=s.newMatches}else{m=m;for(n=0;n<h.children[q].matches.length;n++)h.children[q+n].newMatches=h.children[q+n].matches}if(k)g[l]=m;else g.push(m)}else k||g.push(m)}}};e.searchUtils.generateMatchContext=function(f,g,h){var i=[],j=f*2+1,k;if(g.length<=j){k=0;f=g.length-1}else{k=h-f;if(k<0){k=0;f=k+j-1}else{f=h+f;if(f>g.length-1){f=g.length-1;k=f-j+1}}}for(j=k;j<=f;j++)i.push({context:g[j],current:j===h});return i};e.searchUtils.searchWithinFile=
function(f,g,h,i,j){h=h.split(i);if(j)g.contents=h;if(g){g.children=[];for(var k=i=0;k<h.length;k++){var l=h[k];if(l&&l.length>0){var m=l.toLowerCase();if(m=f.wildCard?e.searchUtils.searchOnelineRegEx(f,m):e.searchUtils.searchOnelineLiteral(f,m)){var n=k+1;if(j)for(var r=0;r<m.length;r++){var s=r+1;s={parent:g,checked:g.checked,type:"detail",matches:m,lineNumber:n,matchNumber:s,name:l,location:g.location+"-"+n+"-"+s};g.children.push(s)}else{s={parent:g,context:e.searchUtils.generateMatchContext(2,
h,k),checked:g.checked,type:"detail",matches:m,lineNumber:n,name:l,linkLocation:g.linkLocation+",line="+n,location:g.location+"-"+n};g.children.push(s)}i+=m.length}}}g.totalMatches=i}};e.searchUtils.replaceCheckedMatches=function(f,g,h,i,j){j=j;for(var k=0,l="",m=[],n=0;n<h.length;n++){if(k!==h[n].startIndex)l+=f.substring(k,h[n].startIndex);if(h[n].length)j=h[n].length;k=false;for(var r=0;r<i.length;r++)if(i[r]===n){k=true;break}if(k){m.push({startIndex:l.length,length:g.length});l+=g}else{m.push({startIndex:l.length,
length:j});l+=f.substring(h[n].startIndex,h[n].startIndex+j)}k=h[n].startIndex+j}if(k<f.length-1)l+=f.substring(k);return{replacedStr:l,newMatches:m}};e.searchUtils.fullPathNameByMeta=function(f){var g=f.length,h="";if(g>0)for(g=g-1;g>-1;g--)h=h+(h===""?"":"/")+f[g].Name;return h};e.searchUtils.path2FolderName=function(f,g,h){return f.substring(0,f.length-g.length-(h?0:1))};return e.searchUtils});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(c,d){c.declare("dijit.layout.BorderContainer",d.layout._LayoutWidget,{design:"headline",gutters:true,liveSplitters:true,persist:false,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){if(!this._started){c.forEach(this.getChildren(),
this._setupChild,this);this.inherited(arguments)}},_setupChild:function(a){var e=a.region;if(e){this.inherited(arguments);c.addClass(a.domNode,this.baseClass+"Pane");var f=this.isLeftToRight();if(e=="leading")e=f?"left":"right";if(e=="trailing")e=f?"right":"left";if(e!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget){var g=c.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter");f=new g({id:a.id+"_splitter",container:this,child:a,region:e,live:this.liveSplitters});f.isSplitter=
true;a._splitterWidget=f;c.place(f.domNode,a.domNode,"after");f.startup()}a.region=e}},layout:function(){this._layoutChildren()},addChild:function(){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var e=a.region,f=a._splitterWidget;if(f){f.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,e=="top"||e=="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(e){return e.region==a})[0]._splitterWidget},resize:function(){if(!this.cs||!this.pe){var a=this.domNode;this.cs=c.getComputedStyle(a);this.pe=c._getPadExtents(a,this.cs);this.pe.r=c._toPixelValue(a,this.cs.paddingRight);this.pe.b=c._toPixelValue(a,this.cs.paddingBottom);
c.style(a,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,e){if(this._borderBox&&this._borderBox.h){var f=c.map(this.getChildren(),function(h,i){return{pane:h,weight:[h.region=="center"?Infinity:0,h.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(h.region)?1:-1),i]}},this);f.sort(function(h,i){h=h.weight;i=i.weight;for(var j=0;j<h.length;j++)if(h[j]!=i[j])return h[j]-i[j];return 0});var g=[];c.forEach(f,function(h){h=h.pane;g.push(h);h._splitterWidget&&g.push(h._splitterWidget)});
d.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},g,a,e)}},destroyRecursive:function(){c.forEach(this.getChildren(),function(a){var e=a._splitterWidget;e&&e.destroy();delete a._splitterWidget});this.inherited(arguments)}});c.extend(d._Widget,{region:"",layoutPriority:0,splitter:false,minSize:0,maxSize:Infinity});c.declare("dijit.layout._Splitter",[d._Widget,d._Templated],{live:true,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);if(a)this.child.domNode.style[this.horizontal?"height":"width"]=a}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",e=c.marginBox(this.child.domNode)[a],f=c.filter(this.container.getChildren(),function(g){return g.region=="center"})[0];a=c.marginBox(f.domNode)[a];return Math.min(this.child.maxSize,e+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(true)).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");if(this.fake)c.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var e=this._factor,f=this.horizontal,g=f?"pageY":"pageX",h=a[g],i=this.domNode.style;f=f?"h":"w";var j=c.marginBox(this.child.domNode)[f],k=this._computeMaxSize(),l=this.child.minSize||20;f=this.region;var m=f==
"top"||f=="bottom"?"top":"left",n=parseInt(i[m],10),r=this._resize,s=c.hitch(this.container,"_layoutChildren",this.child.id);f=c.doc;this._handlers=(this._handlers||[]).concat([c.connect(f,"onmousemove",this._drag=function(o,q){o=o[g]-h;var p=e*o+j,t=Math.max(Math.min(p,k),l);if(r||q)s(t);i[m]=o+n+e*(t-p)+"px"}),c.connect(f,"ondragstart",c.stopEvent),c.connect(c.body(),"onselectstart",c.stopEvent),c.connect(f,"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,true)}finally{this._cleanupHandlers();delete this._drag}if(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=true;var e=this.horizontal,f=1,g=c.keys;switch(a.charOrCode){case e?g.UP_ARROW:g.LEFT_ARROW:f*=-1;case e?g.DOWN_ARROW:g.RIGHT_ARROW:break;default:return}e=c._getMarginSize(this.child.domNode)[e?"h":"w"]+this._factor*f;this.container._layoutChildren(this.child.id,Math.max(Math.min(e,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",[d._Widget,d._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 d.layout.BorderContainer});
define("orion/searchClient",["require","dojo","dijit","orion/auth","orion/util","orion/searchUtils","dijit/form/Button","dijit/layout/BorderContainer","dijit/layout/ContentPane"],function(c,d,a,e,f,g){function h(i){this.registry=i.serviceRegistry;this._commandService=i.commandService;(this._fileService=i.fileService)||console.error("No file service on search client")}h.prototype={search:function(i,j,k){j=g.parseQueryStr(i);try{this._fileService.search(j.location,i).then(function(m){var n=m.responseHeader.params.q;
n=n.substring(n.indexOf("}")+1);k(function(r){for(var s=[],o=0;o<r.response.docs.length;o++){var q=r.response.docs[o];s.push({name:q.Name,path:q.Location,folderName:g.path2FolderName(q.Path,q.Name),directory:q.Directory,lineNumber:q.LineNumber})}return s}(m),n)})}catch(l){this.registry.getService("orion.page.message").setErrorMessage(l)}},handleError:function(i,j){console.error(i);var k=document.createTextNode(i);d.place(k,j,"only");return i},setLocationByMetaData:function(i,j){var k="",l=null;if(j&&
i&&i.Parents&&i.Parents.length>0)l=j.index==="last"?i.Parents[i.Parents.length-1]:i.Parents[0];else if(i&&i.Directory&&i.Location&&i.Parents)l=i;if(l){this.setLocationByURL(l.Location);k=l.Name}else if(i)k=this._fileService.fileServiceName(i&&i.Location);if((i=d.byId("search"))&&i.placeholder)i.placeholder=k.length>23?"Search "+k.substring(0,20)+"...":"Search "+k;if(i&&i.title)i.title="Type a keyword or wild card to search in "+k},setLocationByURL:function(i){this.location=i},createSearchQuery:function(i,
j,k,l){k||(k="Path");k+=" asc";if(j){i=/\*$/.test(j)?"":"*";return g.generateSearchQuery({sort:k,rows:100,start:0,searchStr:"Name:"+this._luceneEscape(j,true)+i})}return g.generateSearchQuery({sort:k,rows:40,start:0,searchStr:this._luceneEscape(i,true),location:l?"":this.location})},_luceneEscape:function(i,j){var k="";j='+-&|!(){}[]^"~:\\'+(!j?"*?":"");for(var l=0;l<i.length;l++){var m=i.charAt(l);if(j.indexOf(m)>=0)k+="\\";k+=m}return k},defaultRenderer:{makeRenderFunction:function(i,j,k,l){function m(n,
r){var s=function(){function z(H,I){H.appendChild(document.createTextNode(" - "+(I.folderName?I.folderName:I.path)+" "))}function F(H,I){var D=I.name;if(G.hasOwnProperty(D)){z(H,I);var E=G[D];if(typeof E==="function"){G[D]=null;E()}}else G[D]=function(){z(H,I)}}var G={};return F}(),o=false;d.empty(i);if(n&&n.length>0){for(var q=document.createElement("table"),p=0;p<n.length;p++){var t=n[p],v;if(!o){o=true;if(j){v=q.insertRow(0).insertCell(0);v.innerHTML=j}}v=q.insertRow(-1).insertCell(0);v.colspan=
2;l&&l(v);var w=document.createElement("a");d.place(document.createTextNode(t.name),w);t.LineNumber&&d.place(document.createTextNode(" (Line "+t.LineNumber+")"),w);var y=t.location;if(t.isExternalResource)y=t.path;else{y=t.directory?c.toUrl("navigate/table.html")+"#"+t.path:c.toUrl("edit/edit.html")+"#"+t.path;if(y==="#")y=""}w.setAttribute("href",y);d.style(w,"verticalAlign","middle");v.appendChild(w);s(v,t)}d.place(q,i,"last");typeof k==="function"&&k(i)}if(!o)if(r){n=d.place("<div>No matches found for </div>",
i,"only");n=d.create("b",null,n,"last");d.place(document.createTextNode(r),n,"only");typeof k==="function"&&k(i)}}return m}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/git/gitClient",["require","dojo","orion/auth"],function(c,d,a){var e=e||{};e.GitService=function(){function f(g){if(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.git.provider",this);this._sshService=g.getService("orion.net.ssh")}}f.prototype={checkGitService:function(){},cloneGitRepository:function(g,h,i,j,k,l,m,n,r){var s=this,o={};if(g)o.Name=g;if(i)o.Path=i;if(h)o.GitUrl=h;o.Location=j;if(k)o.GitSshUsername=k;if(l)o.GitSshPassword=l;if(m)o.GitSshKnownHost=
m;if(n)o.GitSshPrivateKey=n;if(r)o.GitSshPassphrase=r;i=c.toUrl("gitapi/clone/._");i=i.substring(0,i.length-2);var q=new d.Deferred;d.xhrPost({url:i,headers:{"Orion-Version":"1"},postData:d.toJson(o),handleAs:"json",timeout:15E3,load:function(p,t){d.hitch(s,s._getGitServiceResponse)(q,p,t,h?"Cloning repository: "+h:"Initializing repository: "+g)},error:function(p,t){return d.hitch(s,s._handleGitServiceResponseError)(q,this,p,t)}});return q},removeGitRepository:function(g){var h=this,i=new d.Deferred;
d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Removing repository")},error:function(j,k){return d.hitch(h,h._handleGitServiceResponseError)(i,this,j,k)}});return i},getDiffContent:function(g,h,i){var j=this,k=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},content:{parts:"diff"},handleAs:"text",timeout:15E3,load:function(l,m){d.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting git diff",h,i)},
error:function(l,m){return d.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,h,i,d.xhrGet)}});return k},getDiffFileURI:function(g,h,i){var j=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},content:{parts:"uris"},handleAs:"json",timeout:15E3,load:function(k,l){d.hitch(service,service._getGitServiceResponse)(j,k,l,"Getting git diff",h,i)},error:function(k,l){d.hitch(service,service._handleGitServiceResponseError)(j,this,k,l,h,i,d.xhrGet)}});return j},getGitStatus:function(g,h,i){var j=
this,k=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(l,m){d.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting git status",h,i)},error:function(l,m){d.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,h,i,d.xhrGet)}});return k},stage:function(g,h,i){var j=this,k=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(l,m){d.hitch(j,j._getGitServiceResponse)(k,l,m,"Staging",h,i)},error:function(l,
m){d.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,h,i)}});return k},stageMultipleFiles:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Path:h}),handleAs:"json",timeout:15E3,load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Staging",i,j)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j)}});return l},unstageAll:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:15E3,postData:d.toJson({Reset:h}),load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Unstaging",i,j)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j)}});return l},unstage:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:d.toJson({Path:h}),load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Unstaging",i,j)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,
this,m,n,i,j)}});return l},checkoutPath:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Path:h,RemoveUntracked:"true"}),handleAs:"json",timeout:15E3,load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Checking out",i,j)},error:function(m,n){return d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j)}});return l},commitAll:function(g,h,i,j,k){var l=this,m=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},handleAs:"json",
timeout:15E3,postData:i,load:function(n,r){d.hitch(l,l._getGitServiceResponse)(m,n,r,"Committing",j,k)},error:function(n,r){d.hitch(l,l._handleGitServiceResponseError)(m,this,n,r,j,k)}});return m},getGitClone:function(g,h,i){var j=this,k=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(l,m){d.hitch(j,j._getGitServiceResponse)(k,l,m,"Getting git repository information",h)},error:function(l,m){d.hitch(j,j._handleGitServiceResponseError)(k,this,l,
m,h,i,d.xhrGet)}});return k},getGitCloneConfig:function(g){var h=this,i=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Getting git repository configuration")},error:function(j,k){d.hitch(h,h._handleGitServiceResponseError)(i,this,j,k,null,null,d.xhrGet)}});return i},getGitBranch:function(g){var h=this,i=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,
k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Getting branch information")},error:function(j,k){d.hitch(h,h._handleGitServiceResponseError)(i,this,j,k,null,null,d.xhrGet)}});return i},getGitRemote:function(g){var h=this,i=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Getting remote branch information")},error:function(j,k){d.hitch(h,h._handleGitServiceResponseError)(i,this,j,k,null,null,d.xhrGet)}});
return i},checkoutBranch:function(g,h){var i=this,j=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Branch:h}),handleAs:"json",timeout:5E3,load:function(k,l){d.hitch(i,i._getGitServiceResponse)(j,k,l,h?"Checking out branch "+h:"Checking out branch")},error:function(k,l){d.hitch(i,i._handleGitServiceResponseError)(j,this,k,l)}});return j},resetIndex:function(g,h){var i=this,j=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Commit:h,Reset:"HARD"}),
handleAs:"json",timeout:5E3,load:function(k,l){d.hitch(i,i._getGitServiceResponse)(j,k,l,"Resetting index")},error:function(k,l){d.hitch(i,i._handleGitServiceResponseError)(j,this,k,l)}});return j},addBranch:function(g,h,i){var j=this,k={};if(h)k.Name=h;if(i)k.Branch=i;var l=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson(k),handleAs:"json",timeout:5E3,load:function(m,n){d.hitch(j,j._getGitServiceResponse)(l,m,n,h?"Adding branch "+h:"Adding branch")},error:function(m,
n){d.hitch(j,j._handleGitServiceResponseError)(l,this,m,n)}});return l},removeBranch:function(g){var h=this,i=new d.Deferred;d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Removing branch")},error:function(j,k){d.hitch(h,h._handleGitServiceResponseError)(i,this,j,k)}});return i},addRemote:function(g,h,i){var j=this,k=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Remote:h,RemoteURI:i}),
handleAs:"json",timeout:5E3,load:function(l,m){d.hitch(j,j._getGitServiceResponse)(k,l,m,h?"Adding remote "+h:"Adding remote")},error:function(l,m){d.hitch(j,j._handleGitServiceResponseError)(k,this,l,m)}});return k},removeRemote:function(g){var h=this,i=new d.Deferred;d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Removing remote")},error:function(j,k){d.hitch(h,h._handleGitServiceResponseError)(i,this,j,
k)}});return i},doGitLog:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,j?j:"Generating git log",h)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,h,i,d.xhrGet)}});return l},getDiff:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({New:h}),handleAs:"json",timeout:5E3,load:function(m,
n){d.hitch(k,k._getGitServiceResponse)(l,m,n,h?"Getting git diff for "+h:"Getting git diff",i)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j,d.xhrPost)}});return l},doFetch:function(g,h,i,j,k,l,m,n){var r=this,s=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Fetch:"true",Force:h,GitSshUsername:j,GitSshPassword:k,GitSshKnownHost:l,GitSshPrivateKey:m,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,load:function(o,q){d.hitch(r,r._getGitServiceResponse)(s,
o,q,"Fetching remote: "+g,i)},error:function(o,q){d.hitch(r,r._handleGitServiceResponseError)(s,this,o,q)}});return s},doPull:function(g,h,i,j,k,l,m,n){var r=this,s=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Pull:"true",Force:h,GitSshUsername:j,GitSshPassword:k,GitSshKnownHost:l,GitSshPrivateKey:m,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,load:function(o,q){d.hitch(r,r._getGitServiceResponse)(s,o,q,"Pulling : "+g,i)},error:function(o,q){d.hitch(r,r._handleGitServiceResponseError)(s,
this,o,q)}});return s},doMerge:function(g,h){var i=this,j=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Merge:h}),handleAs:"json",timeout:5E3,load:function(k,l){var m=new d.Deferred;d.hitch(i,i._getGitServiceResponse)(m,k,l,"Merging "+g);m.then(function(n){j.callback({jsonData:n})})},error:function(k,l){d.hitch(i,i._handleGitServiceResponseError)(j,this,k,l)}});return j},doCherryPick:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},
postData:d.toJson({"Cherry-Pick":h}),handleAs:"json",timeout:5E3,load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Cherry pick of "+h,i,j)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j)}});return l},doRebase:function(g,h,i,j,k){var l=this,m={};m.Rebase=h;if(i)m.Operation=i;var n=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson(m),handleAs:"json",timeout:5E3,load:function(r,s){d.hitch(l,l._getGitServiceResponse)(n,r,s,h?"Rebase on top of ":
"Rebase"+h,j,k)},error:function(r,s){d.hitch(l,l._handleGitServiceResponseError)(n,this,r,s,j,k)}});return n},doPush:function(g,h,i,j,k,l,m,n,r,s,o){var q=this,p=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({PushSrcRef:h,PushTags:i,Force:j,GitSshUsername:m,GitSshPassword:n,GitSshKnownHost:r,GitSshPrivateKey:s,GitSshPassphrase:o}),handleAs:"json",timeout:5E3,load:function(t,v){d.hitch(q,q._getGitServiceResponse)(p,t,v,l?l:"Pushing repository")},error:function(t,v){d.hitch(q,
q._handleGitServiceResponseError)(p,this,t,v)}});return p},getLog:function(g,h,i,j,k){var l=this,m=new d.Deferred,n=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({New:h}),handleAs:"json",timeout:5E3,load:function(r,s){n.callback(s.xhr.getResponseHeader("Location"))},error:function(r,s){d.hitch(l,l._handleGitServiceResponseError)(n,this,r,s,j,k,d.xhrPost)}});n.then(function(r){d.xhrGet({url:r,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(s,
o){d.hitch(l,l._getGitServiceResponse)(m,s,o,i?i:"Generating git log",j)},error:function(s,o){d.hitch(l,l._handleGitServiceResponseError)(m,this,s,o,j,k,d.xhrGet)}})});return m},getDefaultRemoteBranch:function(g,h,i){var j=this,k=new d.Deferred,l=new d.Deferred;d.xhrGet({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(m,n){d.hitch(j,j._getGitServiceResponse)(l,m,n,"Getting remote branches")},error:function(m,n){d.hitch(j,j._handleGitServiceResponseError)(l,this,m,n,h,
i,d.xhrGet)}});l.then(function(m){if(m.Children[0]==null)return null;d.xhrGet({url:m.Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(n,r){d.hitch(j,j._getGitServiceResponse)(k,n,r,"Getting default remote branch",h)},error:function(n,r){d.hitch(j,j._handleGitServiceResponseError)(k,this,n,r,h,i,d.xhrGet)}})});return k},doAddTag:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Name:h}),handleAs:"json",
timeout:5E3,load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Adding tag ..."+h,i)},error:function(m,n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j)}});return l},doRemoveTag:function(g){var h=this,i=new d.Deferred;d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(j,k){d.hitch(h,h._getGitServiceResponse)(i,j,k,"Removing tag ...")},error:function(j,k){d.hitch(h,h._handleGitServiceResponseError)(i,this,j,k)}});return i},checkoutTag:function(g,
h,i,j,k){var l=this,m=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Tag:h,Branch:i}),handleAs:"json",timeout:5E3,load:function(n,r){d.hitch(l,l._getGitServiceResponse)(m,n,r,"Checking out tag "+h,j,k)},error:function(n,r){d.hitch(l,l._handleGitServiceResponseError)(m,this,n,r,j,k)}});return m},addCloneConfigurationProperty:function(g,h,i,j,k){var l=this,m=new d.Deferred;d.xhrPost({url:g,headers:{"Orion-Version":"1"},postData:d.toJson({Key:h,Value:i}),handleAs:"json",
timeout:15E3,load:function(n,r){d.hitch(l,l._getGitServiceResponse)(m,n,r,"Adding configuration property "+h,j,k)},error:function(n,r){d.hitch(l,l._handleGitServiceResponseError)(m,this,n,r,j,k)}});return m},editCloneConfigurationProperty:function(g,h,i,j){var k=this,l=new d.Deferred;d.xhrPut({url:g,headers:{"Orion-Version":"1"},putData:d.toJson({Value:h}),handleAs:"json",timeout:15E3,load:function(m,n){d.hitch(k,k._getGitServiceResponse)(l,m,n,"Saving configuration property as "+h,i,j)},error:function(m,
n){d.hitch(k,k._handleGitServiceResponseError)(l,this,m,n,i,j)}});return l},deleteCloneConfigurationProperty:function(g,h,i){var j=this,k=new d.Deferred;d.xhrDelete({url:g,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(l,m){d.hitch(j,j._getGitServiceResponse)(k,l,m,"Deleting configuration property",h,i)},error:function(l,m){d.hitch(j,j._handleGitServiceResponseError)(k,this,l,m,h,i)}});return k},_getGitServiceResponse:function(g,h,i,j,k){var l=this;if(i&&i.xhr.status===202){i=
new d.Deferred;i.callback(h);return this._serviceRegistry.getService("orion.page.progress").showWhile(i,j).then(function(m){m=m.Result.Severity=="Ok"?m.Result.JsonData:m.Result;if(k)typeof k==="function"?k(m):l._serviceRegistration.dispatchEvent(k,m);g.callback(m)})}if(k)typeof k==="function"?k(h,i):l._serviceRegistration.dispatchEvent(k,h);g.callback(h)},_handleGitServiceResponseError:function(g,h,i,j,k,l,m){g||(g=new d.Deferred);if(i.status===401||i.status===403){a.handleAuthenticationError(j.xhr,
function(){m?m(h).then(function(n,r){g.callback(n,r)},function(n,r){l&&l(n,r);g.errback(n,r)}):g.errback(i)})!=null&&g.errback(i);return g}l&&l(i,j);g.errback(i);return g}};return f}();return e});
define("orion/breadcrumbs",["require","dojo","orion/util"],function(c,d,a){function e(f){this._init(f)}e.prototype={_init:function(f){var g=f.container;if(typeof g==="string")g=d.byId(g);if(!g)throw"no parent container";this._container=g;d.removeClass(g,"currentLocation");this._id=f.id||"eclipse.breadcrumbs";this._resource=f.resource||null;this._firstSegmentName=f.firstSegmentName;this._makeHref=f.makeHref;this.path="";this.render()},getNavigatorRootSegment:function(){if(this._firstSegmentName){var f;
if(this._resource&&this._resource.Parents){f=document.createElement("a");if(this._makeHref)this._makeHref(f,"");else f.href=c.toUrl("navigate/table.html")+"#"}else f=document.createElement("span");d.place(document.createTextNode(this._firstSegmentName),f,"only");return f}return null},render:function(){var f=this._container,g=d.byId(this._id);if(g)d.empty(g);else{g=document.createElement("span");g.id=this._id;f.appendChild(g)}var h;if(h=this.getNavigatorRootSegment()){d.addClass(h,"breadcrumb");g.appendChild(h);
if(this._resource&&this._resource.Parents){h=document.createElement("span");d.place(document.createTextNode(" >> "),h,"only");this.path+="/";d.addClass(h,"breadcrumb");g.appendChild(h)}else{h.href="";d.removeClass(h,"breadcrumb");d.addClass(h,"currentLocation");a.forceLayout(f);return}}if(this._resource){if(this._resource.Parents)for(var i=this._resource.Parents,j=i.length;--j>=0;){h=document.createElement("a");d.addClass(h,"breadcrumb");d.place(document.createTextNode(i[j].Name),h,"only");this.path+=
i[j].Name;if(this._makeHref)this._makeHref(h,i[j].ChildrenLocation);else h.href=c.toUrl("navigate/table.html")+"#"+i[j].ChildrenLocation;g.appendChild(h);h=document.createElement("span");d.place(document.createTextNode(" >> "),h,"only");this.path+="/";d.addClass(h,"breadcrumb");g.appendChild(h)}h=document.createElement("span");d.place("<br>"+this._resource.Name,h,"only");d.addClass(h,"currentLocation");this.path+=this._resource.Name;g.appendChild(h)}if(g.childNodes.length===0){h=document.createElement("a");
d.place(document.createTextNode(document.title),h,"only");d.addClass(h,"breadcrumb");d.addClass(h,"currentLocation");g.appendChild(h)}a.forceLayout(f)}};e.prototype.constructor=e;return{BreadCrumbs:e}});
define("orion/ssh/sshTools",[],function(){var c=c||{};c.SshService=function(){function d(a){if(a){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.net.ssh",this)}}d.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(a,e){e||(e="");var f=localStorage.getItem(e+this._KNOWN_HOSTS);if(f)f.indexOf(a)<0&&localStorage.setItem(e+this._KNOWN_HOSTS,f+"\n"+a);else localStorage.setItem(e+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 d}();return c});
define("orion/treetable",["dojo"],function(c){function d(a){this._init(a)}d.prototype={_init:function(a){var e=a.parent,f=this;if(typeof e==="string")e=c.byId(e);if(!e)throw"no parent";if(!a.model)throw"no tree model";if(!a.renderer)throw"no renderer";this._parent=e;this._treeModel=a.model;this._renderer=a.renderer;this._showRoot=a.showRoot===undefined?false:a.showRoot;this._indent=a.indent===undefined?16:a.indent;this._onCollapse=a.onCollapse;this._labelColumnIndex=a.labelColumnIndex===undefined?
0:a.labelColumnIndex;this._id=a.id===undefined?"treetable":a.id;this._tableStyle=a.tableStyle;this._root=this._treeModel.getRoot(function(g){if(this._showRoot){g._depth=0;this._generate([g],0)}else f._treeModel.getChildren(g,function(h){f._generate(h,0)})})},_generate:function(a,e){c.empty(this._parent);var f=document.createElement("table");f.id=this._id;this._tableStyle&&c.addClass(f,this._tableStyle);this._renderer.initTable(f,this);var g=document.createElement("tbody");g.id=this._id+"tbody";this._generateChildren(a,
e,g,"last");f.appendChild(g);this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(a,e,f,g){for(var h in a){var i=document.createElement("tr");i.id=this._treeModel.getId(a[h]);i._depth=e;i._item=a[h];this._renderer.render(a[h],i);c.style(i.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*e+"px");c.place(i,f,g);if(g==="after")f=i}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},
refresh:function(a,e,f,g,h,i){var j=this._treeModel.getId(a),k;if(j===this._id){this._removeChildRows(j);this._generateChildren(e,0,c.byId(j+"tbody"),"last");this._rowsChanged()}else{var l=c.byId(j);if(l){l._item=a;if(l&&(f||l._expanded)){l._expanded=true;this._removeChildRows(j);this._renderer.updateExpandVisuals(l,true);if(e){this._generateChildren(e,l._depth+1,l,"after");this._rowsChanged();if(g&&h){a=c.byId(g);c.addClass(a,h);i&&c.removeClass(a,i)}}else{k=this;e=this._treeModel.getChildren(l._item,
function(m){k._generateChildren(m,l._depth+1,l,"after");k._rowsChanged()})}}else this._renderer.updateExpandVisuals(l,false)}else console.log("could not find table row "+j)}},refreshAndExpand:function(a,e,f,g,h){this.refresh(a,e,true,f,g,h)},getItem:function(a){if(typeof a==="string"){var e=c.byId(a);if(e)return e._item}if(a._item)return a._item;return a},toggle:function(a,e,f,g){var h=c.byId(a);if(h)if(h._expanded){this.collapse(a);if(e){a=c.byId(e);c.addClass(a,g);c.removeClass(a,f)}}else{this.expand(a);
if(e){a=c.byId(e);c.addClass(a,f);c.removeClass(a,g)}}},isExpanded:function(a){if(a=c.byId(a))return a._expanded;return false},expand:function(a,e,f){a=typeof a==="string"?a:this._treeModel.getId(a);var g=c.byId(a);if(g)if(!g._expanded){g._expanded=true;var h=this;this._renderer.updateExpandVisuals(g,true);this._treeModel.getChildren(g._item,function(i){h._generateChildren(i,g._depth+1,g,"after");h._rowsChanged();e&&e.apply(this,f)})}},_removeChildRows:function(a){c.byId(this._id);var e=a===this._id,
f=false,g=-1,h=[];c.query(".treeTableRow").forEach(function(k){if(!f)if(e)if(k._depth>g)h.push(k);else f=true;else if(k.id===a){e=true;g=k._depth}});for(var i in h){var j=h[i];j.parentNode.removeChild(j)}},collapse:function(a){a=typeof a==="string"?a:this._treeModel.getId(a);var e=c.byId(a);if(e){if(!e._expanded)return;e._expanded=false;this._renderer.updateExpandVisuals(e,false);this._removeChildRows(a);this._rowsChanged()}this._onCollapse&&this._onCollapse(e._item)}};d.prototype.constructor=d;return{TableTree:d}});
define("orion/explorer",["require","dojo","orion/treetable"],function(c,d,a){var e={};e.Explorer=function(){function f(g,h,i){this.registry=g;this.renderer=i;this.selection=h;this.myTree=null}f.prototype={changedItem:function(g,h){d.hitch(this.myTree,this.myTree.refreshAndExpand)(g,h)},updateCommands:function(g){this.myTree&&d.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(g))},makeNewItemPlaceHolder:function(g,h,i){g=this.getRow(g);if(i){g=g.childNodes[i];d.place("<br><span id='"+
h+"placeHolderRow'></span>",g,"last");if(i=d.byId(h+"placeHolderRow"))return{tempNode:i,refNode:i}}if(g){d.place("<tr id='"+h+"placeHolderRow'><td id='"+h+"placeHolderCol'></td>",g,"after");i=d.byId(h+"placeHolderRow");g=d.byId(h+"placeHolderCol");if(i&&g)return{tempNode:i,refNode:g}}return null},getRow:function(g){if(g=this.model.getId(g))return d.byId(g)},createTree:function(g,h,i){var j=g+"innerTree",k=d.byId(j);k&&d.destroy(k);if(h)h.rootId=j;this.model=h;this.myTree=new a.TableTree({id:j,model:h,
showRoot:false,parent:g,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,indent:i?i.indent:undefined,onCollapse:i?i.onCollapse:undefined,tableStyle:"mainPadding"});this.renderer._initializeUIState()},getRootPath:function(){if(this.model&&this.model.root)return this.model.root.Location;return null},_lastHash:null,checkbox:this.checkbox||true};return f}();e.ExplorerModel=function(){function f(g,h){this.rootPath=g;this.fetchItems=h}f.prototype={destroy:function(){},getRoot:function(g){this.fetchItems(this.rootPath).then(d.hitch(this,
function(h){this.root=h;g(h)}))},getChildren:function(g,h){if(g.Children)h(g.Children);else g.ChildrenLocation?this.fetchItems(g.ChildrenLocation).then(d.hitch(this,function(i){g.Children=i;h(i)})):h([])},getId:function(g){if(g.Location===this.root.Location)return this.rootId;g=g.Location.replace(/[\\\/]/g,"");for(var h="",i=0;i<g.length;i++)h+=g[i].match(/[^\.\:\-\_0-9A-Za-z]/g)?g.charCodeAt(i):g[i];return h}};return f}();e.ExplorerFlatModel=function(){function f(g,h,i){this.rootPath=g;this.fetchItems=
h;this.root=i}f.prototype=new e.ExplorerModel;f.prototype.getRoot=function(g){this.root?g(this.root):this.fetchItems(this.rootPath).then(d.hitch(this,function(h){this.root=h;g(h)}))};f.prototype.getChildren=function(g,h){g===this.root?h(this.root):h([])};return f}();e.ExplorerRenderer=function(){function f(g,h){this.explorer=h;this._init(g);this._expandImageClass="core-sprite-twistie_open";this._collapseImageClass="core-sprite-twistie_closed";this._twistieSpriteClass="modelDecorationSprite"}f.prototype=
{getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(g,h){this.tableTree=h;d.empty(g);d.addClass(g,"treetable");this.renderTableHeader(g)},getActionsColumn:function(g,h,i,j){i=i||"tool";var k=this.explorer.registry.getService("orion.page.command"),l=document.createElement("td");l.id=h.id+"actionswrapper";j&&d.addClass(l,j);k.renderCommands(l,"object",g,this.explorer,i,false,null,"commandActiveItem","commandInactiveItem");return l},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},
getCheckboxColumn:function(g,h){if(this._useCheckboxSelection){var i=document.createElement("td"),j=document.createElement("span");j.id=this.getCheckBoxId(h.id);d.addClass(j,"core-sprite-check selectionCheckmarkSprite");j.itemId=h.id;if(this.getCheckedFunc){j.checked=this.getCheckedFunc(g);this._highlightSelection&&d.toggleClass(h,"checkedRow",j.checked);d.toggleClass(j,"core-sprite-check_on",j.checked)}i.appendChild(j);d.connect(j,"onclick",d.hitch(this,function(k){this.onCheck(h,k.target,k.target.checked?
false:true,true)}));return i}},getCheckBoxId:function(g){return g+"selectedState"},onCheck:function(g,h,i,j){h.checked=i;this._highlightSelection&&g&&d.toggleClass(g,"checkedRow",i);d.toggleClass(h,"core-sprite-check_on",i);this.onCheckedFunc&&this.onCheckedFunc(h.itemId,i,j);this._storeSelections();this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},_storeSelections:function(){var g=this.getSelectedIds(),h=this._getUIStatePreferencePath();if(h&&window.sessionStorage)window.sessionStorage[h+
"selection"]=JSON.stringify(g)},_restoreSelections:function(g){g=window.sessionStorage[g+"selection"];if(typeof g==="string")g=g.length>0?JSON.parse(g):null;var h;if(g)for(h=0;h<g.length;h++){var i=d.byId(g[h]);if(i){this._highlightSelection&&d.addClass(i,"checkedRow");if(i=d.byId(this.getCheckBoxId(i.id))){i.checked=true;d.addClass(i,"core-sprite-check_on")}}}g=this.getSelected();this.explorer.selection&&this.explorer.selection.setSelections(g)},_storeExpansions:function(g){window.sessionStorage[g+
"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(g){var h=false,i=window.sessionStorage[g+"expanded"];if(typeof i==="string")i=i.length>0?JSON.parse(i):null;var j;if(i)for(j=0;j<i.length;j++)if(d.byId(i[j])){this._expanded.push(i[j]);this.tableTree.expand(i[j],d.hitch(this,function(){this._restoreSelections(g)}));h=true}return!h},_getUIStatePreferencePath:function(){if(this.explorer){var g=this.explorer.getRootPath();if(this._cachePrefix&&g)return"/"+this._cachePrefix+"/"+g.replace(/[^\.\:\-\_0-9A-Za-z]/g,
"")+"/uiState"}return null},expandCollapseImageId:function(g){return g+"__expand"},updateExpandVisuals:function(g,h){if(g=d.byId(this.expandCollapseImageId(g.id))){d.addClass(g,h?this._expandImageClass:this._collapseImageClass);d.removeClass(g,h?this._collapseImageClass:this._expandImageClass)}},getExpandImage:function(g,h,i,j){var k=d.create("span",{id:this.expandCollapseImageId(g.id)},h,"last");d.addClass(k,this._twistieSpriteClass);d.addClass(k,this._collapseImageClass);if(i){h=d.create("span",
null,h,"last");d.addClass(h,j||"imageSprite");d.addClass(h,i)}k.onclick=d.hitch(this,function(){this.tableTree.toggle(g.id,this.expandCollapseImageId(g.id),this._expandImageClass,this._collapseImageClass);if(this.tableTree.isExpanded(g.id))this._expanded.push(g.id);else for(var l in this._expanded)if(this._expanded[l]===g.id){this._expanded.splice(l,1);break}(l=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(l)});return k},render:function(g,h){h.cellSpacing="8px";this.renderRow(g,
h)},getSelected:function(){var g=[];d.query(".core-sprite-check_on").forEach(d.hitch(this,function(h){g.push(this.tableTree.getItem(h.parentNode.parentNode))}));return g},getSelectedIds:function(){var g=[];d.query(".core-sprite-check_on").forEach(d.hitch(this,function(h){g.push(h.parentNode.parentNode.id)}));return g},rowsChanged:function(){this._decorateAlternatingLines&&d.query(".treeTableRow").forEach(function(g,h){if(h%2){d.addClass(g,"darkTreeTableRow");d.removeClass(g,"lightTreeTableRow")}else{d.addClass(g,
"lightTreeTableRow");d.removeClass(g,"darkTreeTableRow")}});this.explorer.selection&&this.explorer.selection.setSelections(this.getSelected())},updateCommands:function(){var g=this.explorer.registry;d.query(".treeTableRow").forEach(function(h){var i=d.byId(h.id+"actionswrapper");d.empty(i);g.getService("orion.page.command").renderCommands(i,"object",h._item,this.explorer,"tool")})},_init:function(g){if(g){this._useCheckboxSelection=g.checkbox===undefined?false:g.checkbox;this._colums=g.colums||[];
this._cachePrefix=g.cachePrefix;this.getCheckedFunc=g.getCheckedFunc;this.onCheckedFunc=g.onCheckedFunc;this._highlightSelection=true;if(g.highlightSelection===false)this._highlightSelection=false;this._decorateAlternatingLines=true;if(g.decorateAlternatingLines===false)this._decorateAlternatingLines=false}},_initializeUIState:function(){this._expanded=[];var g=this._getUIStatePreferencePath();g&&window.sessionStorage&&this._restoreExpansions(g)&&this._restoreSelections(g)}};return f}();e.SelectionRenderer=
function(){function f(g,h){this._init(g);this.explorer=h}f.prototype=new e.ExplorerRenderer;f.prototype.renderTableHeader=function(g){var h=document.createElement("thead"),i=document.createElement("tr");d.addClass(h,"navTableHeading");this._useCheckboxSelection&&i.appendChild(this.initCheckboxColumn(g));for(var j=0,k=this.getCellHeaderElement(j);k;){k.innerHTML.length>0&&d.addClass(k,"navColumn");i.appendChild(k);k=this.getCellHeaderElement(++j)}h.appendChild(i);g.appendChild(h)};f.prototype.renderRow=
function(g,h){d.style(h,"verticalAlign","baseline");d.addClass(h,"treeTableRow");var i=this.getCheckboxColumn(g,h);if(i){d.addClass(i,"checkColumn");h.appendChild(i)}i=0;for(var j=this.getCellElement(i,g,h);j;){h.appendChild(j);d.addClass(j,"secondaryColumn");j=this.getCellElement(++i,g,h)}};f.prototype.getCellHeaderElement=function(){};f.prototype.getCellElement=function(){};return f}();return e});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("orion/git/widgets/CloneGitRepositoryDialog",["require","dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","orion/widgets/DirectoryPrompterDialog","text!orion/git/widgets/templates/CloneGitRepositoryDialog.html"],function(c,d,a){d.declare("orion.git.widgets.CloneGitRepositoryDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:d.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:"Clone Git Repository";this.gitUrlLabelText="Repository URL:";this.gitPathLabelText="Existing directory:";this.gitNameLabelText="New folder:";this.advancedShown=false},postCreate:function(){var e=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(){e.gitName.focus()},400)}d.connect(this.changeGitPath,"onclick",null,d.hitch(this,this.openDirectoryPickerDialog));d.connect(this.isExistingProject,"onchange",null,d.hitch(this,this.showExistingFolder));d.connect(this.gitName,"onfocus",null,d.hitch(this,this.showNewProject));d.connect(this.advancedLink,"onclick",null,d.hitch(this,this.showAdvanced));d.connect(this.advancedLinkHide,"onclick",null,d.hitch(this,this.hideAdvanced));this.options.alwaysShowAdvanced&&this.showAdvanced()},
execute:function(){if(this.options.func)this.options.func(this.options.advancedOnly?undefined:this.gitUrl.value,this.advancedShown&&this.isNewProject.checked?undefined:this.gitPath.value,this.advancedShown&&!this.isNewProject.checked?undefined:this.gitName.value);delete this.options.func},showAdvanced:function(){this.advancedShown=true;this.Advanced.style.display="";this.advancedLink.style.display="none";this.advancedLinkHide.style.display=""},hideAdvanced:function(){this.advancedShown=false;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=true},openDirectoryPickerDialog:function(){this.isExistingProject.checked=true;var e=new orion.widgets.DirectoryPrompterDialog({title:"Choose a Folder",serviceRegistry:this.options.serviceRegistry,fileClient:this.options.fileClient,func:d.hitch(this,
function(f){if(f&&f.Location){this.gitPath.value=f.Location;this.shownGitPath.innerHTML="<a href='"+c.toUrl("navigate/table.html")+"#"+f.ChildrenLocation+"'>"+f.Name+"</a>";for(f=f;f.parent&&!f.parent.Projects;){this.shownGitPath.innerHTML="<a href='"+c.toUrl("navigate/table.html")+"#"+f.parent.ChildrenLocation+"'>"+f.parent.Name+"</a>/"+this.shownGitPath.innerHTML;f=f.parent}}})});e.startup();e.show()}})});define("text!orion/git/widgets/templates/InitGitRepositoryDialog.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="gitTargetLabel" for="${id}_gitTarget" style="padding-right: 10">${gitTargetLabelText}</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="gitTarget" id="${id}_gitTarget" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t<br><i>This is to be replaced with directory picker dialog</i>\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("orion/git/widgets/InitGitRepositoryDialog",["dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/InitGitRepositoryDialog.html"],function(c,d){c.declare("orion.git.widgets.InitGitRepositoryDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/InitGitRepositoryDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title="Init Git Repository";this.gitTargetLabelText="Target:"},execute:function(){this.options.func&&this.options.func(this.gitTarget.value);delete this.options.func}})});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("orion/git/widgets/AddRemoteDialog",["dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/AddRemoteDialog.html"],function(c,d){c.declare("orion.git.widgets.AddRemoteDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/AddRemoteDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title="Add Remote";this.gitRemoteLabelText="Remote Name:";this.gitRemoteURILabelText="Remote URI:"},execute:function(){this.options.func&&this.options.func(this.gitRemote.value,this.gitRemoteURI.value);delete this.options.func}})});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("orion/git/widgets/GitCredentialsDialog",["dojo","dijit","dijit/Dialog","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/GitCredentialsDialog.html"],function(c,d){c.declare("orion.git.widgets.GitCredentialsDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.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||"Git Credentials";this.gitUrlLabelText="Repository URL:";this.gitSshUsernameLabelText="Username:";this.gitSshPasswordLabelText="Ssh password:";this.gitPrivateKeyLabelText="Private key:";this.gitPassphraseLabelText="Passphrase (optional):";if(!this.options.username&&!this.options.password&&!this.options.privatekey&&!this.options.passphrase){this.options.username=true;this.options.password=true;this.options.privatekey=true;this.options.passphrase=true}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||c.style(this.gitSshUsernameRow,"display","none");this.options.password||c.style(this.gitSshPasswordRow,"display","none");this.options.privatekey||c.style(this.gitPrivateKeyRow,"display","none");if(!this.options.passphrase){c.style(this.gitPassphraseRow,"display","none");c.style(this.gitPassphraseRow_1,
"display","none")}if(this.options.errordata&&this.options.errordata.Url){c.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;c.style(this.gitSshUsernameRow,"display","none");setTimeout(function(){a.gitSshPassword.focus()},400)}c.connect(this.gitSshPassword,"onfocus",null,c.hitch(this,function(){this.isSshPassword.checked=
true}));c.connect(this.gitPrivateKey,"onfocus",null,c.hitch(this,function(){this.isPrivateKey.checked=true}));c.connect(this.gitPassphrase,"onfocus",null,c.hitch(this,function(){this.isPrivateKey.checked=true}))},execute:function(){if(this._sshService){var a=this;this._sshService.getKnownHosts().then(function(e){if(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:e});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/git-clones-explorer",["require","dojo","orion/explorer","orion/util"],function(c,d,a,e){var f={};f.GitClonesExplorer=function(){function g(h,i,j,k,l,m){this.parentId=k;this.registry=h;this.selection=i;this.toolbarId=l;this.selectionToolsId=m;this.cloneDetails=j;this.checkbox=false;this.renderer=new f.GitClonesRenderer({checkbox:false},this)}g.prototype=new a.Explorer;g.prototype.getGitLocation=function(h){h=e.makeRelative(h);var i=c.toUrl("gitapi/clone._");i=i.substring(0,i.length-
2);return h[0]==="/"?i+h:i+"/"+h};g.prototype.setDefaultPath=function(h){this.defaultPath=h};g.prototype.displayClonesList=function(h){h=h||this.defaultPath;h=e.makeRelative(h);if(h!==this._lastHash){this._lastHash=h;d.hash(h,true);h=this.getGitLocation(h);d.create("div",null,d.byId(this.parentId),"only").innerHTML="Loading <b>"+h+"</b>...";var i=this.registry.getService("orion.git.provider");this.createTree(this.parentId,new f.GitClonesModel(i,h,i.getGitClone))}};g.prototype.redisplayClonesList=
function(){if(this._lastHash){var h=this.getGitLocation(this._lastHash);d.create("div",null,d.byId(this.parentId),"only").innerHTML="Loading <b>"+h+"</b>...";var i=this.registry.getService("orion.git.provider");this.createTree(this.parentId,new f.GitClonesModel(i,h,i.getGitClone))}};g.prototype.loadCloneDetails=function(h){this.cloneDetails.loadCloneDetails(h.ConfigLocation)};return g}();f.GitClonesModel=function(){function g(h,i,j,k){this.gitClient=h;this.rootPath=i;this.fetchItems=j;this.root=k?
k:null}g.prototype=new a.ExplorerModel;g.prototype.getRoot=function(h){this.root?h(this.root):this.fetchItems(this.rootPath).then(d.hitch(this,function(i){this.root=i;h(i)}))};g.prototype.mayHaveChildren=function(h){if(h.children||h.Children)return true;else if(h.BranchLocation&&h.RemoteLocation)return true;else if(h.GroupNode)return true;else if(h.Type==="Remote")return true;return false};g.prototype.getIdentity=function(h){if(h.Location){h=h.Location;h=h.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")}else h=
"ROOT";return h};g.prototype.getChildren=function(h,i){h.children=[];if(h.Children){for(var j=0;j<h.Children.length;j++){h.Children[j].parent=h;h.children[j]=h.Children[j]}i(h.Children)}else if(h.BranchLocation&&h.RemoteLocation){h.children=[{GroupNode:"true",Location:h.BranchLocation,Name:"Branches",parent:h},{GroupNode:"true",Location:h.RemoteLocation,BranchLocation:h.BranchLocation,Name:"Remotes",parent:h},{GroupNode:"true",Location:h.TagLocation,Name:"Tags",parent:h}];i(h.children)}else if(h.GroupNode)this.gitClient.getGitBranch(h.Location).then(d.hitch(this,
function(k){h.children=k.Children;for(var l=0;l<k.Children.length;l++)k.Children[l].parent=h;i(k.Children)}));else h.Type==="Remote"&&this.gitClient.getGitBranch(h.Location).then(d.hitch(this,function(k){h.children=k.Children;for(var l=0;l<k.Children.length;l++)k.Children[l].parent=h;i(k.Children)}))};return g}();f.GitClonesRenderer=function(){function g(h,i){this._init(h);this.explorer=i}g.prototype=new a.SelectionRenderer;g.prototype.getCellHeaderElement=function(h){switch(h){case 0:case 1:return d.create("th",
{style:"height: 8px;"})}};g.prototype.getCellElement=function(h,i,j){switch(h){case 0:var k,l;if(i.BranchLocation&&i.RemoteLocation){k=document.createElement("td");h=j.id+"__expand";h=d.create("div",null,k,"only");this.getExpandImage(j,h,"git-sprite-repository","gitImageSprite");l=d.create("a",{className:"navlinkonpage"},h,"last");d.connect(l,"onclick",l,d.hitch(this,function(){this.explorer.loadCloneDetails(i)}));d.connect(l,"onmouseover",l,function(){l.style.cursor="pointer"});d.connect(l,"onmouseout",
l,function(){l.style.cursor="default"});d.place(document.createTextNode(i.Name),l,"only")}else if(i.GroupNode){k=document.createElement("td");h=j.id+"__expand";h=d.create("div",null,k,"only");i.Name==="Branches"&&this.getExpandImage(j,h,"git-sprite-branches","gitImageSprite");i.Name==="Remotes"&&this.getExpandImage(j,h,"git-sprite-remotes","gitImageSprite");i.Name==="Tags"&&this.getExpandImage(j,h,"git-sprite-tags","gitImageSprite");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},h,"last");
d.place(document.createTextNode(i.Name),l,"only")}else if(i.Type==="Branch"){k=document.createElement("td");h=d.create("div",{style:"margin-left: 10px"},k,"only");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},h,"last");if(i.Current)l.style.fontWeight="bold";d.place(document.createTextNode(i.Name),l,"only");j=d.create("span",null,l,"first");d.addClass(j,"gitImageSprite");d.addClass(j,"git-sprite-branch")}else if(i.Type==="Remote"){k=document.createElement("td");h=j.id+"__expand";h=d.create("div",
null,k,"only");this.getExpandImage(j,h,"git-sprite-remote","gitImageSprite");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},h,"last");!i.PushUrl||i.PushUrl===i.GitUrl?d.place(document.createTextNode(i.Name+" ("+i.GitUrl+")"),l,"only"):d.place(document.createTextNode(i.Name+" (See the configuration for fetch/push urls)"),l,"only")}else if(i.Type==="RemoteTrackingBranch"){k=document.createElement("td");h=d.create("div",{style:"margin-left: 10px"},k,"only");l=d.create("a",{innerHTML:i.Name,
className:"navlinkonpage"},h,"last");d.place(document.createTextNode(i.Name),l,"only");j=d.create("span",null,l,"first");d.addClass(j,"gitImageSprite");d.addClass(j,"git-sprite-branch")}else if(i.Type==="Tag"){k=document.createElement("td");h=d.create("div",{style:"margin-left: 10px"},k,"only");l=d.create("a",{innerHTML:i.Name,className:"navlinkonpage"},h,"last");d.place(document.createTextNode(i.Name),l,"only");j=d.create("span",null,l,"first");d.addClass(j,"gitImageSprite");d.addClass(j,"git-sprite-tag")}return k;
case 1:return this.getActionsColumn(i,j,"tool","actionsColumn")}};return g}();return f});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("orion/git/widgets/RemotePrompterDialog",["dojo","dijit","orion/util","orion/git/git-clones-explorer","dijit/Dialog","dijit/form/Button","orion/widgets/ExplorerTree","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/RemotePrompterDialog.html"],function(c,d,a,e){c.declare("orion.git.widgets.RemotePrompterDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:true,templateString:c.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||"Choose a Folder";this.newBranchText="New Branch:";this.buttonOk="OK"},postCreate:function(){this.inherited(arguments);this.loadRemoteChildren(this.treeRoot);c.connect(this.newBranch,"onchange",c.hitch(this,this.validate));if(this.options.hideNewBranch)this.newBranchSection.style.display="none"},
loadRemoteChildren:function(f){this.treeRoot=f;this.createTree(new e.GitClonesModel(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))},createTree:function(f){var g=this.treeWidget=new orion.widgets.ExplorerTree({style:"width:100%; height:100%",model:f,region:"center",showRoot:false,persist:true,openOnClick:false,getLabel:function(i){if(i.Type==="RemoteTrackingBranch"&&!i.Id)return i.Name+" [New branch]";return i.Name},getIconClass:function(i){if(i.BranchLocation&&i.RemoteLocation)return"gitRepoItem";
if(i.GroupNode)return i.Name==="Branch"?"gitBranchesItem":"gitRemotesItem";if(i.Type==="Branch"||i.Type==="RemoteTrackingBranch")return"gitBranchItem";if(i.Type==="Remote")return"gitRemoteItem";return"gitDefaultItem"}}),h=this;this.treeWidget._inheritedSelectNode=this.treeWidget._selectNode;this.treeWidget._selectNode=function(i){g._inheritedSelectNode(i);h.newBranch.disabled=i.item&&i.item.Type==="Remote"?false:true;c.hitch(h,h.validate)()};this.treeWidget.startup();c.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},
validate:function(){var f=this.treeWidget.getSelectedItems();if(f.length==1)if(f[0].Type==="RemoteTrackingBranch"){this.RemoteBrowserButton.disabled=false;return}else if(f[0].Type==="Remote")if(this.newBranch.value!=""){this.RemoteBrowserButton.disabled=false;return}this.RemoteBrowserButton.disabled=true},execute:function(){var f=this.treeWidget.getSelectedItems();this.onHide();if(this.options.func)f[0].Type==="RemoteTrackingBranch"?this.options.func(f[0],f[0].parent):this.options.func(null,f[0],
this.newBranch.value);delete this.options.func}})});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("orion/git/widgets/ApplyPatchDialog",["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"],function(c,d){c.declare("orion.git.widgets.ApplyPatchDialog",[d.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:c.cache("orion","git/widgets/templates/ApplyPatchDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="Apply Patch"},postCreate:function(){function a(e){d.byId("files").set("disabled",e);d.byId("applyPatchDialog.uploader").set("disabled",e);d.byId("applyPatchDialog.url").set("disabled",!e)}this.inherited(arguments);c.byId("applyPatchDialog.myForm").action=this.options.diffLocation;c.byId("applyPatchDialog.uploader").url=this.options.diffLocation;a(true);
c.connect(d.byId("applyPatchDialog.urlRadio"),"onclick",c.hitch(this,function(e){e.target.id==="applyPatchDialog.urlRadio"&&a(true)}));c.connect(d.byId("applyPatchDialog.fileRadio"),"onclick",c.hitch(this,function(e){e.target.id==="applyPatchDialog.fileRadio"&&a(false)}));c.connect(d.byId("applyPatchDialog.uploader"),"onError",c.hitch(this,function(){setTimeout(c.hitch(this,function(){this.hide()}),2E3)}));c.connect(d.byId("applyPatchDialog.uploader"),"onComplete",c.hitch(this,function(){setTimeout(c.hitch(this,
function(){this.hide()}),2E3)}))}})});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("orion/git/widgets/OpenCommitDialog",["require","dojo","dijit","orion/util","dijit/Dialog","dijit/form/TextBox","orion/widgets/_OrionDialogMixin","text!orion/git/widgets/templates/OpenCommitDialog.html"],function(c,d,a){return d.declare("orion.git.widgets.OpenCommitDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:true,templateString:d.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 new Error("Missing required argument: serviceRegistry");this.repositories=this.options.repositories;if(!this.repositories)throw new Error("Missing required argument: repositories");this.commitName=this.options.commitName},postMixInProperties:function(){this.options.title=this.options.title||"Find Commit";this.selectFile="Type the commit name (sha1):";this.searchPlaceHolder=
"Search";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);d.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(d.hitch(this,this.checkSearch),0)});d.connect(this.resourceName,"onKeyPress",this,function(e){if(e.keyCode===d.keys.ENTER&&this.results){e=d.query("a",this.results);if(e.length>0){window.open(e[0].href);this.hide()}}});d.connect(this,"onMouseUp",function(e){e.target.focus()});this.resourceName.set("value",
this.commitName)},checkSearch:function(){clearTimeout(this.timeoutId);var e=(new Date).getTime();if(e-this.time>this.SEARCH_DELAY){this.time=e;this.doSearch()}else this.timeoutId=setTimeout(d.hitch(this,"checkSearch"),50)},_findCommitLocation:function(e,f,g){var h=this;if(g==null)g=new d.Deferred;e.length>0?h.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+f+e[0].ContentLocation+"?page=1&pageSize=1",null,null,"Looking for the commit").then(function(i){g.callback(i.Children[0])},
function(){h._findCommitLocation(e.slice(1),f,g)}):g.errback();return g},doSearch:function(){var e=this.resourceName&&this.resourceName.get("value");if(e){d.place("<div>Searching&#x2026;</div>",this.results,"only");var f=this;this.serviceRegistry.getService("orion.page.message").setProgressMessage("Looking for the commit");this._findCommitLocation(this.repositories,e).then(function(g){d.empty(f.results);f.displayCommit(g,f.results)},function(){d.place("<div>No commits found</div>",f.results,"only");
f.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}},displayCommit:function(e,f){f=d.create("div",{style:"padding:10px; max-width:480px"},f);var g=e.Message.split(/(\r?\n|$)/)[0],h=d.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+e.Location+"?page=1&pageSize=1"},f);d.place(document.createTextNode(g),h);d.connect(h,"onclick",h,d.hitch(this,function(){this.hide()}));d.create("div",{style:"padding-top:15px"},f);d.create("span",{"class":"gitSecondaryDescription",
innerHTML:" commit: "+e.Name},f);if(e.Parents&&e.Parents.length>0){d.create("div",null,f);d.place(document.createTextNode("parent: "),f);g=d.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+e.Parents[0].Location+"?page=1&pageSize=1"},f);d.place(document.createTextNode(e.Parents[0].Name),g);d.connect(g,"onclick",g,d.hitch(this,function(){this.hide()}))}d.create("div",{style:"padding-top:15px"},f);if(e.AuthorImage){g=d.create("span",{"class":"git-author-icon-small",style:"margin-bottom:30px"},
f);h=new Image;h.src=e.AuthorImage;h.name=e.AuthorName;h.width=35;h.height=35;d.place(h,g,"first")}d.create("span",{"class":"gitSecondaryDescription",innerHTML:" authored by "+e.AuthorName+" ("+e.AuthorEmail+") on "+d.date.locale.format(new Date(e.Time),{formatLength:"short"})},f);d.create("div",null,f);d.create("span",{"class":"gitSecondaryDescription",innerHTML:"committed by "+e.CommitterName+" ("+e.CommitterEmail+")"},f)},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);
this.inherited(arguments)}})});
define("orion/git/gitCommands",["require","dojo","orion/commands","orion/util","orion/git/widgets/CloneGitRepositoryDialog","orion/git/widgets/InitGitRepositoryDialog","orion/git/widgets/AddRemoteDialog","orion/git/widgets/GitCredentialsDialog","orion/widgets/NewItemDialog","orion/git/widgets/RemotePrompterDialog","orion/git/widgets/ApplyPatchDialog","orion/git/widgets/OpenCommitDialog"],function(c,d,a,e){var f={};(function(){function g(i){var j;try{j=JSON.parse(i.responseText)}catch(k){j={Result:i.responseText}}j.HttpCode=
i.status;return j}var h=false;f.updateNavTools=function(i,j,k,l,m,n){var r=d.byId(k);if(r)d.empty(r);else throw"could not find toolbar "+k;var s=i.getService("orion.page.command");s.renderCommands(r,"dom",m,j,"button");if(n)if(k=d.byId(n)){d.empty(k);s.renderCommands(k,"dom",m,j,"button",true)}if(l)if(d.byId(l)){d.empty(l);s.renderCommands(l,"dom",null,j,"button")}if(!h){h=true;i.getService("orion.page.selection").addEventListener("selectionChanged",function(o,q){if(o=d.byId(l)){d.empty(o);s.renderCommands(o,
"dom",q,j,"button")}})}};f.getNewItemName=function(i,j,k,l,m,n,r,s){var o,q;if(k)o=d.byId(l);else if(j.makeNewItemPlaceHolder!=null)if(i=j.makeNewItemPlaceHolder(i,l,r)){o=i.refNode;q=i.tempNode}else o=d.byId(l);if(o)e.getUserText(l+"EditBox",o,false,m,d.hitch(this,function(p){if(p){q&&q.parentNode.removeChild(q);n(p)}}),undefined,undefined,undefined,s);else(l=window.prompt(m))&&n(l)};f.handleKnownHostsError=function(i,j,k,l){if(confirm("Would you like to add "+j.KeyType+" key for host "+j.Host+" to continue operation? Key fingerpt is "+
j.HostFingerprint+".")){var m=i.getService("orion.net.ssh");m.addKnownHosts(j.Host+" "+j.KeyType+" "+j.HostKey).then(function(){m.getKnownHosts().then(function(r){k.knownHosts=r;l(k)});if(k.failedOperation){var n=i.getService("orion.page.progress");d.hitch(n,n.removeOperation)(k.failedOperation.Location,k.failedOperation.Id)}})}};f.handleSshAuthenticationError=function(i,j,k,l,m){j=new orion.git.widgets.GitCredentialsDialog({title:m,serviceRegistry:i,func:l,errordata:k.errordata,failedOperation:k.failedOperation});
j.startup();j.show();if(k.failedOperation){i=i.getService("orion.page.progress");d.hitch(i,i.removeOperation)(k.failedOperation.Location,k.failedOperation.Id)}};f.getDefaultSshOptions=function(i,j){var k=new d.Deferred;i=i.getService("orion.net.ssh");var l=j&&!j.optionsRequested?j.valueFor("sshuser"):"",m=j&&!j.optionsRequested?j.valueFor("sshpassword"):"";i.getKnownHosts().then(function(n){k.callback({knownHosts:n,gitSshUsername:l,gitSshPassword:m,gitPrivateKey:"",gitPassphrase:""})});return k};
f.handleProgressServiceResponse=function(i,j,k,l,m,n){if(i&&i.status)i=g(i);if(!i||!i.HttpCode)l&&l(i);else switch(i.HttpCode){case 200:case 201:case 202:l&&l(i.Result);return;case 401:if(i.JsonData)j.errordata=i.JsonData;if(i.failedOperation)j.failedOperation=i.failedOperation;d.hitch(this,f.handleSshAuthenticationError)(k,i.JsonData,j,m,n);return;case 400:if(i.JsonData&&i.JsonData.HostKey){if(i.failedOperation)j.failedOperation=i.failedOperation;d.hitch(this,f.handleKnownHostsError)(k,i.JsonData,
j,m);return}default:j=[];j.Severity="Error";j.HTML=false;try{j.Message=i.DetailedMessage?i.DetailedMessage:i.Message}catch(r){j.Message=error.message}k.getService("orion.page.message").setProgressResult(j);break}};f.gatherSshCredentials=function(i,j,k,l){var m=new d.Deferred,n=function(r){i.getService("orion.net.ssh").getKnownHosts().then(function(s){m.callback({knownHosts:s,gitSshUsername:r.gitSshUsername,gitSshPassword:r.gitSshPassword,gitPrivateKey:r.gitPrivateKey,gitPassphrase:r.gitPassphrase})})};
if(k&&k.HostKey){confirm("Would you like to add "+k.KeyType+" key for host "+k.Host+" to continue operation? Key fingerpt is "+k.HostFingerprint+".")&&i.getService("orion.net.ssh").addKnownHosts(k.Host+" "+k.KeyType+" "+k.HostKey).then(function(){n({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})});return m}if(j){k=j.parameters?j.parameters.valueFor("sshuser"):"";j=j.parameters?j.parameters.valueFor("sshpassword"):"";n({gitSshUsername:k,gitSshPassword:j,gitPrivateKey:"",gitPassphrase:""});
return m}j=new orion.git.widgets.GitCredentialsDialog({title:l,serviceRegistry:i,func:n,errordata:k});j.startup();j.show();return m};f.handleProgressServiceResponse2=function(i,j,k,l){if(i&&i.status)i=g(i);if(!i||!i.HttpCode)k&&k(i);else switch(i.HttpCode){case 200:case 201:case 202:k&&k(i.Result);return;case 401:if(i.failedOperation){j=j.getService("orion.page.progress");d.hitch(j,j.removeOperation)(i.failedOperation.Location,i.failedOperation.Id)}l(i);return;case 400:if(i.JsonData&&i.JsonData.HostKey){if(i.failedOperation){j=
j.getService("orion.page.progress");d.hitch(j,j.removeOperation)(i.failedOperation.Location,i.failedOperation.Id)}l(i);return}default:l=[];l.Severity="Error";l.HTML=false;try{l.Message=i.DetailedMessage?i.DetailedMessage:i.Message}catch(m){l.Message=error.message}j.getService("orion.page.message").setProgressResult(l);break}};f.createFileCommands=function(i,j,k){function l(n){if(!(n.status===401||n.status===403)){var r=[];r.Severity="Error";r.HTML=false;try{var s=JSON.parse(n.responseText);r.Message=
s.DetailedMessage?s.DetailedMessage:s.Message}catch(o){r.Message=n.message}i.getService("orion.page.message").setProgressResult(r)}}var m=new a.Command({name:"Link Repository",imageClass:"core-sprite-link",id:"eclipse.linkRepository",callback:function(n){var r=new orion.widgets.NewItemDialog({title:"Link Repository",label:"Folder name:",func:function(s){var o=i.getService("orion.core.file");o.loadWorkspace("").then(function(q){o.createProject(q.Location,s,n.items.ContentLocation,false).then(function(p){alert("Repository was linked to "+
p.Name);o.read(p.ContentLocation,true).then(function(t){window.location.replace(c.toUrl("navigate/table.html")+"#"+t.ChildrenLocation)})})})},advanced:false});r.startup();r.show()},visibleWhen:function(n){if(n.ContentLocation)return true;return false}});j.addCommand(m,"object");m=new a.Command({name:"Checkout",tooltip:"Checkout the current tag, creating a local branch based on its contents.",imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",callback:function(n){function r(){if(s.Repository)return s.Repository.BranchLocation;
for(var o in s.parent.parent.children)if(s.parent.parent.children[o].Name==="Branches")return s.parent.parent.children[o];return s.parent.parent}var s=n.items;f.getNewItemName(s,k,false,n.domNode.id,"tag_"+s.Name,function(o){if(!(!o&&o=="")){var q;q=s.Repository!=null?s.Repository.Location:s.parent.parent.Location;i.getService("orion.git.provider").checkoutTag(q,s.Name,o).then(function(){d.hitch(k,k.changedItem)(r())},l)}},undefined,true)},visibleWhen:function(n){return n.Type==="Tag"}});j.addCommand(m,
"object");m=new a.Command({name:"Checkout",tooltip:"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(n){var r=n.items,s=i.getService("orion.git.provider"),o=i.getService("orion.page.message");o.setProgressMessage("Checking out branch...");r.Type==="Branch"?
s.checkoutBranch(r.CloneLocation,r.Name).then(function(){d.hitch(k,k.changedItem)(r.parent);o.setProgressResult("Ok")},l):s.addBranch(r.Repository!=null?r.Repository.BranchLocation:r.parent.parent.BranchLocation,null,r.Name).then(function(q){s.checkoutBranch(q.CloneLocation,q.Name).then(function(){d.hitch(k,k.changedItem)(r.Repository?r.Repository.BranchLocation:r.parent.parent.parent);o.setProgressResult("Ok")},l)},l)},visibleWhen:function(n){return n.Type==="Branch"||n.Type==="RemoteTrackingBranch"}});
j.addCommand(m,"object");m=new a.ParametersDescription([new a.CommandParameter("name","text","Name:")],false);m=new a.Command({name:"New Branch",tooltip:"Add a new local branch to the repository",imageClass:"core-sprite-add",id:"eclipse.addBranch",parameters:m,callback:function(n){var r=n.items,s=function(q,p){i.getService("orion.git.provider").addBranch(q,p).then(function(){d.hitch(k,k.changedItem)(r)},l)},o;o=r.Type==="Clone"?r.BranchLocation:r.Location;n.parameters.valueFor("name")&&!n.parameters.optionsRequested?
s(o,n.parameters.valueFor("name")):f.getNewItemName(r,k,false,n.domNode.id,"Branch name",function(q){!q&&q==""||s(o,q)})},visibleWhen:function(n){return n.GroupNode&&n.Name==="Branches"||n.Type==="Clone"&&k.parentId==="artifacts"}});j.addCommand(m,"object");j.addCommand(m,"dom");m=new a.Command({name:"Delete",tooltip:"Delete the local branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(n){var r=n.items;confirm("Are you sure you want to delete branch "+
r.Name+"?")&&i.getService("orion.git.provider").removeBranch(r.Location).then(function(){if(k.changedItem)d.hitch(k,k.changedItem)(r.parent);else k.displayBranches&&d.hitch(k,k.displayBranches)(r.ParentLocation,null)},l)},visibleWhen:function(n){return n.Type==="Branch"&&!n.Current}});j.addCommand(m,"object");m=new a.Command({name:"Delete",tooltip:"Delete the remote tracking branch from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(n){var r=n.items;
confirm("You're going to delete remote branch "+r.Name+" and push the change.\n\nAre you sure?")&&f.getDefaultSshOptions(i).then(function(s){var o=arguments.callee;i.getService("orion.git.provider").doPush(r.Location,"",false,false,null,"Removing remote branch: "+r.Name,s.gitSshUsername,s.gitSshPassword,s.knownHosts,s.gitPrivateKey,s.gitPassphrase).then(function(q){f.handleProgressServiceResponse(q,s,i,function(p){p.Result.Severity=="Ok"&&d.hitch(k,k.changedItem)(r.parent)},o,"Delete Remote Branch")},
function(q){f.handleProgressServiceResponse(q,s,i,function(){},o,"Removing remote branch: "+r.Name)})})},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"}});j.addCommand(m,"object");m=new a.ParametersDescription([new a.CommandParameter("name","text","Name:"),new a.CommandParameter("url","url","Url:")],false);m=new a.Command({name:"New Remote",tooltip:"Add a new remote to the repository",imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:m,callback:function(n){var r=n.items,
s=function(q,p,t){i.getService("orion.git.provider").addRemote(q,p,t).then(function(){d.hitch(k,k.changedItem)(r)},l)},o;o=r.Type==="Clone"?r.RemoteLocation:r.Location;if(n.parameters.valueFor("name")&&n.parameters.valueFor("url")&&!n.parameters.optionsRequested)s(o,n.parameters.valueFor("name"),n.parameters.valueFor("url"));else{n=new orion.git.widgets.AddRemoteDialog({func:function(q,p){s(o,q,p)}});n.startup();n.show()}},visibleWhen:function(n){return n.GroupNode&&n.Name==="Remotes"||n.Type==="Clone"&&
k.parentId==="artifacts"}});j.addCommand(m,"object");j.addCommand(m,"dom");m=new a.Command({name:"Delete",tooltip:"Delete the remote from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(n){var r=n.items;confirm("Are you sure you want to delete remote "+r.Name+"?")&&i.getService("orion.git.provider").removeRemote(r.Location).then(function(){d.hitch(k,k.changedItem)(r.parent)},l)},visibleWhen:function(n){return n.Type==="Remote"}});j.addCommand(m,"object");
m=new a.Command({name:"Pull",tooltip:"Pull from the repository",imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(n){var r=n.items,s=r.Location;f.getDefaultSshOptions(i).then(function(o){var q=arguments.callee;i.getService("orion.git.provider").doPull(s,false,null,o.gitSshUsername,o.gitSshPassword,o.knownHosts,o.gitPrivateKey,o.gitPassphrase).then(function(p){f.handleProgressServiceResponse(p,o,i,function(){d.xhrGet({url:s,headers:{"Orion-Version":"1"},
postData:d.toJson({GitSshUsername:o.gitSshUsername,GitSshPassword:o.gitSshPassword,GitSshPrivateKey:o.gitPrivateKey,GitSshPassphrase:o.gitPassphrase,GitSshKnownHost:o.knownHosts}),handleAs:"json",timeout:5E3,load:function(t){return t},error:function(t,v){console.error("HTTP status code: ",v.xhr.status);return t}}).then(function(){r.Type==="Clone"&&d.hitch(k,k.changedItem)(r)},l)},q,"Pull Git Repository")},function(p){f.handleProgressServiceResponse(p,o,i,function(){},q,"Pull Git Repository")})})},
visibleWhen:function(n){return n.Type==="Clone"}});j.addCommand(m,"object");m=new a.Command({name:"Git Log",tooltip:"Open the log for the branch",id:"eclipse.openGitLog",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(n){n=n.items;if(n.Type==="RemoteTrackingBranch")return c.toUrl("git/git-log.html")+"#"+n.Location+"?page=1";return c.toUrl("git/git-log.html")+"#"+n.CommitLocation+"?page=1"},visibleWhen:function(n){return n.Type==="Branch"||n.Type==="RemoteTrackingBranch"}});
j.addCommand(m,"object");m=new a.Command({name:"Git Log",tooltip:"Open the log for the repository",id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(n){return c.toUrl("git/git-log.html")+"#"+n.items.CommitLocation+"?page=1"},visibleWhen:function(n){if(!n.CommitLocation||!n.StatusLocation)return false;return true}});j.addCommand(m,"object");m=new a.Command({name:"Git Status",tooltip:"Open the status for the repository",id:"eclipse.openGitStatus",
imageClass:"git-sprite-status",spriteClass:"gitCommandSprite",hrefCallback:function(n){return c.toUrl("git/git-status.html")+"#"+n.items.StatusLocation},visibleWhen:function(n){if(!n.StatusLocation)return false;return true}});j.addCommand(m,"object");m=new a.Command({name:"Show in Navigator",tooltip:"Show the repository folder in the file navigator",id:"eclipse.openCloneContent",hrefCallback:function(n){return c.toUrl("navigate/table.html")+"#"+n.items.ContentLocation+"?depth=1"},visibleWhen:function(n){if(!n.ContentLocation)return false;
return true}});j.addCommand(m,"object");m=new a.Command({name:"Compare With Each Other",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(n){n=n.items;var r=new d.Deferred;i.getService("orion.git.provider").getDiff(n[1].DiffLocation,n[0].Name,function(s,o){r.callback(c.toUrl("compare/compare.html")+"?readonly#"+o.xhr.getResponseHeader("Location"))});return r},visibleWhen:function(n){if(k.isDirectory)return false;if(d.isArray(n)&&
n.length===2&&n[0].Type==="Commit"&&n[1].Type==="Commit")return true;return false}});j.addCommand(m,"dom");m=new a.Command({name:"Compare With Working Tree",imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(n){return c.toUrl("compare/compare.html")+"#"+n.items.DiffLocation},visibleWhen:function(n){return n.Type==="Commit"&&!k.isDirectory}});j.addCommand(m,"object");m=new a.Command({name:"Open",id:"eclipse.openGitCommit",hrefCallback:function(n){return c.toUrl("edit/edit.html")+
"#"+n.items.ContentLocation},visibleWhen:function(n){return n.Type==="Commit"&&n.ContentLocation!=null&&!k.isDirectory}});j.addCommand(m,"object");m=new a.Command({name:"Fetch",tooltip:"Fetch from the remote",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(n){var r=n.items,s=r.Location,o=function(p,t){if(p.JsonData.HostKey)q(t,p.JsonData);else if(t){t.parameters=p.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword",
"password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=p.JsonData;j._collectParameters(t)}else q(null,p.JsonData)},q=function(p,t){f.gatherSshCredentials(i,p,t).then(function(v){var w=i.getService("orion.git.provider");w.doFetch(s,false,null,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(y){f.handleProgressServiceResponse2(y,
i,function(){w.getGitRemote(s).then(function(z){k.parentId==="explorer-tree"&&w.getLog(z.HeadLocation,z.Id,"Getting git incoming changes",function(F){k.renderer.setIncomingCommits(F.Children);k.loadCommitsList(z.CommitLocation+"?page=1",z,true)});d.hitch(k,k.changedItem)(r)},l)},function(z){o(z,p)})},function(y){f.handleProgressServiceResponse2(y,i,function(){},function(z){o(z,p)})})})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;
n.parameters.errorData=null}else q(n)},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"||n.Type==="Remote"}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Force Fetch",tooltip:"Fetch from the remote branch into your remote tracking branch overriding its current content",id:"eclipse.orion.git.fetchForce",callback:function(n){if(confirm("You're going to override content of the remote tracking branch. This can cause the branch to lose commits.\n\nAre you sure?")){var r=
n.items,s=r.Location,o=function(p,t){if(p.JsonData.HostKey)q(t,p.JsonData);else if(t){t.parameters=p.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword","password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=p.JsonData;j._collectParameters(t)}else q(null,p.JsonData)},q=function(p,t){f.gatherSshCredentials(i,p,
t).then(function(v){var w=i.getService("orion.git.provider");w.doFetch(s,true,null,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(y){f.handleProgressServiceResponse2(y,i,function(){w.getGitRemote(s).then(function(z){k.parentId==="explorer-tree"&&w.getLog(z.HeadLocation,z.Id,"Getting git incoming changes",function(F){k.renderer.setIncomingCommits(F.Children);k.loadCommitsList(z.CommitLocation+"?page=1",z,true)});d.hitch(k,k.changedItem)(r)},l)},function(z){o(z,
p)})},function(y){f.handleProgressServiceResponse2(y,i,function(){},function(z){o(z,p)})})})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;n.parameters.errorData=null}else q(n)}},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"||n.Type==="Remote"}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Merge",tooltip:"Merge the content from the branch to your active branch",imageClass:"git-sprite-merge",
spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(n){var r=n.items;n=i.getService("orion.git.provider");var s=i.getService("orion.page.message");n.doMerge(r.HeadLocation,r.Name).then(function(o){var q=[];if(o.jsonData&&(o.jsonData.Result=="FAST_FORWARD"||o.jsonData.Result=="ALREADY_UP_TO_DATE")){d.query(".treeTableRow").forEach(function(t){d.toggleClass(t,"incomingCommitsdRow",false)});q.Severity="Ok";q.HTML=false;q.Message=o.jsonData.Result;d.hitch(k,k.changedItem)(r)}else if(o.jsonData){var p=
r.HeadLocation.replace("commit/HEAD","status");q.Severity="Warning";q.HTML=true;q.Message="<span>"+o.jsonData.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+p+'">Git Status page</a>.<span>'}else if(o.error){p=r.HeadLocation.replace("commit/HEAD","status");q.Severity="Error";if(o.error.responseText&&JSON.parse(o.error.responseText)){o=JSON.parse(o.error.responseText);q.Message=o.DetailedMessage?o.DetailedMessage:o.Message}else q.Message=o.error.message;q.HTML=true;q.Message="<span>"+
q.Message+' Go to <a href="'+c.toUrl("git/git-status.html")+"#"+p+'">Git Status page</a>.<span>'}s.setProgressResult(q)},function(o,q){o=[];var p=r.HeadLocation.replace("commit/HEAD","status");o.Severity="Error";o.HTML=true;o.Message="<span>"+d.fromJson(q.xhr.responseText).DetailedMessage+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+p+'">Git Status page</a>.<span>';i.getService("orion.page.message").setProgressResult(o)})},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"||
n.Type==="Branch"&&!n.Current}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Rebase",tooltip:"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(n){var r=n.items;i.getService("orion.git.provider").doRebase(r.HeadLocation,
r.Name,"BEGIN",function(s){var o=[],q=r.HeadLocation.replace("commit/HEAD","status");if(s.Result=="OK"||s.Result=="FAST_FORWARD"||s.Result=="UP_TO_DATE"){o.Severity="Ok";o.HTML=false;o.Message=s.Result;d.hitch(k,k.changedItem)(r)}else if(s.Result=="STOPPED"){o.Severity="Warning";o.HTML=true;o.Message="<span>"+s.Result+'. Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else if(s.Result==
"FAILED_WRONG_REPOSITORY_STATE"){o.Severity="Error";o.HTML=true;o.Message="<span>"+s.Result+'. Repository state is invalid (i.e. already during rebasing). Go to <a href="'+c.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else if(s.Result=="FAILED_UNMERGED_PATHS"){o.Severity="Error";o.HTML=true;o.Message="<span>"+s.Result+'. Repository contains unmerged paths. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else if(s.Result=="FAILED_PENDING_CHANGES"){o.Severity=
"Error";o.HTML=true;o.Message="<span>"+s.Result+'. Repository contains pending changes. Please commit or stash them. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}else{o.Severity="Warning";o.HTML=true;o.Message="<span>"+s.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+q+'">Git Status page</a>.<span>'}i.getService("orion.page.message").setProgressResult(o)},l)},visibleWhen:function(n){this.tooltip="Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of '"+
n.Name+"' and applying each commit again to the updated active branch.";return n.Type==="RemoteTrackingBranch"||n.Type==="Branch"&&!n.Current}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Push All",tooltip:"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(n){var r=n.items,s=d.hash();if(r.toRef)r=r.toRef;var o=function(p,t){if(p.JsonData.HostKey)q(t,
p.JsonData);else if(t){t.parameters=p.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword","password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=p.JsonData;j._collectParameters(t)}else q(null,p.JsonData)},q=function(p,t){f.gatherSshCredentials(i,p,t).then(function(v){var w=i.getService("orion.git.provider");if(r.RemoteLocation.length==
1&&r.RemoteLocation[0].Children.length==1)w.doPush(r.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,"Pushing remote: "+s,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(z){f.handleProgressServiceResponse2(z,i,function(){if(k.parentId==="explorer-tree"){if(!z||!z.HttpCode)d.query(".treeTableRow").forEach(function(F){d.toggleClass(F,"outgoingCommitsdRow",false)})}else d.hitch(k,k.changedItem)()},function(F){o(F,p)})},function(z){f.handleProgressServiceResponse2(z,
i,function(){},function(F){o(F,p)})});else{var y=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:w,treeRoot:{Children:r.RemoteLocation},hideNewBranch:true,func:d.hitch(this,function(z,F){w.doPush(z.Location,"HEAD",true,true,null,"Pushing remote: "+F.Name,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(G){f.handleProgressServiceResponse2(G,i,function(){if(k.parentId==="explorer-tree"){if(!G||!G.HttpCode)d.query(".treeTableRow").forEach(function(H){d.toggleClass(H,
"outgoingCommitsdRow",false)})}else d.hitch(k,k.changedItem)()},function(H){o(H,p)})},function(G){f.handleProgressServiceResponse2(G,i,function(){},function(H){o(H,p)})})})});y.startup();y.show()}})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;n.parameters.errorData=null}else q(n)},visibleWhen:function(n){return n.toRef?n.RepositoryPath===""&&n.toRef.Type==="Branch"&&n.toRef.Current&&n.toRef.RemoteLocation:n.Type==="Branch"&&n.Current&&
n.RemoteLocation}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Force Push All",tooltip:"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(n){if(confirm("You're going to override content of the remote branch. This can cause the remote repository to lose commits.\n\nAre you sure?")){var r=n.items,s=d.hash();if(r.toRef)r=
r.toRef;var o=function(p,t){if(p.JsonData.HostKey)q(t,p.JsonData);else if(t){t.parameters=p.JsonData.User?new a.ParametersDescription([new a.CommandParameter("sshpassword","password","SSH Password:")],true):new a.ParametersDescription([new a.CommandParameter("sshuser","text","SSH User Name:"),new a.CommandParameter("sshpassword","password","SSH Password:")],true);t.parameters.errorData=p.JsonData;j._collectParameters(t)}else q(null,p.JsonData)},q=function(p,t){f.gatherSshCredentials(i,p,t).then(function(v){var w=
i.getService("orion.git.provider");if(r.RemoteLocation.length==1&&r.RemoteLocation[0].Children.length==1)w.doPush(r.RemoteLocation[0].Children[0].Location,"HEAD",true,true,null,"Pushing remote: "+s,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(z){f.handleProgressServiceResponse2(z,i,function(){if(k.parentId==="explorer-tree"){if(!z||!z.HttpCode)d.query(".treeTableRow").forEach(function(F){d.toggleClass(F,"outgoingCommitsdRow",false)})}else d.hitch(k,
k.changedItem)()},function(F){o(F,p)})},function(z){f.handleProgressServiceResponse2(z,i,function(){},function(F){o(F,p)})});else{var y=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:w,treeRoot:{Children:r.RemoteLocation},hideNewBranch:true,func:d.hitch(this,function(z,F){w.doPush(z.Location,"HEAD",true,true,null,"Pushing remote: "+F.Name,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(G){f.handleProgressServiceResponse2(G,
i,function(){if(k.parentId==="explorer-tree"){if(!G||!G.HttpCode)d.query(".treeTableRow").forEach(function(H){d.toggleClass(H,"outgoingCommitsdRow",false)})}else d.hitch(k,k.changedItem)()},function(H){o(H,p)})},function(G){f.handleProgressServiceResponse2(G,i,function(){},function(H){o(H,p)})})})});y.startup();y.show()}})};if(n.parameters&&n.parameters.optionsRequested){q(null,n.parameters.errorData);n.parameters.optionsRequested=false;n.parameters.errorData=null}else q(n)}},visibleWhen:function(n){if(n.toRef)return n.RepositoryPath===
""&&n.toRef.Type==="Branch"&&n.toRef.Current&&n.toRef.RemoteLocation}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Switch to Remote",tooltip:"Show the log for the corresponding remote tracking branch",id:"eclipse.orion.git.switchToRemote",hrefCallback:function(n){return c.toUrl("git/git-log.html")+"#"+n.items.toRef.RemoteLocation[0].Children[0].Location+"?page=1"},visibleWhen:function(n){return n.toRef!=null&&n.toRef.Type==="Branch"&&n.toRef.Current&&n.toRef.RemoteLocation&&
n.toRef.RemoteLocation.length===1&&n.toRef.RemoteLocation[0].Children.length===1}});j.addCommand(m,"dom");m=new a.Command({name:"< Previous Page",tooltip:"Show previous page of git log",id:"eclipse.orion.git.previousLogPage",hrefCallback:function(n){return c.toUrl("git/git-log.html")+"#"+n.items.PreviousLocation},visibleWhen:function(n){if(n.Type==="RemoteTrackingBranch"||n.toRef!=null&&n.toRef.Type==="Branch"||n.RepositoryPath!=null)return n.PreviousLocation!==undefined;return false}});j.addCommand(m,
"dom");m=new a.Command({name:"Next Page >",tooltip:"Show next page of git log",id:"eclipse.orion.git.nextLogPage",hrefCallback:function(n){return c.toUrl("git/git-log.html")+"#"+n.items.NextLocation},visibleWhen:function(n){if(n.Type==="RemoteTrackingBranch"||n.toRef!=null&&n.toRef.Type==="Branch"||n.RepositoryPath!=null)return n.NextLocation!==undefined;return false}});j.addCommand(m,"dom");m=new a.Command({name:"Switch to Active Local",tooltip:"Show the log for the active local branch",id:"eclipse.orion.git.switchToCurrentLocal",
hrefCallback:function(n){n=n.items;var r=new d.Deferred,s=n.CloneLocation;if(s==null)s=JSON.parse(n.responseText).JsonData.CloneLocation;var o=i.getService("orion.git.provider");d.xhrGet({url:s,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(q){o.getGitClone(q.Children[0].BranchLocation,function(p){d.forEach(p.Children,function(t){t.Current==true&&r.callback(c.toUrl("git/git-log.html")+"#"+t.CommitLocation+"?page=1")})})}});return r},visibleWhen:function(n){if(n.Type==="RemoteTrackingBranch")return true;
try{if(JSON.parse(n.responseText).JsonData)return true}catch(r){}return false}});j.addCommand(m,"dom");m=new a.Command({name:"Push to...",tooltip:"Push from your local branch into the selected remote branch",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushto",callback:function(n){var r=n.items;n={};for(var s in r.parent.parent.children)if(r.parent.parent.children[s].Name==="Remote")n=r.parent.parent.children[s];s=i.getService("orion.git.provider");n=new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",
serviceRegistry:i,gitClient:s,treeRoot:n,func:d.hitch(this,function(o,q,p){console.info("Branch "+o+" remote "+q+" new branch "+p)})});n.startup();n.show()},visibleWhen:function(){return false}});j.addCommand(m,"dom");j.addCommand(m,"object");m=new a.Command({name:"Reset",tooltip:"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(n){var r=
n.items;if(confirm("The content of your active branch will be replaced with "+r.Name+". All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?")){n=i.getService("orion.git.provider");var s=i.getService("orion.page.message");s.setProgressMessage("Resetting index...");n.resetIndex(r.IndexLocation,r.Name).then(function(){var o={};o.Severity="Info";o.HTML=false;o.Message="Ok";d.hitch(k,k.changedItem)(r);s.setProgressResult(o)},function(o){var q={};q.Severity="Error";
q.HTML=false;q.Message=o.message;s.setProgressResult(q)})}},visibleWhen:function(n){return n.Type==="RemoteTrackingBranch"}});j.addCommand(m,"object");m=new a.ParametersDescription([new a.CommandParameter("name","text","Name:")],false);m=new a.Command({name:"Tag",tooltip:"Create a tag for the commit",imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:m,callback:function(n){var r=n.items,s=function(q,p){i.getService("orion.git.provider").doAddTag(q,
p).then(function(){d.hitch(k,k.changedItem)(r)},l)},o=r.Location;n.parameters.valueFor("name")&&!n.parameters.optionsRequested?s(o,n.parameters.valueFor("name")):f.getNewItemName(r,k,false,n.domNode.id,"Tag name",function(q){!q&&q==""||s(o,q)})},visibleWhen:function(n){return n.Type==="Commit"}});j.addCommand(m,"object");j.addCommand(m,"dom");m=new a.Command({name:"Delete",tooltip:"Delete the tag from the repository",imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(n){var r=
n.items;confirm("Are you sure you want to delete tag "+r.Name+"?")&&i.getService("orion.git.provider").doRemoveTag(r.Location).then(function(){d.hitch(k,k.changedItem)(r.parent)},l)},visibleWhen:function(n){return n.Type==="Tag"}});j.addCommand(m,"object");m=new a.Command({name:"Cherry-Pick",tooltip:"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(n){var r=n.items,
s=d.hash(),o=i.getService("orion.git.provider");n=r.Location.replace(r.Name,"HEAD");o.doCherryPick(n,r.Name,function(q){var p=[],t=r.Location.replace("commit/"+r.Name,"status");if(q.Result=="OK"){p.Severity="Ok";if(q.HeadUpdated){p.HTML=false;p.Message=q.Result;k.parentId==="explorer-tree"&&d.xhrGet({url:s,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(v){return v},error:function(v,w){console.error("HTTP status code: ",w.xhr.status)}}).then(function(v){v.HeadLocation?o.getLog(v.HeadLocation,
v.Id,"Getting git incoming changes",function(w){k.renderer.setIncomingCommits(w.Children);k.loadCommitsList(v.CommitLocation+"?page=1",v,true)}):o.getLog(s,"HEAD","Getting git outgoing changes",function(w){k.renderer.setOutgoingCommits(w.Children);k.loadCommitsList(s,v,true)})})}else{p.HTML=true;p.Message="<span>Nothing changed.</span>"}}else if(q.Result=="CONFLICTING"){p.Severity="Warning";p.HTML=true;p.Message="<span>"+q.Result+'. Some conflicts occurred. Go to <a href="'+c.toUrl("git/git-status.html")+
"#"+t+'">Git Status page</a>.<span>'}else if(q.Result=="FAILED"){p.Severity="Error";p.HTML=true;p.Message="<span>"+q.Result+'. Go to <a href="'+c.toUrl("git/git-status.html")+"#"+t+'">Git Status page</a>.<span>'}else{p.Severity="Warning";p.HTML=false;p.Message=q.Result}i.getService("orion.page.message").setProgressResult(p)},l)},visibleWhen:function(n){return n.Type==="Commit"}});j.addCommand(m,"object");j.addCommand(m,"dom")};f.createStatusCommands=function(i,j,k,l,m){var n=new a.Command({name:"Fetch",
tooltip:"Fetch from the remote branch into your remote tracking branch",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(r){var s=r.items.Location,o=i.getService("orion.git.provider");f.getDefaultSshOptions(i).then(function(q){var p=arguments.callee;o.doFetch(s,false,null,q.gitSshUsername,q.gitSshPassword,q.knownHosts,q.gitPrivateKey,q.gitPassphrase).then(function(t){f.handleProgressServiceResponse(t,q,i,function(){d.xhrGet({url:s,headers:{"Orion-Version":"1"},
postData:d.toJson({GitSshUsername:q.gitSshUsername,GitSshPassword:q.gitSshPassword,GitSshPrivateKey:q.gitPrivateKey,GitSshPassphrase:q.gitPassphrase,GitSshKnownHost:q.knownHosts}),handleAs:"json",timeout:5E3,load:function(v){return v},error:function(v,w){console.error("HTTP status code: ",w.xhr.status)}}).then(function(v){o.getLog(v.HeadLocation,v.Id,"Getting git incoming changes",function(w){m._gitCommitNavigatorRem.renderer.setIncomingCommits(w.Children);m._gitCommitNavigatorRem.loadCommitsList(v.CommitLocation+
"?page=1&pageSize=5",v,true)})})},p,"Fetch Git Repository")},function(t){f.handleProgressServiceResponse(t,q,i,function(){},p,"Fetch Git Repository")})})},visibleWhen:function(r){return r.Type==="RemoteTrackingBranch"}});j.addCommand(n,"object");j.addCommand(n,"dom");j.registerCommandContribution("eclipse.orion.git.fetch",l+1);n=new a.Command({name:"Merge",tooltip:"Merge the content from the branch to your active branch",imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",
callback:function(r){r=r.items;var s=i.getService("orion.git.provider"),o=i.getService("orion.page.message");s.doMerge(r.HeadLocation,r.Name).then(function(q){var p=[];if(q.jsonData&&(q.jsonData.Result=="FAST_FORWARD"||q.jsonData.Result=="ALREADY_UP_TO_DATE")){d.query(".treeTableRow").forEach(function(t){d.toggleClass(t,"incomingCommitsdRow",false)});p.Severity="Ok";p.HTML=false;p.Message=q.jsonData.Result;k();o.setProgressResult(p)}else if(q.jsonData){p.Severity="Warning";p.HTML=true;p.Message="<span>"+
q.jsonData.Result+"<span>";o.setProgressResult(p)}else if(q.error){p.Severity="Error";if(q.error.responseText&&JSON.parse(q.error.responseText)){q=JSON.parse(q.error.responseText);p.Message=q.DetailedMessage?q.DetailedMessage:q.Message}else p.Message=q.error.message;p.HTML=true;p.Message="<span>"+p.Message+"<span>";o.setProgressResult(p)}},function(q,p){q=[];q.Severity="Error";q.HTML=true;q.Message="<span>"+d.fromJson(p.xhr.responseText).DetailedMessage+"</span>";o.setProgressResult(q)})},visibleWhen:function(r){return r.Type===
"RemoteTrackingBranch"||r.Type==="Branch"&&!r.Current}});j.addCommand(n,"object");j.addCommand(n,"dom");j.registerCommandContribution("eclipse.orion.git.merge",l+2);n=new a.Command({name:"Push",tooltip:"Push from your local branch into the remote branch",imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.push",callback:function(r){var s=r.items,o=d.hash(),q=i.getService("orion.git.provider");if(s.RemoteLocation.length==1&&s.RemoteLocation[0].Children.length==1)f.getDefaultSshOptions(i).then(function(p){var t=
arguments.callee;q.doPush(s.RemoteLocation[0].Children[0].Location,"HEAD",true,false,null,"Pushing remote: "+o,p.gitSshUsername,p.gitSshPassword,p.knownHosts,p.gitPrivateKey,p.gitPassphrase).then(function(v){f.handleProgressServiceResponse(v,p,i,function(w){if(!w||!w.HttpCode){d.query(".treeTableRow").forEach(function(y){d.toggleClass(y,"outgoingCommitsdRow",false)});k()}},t,"Push Git Repository")},function(v){f.handleProgressServiceResponse(v,p,i,function(){},t,"Push Git Repository")})});else{r=
new orion.git.widgets.RemotePrompterDialog({title:"Choose Branch",serviceRegistry:i,gitClient:q,treeRoot:{Children:s.RemoteLocation},hideNewBranch:true,func:d.hitch(this,function(p,t){f.getDefaultSshOptions(i).then(function(v){var w=arguments.callee;q.doPush(p.Location,"HEAD",true,false,null,"Pushing remote: "+t,v.gitSshUsername,v.gitSshPassword,v.knownHosts,v.gitPrivateKey,v.gitPassphrase).then(function(y){f.handleProgressServiceResponse(y,v,i,function(z){if(!z||!z.HttpCode){d.query(".treeTableRow").forEach(function(F){d.toggleClass(F,
"outgoingCommitsdRow",false)});k()}},w,"Push Git Repository")})},function(v){f.handleProgressServiceResponse(v,options,i,function(){},func,"Pushing remote: "+t)})})});r.startup();r.show()}},visibleWhen:function(r){return r.Type==="LocalBranch"}});j.addCommand(n,"object");j.addCommand(n,"dom");j.registerCommandContribution("eclipse.orion.git.push",l+3)};f.createGitClonesCommands=function(i,j,k,l,m,n){function r(o){if(!(o.status===401||o.status===403)){var q=[];q.Severity="Error";q.HTML=false;try{var p=
JSON.parse(o.responseText);q.Message=p.DetailedMessage?p.DetailedMessage:p.Message}catch(t){q.Message=o.message}i.getService("orion.page.message").setProgressResult(q)}}function s(o){if(d.isArray(o))o=o.length>1?{}:o[0];return o}l=new a.ParametersDescription([new a.CommandParameter("key","text","Key:"),new a.CommandParameter("value","text","Value:")],false);l=new a.Command({name:"New Configuration Entry",tooltip:"Add a new entry to the repository configuration",imageClass:"core-sprite-add",id:"eclipse.orion.git.addConfigEntryCommand",
parameters:l,callback:function(o){var q=o.items,p=i.getService("orion.git.provider");o.parameters.valueFor("key")&&o.parameters.valueFor("value")&&p.addCloneConfigurationProperty(q.ConfigLocation,o.parameters.valueFor("key"),o.parameters.valueFor("value")).then(function(){d.hitch(k,k.changedItem)(q)},r)}});j.addCommand(l,"dom");l=new a.ParametersDescription([new a.CommandParameter("value","text","Value:")],false);l=new a.Command({name:"Edit",tooltip:"Edit the configuration entry",imageClass:"core-sprite-edit",
id:"eclipse.orion.git.editConfigEntryCommand",parameters:l,callback:function(o){var q=o.items,p=i.getService("orion.git.provider");o.parameters.valueFor("value")&&p.editCloneConfigurationProperty(q.Location,o.parameters.valueFor("value")).then(function(){d.hitch(k,k.changedItem)(q)},r)},visibleWhen:function(o){return o.Key&&o.Value&&o.Location}});j.addCommand(l,"object");l=new a.Command({name:"Delete",tooltip:"Delete the configuration entry",imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",
callback:d.hitch(this,function(o){var q=o.items;o=i.getService("orion.git.provider");confirm("Are you sure you want to delete "+q.Key+"?")&&o.deleteCloneConfigurationProperty(q.Location).then(function(){d.hitch(k,k.changedItem)(q)},r)}),visibleWhen:function(o){return o.Key&&o.Value&&o.Location}});j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("url","url","Repository URL:")],true);l=new a.Command({name:"Clone Repository",tooltip:"Clone an existing Git repository to a folder",
id:"eclipse.cloneGitRepository",parameters:l,callback:function(o){var q=i.getService("orion.git.provider"),p=function(t,v,w){f.getDefaultSshOptions(i).then(function(y){var z=arguments.callee;q.cloneGitRepository(w,t,v,k.defaultPath,y.gitSshUsername,y.gitSshPassword,y.knownHosts,y.gitPrivateKey,y.gitPassphrase).then(function(F){f.handleProgressServiceResponse(F,y,i,function(){k.redisplayClonesList&&d.hitch(k,k.redisplayClonesList)()},z,"Clone Git Repository")},function(F){f.handleProgressServiceResponse(F,
y,i,function(){},z,"Clone Git Repository")})})};if(o.parameters.valueFor("url")&&!o.parameters.optionsRequested)p(o.parameters.valueFor("url"));else{o=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:i,fileClient:n,url:o.parameters.valueFor("url"),alwaysShowAdvanced:o.parameters.optionsRequested,func:p});o.startup();o.show()}},visibleWhen:function(){return true}});j.addCommand(l,"dom");l=new a.ParametersDescription([new a.CommandParameter("folderName","text","New folder:")],true);l=
new a.Command({name:"Init Repository",tooltip:"Create a new Git repository in a new folder",id:"eclipse.initGitRepository",parameters:l,callback:function(o){var q=i.getService("orion.git.provider"),p=function(t,v,w){f.getDefaultSshOptions(i).then(function(y){var z=arguments.callee;q.cloneGitRepository(w,t,v,k.defaultPath).then(function(F){f.handleProgressServiceResponse(F,y,i,function(){k.redisplayClonesList&&d.hitch(k,k.redisplayClonesList)()},z,"Init Git Repository")},function(F){f.handleProgressServiceResponse(F,
y,i,function(){},z,"Init Git Repository")})})};if(o.parameters.valueFor("folderName")&&!o.parameters.optionsRequested)p(null,null,o.parameters.valueFor("folderName"));else{o=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:i,title:"Init Git Repository",fileClient:n,advancedOnly:true,func:p});o.startup();o.show()}},visibleWhen:function(){return true}});j.addCommand(l,"dom");l=new a.Command({name:"Delete",tooltip:"Delete the repository",imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",
visibleWhen:function(o){o=d.isArray(o)?o:[o];if(o.length===0)return false;for(var q=0;q<o.length;q++)if(!o[q].ContentLocation)return false;return true},callback:function(o){var q=o.items;o=i.getService("orion.git.provider");if(d.isArray(q)){if(confirm("Are you sure you want do delete "+q.length+" repositories?"))for(var p=0,t=0;t<q.length;t++)o.removeGitRepository(q[t].Location).then(function(){p++;p>=q.length&&k.redisplayClonesList&&d.hitch(k,k.redisplayClonesList)()},r)}else confirm("Are you sure you want to delete "+
q.Name+"?")&&o.removeGitRepository(q.Location).then(function(){k.redisplayClonesList&&d.hitch(k,k.redisplayClonesList)()},this.displayErrorOnStatus)}});j.addCommand(l,"object");j.addCommand(l,"dom");l=new a.Command({name:"Apply Patch",tooltip:"Apply a patch on the selected repository",id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(o){o=s(o.items);o=new orion.git.widgets.ApplyPatchDialog({title:"Apply Patch",diffLocation:o.DiffLocation});
o.startup();o.show()},visibleWhen:function(o){return o.Type==="Clone"}});j.addCommand(l,"object");l=new a.ParametersDescription([new a.CommandParameter("commitName","text","Commit name:")],true);l=new a.Command({name:"Open Commit",tooltip:"Open the commit with the given name",id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",parameters:l,callback:function(o){var q=function(v,w,y){if(y==null)y=new d.Deferred;v.length>0?i.getService("orion.git.provider").doGitLog("/gitapi/commit/"+
o.parameters.valueFor("commitName")+v[0].ContentLocation+"?page=1&pageSize=1",null,null,"Looking for the commit").then(function(z){y.callback(z.Children[0].Location)},function(){q(v.slice(1),w,y)}):y.errback();return y},p=function(v){if(o.parameters.optionsRequested)(new orion.git.widgets.OpenCommitDialog({repositories:v,serviceRegistry:i,commitName:o.parameters.valueFor("commitName")})).show();else{i.getService("orion.page.message").setProgressMessage("Looking for the commit");q(v,o.parameters.valueFor("commitName")).then(function(w){w!==
null&&window.open("/git/git-commit.html#"+w+"?page=1&pageSize=1")},function(){var w=[];w.Severity="warning";w.HTML=false;w.Message="No commits found";i.getService("orion.page.message").setProgressResult(w)})}};if(o.items.Type==="Clone"){var t=[o.items];p(t)}else if(o.items.CloneLocation)i.getService("orion.git.provider").getGitClone(o.items.CloneLocation).then(function(v){p(v.Children)});else{t=o.items;p(t)}},visibleWhen:function(o){return o.Type==="Clone"||o.CloneLocation||o.length>1&&o[0].Type===
"Clone"}});j.addCommand(l,"dom");l=new a.Command({name:"Show in GitHub",tooltip:"Show this repository at GitHub",id:"orion.git.gotoGithub",hrefCallback:function(o){o=/github\.com.*\.git/.exec(o.items.GitUrl)[0];o=o.replace(":","/");return"https://"+o.substring(0,o.length-4)},visibleWhen:function(o){return o.GitUrl&&/github\.com.*\.git/.exec(o.GitUrl)}});j.addCommand(l,"dom");l=new a.Command({name:"Show in eclipse.org",tooltip:"Show this repository at eclipse.org",id:"orion.git.gotoEclipseGit",hrefCallback:function(o){o=
o.items;var q=o.GitUrl.indexOf("git.eclipse.org/gitroot");if(q>-1)return"http://git.eclipse.org/c"+o.GitUrl.substr(q+23,o.GitUrl.length)},visibleWhen:function(o){return o.GitUrl&&o.GitUrl.indexOf("git.eclipse.org/gitroot")>-1}});j.addCommand(l,"dom")}})();return f});
define("orion/git/widgets/CommitTooltipDialog",["require","dojo","dijit","orion/util","dijit/TooltipDialog"],function(c,d,a){d.declare("orion.git.widgets.CommitTooltipDialog",[a.TooltipDialog],{widgetsInTemplate:false,closable:true,constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postCreate:function(){this.inherited(arguments);this.displayCommit(this.options.commit)},displayCommit:function(e){var f=d.create("div",{style:"padding:10px; max-width:480px"},this.containerNode),
g=e.Message.split(/(\r?\n|$)/)[0];link=d.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+e.Location+"?page=1&pageSize=1"},f);d.place(document.createTextNode(g),link);d.create("div",{style:"padding-top:15px"},f);d.create("span",{"class":"gitSecondaryDescription",innerHTML:" commit: "+e.Name},f);if(e.Parents&&e.Parents.length>0){d.create("div",null,f);d.place(document.createTextNode("parent: "),f);link=d.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+
e.Parents[0].Location+"?page=1&pageSize=1"},f);d.place(document.createTextNode(e.Parents[0].Name),link)}d.create("div",{style:"padding-top:15px"},f);if(e.AuthorImage){g=d.create("div",{"class":"git-author-icon-small",style:"margin-bottom:30px"},f);var h=new Image;h.src=e.AuthorImage;h.name=e.AuthorName;h.width=35;h.height=35;d.place(h,g,"first")}d.create("span",{"class":"gitSecondaryDescription",innerHTML:" authored by "+e.AuthorName+" ("+e.AuthorEmail+") on "+d.date.locale.format(new Date(e.Time),
{formatLength:"short"})},f);d.create("div",null,f);d.create("span",{"class":"gitSecondaryDescription",innerHTML:"committed by "+e.CommitterName+" ("+e.CommitterEmail+")"},f)},_onBlur:function(){this.inherited(arguments);a.popup.hide&&a.popup.hide(this);a.popup.close(this)}})});
define("orion/git/git-commit-navigator",["dojo","orion/explorer","orion/util","orion/git/gitCommands","orion/git/widgets/CommitTooltipDialog"],function(c,d,a,e){var f={};f.GitCommitNavigator=function(){function g(h,i,j,k,l,m,n,r){this.registry=h;this.selection=i;this.checkbox=j!=null?j.checkbox:true;this.minimal=j!=null?j.minimal:false;this.parentId=k;this.pageTitleId=l;this.toolbarId=m;this.pageNavId=r;this.selectionToolsId=n;this.isDirectory=true;this.myTree=this.model=null;this.renderer=new f.GitCommitRenderer({cachePrefix:"GitCommitsNavigator",
minimal:this.minimal},this)}g.prototype=new d.Explorer;g.prototype.loadCommitsList=function(h,i,j){var k=new c.Deferred;this.renderer._useCheckboxSelection=!this.isDirectory&&this.checkbox;h=a.makeRelative(h);if(h===this._lastHash&&!j){k.callback();return k}this._lastHash=h;this._lastTreeRoot=i;var l=c.byId(this.parentId);(j=c.byId(l.id+"progress"))||(j=c.create("div",{id:l.id+"progress"},l,"only"));c.empty(j);if(i.status&&i.status!=200){h=i.message;try{var m=JSON.parse(i.responseText);if(m.Message)h=
m.Message}catch(n){}i.status!=404&&h!==""&&c.create("b",{innerHTML:"Error "+i.status+": "},j,"only");c.place(document.createTextNode(h),j,"last");this.toolbarId&&this.selectionToolsId&&e.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,i,this.pageNavId);k.callback();return k}b=c.create("b");c.place(document.createTextNode("Loading "),j,"last");c.place(document.createTextNode(h),b,"last");c.place(b,j,"last");c.place(document.createTextNode("..."),j,"last");this.toolbarId&&this.selectionToolsId&&
e.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,i,this.pageNavId);var r=this.registry.getService("orion.git.provider");m=function(s,o){var q=new c.Deferred;r.doGitLog(s,function(p){k.callback();o?o(p.Children):q.callback(p.Children)});return q};if(i.Children){this.createTree(this.parentId,new d.ExplorerFlatModel(h,m,i.Children));k.callback()}else this.createTree(this.parentId,new d.ExplorerFlatModel(h,m));return k};return g}();f.GitCommitRenderer=function(){function g(h,i){this._init(h);
this.options=h;this.explorer=i}g.prototype=new d.SelectionRenderer;g.prototype.getCellHeaderElement=function(h){if(!this.options.minimal)switch(h){case 0:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Message</h2>"});case 1:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Author</h2>"});case 2:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Date</h2>"});case 3:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",
innerHTML:"<h2>Actions</h2>"});case 4:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Branches</h2>"});case 5:return c.create("th",{style:"padding-left: 5px; padding-right: 5px",innerHTML:"<h2>Tags</h2>"})}};g.prototype.setIncomingCommits=function(h){this.incomingCommits=h};g.prototype.setOutgoingCommits=function(h){this.outgoingCommits=h};g.prototype.getCellElement=function(h,i,j){var k=false;c.forEach(this.incomingCommits,function(q){if(i.Name===q.Name)k=true});
var l=false;c.forEach(this.outgoingCommits,function(q){if(i.Name===q.Name)l=true});switch(h){case 0:var m,n;h=document.createElement("td");m=c.create("div",{style:"margin-left: 5px; margin-right: 5px; margin-top: 5px; margin-bottom: 5px; padding-left: 20px;"},h,"only");n=c.create("a",{className:"navlink",href:"/git/git-commit.html#"+i.Location+"?page=1&pageSize=1"},m,"last");c.place(document.createTextNode(i.Message),n,"only");var r,s=new orion.git.widgets.CommitTooltipDialog({commit:i,onMouseLeave:function(){dijit.popup.hide&&
dijit.popup.hide(s);dijit.popup.close(s)},onMouseEnter:function(){clearTimeout(r)}});c.connect(n,"onmouseover",n,function(){clearTimeout(r);r=setTimeout(function(){dijit.popup.open({popup:s,around:n,orient:{BR:"TL",TR:"BL"}})},600)});c.connect(n,"onmouseout",n,function(){clearTimeout(r);r=setTimeout(function(){dijit.popup.hide&&dijit.popup.hide(s);dijit.popup.close(s)},200)});if(k)c.toggleClass(j,"incomingCommitsdRow",true);else l&&c.toggleClass(j,"outgoingCommitsdRow",true);return h;case 1:return c.create("td",
{style:"padding-left: 5px; padding-right: 5px",innerHTML:i.AuthorName+" ("+i.AuthorEmail+")"});case 2:return c.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:c.date.locale.format(new Date(i.Time),{formatLength:"short"})});case 3:if(this.options.minimal)break;j=this.getActionsColumn(i,j);c.style(j,"padding-left","5px");c.style(j,"padding-right","5px");return j;case 4:if(this.options.minimal)break;var o=document.createElement("td",{style:"padding-left: 5px; padding-right: 5px"});
c.forEach(i.Branches,function(q){c.place(document.createTextNode(q.FullName),c.create("p",{style:"margin: 5px"},o,"last"),"only")});return o;case 5:if(this.options.minimal)break;o=document.createElement("td",{style:"padding-left: 5px; padding-right: 5px"});c.forEach(i.Tags,function(q){c.place(document.createTextNode(q.Name),c.create("p",{style:"margin: 5px"},o,"last"),"only")});return o}};return g}();return f});
define("orion/links",[],function(){function c(d){this._init(d)}c.prototype={_init:function(d){this._registry=d.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(d,a,e,f,g){var h=d.search(e);if(h>0){a.appendChild(document.createTextNode(d.substring(0,h)));d=d.substring(h)}e=d.replace(e,"");h=d.substring(0,d.length-e.length);var i=h.split(" ",f);if(i.length===f){d=document.createElement("a");g=g;for(var j=0;j<f;j++)g=g.replace("%"+
(j+1),i[j]);d.setAttribute("href",g);d.innerHTML=h;a.appendChild(d);d=e}return d},addLinks:function(d,a){a=a||document.createElement("div");var e=this._registry.getServiceReferences("orion.core.linkScanner");if(e.length>0){var f=e[0];e=new RegExp(f.getProperty("pattern"),"i");var g=f.getProperty("words");f=f.getProperty("anchor");for(var h=d.search(e);h>=0;){d=this._replaceLink(d,a,e,g,f);h=d.search(e)}}d.length>0&&a.appendChild(document.createTextNode(d));return a}};c.prototype.constructor=c;return{TextLinkService:c}});
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(c,d){c.declare("dojox.layout.ToggleSplitter",[d.layout._Splitter],{open:true,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=
false;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,e=c.style(a,this.horizontal?"height":"width");c.forEach(["toggleSplitterOpen","toggleSplitterClosedThreshold","toggleSplitterOpenSize"],function(f){var g=f.substring(14);g=g.charAt(0).toLowerCase()+g.substring(1);if(f in this.child)this[g]=this.child[f]},
this);if(!this.openSize)this.openSize=this.open?e+"px":"75px";this._openStyleProps=this._getStyleProps(a,true);this._started=true;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,e;e=this.horizontal?"height":"width";if(this.open){var f=c.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);f[e]=this._openStyleProps&&this._openStyleProps[e]?this._openStyleProps[e]:this.openSize;c.style(a,
f);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{f=c.getComputedStyle(a);e=this._getStyleProps(a,true,f);f=this._getStyleProps(a,false,f);this._openStyleProps=e;c.style(a,f)}this._setStateClass();this.container._started&&this.container._layoutChildren(this.region)},_getStyleProps:function(a,e,f){f||(f=c.getComputedStyle(a));var g={},h=this.horizontal?"height":"width";g.visibility=e?f.visibility:"hidden";g[h]=e?a.style[h]||f[h]:this._closedSize;var i=["Top","Right","Bottom","Left"];
c.forEach(["padding","margin","border"],function(j){for(var k=0;k<i.length;k++){var l=j+i[k];if(j=="border")j+="Width";if(undefined!==f[l])g[l]=e?f[l]:0}});return g},_setStateClass:function(){if(this.open){c.removeClass(this.domNode,"dojoxToggleSplitterClosed");c.addClass(this.domNode,"dojoxToggleSplitterOpen");c.removeClass(this.toggleNode,"dojoxToggleSplitterIconClosed");c.addClass(this.toggleNode,"dojoxToggleSplitterIconOpen")}else{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,true);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(){this.inherited(arguments)}});c.extend(d._Widget,{toggleSplitterOpen:true,toggleSplitterClosedThreshold:5,
toggleSplitterOpenSize:""})});
define("orion/widgets/eWebBorderContainer",["dojo","dijit","dijit/layout/BorderContainer","dojox/layout/ToggleSplitter"],function(c,d){c.declare("orion.widgets.eWebBorderContainer",d.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");if(a)return a.open;return false},getLeftPane:function(){if(this._left)return this._left;for(var a=
this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&(a[e].region==="leading"||a[e].region==="left"))return this._left=a[e].domNode},getHidingPane:function(){return this.getLeftPane()},getRightPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&a[e].region==="center")return this._center=a[e].domNode},getSizeCookie:function(){var a=this.getSplitter("left");if(a)return a.getSizeCookie();return 0},setSizeCookie:function(a){var e=this.getSplitter("left");
if(e)return e.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(),e=0;e<a.length;e++)if(a[e].region&&a[e].region==="center")this._center=a[e].domNode;else if(a[e].region&&(a[e].region==="leading"||a[e].region==="left"))this._left=a[e].domNode;var f=this._left,g=this._center,h=c.position(f).w,i=this.isLeftPaneOpen(),
j;j=i?0:this.getPreferredLeftPaneWidth();i||this.toggleLeftPaneState();var k=f.style.overflow,l=g.style.overflow;(new c.Animation({node:f,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(m){f.style.width=h+(j-h)*m/100+"px";f.style.overflow="hidden";g.style.overflow="hidden";this.layout()}),onEnd:c.hitch(this,function(){g.style.overflow=l;f.style.overflow=k;this.toggleCallback&&this.toggleCallback.apply();i?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.toggleNode,"onmouseover","_onThumbMouseOver");this.connect(this.domNode,"onmouseover","_onMouseOver");this.connect(this.toggleNode,"onmouseout","_onThumbMouseOut");this._openStateCookieName=this.container.id+"_"+this.region+"_open"},startup:function(){this.inherited(arguments);if(this.container.persist){var a=c.cookie(this._openStateCookieName);
if(a==="true")this.container.getHidingPane().style.width=this.getSizeCookie()+"px";else{a==="false"?this.set("open",false):this.set("open",true);this._handleOnChange()}}else{this.set("open",true);this._handleOnChange()}return this},_handleOnChange:function(){var a=this.child.domNode,e;e=this.horizontal?"height":"width";if(this.open){var f=c.mixin({display:"block",visibility:"visible"},this._openStyleProps);f[e]=this._openStyleProps&&this._openStyleProps[e]?this._openStyleProps[e]:this.openSize;c.style(a,
f);this.connect(this.domNode,"onmousedown","_onMouseDown")}else{f=c.getComputedStyle(a);e=this._getStyleProps(a,true,f);f=this._getStyleProps(a,false,f);this._openStyleProps=e;c.style(a,f)}this._setStateClass();if(this.container._started){a=0;if(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()},_onThumbMouseOver:function(){this.toggleNode.style.backgroundColor="#AAAAAA"},_onThumbMouseOut:function(){this.toggleNode.style.backgroundColor="#DDDDDD"},_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(){if(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";if(this.container.persist)c.cookie(this._openStateCookieName,this.open?"true":"false",{expires:365})}});c.declare("orion.widgets.eWebBorderContainerReverse",d.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");if(a)return a.open;return false},getRightPane:function(){if(this._right)return this._right;for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&(a[e].region==="trailing"||a[e].region==="right"))return this._right=a[e].domNode},getHidingPane:function(){return this.getRightPane()},getLeftPane:function(){if(this._center)return this._center;for(var a=this.getChildren(),e=0;e<a.length;e++)if(a[e].region&&
a[e].region==="center")return this._center=a[e].domNode},getSizeCookie:function(){var a=this.getSplitter("right");if(a)return a.getSizeCookie();return 0},setSizeCookie:function(a){var e=this.getSplitter("right");if(e)return e.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(),e=0;e<a.length;e++)if(a[e].region&&
a[e].region==="center")this._center=a[e].domNode;else if(a[e].region&&(a[e].region==="trailing"||a[e].region==="right"))this._right=a[e].domNode;var f=this._right,g=this._center,h=c.position(f).w,i=this.isRightPaneOpen(),j;j=i?0:this.getPreferredRightPaneWidth();i||this.toggleRightPaneState();var k=f.style.overflow,l=g.style.overflow;(new c.Animation({node:f,duration:300,curve:[1,100],onAnimate:c.hitch(this,function(m){f.style.width=h+(j-h)*m/100+"px";f.style.overflow="hidden";g.style.overflow="hidden";
this.layout()}),onEnd:c.hitch(this,function(){g.style.overflow=l;f.style.overflow=k;this.toggleCallback&&this.toggleCallback.apply();i?this.toggleRightPaneState():this.setSizeCookie(null)})})).play()}})});
define("git/git-log",["require","dojo","orion/bootstrap","orion/status","orion/progress","orion/commands","orion/auth","orion/dialogs","orion/selection","orion/fileClient","orion/operationsClient","orion/searchClient","orion/globalCommands","orion/git/gitClient","orion/breadcrumbs","orion/ssh/sshTools","orion/git/git-commit-navigator","orion/git/gitCommands","orion/links","dojo/parser","dojo/hash","dijit/layout/BorderContainer","dijit/layout/ContentPane","orion/widgets/eWebBorderContainer"],function(c,
d,a,e,f,g,h,i,j,k,l,m,n,r,s,o,q,p,t){function v(D,E,J){var M=d.hash();d.xhrGet({url:M,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(Q,P){var W=function(L){var T=new k.FileClient(I);F(T,D,L,E,J).then(function(){if(L.Type==="RemoteTrackingBranch"){var V=I.getService("orion.git.provider");V.getLog(L.HeadLocation,L.Id,"Getting git incoming changes",function(u){D.renderer.setIncomingCommits(u.Children);D.renderer.setOutgoingCommits([]);V.doGitLog(L.CommitLocation+"?"+(new d._Url(M)).query,
function(x){L.Children=x.Children;if(x.NextLocation)L.NextLocation=L.Location+"?"+(new d._Url(x.NextLocation)).query;if(x.PreviousLocation)L.PreviousLocation=L.Location+"?"+(new d._Url(x.PreviousLocation)).query;D.loadCommitsList(L.CommitLocation+"?"+(new d._Url(M)).query,L)})})}else if(L.toRef)L.toRef.RemoteLocation&&L.toRef.RemoteLocation.length===1&&L.toRef.RemoteLocation[0].Children&&L.toRef.RemoteLocation[0].Children.length===1?d.xhrGet({url:L.toRef.RemoteLocation[0].Children[0].Location,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:5E3,load:function(u){I.getService("orion.git.provider").getLog(u.CommitLocation,"HEAD","Getting git outgoing changes",function(x){D.renderer.setIncomingCommits([]);D.renderer.setOutgoingCommits(x.Children);D.loadCommitsList(d.hash(),L)})},error:function(){D.loadCommitsList(d.hash(),L)}}):D.loadCommitsList(d.hash(),L);else D.loadCommitsList(d.hash(),L)})};if(P.xhr.status===200)W(Q);else if(P.xhr.status===202){P=new d.Deferred;P.callback(Q);I.getService("orion.page.progress").showWhile(P,
"Getting git log").then(function(L){W(L.Result.JsonData)})}},error:function(Q,P){if(P.xhr.status==401||P.xhr.status==403){var W=this;h.handleAuthenticationError(P.xhr,function(){d.xhrGet(W)})}else D.loadCommitsList(d.hash(),Q)}})}function w(){var D=d.hash().split("gitapi/commit/");if(D.length===2){D=D[1].split("/");if(D.length>1){fileURI="";for(var E=0;E<D.length-1;E++)fileURI+="/"+D[E];fileURI+="/"+D[D.length-1].split("?")[0]}}return fileURI}function y(){var D=d.hash().split("gitapi/commit/");if(D.length===
2){D=D[1].split("/");if(D.length>1){branch=D[0];fileURI="";for(var E=1;E<D.length-1;E++)fileURI+="/"+D[E];fileURI+="/"+D[D.length-1].split("?")[0]}}return fileURI}function z(){var D=d.hash().split("gitapi/remote/");if(D.length===2){D=D[1].split("/");if(D.length>2){branch=D[0]+"/"+D[1];fileURI="";for(var E=2;E<D.length-1;E++)fileURI+="/"+D[E];fileURI+="/"+D[D.length-1].split("?")[0]}}return fileURI}function F(D,E,J,M,Q){var P=new d.Deferred,W=J.Type==="RemoteTrackingBranch",L=J.toRef&&J.toRef.Type===
"Branch",T;(T=W?z():L?y():w())?D.read(T,true).then(d.hitch(this,function(V){n.setPageTarget(V,I,Q);var u;u=W?J.Name:L?J.toRef.Name:null;if(J&&J.CloneLocation){var x=J.CloneLocation;I.getService("orion.git.provider").getGitClone(x).then(function(B){B.Children&&B.Children.length>0?H(u,B.Children[0].Name,B.Children[0].Location,W,L):H(u,B.Name,B.Location,W,L)})}else H(u);if(x=d.byId("location")){M.setLocationByMetaData(V);d.empty(x);new s.BreadCrumbs({container:"location",resource:V,makeHref:function(B,
O){G(D,B,O,W)}})}E.isDirectory=V.Directory;p.updateNavTools(I,E,"pageActions","selectionTools",E._lastTreeRoot);E.updateCommands();P.callback()}),d.hitch(this,function(V){P.errback(V)})):P.callback();return P}function G(D,E,J,M){J&&D.read(J,true).then(d.hitch(this,function(Q){if(M){var P=I.getService("orion.git.provider");Q.Git&&P.getDefaultRemoteBranch(Q.Git.RemoteLocation,function(W){E.href=c.toUrl("git/git-log.html")+"#"+W.Location+"?page=1"})}else if(Q.Git)E.href=c.toUrl("git/git-log.html")+"#"+
Q.Git.CommitLocation+"?page=1"}),d.hitch(this,function(Q){console.error("Error loading file metadata: "+Q.message)}))}function H(D,E,J,M,Q){var P=d.byId("pageTitle"),W="Git Log ";if(M)W+="for remote branch <b>"+D+"</b>";else if(Q)W+="for local branch <b>"+D+"</b>";if(J)W=W+" on <a href='"+c.toUrl("git/git-repository.html")+"#"+J+"'>"+E+"</a>";P.innerHTML=W;if(D)document.title=E?D+" on "+E:D}var I;d.addOnLoad(function(){a.startup().then(function(D){I=D.serviceRegistry;D=D.preferences;document.body.style.visibility=
"visible";d.parser.parse();var E=new l.OperationsClient(I);new e.StatusReportingService(I,E,"statusPane","notifications","notificationArea");new f.ProgressService(I,E);new i.DialogService(I);E=new j.Selection(I);new o.SshService(I);var J=new g.CommandService({serviceRegistry:I,selection:E});new t.TextLinkService({serviceRegistry:I});new r.GitService(I);var M=new k.FileClient(I),Q=new m.Searcher({serviceRegistry:I,fileService:M,commandService:J}),P=new q.GitCommitNavigator(I,E,null,"explorer-tree",
"pageTitle","pageActions","selectionTools","pageNavigationActions");n.setPageCommandExclusions(["eclipse.git.remote","eclipse.git.log"]);n.generateBanner("banner",I,J,D,Q,P);p.createFileCommands(I,J,P,"pageActions","selectionTools");J.addCommandGroup("eclipse.gitGroup.nav",200,"More");J.addCommandGroup("eclipse.gitGroup.page",100,null,null,"pageActions");J.addCommandGroup("eclipse.selectionGroup",500,"More actions",null,"selectionTools");J.registerCommandContribution("eclipse.openGitCommit",1);J.registerCommandContribution("eclipse.compareWithWorkingTree",
2);J.registerCommandContribution("eclipse.compareGitCommits",1,"selectionTools","eclipse.selectionGroup");J.registerCommandContribution("eclipse.orion.git.fetch",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.fetchForce",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.merge",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.switchToCurrentLocal",100,"pageActions","eclipse.gitGroup.page");
J.registerCommandContribution("eclipse.orion.git.push",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.pushForce",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.switchToRemote",100,"pageActions","eclipse.gitGroup.page");J.registerCommandContribution("eclipse.orion.git.addTag",3);J.registerCommandContribution("eclipse.orion.git.cherryPick",3);J.registerCommandContribution("eclipse.orion.git.previousLogPage",1,
"pageNavigationActions");J.registerCommandContribution("eclipse.orion.git.nextLogPage",2,"pageNavigationActions");v(P,Q,J);d.subscribe("/dojo/hashchange",P,function(){v(P,Q,J)})})})});