/*
 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
*/
(function(){function b(a,c,e){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var f=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"],h=0,i;i=f[h++];)console[i]||function(){var n=i+"";console[n]="log"in console?function(){var o=Array.apply({},arguments);o.unshift(n+":");console.log(o.join(" "))}:function(){};console[n]._fake=true}()}if(typeof a==
"undefined")a={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};var g=a;if(typeof c=="undefined")c={_scopeName:"dijit"};if(typeof e=="undefined")e={_scopeName:"dojox"};if(!g._scopeArgs)g._scopeArgs=[a,c,e];g.global=this;g.config={isDebug:false,debugAtAllCosts:false};if(f=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var j in f)g.config[j]=f[j];a.locale=g.config.locale;j="$Rev: 24595 $".match(/\d+/);a.version=
{major:1,minor:6,patch:1,flag:"",revision:j?+j[0]:NaN,toString:function(){with(g.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",g.version.toString());var k,m,l={};for(h in{toString:1}){k=[];break}a._extraNames=k=k||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];m=k.length;a._mixin=function(n,o){var p,t,q;for(p in o){t=o[p];
if(!(p in n)||n[p]!==t&&(!(p in l)||l[p]!==t))n[p]=t}if(m&&o)for(q=0;q<m;++q){p=k[q];t=o[p];if(!(p in n)||n[p]!==t&&(!(p in l)||l[p]!==t))n[p]=t}return n};a.mixin=function(n){n||(n={});for(var o=1,p=arguments.length;o<p;o++)g._mixin(n,arguments[o]);return n};a._getProp=function(n,o,p){p=p||g.global;for(var t=0,q;p&&(q=n[t]);t++){if(t==0&&g._scopeMap[q])q=g._scopeMap[q];p=q in p?p[q]:o?(p[q]={}):undefined}return p};a.setObject=function(n,o,p){var t=n.split(".");n=t.pop();return(p=g._getProp(t,true,
p))&&n?(p[n]=o):undefined};a.getObject=function(n,o,p){return g._getProp(n.split("."),o,p)};a.exists=function(n,o){return g.getObject(n,false,o)!==undefined};a.eval=function(n){return g.global.eval?g.global.eval(n):eval(n)};g.deprecated=g.experimental=function(){}})();return{dojo:a,dijit:c,dojox:e}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=b();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var d=b();dojo=d.dojo;dijit=d.dijit;dojox=d.dojox}})();
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap"],function(b,d){var a=["_moduleHasPrefix","_loadPath","_loadUri","_loadUriAndCheck","loaded","_callLoaded","_getModuleSymbols","_loadModule","require","provide","platformRequire","requireIf","requireAfterIf","registerModulePath"],c,e;for(c=0;c<a.length;){e=a[c++];d[e]=function(n){return function(){console.warn("dojo."+n+" not available when using an AMD loader.")}}(e)}var f=function(n){var o=[],p;for(p=0;p<n.length;)o.push(n[p++]);
return o},h=function(n,o){return o?typeof o=="string"?function(){n[o]()}:function(){o.call(n)}:n};d.ready=d.addOnLoad=function(n,o){b.ready(o?h(n,o):n)};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=[],g=function(){var n=i.slice(0);for(Array.prototype.splice.apply(i,[0,i.length]);n.length;)n.shift().call()};i.unshift=function(){Array.prototype.unshift.apply(i,f(arguments));b.ready(g)};i.splice=
function(){Array.prototype.splice.apply(i,f(arguments));b.ready(g)};var j=d._unloaders=[];d.unloaded=function(){for(;j.length;)j.pop().call()};d._onto=function(n,o,p){n.push(p?h(o,p):o)};d._modulesLoaded=function(){};d.loadInit=function(n){n()};var k=function(n){return n.replace(/\./g,"/")};d.getL10nName=function(n,o,p){p=p?p.toLowerCase():d.locale;n="i18n!"+k(n);return/root/i.test(p)?n+"/nls/"+o:n+"/nls/"+p+"/"+o};d.requireLocalization=function(n,o,p){if(b.vendor!="altoviso.com")p=!p||p.toLowerCase()===
d.locale?"root":p;return b(d.getL10nName(n,o,p))};d.i18n={getLocalization:d.requireLocalization,normalizeLocale:function(n){n=n?n.toLowerCase():d.locale;if(n=="root")n="ROOT";return n}};var m=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,l=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;d._Url=function(){for(var n=arguments,o=[n[0]],p=1;p<n.length;p++)if(n[p]){var t=new d._Url(n[p]+"");o=new d._Url(o[0]+"");if(t.path==""&&!t.scheme&&!t.authority&&!t.query){if(t.fragment!=
null)o.fragment=t.fragment;t=o}else if(!t.scheme){t.scheme=o.scheme;if(!t.authority){t.authority=o.authority;if(t.path.charAt(0)!="/"){o=(o.path.substring(0,o.path.lastIndexOf("/")+1)+t.path).split("/");for(var q=0;q<o.length;q++)if(o[q]==".")if(q==o.length-1)o[q]="";else{o.splice(q,1);q--}else if(q>0&&!(q==1&&o[0]=="")&&o[q]==".."&&o[q-1]!="..")if(q==o.length-1){o.splice(q,1);o[q-1]=""}else{o.splice(q-1,2);q-=2}t.path=o.join("/")}}}o=[];t.scheme&&o.push(t.scheme,":");t.authority&&o.push("//",t.authority);
o.push(t.path);t.query&&o.push("?",t.query);t.fragment&&o.push("#",t.fragment)}this.uri=o.join("");p=this.uri.match(m);this.scheme=p[2]||(p[1]?"":null);this.authority=p[4]||(p[3]?"":null);this.path=p[5];this.query=p[7]||(p[6]?"":null);this.fragment=p[9]||(p[8]?"":null);if(this.authority!=null){p=this.authority.match(l);this.user=p[3]||null;this.password=p[4]||null;this.host=p[6]||p[7];this.port=p[9]||null}};d._Url.prototype.toString=function(){return this.uri};d.moduleUrl=function(n,o){if(!n)return null;
n=k(n)+(o?"/"+o:"");o="";var p=n.match(/(.+)(\.[^\/]*)$/);if(p){n=p[1];o=p[2]}return new d._Url(b.nameToUrl(n,o))};return d});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(b){if(typeof window!="undefined"){b.isBrowser=true;b._name="browser";(function(){var a=b;if(document&&document.getElementsByTagName)for(var c=document.getElementsByTagName("script"),e=/dojo(\.xd)?\.js(\W|$)/i,f=0;f<c.length;f++){var h=c[f].getAttribute("src");if(h){var i=h.match(e);if(i){if(!a.config.baseUrl)a.config.baseUrl=h.substring(0,i.index);if(c=c[f].getAttribute("djConfig")||c[f].getAttribute("data-dojo-config")){c=
eval("({ "+c+" })");for(var g in c)b.config[g]=c[g]}break}}}a.baseUrl=a.config.baseUrl;g=navigator;c=g.userAgent;e=g.appVersion;f=parseFloat(e);if(c.indexOf("Opera")>=0)a.isOpera=f;if(c.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=e.indexOf("Konqueror")>=0?f:0;a.isWebKit=parseFloat(c.split("WebKit/")[1])||undefined;a.isChrome=parseFloat(c.split("Chrome/")[1])||undefined;a.isMac=e.indexOf("Macintosh")>=0;if((h=Math.max(e.indexOf("WebKit"),e.indexOf("Safari"),0))&&!b.isChrome){a.isSafari=parseFloat(e.split("Version/")[1]);
if(!a.isSafari||parseFloat(e.substr(h+7))<=419.3)a.isSafari=2}if(c.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=f;if(a.isMoz)a.isFF=parseFloat(c.split("Firefox/")[1]||c.split("Minefield/")[1])||undefined;if(document.all&&!a.isOpera){a.isIE=parseFloat(e.split("MSIE ")[1])||undefined;if((c=document.documentMode)&&c!=5&&Math.floor(a.isIE)!=c)a.isIE=c}if(b.isIE&&window.location.protocol==="file:")b.config.ieForceActiveXXhr=true;a.isQuirks=document.compatMode=="BackCompat";a.locale=
b.config.locale||(a.isIE?g.userLanguage:g.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var p,t;if(!b.isIE||!b.config.ieForceActiveXXhr)try{p=new XMLHttpRequest}catch(q){}if(!p)for(var r=0;r<3;++r){var v=a._XMLHTTP_PROGIDS[r];try{p=new ActiveXObject(v)}catch(u){t=u}if(p){a._XMLHTTP_PROGIDS=[v];break}}if(!p)throw new Error("XMLHTTP not available: "+t);return p};a._isDocumentOk=function(p){p=p.status||0;var t=location.protocol;
return p>=200&&p<300||p==304||p==1223||!p&&(t=="file:"||t=="chrome:"||t=="chrome-extension:"||t=="app:")};var j=window.location+"";var k=(g=document.getElementsByTagName("base"))&&g.length>0;a._getText=function(p,t){var q=a._xhrObj();if(!k&&b._Url)p=(new b._Url(j,p)).toString();if(a.config.cacheBust){p+="";p+=(p.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,"")}q.open("GET",p,false);try{q.send(null);if(!a._isDocumentOk(q)){var r=Error("Unable to load "+p+" status:"+q.status);
r.status=q.status;r.responseText=q.responseText;throw r;}}catch(v){if(t)return null;throw v;}return q.responseText};var m=window,l=function(p,t){var q=m.attachEvent||m.addEventListener;p=m.attachEvent?p:p.substring(2);q(p,function(){t.apply(m,arguments)},false)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var p=a._windowUnloaders;p.length;)p.pop()();a=null};var n=0;a.addOnWindowUnload=function(p,t){a._onto(a._windowUnloaders,p,t);if(!n){n=1;l("onunload",a.windowUnloaded)}};var o=0;a.addOnUnload=
function(p,t){a._onto(a._unloaders,p,t);if(!o){o=1;l("onbeforeunload",b.unloaded)}}})();b._initFired=false;b._loadInit=function(){if(b._scrollIntervalId){clearInterval(b._scrollIntervalId);b._scrollIntervalId=0}if(!b._initFired){b._initFired=true;!b.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",b._loadInit);b._inFlightCount==0&&b._modulesLoaded()}};if(!b.config.afterOnLoad)if(document.addEventListener){document.addEventListener("DOMContentLoaded",b._loadInit,false);window.addEventListener("load",
b._loadInit,false)}else if(window.attachEvent){window.attachEvent("onload",b._loadInit);if(!b.config.skipIeDomLoaded&&self===self.top)b._scrollIntervalId=setInterval(function(){try{if(document.body){document.documentElement.doScroll("left");b._loadInit()}}catch(a){}},30)}if(b.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],c=0,e=1,f=document.createStyleSheet();if(b.isIE>=8){c=
1;e=a.length}for(;c<e;++c)f.addRule("v\\:"+a[c],"behavior:url(#default#VML); display:inline-block")})()}catch(d){}}(function(){var a=b.config.modulePaths;if(a)for(var c in a)b.registerModulePath(c,a[c])})();b.config.isDebug&&b.require("dojo._firebug.firebug");if(b.config.debugAtAllCosts){b.require("dojo._base._loader.loader_debug");b.require("dojo.i18n")}return b});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(b){return dojo=b});
define("dojo/_base/lang",["dojo/lib/kernel"],function(b){(function(){var d=Object.prototype.toString;b.isString=function(g){return typeof g=="string"||g instanceof String};b.isArray=function(g){return g&&(g instanceof Array||typeof g=="array")};b.isFunction=function(g){return d.call(g)==="[object Function]"};b.isObject=function(g){return g!==undefined&&(g===null||typeof g=="object"||b.isArray(g)||b.isFunction(g))};b.isArrayLike=function(g){return g&&g!==undefined&&!b.isString(g)&&!b.isFunction(g)&&
!(g.tagName&&g.tagName.toLowerCase()=="form")&&(b.isArray(g)||isFinite(g.length))};b.isAlien=function(g){return g&&!b.isFunction(g)&&/\{\s*\[native code\]\s*\}/.test(String(g))};b.extend=function(g){for(var j=1,k=arguments.length;j<k;j++)b._mixin(g.prototype,arguments[j]);return g};b._hitchArgs=function(g,j){var k=b._toArray(arguments,2),m=b.isString(j);return function(){var l=b._toArray(arguments),n=m?(g||b.global)[j]:j;return n&&n.apply(g||this,k.concat(l))}};b.hitch=function(g,j){if(arguments.length>
2)return b._hitchArgs.apply(b,arguments);if(!j){j=g;g=null}if(b.isString(j)){g=g||b.global;if(!g[j])throw['dojo.hitch: scope["',j,'"] is null (scope="',g,'")'].join("");return function(){return g[j].apply(g,arguments||[])}}return!g?j:function(){return j.apply(g,arguments||[])}};b.delegate=b._delegate=function(){function g(){}return function(j,k){g.prototype=j;j=new g;g.prototype=null;k&&b._mixin(j,k);return j}}();var a=function(g,j,k){return(k||[]).concat(Array.prototype.slice.call(g,j||0))},c=function(g,
j,k){k=k||[];for(j=j||0;j<g.length;j++)k.push(g[j]);return k};b._toArray=b.isIE?function(g){return(g.item?c:a).apply(this,arguments)}:a;b.partial=function(){return b.hitch.apply(b,[null].concat(b._toArray(arguments)))};var e=b._extraNames,f=e.length,h={};b.clone=function(g){if(!g||typeof g!="object"||b.isFunction(g))return g;if(g.nodeType&&"cloneNode"in g)return g.cloneNode(true);if(g instanceof Date)return new Date(g.getTime());if(g instanceof RegExp)return new RegExp(g);var j,k,m,l;if(b.isArray(g)){j=
[];k=0;for(m=g.length;k<m;++k)k in g&&j.push(b.clone(g[k]))}else j=g.constructor?new g.constructor:{};for(l in g){m=g[l];if(!(l in j)||j[l]!==m&&(!(l in h)||h[l]!==m))j[l]=b.clone(m)}if(f)for(k=0;k<f;++k){l=e[k];m=g[l];if(!(l in j)||j[l]!==m&&(!(l in h)||h[l]!==m))j[l]=m}return j};b.trim=String.prototype.trim?function(g){return g.trim()}:function(g){return g.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var i=/\{([^\}]+)\}/g;b.replace=function(g,j,k){return g.replace(k||i,b.isFunction(j)?j:function(m,
l){return b.getObject(l,false,j)})}})();return b});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var d=function(c,e,f){return[typeof c=="string"?c.split(""):c,e||b.global,typeof f=="string"?new Function("item","index","array",f):f]},a=function(c,e,f,h){var i=d(e,h,f);e=i[0];f=0;for(h=e.length;f<h;++f){var g=!!i[2].call(i[1],e[f],f,e);if(c^g)return g}return c};b.mixin(b,{indexOf:function(c,e,f,h){var i=1,g=c.length||0,j=0;if(h){j=g-1;i=g=-1}if(f!=undefined)j=f;if(h&&j>g||j<g)for(;j!=g;j+=i)if(c[j]==e)return j;
return-1},lastIndexOf:function(c,e,f){return b.indexOf(c,e,f,true)},forEach:function(c,e,f){if(c&&c.length){var h=d(c,f,e);c=h[0];e=0;for(f=c.length;e<f;++e)h[2].call(h[1],c[e],e,c)}},every:function(c,e,f){return a(true,c,e,f)},some:function(c,e,f){return a(false,c,e,f)},map:function(c,e,f,h){var i=d(c,f,e);c=i[0];e=h?new h:[];f=0;for(h=c.length;f<h;++f)e.push(i[2].call(i[1],c[f],f,c));return e},filter:function(c,e,f){var h=d(c,f,e);c=h[0];e=[];f=0;for(var i=c.length;f<i;++f)h[2].call(h[1],c[f],f,
c)&&e.push(c[f]);return e}})})();return b});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(b){(function(){function d(C,D){throw new Error("declare"+(D?" "+D:"")+": "+C);}function a(C,D){for(var z=[],E=[{cls:0,refs:[]}],F={},K=1,G=C.length,M=0,L,P,Q,$,da;M<G;++M){if(L=C[M])r.call(L)!="[object Function]"&&d("mixin #"+M+" is not a callable constructor.",D);else d("mixin #"+M+" is unknown. Did you use dojo.require to pull it in?",D);P=L._meta?L._meta.bases:[L];Q=0;for(L=P.length-1;L>=0;--L){$=P[L].prototype;
if(!$.hasOwnProperty("declaredClass"))$.declaredClass="uniqName_"+u++;$=$.declaredClass;if(!F.hasOwnProperty($)){F[$]={count:0,refs:[],cls:P[L]};++K}$=F[$];if(Q&&Q!==$){$.refs.push(Q);++Q.count}Q=$}++Q.count;E[0].refs.push(Q)}for(;E.length;){Q=E.pop();z.push(Q.cls);for(--K;da=Q.refs,da.length==1;){Q=da[0];if(!Q||--Q.count){Q=0;break}z.push(Q.cls);--K}if(Q){M=0;for(G=da.length;M<G;++M){Q=da[M];--Q.count||E.push(Q)}}}K&&d("can't build consistent linearization",D);L=C[0];z[0]=L?L._meta&&L===z[z.length-
L._meta.bases.length]?L._meta.bases.length:1:0;return z}function c(C,D,z){var E,F,K,G,M,L,P,Q=this._inherited=this._inherited||{};if(typeof C=="string"){E=C;C=D;D=z}z=0;G=C.callee;(E=E||G.nom)||d("can't deduce a name to call inherited()",this.declaredClass);M=this.constructor._meta;K=M.bases;P=Q.p;if(E!=x){if(Q.c!==G){P=0;L=K[0];M=L._meta;if(M.hidden[E]!==G){(F=M.chains)&&typeof F[E]=="string"&&d("calling chained method with inherited: "+E,this.declaredClass);do{M=L._meta;F=L.prototype;if(M&&(F[E]===
G&&F.hasOwnProperty(E)||M.hidden[E]===G))break}while(L=K[++P]);P=L?P:-1}}if(L=K[++P]){F=L.prototype;if(L._meta&&F.hasOwnProperty(E))z=F[E];else{G=q[E];do{F=L.prototype;if((z=F[E])&&(L._meta?F.hasOwnProperty(E):z!==G))break}while(L=K[++P])}}z=L&&z||q[E]}else{if(Q.c!==G){P=0;if((M=K[0]._meta)&&M.ctor!==G){F=M.chains;if(!F||F.constructor!=="manual")d("calling chained constructor with inherited",this.declaredClass);for(;L=K[++P];)if((M=L._meta)&&M.ctor===G)break;P=L?P:-1}}for(;L=K[++P];)if(z=(M=L._meta)?
M.ctor:L)break;z=L&&z}Q.c=z;Q.p=P;if(z)return D===true?z:z.apply(this,D||C)}function e(C,D){if(typeof C=="string")return this.inherited(C,D,true);return this.inherited(C,true)}function f(C){for(var D=this.constructor._meta.bases,z=0,E=D.length;z<E;++z)if(D[z]===C)return true;return this instanceof C}function h(C,D){var z,E=0,F=p._extraNames.length;for(z in D)if(z!=x&&D.hasOwnProperty(z))C[z]=D[z];for(;E<F;++E){z=p._extraNames[E];if(z!=x&&D.hasOwnProperty(z))C[z]=D[z]}}function i(C,D){var z,E,F=0,
K=p._extraNames.length;for(z in D){E=D[z];if((E!==q[z]||!(z in q))&&z!=x){if(r.call(E)=="[object Function]")E.nom=z;C[z]=E}}for(;F<K;++F){z=p._extraNames[F];E=D[z];if((E!==q[z]||!(z in q))&&z!=x){if(r.call(E)=="[object Function]")E.nom=z;C[z]=E}}return C}function g(C){i(this.prototype,C);return this}function j(C,D){return function(){var z=arguments,E=z,F=z[0],K,G;G=C.length;var M;if(!(this instanceof z.callee))return o(z);if(D&&(F&&F.preamble||this.preamble)){M=new Array(C.length);M[0]=z;for(K=0;;){if(F=
z[0])if(F=F.preamble)z=F.apply(this,z)||z;F=C[K].prototype;if(F=F.hasOwnProperty("preamble")&&F.preamble)z=F.apply(this,z)||z;if(++K==G)break;M[K]=z}}for(K=G-1;K>=0;--K){F=C[K];if(F=(G=F._meta)?G.ctor:F)F.apply(this,M?M[K]:z)}(F=this.postscript)&&F.apply(this,E)}}function k(C,D){return function(){var z=arguments,E=z,F=z[0];if(!(this instanceof z.callee))return o(z);if(D){if(F)if(F=F.preamble)E=F.apply(this,E)||E;(F=this.preamble)&&F.apply(this,E)}C&&C.apply(this,z);(F=this.postscript)&&F.apply(this,
z)}}function m(C){return function(){var D=arguments,z=0,E,F;if(!(this instanceof D.callee))return o(D);for(;E=C[z];++z)if(E=(F=E._meta)?F.ctor:E){E.apply(this,D);break}(E=this.postscript)&&E.apply(this,D)}}function l(C,D,z){return function(){var E,F,K=0,G=1;if(z){K=D.length-1;G=-1}for(;E=D[K];K+=G){F=E._meta;(E=(F?F.hidden:E.prototype)[C])&&E.apply(this,arguments)}}}function n(C){v.prototype=C.prototype;C=new v;v.prototype=null;return C}function o(C){var D=C.callee,z=n(D);D.apply(z,C);return z}var p=
b,t=p._mixin,q=Object.prototype,r=q.toString,v=new Function,u=0,x="constructor";p.declare=function(C,D,z){if(typeof C!="string"){z=D;D=C;C=""}z=z||{};var E,F,K,G,M,L,P,Q=1,$=D;if(r.call(D)=="[object Array]"){L=a(D,C);K=L[0];Q=L.length-K;D=L[Q]}else{L=[0];if(D)if(r.call(D)=="[object Function]"){K=D._meta;L=L.concat(K?K.bases:D)}else d("base class is not a callable constructor.",C);else D!==null&&d("unknown base class. Did you use dojo.require to pull it in?",C)}if(D)for(F=Q-1;;--F){E=n(D);if(!F)break;
K=L[F];(K._meta?h:t)(E,K.prototype);G=new Function;G.superclass=D;G.prototype=E;D=E.constructor=G}else E={};i(E,z);K=z.constructor;if(K!==q.constructor){K.nom=x;E.constructor=K}for(F=Q-1;F;--F)if((K=L[F]._meta)&&K.chains)P=t(P||{},K.chains);if(E["-chains-"])P=t(P||{},E["-chains-"]);K=!P||!P.hasOwnProperty(x);L[0]=G=P&&P.constructor==="manual"?m(L):L.length==1?k(z.constructor,K):j(L,K);G._meta={bases:L,hidden:z,chains:P,parents:$,ctor:z.constructor};G.superclass=D&&D.prototype;G.extend=g;G.prototype=
E;E.constructor=G;E.getInherited=e;E.inherited=c;E.isInstanceOf=f;if(C){E.declaredClass=C;p.setObject(C,G)}if(P)for(M in P)if(E[M]&&typeof P[M]=="string"&&M!=x){K=E[M]=l(M,L,P[M]==="after");K.nom=M}return G};p.safeMixin=i})();return b.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(b){b._listener={getDispatcher:function(){return function(){var d=Array.prototype,a=arguments.callee,c=a._listeners;a=(a=a.target)&&a.apply(this,arguments);var e;c=[].concat(c);for(e in c)e in d||c[e].apply(this,arguments);return a}},add:function(d,a,c){d=d||b.global;var e=d[a];if(!e||!e._listeners){var f=b._listener.getDispatcher();f.target=e;f._listeners=[];e=d[a]=f}return e._listeners.push(c)},remove:function(d,a,c){(d=(d||
b.global)[a])&&d._listeners&&c--&&delete d._listeners[c]}};b.connect=function(){var d=arguments,a=[],c=0;a.push(b.isString(d[0])?null:d[c++],d[c++]);var e=d[c+1];a.push(b.isString(e)||b.isFunction(e)?d[c++]:null,d[c++]);for(e=d.length;c<e;c++)a.push(d[c]);return b._connect.apply(this,a)};b._connect=function(d,a,c,e){var f=b._listener;c=f.add(d,a,b.hitch(c,e));return[d,a,c,f]};b.disconnect=function(d){if(d&&d[0]!==undefined){b._disconnect.apply(this,d);delete d[0]}};b._disconnect=function(d,a,c,e){e.remove(d,
a,c)};b._topics={};b.subscribe=function(d,a,c){return[d,b._listener.add(b._topics,d,b.hitch(a,c))]};b.unsubscribe=function(d){d&&b._listener.remove(b._topics,d[0],d[1])};b.publish=function(d,a){if(d=b._topics[d])d.apply(this,a||[])};b.connectPublisher=function(d,a,c){var e=function(){b.publish(d,arguments)};return c?b.connect(a,c,e):b.connect(a,e)};return b.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var d=function(){},a=Object.freeze||function(){};b.Deferred=function(c){function e(n){if(i)throw new Error("This deferred has already been resolved");h=n;i=true;f()}function f(){for(var n;!n&&k;){var o=k;k=k.next;if(n=o.progress==d)i=false;var p=g?o.error:o.resolved;if(p)try{var t=p(h);if(t&&typeof t.then==="function")t.then(b.hitch(o.deferred,"resolve"),b.hitch(o.deferred,"reject"));else{p=n&&t===undefined;
if(n&&!p)g=t instanceof Error;o.deferred[p&&g?"reject":"resolve"](p?h:t)}}catch(q){o.deferred.reject(q)}else g?o.deferred.reject(h):o.deferred.resolve(h)}}var h,i,g,j,k,m=this.promise={};this.resolve=this.callback=function(n){this.fired=0;this.results=[n,null];e(n)};this.reject=this.errback=function(n){g=true;this.fired=1;e(n);this.results=[null,n];if(!n||n.log!==false)(b.config.deferredOnError||function(o){console.error(o)})(n)};this.progress=function(n){for(var o=k;o;){var p=o.progress;p&&p(n);
o=o.next}};this.addCallbacks=function(n,o){this.then(n,o,d);return this};this.then=m.then=function(n,o,p){var t=p==d?this:new b.Deferred(m.cancel);n={resolved:n,error:o,progress:p,deferred:t};if(k)j=j.next=n;else k=j=n;i&&f();return t.promise};var l=this;this.cancel=m.cancel=function(){if(!i){var n=c&&c(l);if(!i){n instanceof Error||(n=new Error(n));n.log=false;l.reject(n)}}};a(m)};b.extend(b.Deferred,{addCallback:function(){return this.addCallbacks(b.hitch.apply(b,arguments))},addErrback:function(){return this.addCallbacks(null,
b.hitch.apply(b,arguments))},addBoth:function(){var c=b.hitch.apply(b,arguments);return this.addCallbacks(c,c)},fired:-1})})();b.when=function(d,a,c,e){if(d&&typeof d.then==="function")return d.then(a,c,e);return a(d)};return b.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(b){b.fromJson=function(d){return eval("("+d+")")};b._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")};b.toJsonIndentStr="\t";b.toJson=function(d,a,c){if(d===undefined)return"undefined";var e=typeof d;if(e=="number"||e=="boolean")return d+"";if(d===null)return"null";if(b.isString(d))return b._escapeString(d);var f=
arguments.callee,h;c=c||"";var i=a?c+b.toJsonIndentStr:"";h=d.__json__||d.json;if(b.isFunction(h)){h=h.call(d);if(d!==h)return f(h,a,i)}if(d.nodeType&&d.cloneNode)throw new Error("Can't serialize DOM nodes");h=a?" ":"";var g=a?"\n":"";if(b.isArray(d))return"["+b.map(d,function(l){l=f(l,a,i);if(typeof l!="string")l="undefined";return g+i+l}).join(","+h)+g+c+"]";if(e=="function")return null;e=[];var j;for(j in d){var k,m;if(typeof j=="number")k='"'+j+'"';else if(typeof j=="string")k=b._escapeString(j);
else continue;m=f(d[j],a,i);typeof m=="string"&&e.push(g+i+k+":"+h+m)}return"{"+e.join(","+h)+g+c+"}"};return b});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(b){(function(){b.Color=function(d){d&&this.setColor(d)};b.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:b.config.transparentColor||[255,255,255]};b.extend(b.Color,
{r:255,g:255,b:255,a:1,_set:function(d,a,c,e){this.r=d;this.g=a;this.b=c;this.a=e},setColor:function(d){if(b.isString(d))b.colorFromString(d,this);else if(b.isArray(d))b.colorFromArray(d,this);else{this._set(d.r,d.g,d.b,d.a);d instanceof b.Color||this.sanitize()}return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+b.map(["r","g","b"],function(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)}});b.blendColors=function(d,a,c,e){var f=e||new b.Color;b.forEach(["r","g","b","a"],function(h){f[h]=d[h]+(a[h]-d[h])*c;if(h!="a")f[h]=Math.round(f[h])});return f.sanitize()};b.colorFromRgb=function(d,a){return(d=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&b.colorFromArray(d[1].split(/\s*,\s*/),a)};b.colorFromHex=function(d,
a){var c=a||new b.Color,e=d.length==4?4:8,f=(1<<e)-1;d=Number("0x"+d.substr(1));if(isNaN(d))return null;b.forEach(["b","g","r"],function(h){var i=d&f;d>>=e;c[h]=e==4?17*i:i});c.a=1;return c};b.colorFromArray=function(d,a){a=a||new b.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()};b.colorFromString=function(d,a){var c=b.Color.named[d];return c&&b.colorFromArray(c,a)||b.colorFromRgb(d,a)||b.colorFromHex(d,a)}})();return b.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(b){b.doc=window.document||null;b.body=function(){return b.doc.body||b.doc.getElementsByTagName("body")[0]};b.setContext=function(d,a){b.global=d;b.doc=a};b.withGlobal=function(d,a,c,e){var f=b.global;try{b.global=d;return b.withDoc.call(null,d.document,a,c,e)}finally{b.global=f}};b.withDoc=function(d,a,c,e){var f=b.doc,h=b._bodyLtr,i=b.isQuirks;try{b.doc=d;delete b._bodyLtr;b.isQuirks=b.doc.compatMode=="BackCompat";if(c&&typeof a=="string")a=
c[a];return a.apply(c,e||[])}finally{b.doc=f;delete b._bodyLtr;if(h!==undefined)b._bodyLtr=h;b.isQuirks=i}};return b});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(b){(function(){var d=b._event_listener={add:function(g,j,k){if(g){j=d._normalizeEventName(j);k=d._fixCallback(j,k);if(!b.isIE&&(j=="mouseenter"||j=="mouseleave")){var m=k;j=j=="mouseenter"?"mouseover":"mouseout";k=function(l){if(!b.isDescendant(l.relatedTarget,g))return m.call(this,l)}}g.addEventListener(j,k,false);return k}},remove:function(g,j,k){if(g){j=d._normalizeEventName(j);if(!b.isIE&&(j=="mouseenter"||j=="mouseleave"))j=
j=="mouseenter"?"mouseover":"mouseout";g.removeEventListener(j,k,false)}},_normalizeEventName:function(g){return g.slice(0,2)=="on"?g.slice(2):g},_fixCallback:function(g,j){return g!="keypress"?j:function(k){return j.call(this,d._fixEvent(k,this))}},_fixEvent:function(g){switch(g.type){case "keypress":d._setKeyChar(g);break}return g},_setKeyChar:function(g){g.keyChar=g.charCode>=32?String.fromCharCode(g.charCode):"";g.charOrCode=g.keyChar||g.keyCode},_punctMap:{106:42,111:47,186:59,187:43,188:44,
189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}};b.fixEvent=function(g,j){return d._fixEvent(g,j)};b.stopEvent=function(g){g.preventDefault();g.stopPropagation()};var a=b._listener;b._connect=function(g,j,k,m,l){l=g&&(g.nodeType||g.attachEvent||g.addEventListener)?l?2:1:0;k=[b._listener,d,a][l].add(g,j,b.hitch(k,m));return[g,j,k,l]};b._disconnect=function(g,j,k,m){[b._listener,d,a][m].remove(g,j,k)};b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:b.isSafari?91:224,
PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,
F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:b.isMac&&!b.isAIR?b.isSafari?91:224:17};var c=b.isMac?"metaKey":"ctrlKey";b.isCopyKey=function(g){return g[c]};b.mouseButtons=b.isIE<9||b.isIE&&b.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(g,j){return g.button&j},isLeft:function(g){return g.button&1},isMiddle:function(g){return g.button&4},isRight:function(g){return g.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(g,j){return g.button==j},isLeft:function(g){return g.button==
0},isMiddle:function(g){return g.button==1},isRight:function(g){return g.button==2}};if(b.isIE){var e=function(g,j){try{return g.keyCode=j}catch(k){return 0}},f=b._listener,h=b._ieListenersName="_"+b._scopeName+"_listeners";if(!b.config._allow_leaks){a=f=b._ie_listener={handlers:[],add:function(g,j,k){g=g||b.global;var m=g[j];if(!m||!m[h]){var l=b._getIeDispatcher();l.target=m&&i.push(m)-1;l[h]=[];m=g[j]=l}return m[h].push(i.push(k)-1)},remove:function(g,j,k){j=(g=(g||b.global)[j])&&g[h];if(g&&j&&
k--){delete i[j[k]];delete j[k]}}};var i=f.handlers}b.mixin(d,{add:function(g,j,k){if(g){j=d._normalizeEventName(j);if(j=="onkeypress"){var m=g.onkeydown;if(!m||!m[h]||!m._stealthKeydownHandle){var l=d.add(g,"onkeydown",d._stealthKeyDown);m=g.onkeydown;m._stealthKeydownHandle=l;m._stealthKeydownRefs=1}else m._stealthKeydownRefs++}return f.add(g,j,d._fixCallback(k))}},remove:function(g,j,k){j=d._normalizeEventName(j);f.remove(g,j,k);if(j=="onkeypress"){j=g.onkeydown;if(--j._stealthKeydownRefs<=0){f.remove(g,
"onkeydown",j._stealthKeydownHandle);delete j._stealthKeydownHandle}}},_normalizeEventName:function(g){return g.slice(0,2)!="on"?"on"+g:g},_nop:function(){},_fixEvent:function(g,j){if(!g)g=(j&&(j.ownerDocument||j.document||j).parentWindow||window).event;if(!g)return g;g.target=g.srcElement;g.currentTarget=j||g.srcElement;g.layerX=g.offsetX;g.layerY=g.offsetY;j=(j=g.srcElement)&&j.ownerDocument||document;j=b.isIE<6||j.compatMode=="BackCompat"?j.body:j.documentElement;var k=b._getIeDocumentElementOffset();
g.pageX=g.clientX+b._fixIeBiDiScrollLeft(j.scrollLeft||0)-k.x;g.pageY=g.clientY+(j.scrollTop||0)-k.y;if(g.type=="mouseover")g.relatedTarget=g.fromElement;if(g.type=="mouseout")g.relatedTarget=g.toElement;if(b.isIE<9||b.isQuirks){g.stopPropagation=d._stopPropagation;g.preventDefault=d._preventDefault}return d._fixKeys(g)},_fixKeys:function(g){switch(g.type){case "keypress":var j="charCode"in g?g.charCode:g.keyCode;if(j==10){j=0;g.keyCode=13}else if(j==13||j==27)j=0;else if(j==3)j=99;g.charCode=j;d._setKeyChar(g);
break}return g},_stealthKeyDown:function(g){var j=g.currentTarget.onkeypress;if(j&&j[h]){var k=g.keyCode,m=(k!=13||b.isIE>=9&&!b.isQuirks)&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(m||g.ctrlKey){m=m?0:k;if(g.ctrlKey)if(k==3||k==13)return;else if(m>95&&m<106)m-=48;else if(!g.shiftKey&&m>=65&&m<=90)m+=32;else m=d._punctMap[m]||m;k=d._synthesizeEvent(g,{type:"keypress",faux:true,charCode:m});j.call(g.currentTarget,k);if(b.isIE<9||b.isIE&&b.isQuirks)g.cancelBubble=
k.cancelBubble;g.returnValue=k.returnValue;e(g,k.keyCode)}}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&e(this,0);this.returnValue=false}});b.stopEvent=b.isIE<9||b.isQuirks?function(g){g=g||window.event;d._stopPropagation.call(g);d._preventDefault.call(g)}:b.stopEvent}d._synthesizeEvent=function(g,j){j=b.mixin({},g,j);d._setKeyChar(j);j.preventDefault=function(){g.preventDefault()};j.stopPropagation=function(){g.stopPropagation()};
return j};b.isOpera&&b.mixin(d,{_fixEvent:function(g){switch(g.type){case "keypress":var j=g.which;if(j==3)j=99;j=j<41&&!g.shiftKey?0:j;if(g.ctrlKey&&!g.shiftKey&&j>=65&&j<=90)j+=32;return d._synthesizeEvent(g,{charCode:j})}return g}});if(b.isWebKit){d._add=d.add;d._remove=d.remove;b.mixin(d,{add:function(g,j,k){if(g){var m=d._add(g,j,k);if(d._normalizeEventName(j)=="keypress")m._stealthKeyDownHandle=d._add(g,"keydown",function(l){var n=l.keyCode,o=n!=13&&n!=32&&(n<48||n>90)&&(n<96||n>111)&&(n<186||
n>192)&&(n<219||n>222);if(o||l.ctrlKey){o=o?0:n;if(l.ctrlKey)if(n==3||n==13)return;else if(o>95&&o<106)o-=48;else if(!l.shiftKey&&o>=65&&o<=90)o+=32;else o=d._punctMap[o]||o;n=d._synthesizeEvent(l,{type:"keypress",faux:true,charCode:o});k.call(l.currentTarget,n)}});return m}},remove:function(g,j,k){if(g){k._stealthKeyDownHandle&&d._remove(g,"keydown",k._stealthKeyDownHandle);d._remove(g,j,k)}},_fixEvent:function(g){switch(g.type){case "keypress":if(g.faux)return g;var j=g.charCode;j=j>=32?j:0;return d._synthesizeEvent(g,
{charCode:j,faux:true})}return g}})}})();if(b.isIE){b._ieDispatcher=function(d,a){var c=Array.prototype,e=b._ie_listener.handlers,f=d.callee,h=f[b._ieListenersName];f=(f=e[f.target])&&f.apply(a,d);h=[].concat(h);for(var i in h){var g=e[h[i]];!(i in c)&&g&&g.apply(a,d)}return f};b._getIeDispatcher=function(){return new Function(b._scopeName+"._ieDispatcher(arguments, this)")};b._event_listener._fixCallback=function(d){var a=b._event_listener._fixEvent;return function(c){return d.call(this,a(c,this))}}}return b.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(b){try{document.execCommand("BackgroundImageCache",false,true)}catch(d){}b.byId=b.isIE?function(a,c){if(typeof a!="string")return a;var e=c||b.doc;if((c=e.getElementById(a))&&(c.attributes.id.value==a||c.id==a))return c;else{var f=e.all[a];if(!f||f.nodeName)f=[f];for(var h=0;c=f[h++];)if(c.attributes&&c.attributes.id&&c.attributes.id.value==a||c.id==a)return c}}:function(a,c){return(typeof a=="string"?(c||b.doc).getElementById(a):
a)||null};(function(){var a=b.byId,c=null,e;b.addOnWindowUnload(function(){c=null});b._destroyElement=b.destroy=function(s){s=a(s);try{var w=s.ownerDocument;if(!c||e!=w){c=w.createElement("div");e=w}c.appendChild(s.parentNode?s.parentNode.removeChild(s):s);c.innerHTML=""}catch(A){}};b.isDescendant=function(s,w){try{s=a(s);for(w=a(w);s;){if(s==w)return true;s=s.parentNode}}catch(A){}return false};b.setSelectable=function(s,w){s=a(s);if(b.isMozilla)s.style.MozUserSelect=w?"":"none";else if(b.isKhtml||
b.isWebKit)s.style.KhtmlUserSelect=w?"auto":"none";else if(b.isIE){w=s.unselectable=w?"":"on";b.query("*",s).forEach("item.unselectable = '"+w+"'")}};var f=function(s,w){var A=w.parentNode;A&&A.insertBefore(s,w)},h=function(s,w){var A=w.parentNode;if(A)A.lastChild==w?A.appendChild(s):A.insertBefore(s,w.nextSibling)};b.place=function(s,w,A){w=a(w);if(typeof s=="string")s=/^\s*</.test(s)?b._toDom(s,w.ownerDocument):a(s);if(typeof A=="number"){var J=w.childNodes;!J.length||J.length<=A?w.appendChild(s):
f(s,J[A<0?0:A])}else switch(A){case "before":f(s,w);break;case "after":h(s,w);break;case "replace":w.parentNode.replaceChild(s,w);break;case "only":b.empty(w);w.appendChild(s);break;case "first":if(w.firstChild){f(s,w.firstChild);break}default:w.appendChild(s)}return s};b.boxModel="content-box";if(b.isIE)b.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var i;i=b.isWebKit?function(s){var w;if(s.nodeType==1){var A=s.ownerDocument.defaultView;w=A.getComputedStyle(s,null);if(!w&&
s.style){s.style.display="";w=A.getComputedStyle(s,null)}}return w||{}}:b.isIE?function(s){return s.nodeType==1?s.currentStyle:{}}:function(s){return s.nodeType==1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}};b.getComputedStyle=i;b._toPixelValue=b.isIE?function(s,w){if(!w)return 0;if(w=="medium")return 4;if(w.slice&&w.slice(-2)=="px")return parseFloat(w);with(s){s=style.left;var A=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=w;w=style.pixelLeft}catch(J){w=0}style.left=
s;runtimeStyle.left=A}return w}:function(s,w){return parseFloat(w)||0};var g=b._toPixelValue,j=function(s,w){try{return s.filters.item("DXImageTransform.Microsoft.Alpha")}catch(A){return w?{}:null}};b._getOpacity=b.isIE<9?function(s){try{return j(s).Opacity/100}catch(w){return 1}}:function(s){return i(s).opacity};b._setOpacity=b.isIE<9?function(s,w){var A=w*100,J=w==1;s.style.zoom=J?"":1;if(j(s))j(s,1).Opacity=A;else{if(J)return w;s.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+
A+")"}j(s,1).Enabled=!J;s.nodeName.toLowerCase()=="tr"&&b.query("> td",s).forEach(function(N){b._setOpacity(N,w)});return w}:function(s,w){return s.style.opacity=w};var k={left:true,top:true},m=/margin|padding|width|height|max|min|offset/,l=function(s,w,A){w=w.toLowerCase();if(b.isIE){if(A=="auto"){if(w=="height")return s.offsetHeight;if(w=="width")return s.offsetWidth}if(w=="fontweight")switch(A){case 700:return"bold";case 400:default:return"normal"}}w in k||(k[w]=m.test(w));return k[w]?g(s,A):A},
n=b.isIE?"styleFloat":"cssFloat",o={cssFloat:n,styleFloat:n,"float":n};b.style=function(s,w,A){var J=a(s),N=arguments.length,R=w=="opacity";w=o[w]||w;if(N==3)return R?b._setOpacity(J,A):(J.style[w]=A);if(N==2&&R)return b._getOpacity(J);R=i(J);if(N==2&&typeof w!="string"){for(var X in w)b.style(s,X,w[X]);return R}return N==1?R:l(J,w,R[w]||J.style[w])};b._getPadExtents=function(s,w){w=w||i(s);var A=g(s,w.paddingLeft),J=g(s,w.paddingTop);return{l:A,t:J,w:A+g(s,w.paddingRight),h:J+g(s,w.paddingBottom)}};
b._getBorderExtents=function(s,w){w=w||i(s);var A=w.borderLeftStyle!="none"?g(s,w.borderLeftWidth):0,J=w.borderTopStyle!="none"?g(s,w.borderTopWidth):0;return{l:A,t:J,w:A+(w.borderRightStyle!="none"?g(s,w.borderRightWidth):0),h:J+(w.borderBottomStyle!="none"?g(s,w.borderBottomWidth):0)}};b._getPadBorderExtents=function(s,w){var A=w||i(s);w=b._getPadExtents(s,A);s=b._getBorderExtents(s,A);return{l:w.l+s.l,t:w.t+s.t,w:w.w+s.w,h:w.h+s.h}};b._getMarginExtents=function(s,w){w=w||i(s);var A=g(s,w.marginLeft),
J=g(s,w.marginTop),N=g(s,w.marginRight);s=g(s,w.marginBottom);if(b.isWebKit&&w.position!="absolute")N=A;return{l:A,t:J,w:A+N,h:J+s}};b._getMarginBox=function(s,w){var A=w||i(s);w=b._getMarginExtents(s,A);var J=s.offsetLeft-w.l,N=s.offsetTop-w.t,R=s.parentNode;if(b.isMoz){var X=parseFloat(A.left);A=parseFloat(A.top);if(!isNaN(X)&&!isNaN(A)){J=X;N=A}else if(R&&R.style){X=i(R);if(X.overflow!="visible"){R=b._getBorderExtents(R,X);J+=R.l;N+=R.t}}}else if(b.isOpera||b.isIE>7&&!b.isQuirks)if(R){R=b._getBorderExtents(R);
J-=R.l;N-=R.t}return{l:J,t:N,w:s.offsetWidth+w.w,h:s.offsetHeight+w.h}};b._getMarginSize=function(s,w){s=a(s);w=b._getMarginExtents(s,w||i(s));s=s.getBoundingClientRect();return{w:s.right-s.left+w.w,h:s.bottom-s.top+w.h}};b._getContentBox=function(s,w){var A=w||i(s);w=b._getPadExtents(s,A);A=b._getBorderExtents(s,A);var J=s.clientWidth;if(J){s=s.clientHeight;A.w=A.h=0}else{J=s.offsetWidth;s=s.offsetHeight}if(b.isOpera){w.l+=A.l;w.t+=A.t}return{l:w.l,t:w.t,w:J-w.w-A.w,h:s-w.h-A.h}};b._getBorderBox=
function(s,w){var A=w||i(s);w=b._getPadExtents(s,A);s=b._getContentBox(s,A);return{l:s.l-w.l,t:s.t-w.t,w:s.w+w.w,h:s.h+w.h}};b._setBox=function(s,w,A,J,N,R){R=R||"px";s=s.style;if(!isNaN(w))s.left=w+R;if(!isNaN(A))s.top=A+R;if(J>=0)s.width=J+R;if(N>=0)s.height=N+R};b._isButtonTag=function(s){return s.tagName=="BUTTON"||s.tagName=="INPUT"&&(s.getAttribute("type")||"").toUpperCase()=="BUTTON"};b._usesBorderBox=function(s){var w=s.tagName;return b.boxModel=="border-box"||w=="TABLE"||b._isButtonTag(s)};
b._setContentSize=function(s,w,A,J){if(b._usesBorderBox(s)){J=b._getPadBorderExtents(s,J);if(w>=0)w+=J.w;if(A>=0)A+=J.h}b._setBox(s,NaN,NaN,w,A)};b._setMarginBox=function(s,w,A,J,N,R){var X=R||i(s);R=b._usesBorderBox(s)?p:b._getPadBorderExtents(s,X);if(b.isWebKit)if(b._isButtonTag(s)){var ea=s.style;if(J>=0&&!ea.width)ea.width="4px";if(N>=0&&!ea.height)ea.height="4px"}X=b._getMarginExtents(s,X);if(J>=0)J=Math.max(J-R.w-X.w,0);if(N>=0)N=Math.max(N-R.h-X.h,0);b._setBox(s,w,A,J,N)};var p={l:0,t:0,w:0,
h:0};b.marginBox=function(s,w){s=a(s);var A=i(s);return!w?b._getMarginBox(s,A):b._setMarginBox(s,w.l,w.t,w.w,w.h,A)};b.contentBox=function(s,w){s=a(s);var A=i(s);return!w?b._getContentBox(s,A):b._setContentSize(s,w.w,w.h,A)};b._docScroll=function(){var s=b.global;return"pageXOffset"in s?{x:s.pageXOffset,y:s.pageYOffset}:(s=b.isQuirks?b.doc.body:b.doc.documentElement,{x:b._fixIeBiDiScrollLeft(s.scrollLeft||0),y:s.scrollTop||0})};b._isBodyLtr=function(){return"_bodyLtr"in b?b._bodyLtr:(b._bodyLtr=(b.body().dir||
b.doc.documentElement.dir||"ltr").toLowerCase()=="ltr")};b._getIeDocumentElementOffset=function(){var s=b.doc.documentElement;if(b.isIE<8){var w=s.getBoundingClientRect(),A=w.left;w=w.top;if(b.isIE<7){A+=s.clientLeft;w+=s.clientTop}return{x:A<0?0:A,y:w<0?0:w}}else return{x:0,y:0}};b._fixIeBiDiScrollLeft=function(s){var w=b.isIE;if(w&&!b._isBodyLtr()){var A=b.isQuirks,J=A?b.doc.body:b.doc.documentElement;if(w==6&&!A&&b.global.frameElement&&J.scrollHeight>J.clientHeight)s+=J.clientLeft;return w<8||
A?s+J.clientWidth-J.scrollWidth:-s}return s};b._abs=b.position=function(s,w){s=a(s);var A=b.body(),J=A.parentNode;s=s.getBoundingClientRect();s={x:s.left,y:s.top,w:s.right-s.left,h:s.bottom-s.top};if(b.isIE){J=b._getIeDocumentElementOffset();s.x-=J.x+(b.isQuirks?A.clientLeft+A.offsetLeft:0);s.y-=J.y+(b.isQuirks?A.clientTop+A.offsetTop:0)}else if(b.isFF==3){A=i(J);s.x-=g(J,A.marginLeft)+g(J,A.borderLeftWidth);s.y-=g(J,A.marginTop)+g(J,A.borderTopWidth)}if(w){w=b._docScroll();s.x+=w.x;s.y+=w.y}return s};
b.coords=function(s,w){s=a(s);var A=i(s);A=b._getMarginBox(s,A);w=b.position(s,w);A.x=w.x;A.y=w.y;return A};var t={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},q={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},r={innerHTML:1,className:1,htmlFor:b.isIE,value:1},v=function(s){return q[s.toLowerCase()]||s},u=function(s,w){return(s=s.getAttributeNode&&s.getAttributeNode(w))&&
s.specified};b.hasAttr=function(s,w){var A=w.toLowerCase();return r[t[A]||w]||u(a(s),q[A]||w)};var x={},C=0,D=b._scopeName+"attrid",z={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};b.attr=function(s,w,A){s=a(s);var J=arguments.length;if(J==2&&typeof w!="string"){for(var N in w)b.attr(s,N,w[N]);return s}var R=w.toLowerCase();N=t[R]||w;var X=r[N];R=q[R]||w;if(J==3){if(N=="style"&&typeof A!="string")b.style(s,A);else if(N=="innerHTML")if(b.isIE&&s.tagName.toLowerCase()in z){b.empty(s);
s.appendChild(b._toDom(A,s.ownerDocument))}else s[N]=A;else if(b.isFunction(A)){J=b.attr(s,D);if(!J){J=C++;b.attr(s,D,J)}x[J]||(x[J]={});if(X=x[J][N])b.disconnect(X);else try{delete s[N]}catch(ea){}x[J][N]=b.connect(s,N,A)}else if(X||typeof A=="boolean")s[N]=A;else s.setAttribute(R,A);return s}A=s[N];if(X&&typeof A!="undefined")return A;if(N!="href"&&(typeof A=="boolean"||b.isFunction(A)))return A;return u(s,R)?s.getAttribute(R):null};b.removeAttr=function(s,w){a(s).removeAttribute(v(w))};b.getNodeProp=
function(s,w){s=a(s);var A=w.toLowerCase(),J=t[A]||w;if(J in s&&J!="href")return s[J];w=q[A]||w;return u(s,w)?s.getAttribute(w):null};b.create=function(s,w,A,J){var N=b.doc;if(A){A=a(A);N=A.ownerDocument}if(typeof s=="string")s=N.createElement(s);w&&b.attr(s,w);A&&b.place(s,A,J);return s};b.empty=b.isIE?function(s){s=a(s);for(var w;w=s.lastChild;)b.destroy(w)}:function(s){a(s).innerHTML=""};var E={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"]},F=/<\s*([\w\:]+)/,K={},G=0,M="__"+b._scopeName+"ToDomId";for(var L in E)if(E.hasOwnProperty(L)){var P=E[L];P.pre=L=="option"?'<select multiple="multiple">':"<"+P.join("><")+">";P.post="</"+P.reverse().join("></")+">"}b._toDom=function(s,w){w=w||b.doc;var A=w[M];if(!A){w[M]=A=++G+"";K[A]=w.createElement("div")}s+="";var J=s.match(F),N=J?J[1].toLowerCase():"";A=K[A];if(J&&E[N]){J=
E[N];A.innerHTML=J.pre+s+J.post;for(s=J.length;s;--s)A=A.firstChild}else A.innerHTML=s;if(A.childNodes.length==1)return A.removeChild(A.firstChild);for(s=w.createDocumentFragment();w=A.firstChild;)s.appendChild(w);return s};var Q="className";b.hasClass=function(s,w){return(" "+a(s)[Q]+" ").indexOf(" "+w+" ")>=0};var $=/\s+/,da=[""],ga={},ka=function(s){if(typeof s=="string"||s instanceof String)if(s.indexOf(" ")<0){da[0]=s;return da}else return s.split($);return s||""};b.addClass=function(s,w){s=
a(s);w=ka(w);var A=s[Q],J;A=A?" "+A+" ":" ";J=A.length;for(var N=0,R=w.length,X;N<R;++N)if((X=w[N])&&A.indexOf(" "+X+" ")<0)A+=X+" ";if(J<A.length)s[Q]=A.substr(1,A.length-2)};b.removeClass=function(s,w){s=a(s);var A;if(w!==undefined){w=ka(w);A=" "+s[Q]+" ";for(var J=0,N=w.length;J<N;++J)A=A.replace(" "+w[J]+" "," ");A=b.trim(A)}else A="";if(s[Q]!=A)s[Q]=A};b.replaceClass=function(s,w,A){s=a(s);ga.className=s.className;b.removeClass(ga,A);b.addClass(ga,w);if(s.className!==ga.className)s.className=
ga.className};b.toggleClass=function(s,w,A){if(A===undefined)A=!b.hasClass(s,w);b[A?"addClass":"removeClass"](s,w)}})();return b});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(b){(function(){var d=Array.prototype,a=d.slice,c=d.concat,e=function(n,o,p){n.sort||(n=a.call(n,0));p=p||this._NodeListCtor||b._NodeListCtor;n.constructor=p;b._mixin(n,p.prototype);n._NodeListCtor=p;return o?n._stash(o):n},f=function(n,o,p){o=[0].concat(a.call(o,0));p=p||b.global;return function(t){o[0]=t;return n.apply(p,o)}},h=function(n,o){return function(){this.forEach(f(n,
arguments,o));return this}},i=function(n,o){return function(){return this.map(f(n,arguments,o))}},g=function(n,o,p){return function(){var t=arguments,q=f(n,t,p);if(o.call(p||b.global,t))return this.map(q);this.forEach(q);return this}},j=function(n){return n.length==1&&typeof n[0]=="string"},k=function(n){var o=n.parentNode;o&&o.removeChild(n)};b.NodeList=function(){return e(Array.apply(null,arguments))};var m=b._NodeListCtor=b.NodeList,l=m.prototype;m._wrap=l._wrap=e;m._adaptAsMap=i;m._adaptAsForEach=
h;m._adaptAsFilter=function(n,o){return function(){return this.filter(f(n,arguments,o))}};m._adaptWithCondition=g;b.forEach(["slice","splice"],function(n){var o=d[n];l[n]=function(){return this._wrap(o.apply(this,arguments),n=="slice"?this:null)}});b.forEach(["indexOf","lastIndexOf","every","some"],function(n){var o=b[n];l[n]=function(){return o.apply(b,[this].concat(a.call(arguments,0)))}});b.forEach(["attr","style"],function(n){l[n]=g(b[n],j)});b.forEach(["connect","addClass","removeClass","replaceClass",
"toggleClass","empty","removeAttr"],function(n){l[n]=h(b[n])});b.extend(b.NodeList,{_normalize:function(n,o){var p=n.parse===true?true:false;if(typeof n.template=="string"){var t=n.templateFunc||b.string&&b.string.substitute;n=t?t(n.template,n):n}t=typeof n;if(t=="string"||t=="number"){n=b._toDom(n,o&&o.ownerDocument);n=n.nodeType==11?b._toArray(n.childNodes):[n]}else if(b.isArrayLike(n))b.isArray(n)||(n=b._toArray(n));else n=[n];if(p)n._runParse=true;return n},_cloneNode:function(n){return n.cloneNode(true)},
_place:function(n,o,p,t){if(!(o.nodeType!=1&&p=="only")){o=o;for(var q,r=n.length,v=r-1;v>=0;v--){var u=t?this._cloneNode(n[v]):n[v];if(n._runParse&&b.parser&&b.parser.parse){q||(q=o.ownerDocument.createElement("div"));q.appendChild(u);b.parser.parse(q);for(u=q.firstChild;q.firstChild;)q.removeChild(q.firstChild)}v==r-1?b.place(u,o,p):o.parentNode.insertBefore(u,o);o=u}}},_stash:function(n){this._parent=n;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(){var n=
b.isArray(this)?this:a.call(this,0),o=b.map(arguments,function(p){return p&&!b.isArray(p)&&(typeof NodeList!="undefined"&&p.constructor===NodeList||p.constructor===this._NodeListCtor)?a.call(p,0):p});return this._wrap(c.apply(n,o),this)},map:function(n,o){return this._wrap(b.map(this,n,o),this)},forEach:function(n,o){b.forEach(this,n,o);return this},coords:i(b.coords),position:i(b.position),place:function(n,o){var p=b.query(n)[0];return this.forEach(function(t){b.place(t,p,o)})},orphan:function(n){return(n?
b._filterQueryResult(this,n):this).forEach(k)},adopt:function(n,o){return b.query(n).place(this[0],o)._stash(this)},query:function(n){if(!n)return this;var o=this.map(function(p){return b.query(n,p).filter(function(t){return t!==undefined})});return this._wrap(c.apply([],o),this)},filter:function(n){var o=arguments,p=this,t=0;if(typeof n=="string"){p=b._filterQueryResult(this,o[0]);if(o.length==1)return p._stash(this);t=1}return this._wrap(b.filter(p,o[t],o[t+1]),this)},addContent:function(n,o){n=
this._normalize(n,this[0]);for(var p=0,t;t=this[p];p++)this._place(n,t,o,p>0);return this},instantiate:function(n,o){var p=b.isFunction(n)?n:b.getObject(n);o=o||{};return this.forEach(function(t){new p(o,t)})},at:function(){var n=new this._NodeListCtor;b.forEach(arguments,function(o){if(o<0)o=this.length+o;this[o]&&n.push(this[o])},this);return n._stash(this)}});m.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove",
"mouseout","mouseover","mouseup","submit"];b.forEach(m.events,function(n){var o="on"+n;l[o]=function(p,t){return this.connect(o,p,t)}})})();return b.NodeList});
(function(){var b=function(a){var c=a.trim,e=a.forEach,f=a._NodeListCtor=a.NodeList,h=function(){return a.doc},i=(a.isWebKit||a.isMozilla)&&h().compatMode=="BackCompat",g=h().firstChild.children?"children":"childNodes",j=false,k=function(){return true},m=function(y){y+=">~+".indexOf(y.slice(-1))>=0?" * ":" ";for(var B=function(ma,na){return c(y.slice(ma,na))},H=[],I=-1,O=-1,T=-1,U=-1,S=-1,V=-1,Z=-1,ba="",aa="",ha,Y=0,oa=y.length,W=null,ca=null,pa=function(){if(Z>=0){var ma=Z==Y?null:B(Z,Y);W[">~+".indexOf(ma)<
0?"tag":"oper"]=ma;Z=-1}},qa=function(){if(V>=0){W.id=B(V,Y).replace(/\\/g,"");V=-1}},ra=function(){if(S>=0){W.classes.push(B(S+1,Y).replace(/\\/g,""));S=-1}},la=function(){qa();pa();ra()},sa=function(){la();U>=0&&W.pseudos.push({name:B(U+1,Y)});W.loops=W.pseudos.length||W.attrs.length||W.classes.length;W.oquery=W.query=B(ha,Y);W.otag=W.tag=W.oper?null:W.tag||"*";if(W.tag)W.tag=W.tag.toUpperCase();if(H.length&&H[H.length-1].oper){W.infixOper=H.pop();W.query=W.infixOper.query+" "+W.query}H.push(W);
W=null};ba=aa,aa=y.charAt(Y),Y<oa;Y++)if(ba!="\\"){if(!W){ha=Y;W={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return j?this.otag:this.tag}};Z=Y}if(I>=0)if(aa=="]"){if(ca.attr)ca.matchFor=B(T||I+1,Y);else ca.attr=B(I+1,Y);if(I=ca.matchFor)if(I.charAt(0)=='"'||I.charAt(0)=="'")ca.matchFor=I.slice(1,-1);W.attrs.push(ca);ca=null;I=T=-1}else{if(aa=="="){T="|~^$*".indexOf(ba)>=0?ba:"";ca.type=T+aa;ca.attr=B(I+1,Y-T.length);T=Y+1}}else if(O>=0){if(aa==")"){if(U>=
0)ca.value=B(O+1,Y);U=O=-1}}else if(aa=="#"){la();V=Y+1}else if(aa=="."){la();S=Y}else if(aa==":"){la();U=Y}else if(aa=="["){la();I=Y;ca={}}else if(aa=="("){if(U>=0){ca={name:B(U+1,Y),value:null};W.pseudos.push(ca)}O=Y}else aa==" "&&ba!=aa&&sa()}return H},l=function(y,B){if(!y)return B;if(!B)return y;return function(){return y.apply(window,arguments)&&B.apply(window,arguments)}},n=function(y,B){B=B||[];y&&B.push(y);return B},o=function(y){return 1==y.nodeType},p=function(y,B){if(!y)return"";if(B==
"class")return y.className||"";if(B=="for")return y.htmlFor||"";if(B=="style")return y.style.cssText||"";return(j?y.getAttribute(B):y.getAttribute(B,2))||""},t={"*=":function(y,B){return function(H){return p(H,y).indexOf(B)>=0}},"^=":function(y,B){return function(H){return p(H,y).indexOf(B)==0}},"$=":function(y,B){return function(H){H=" "+p(H,y);return H.lastIndexOf(B)==H.length-B.length}},"~=":function(y,B){var H=" "+B+" ";return function(I){return(" "+p(I,y)+" ").indexOf(H)>=0}},"|=":function(y,
B){var H=" "+B+"-";return function(I){I=" "+p(I,y);return I==B||I.indexOf(H)==0}},"=":function(y,B){return function(H){return p(H,y)==B}}},q=typeof h().firstChild.nextElementSibling=="undefined",r=!q?"nextElementSibling":"nextSibling",v=!q?"previousElementSibling":"previousSibling",u=q?o:k,x=function(y){for(;y=y[v];)if(u(y))return false;return true},C=function(y){for(;y=y[r];)if(u(y))return false;return true},D=function(y){var B=y.parentNode,H=0,I=B[g],O=y._i||-1,T=B._l||-1;if(!I)return-1;I=I.length;
if(T==I&&O>=0&&T>=0)return O;B._l=I;O=-1;for(B=B.firstElementChild||B.firstChild;B;B=B[r])if(u(B)){B._i=++H;if(y===B)O=H}return O},z=function(y){return!(D(y)%2)},E=function(y){return D(y)%2},F={checked:function(){return function(y){return!!("checked"in y?y.checked:y.selected)}},"first-child":function(){return x},"last-child":function(){return C},"only-child":function(){return function(y){if(!x(y))return false;if(!C(y))return false;return true}},empty:function(){return function(y){var B=y.childNodes;
for(y=y.childNodes.length-1;y>=0;y--){var H=B[y].nodeType;if(H===1||H==3)return false}return true}},contains:function(y,B){y=B.charAt(0);if(y=='"'||y=="'")B=B.slice(1,-1);return function(H){return H.innerHTML.indexOf(B)>=0}},not:function(y,B){y=m(B)[0];B={el:1};if(y.tag!="*")B.tag=1;if(!y.classes.length)B.classes=1;var H=G(y,B);return function(I){return!H(I)}},"nth-child":function(y,B){y=parseInt;if(B=="odd")return E;else if(B=="even")return z;if(B.indexOf("n")!=-1){B=B.split("n",2);var H=B[0]?B[0]==
"-"?-1:y(B[0]):1,I=B[1]?y(B[1]):0,O=0,T=-1;if(H>0)if(I<0)I=I%H&&H+I%H;else{if(I>0){if(I>=H)O=I-I%H;I%=H}}else if(H<0){H*=-1;if(I>0){T=I;I%=H}}if(H>0)return function(S){S=D(S);return S>=O&&(T<0||S<=T)&&S%H==I};else B=I}var U=y(B);return function(S){return D(S)==U}}},K=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(y){var B=y.toLowerCase();if(B=="class")y="className";return function(H){return j?H.getAttribute(y):H[y]||H[B]}}:function(y){return function(B){return B&&B.getAttribute&&B.hasAttribute(y)}},
G=function(y,B){if(!y)return k;B=B||{};var H=null;"el"in B||(H=l(H,o));if(!("tag"in B))if(y.tag!="*")H=l(H,function(I){return I&&I.tagName==y.getTag()});"classes"in B||e(y.classes,function(I,O){var T=new RegExp("(?:^|\\s)"+I+"(?:\\s|$)");H=l(H,function(U){return T.test(U.className)});H.count=O});"pseudos"in B||e(y.pseudos,function(I){var O=I.name;if(F[O])H=l(H,F[O](O,I.value))});"attrs"in B||e(y.attrs,function(I){var O,T=I.attr;if(I.type&&t[I.type])O=t[I.type](T,I.matchFor);else if(T.length)O=K(T);
if(O)H=l(H,O)});if(!("id"in B))if(y.id)H=l(H,function(I){return!!I&&I.id==y.id});H||"default"in B||(H=k);return H},M=function(y){return function(B,H,I){for(;B=B[r];)if(!(q&&!o(B))){if((!I||ia(B,I))&&y(B))H.push(B);break}return H}},L=function(y){return function(B,H,I){for(B=B[r];B;){if(u(B)){if(I&&!ia(B,I))break;y(B)&&H.push(B)}B=B[r]}return H}},P=function(y){y=y||k;return function(B,H,I){for(var O=0,T=B[g];B=T[O++];)if(u(B)&&(!I||ia(B,I))&&y(B,O))H.push(B);return H}},Q=function(y,B){for(y=y.parentNode;y;){if(y==
B)break;y=y.parentNode}return!!y},$={},da=function(y){var B=$[y.query];if(B)return B;var H=y.infixOper;H=H?H.oper:"";var I=G(y,{el:1}),O="*"==y.tag,T=h().getElementsByClassName;if(H){T={el:1};if(O)T.tag=1;I=G(y,T);if("+"==H)B=M(I);else if("~"==H)B=L(I);else if(">"==H)B=P(I)}else if(y.id){I=!y.loops&&O?k:G(y,{el:1,id:1});B=function(S,V){var Z=a.byId(y.id,S.ownerDocument||S);if(Z&&I(Z))if(9==S.nodeType)return n(Z,V);else if(Q(Z,S))return n(Z,V)}}else if(T&&/\{\s*\[native code\]\s*\}/.test(String(T))&&
y.classes.length&&!i){I=G(y,{el:1,classes:1,id:1});var U=y.classes.join(" ");B=function(S,V,Z){V=n(0,V);for(var ba,aa=0,ha=S.getElementsByClassName(U);ba=ha[aa++];)I(ba,S)&&ia(ba,Z)&&V.push(ba);return V}}else if(!O&&!y.loops)B=function(S,V,Z){V=n(0,V);for(var ba=0,aa=S.getElementsByTagName(y.getTag());S=aa[ba++];)ia(S,Z)&&V.push(S);return V};else{I=G(y,{el:1,tag:1,id:1});B=function(S,V,Z){V=n(0,V);for(var ba,aa=0,ha=S.getElementsByTagName(y.getTag());ba=ha[aa++];)I(ba,S)&&ia(ba,Z)&&V.push(ba);return V}}return $[y.query]=
B},ga=function(y,B){y=n(y);for(var H,I,O=B.length,T,U,S=0;S<O;S++){U=[];H=B[S];I=y.length-1;if(I>0){T={};U.nozip=true}I=da(H);for(var V=0;H=y[V];V++)I(H,U,T);if(!U.length)break;y=U}return U},ka={},s={},w=function(y){var B=m(c(y));if(B.length==1){var H=da(B[0]);return function(I){if(I=H(I,new f))I.nozip=true;return I}}return function(I){return ga(I,B)}},A=navigator.userAgent;A=a.isWebKit&&A.indexOf("WebKit/")>0&&parseFloat(A.split("WebKit/")[1])>528;var J=a.isIE?"commentStrip":"nozip",N=!!h().querySelectorAll&&
(!a.isSafari||a.isSafari>3.1||A),R=/n\+\d|([^ ])?([>~+])([^ =])?/g,X=function(y,B,H,I){return H?(B?B+" ":"")+H+(I?" "+I:""):y},ea=function(y,B){y=y.replace(R,X);if(N){var H=s[y];if(H&&!B)return H}if(H=ka[y])return H;H=y.charAt(0);var I=-1==y.indexOf(" ");if(y.indexOf("#")>=0&&I)B=true;if(N&&!B&&">~+".indexOf(H)==-1&&(!a.isIE||y.indexOf(":")==-1)&&!(i&&y.indexOf(".")>=0)&&y.indexOf(":contains")==-1&&y.indexOf(":checked")==-1&&y.indexOf("|=")==-1){var O=">~+".indexOf(y.charAt(y.length-1))>=0?y+" *":
y;return s[y]=function(U){try{if(!(9==U.nodeType||I))throw"";var S=U.querySelectorAll(O);S[J]=true;return S}catch(V){return ea(y,true)(U)}}}else{var T=y.split(/\s*,\s*/);return ka[y]=T.length<2?w(y):function(U){for(var S=0,V=[],Z;Z=T[S++];)V=V.concat(w(Z)(U));return V}}},fa=0,ta=a.isIE?function(y){return j?y.getAttribute("_uid")||y.setAttribute("_uid",++fa)||fa:y.uniqueID}:function(y){return y._uid||(y._uid=++fa)},ia=function(y,B){if(!B)return 1;y=ta(y);if(!B[y])return B[y]=1;return 0},ja="_zipIdx",
ua=function(y){if(y&&y.nozip)return f._wrap?f._wrap(y):y;var B=new f;if(!y||!y.length)return B;y[0]&&B.push(y[0]);if(y.length<2)return B;fa++;if(a.isIE&&j){var H=fa+"";y[0].setAttribute(ja,H);for(var I=1,O;O=y[I];I++){y[I].getAttribute(ja)!=H&&B.push(O);O.setAttribute(ja,H)}}else if(a.isIE&&y.commentStrip)try{for(I=1;O=y[I];I++)o(O)&&B.push(O)}catch(T){}else{if(y[0])y[0][ja]=fa;for(I=1;O=y[I];I++){y[I][ja]!=fa&&B.push(O);O[ja]=fa}}return B};a.query=function(y,B){f=a._NodeListCtor;if(!y)return new f;
if(y.constructor==f)return y;if(typeof y!="string")return new f(y);if(typeof B=="string"){B=a.byId(B);if(!B)return new f}B=B||h();var H=B.ownerDocument||B.documentElement;j=B.contentType&&B.contentType=="application/xml"||a.isOpera&&(B.doctype||H.toString()=="[object XMLDocument]")||!!H&&(a.isIE?H.xml:B.xmlVersion||H.xmlVersion);if((y=ea(y)(B))&&y.nozip&&!f._wrap)return y;return ua(y)};a.query.pseudos=F;a._filterQueryResult=function(y,B,H){var I=new a._NodeListCtor,O=m(B);O=O.length==1&&!/[^\w#\.]/.test(B)?
G(O[0]):function(S){return dojo.query(B,H).indexOf(S)!=-1};for(var T=0,U;U=y[T];T++)O(U)&&I.push(U);return I}},d=function(){acme={trim:function(f){f=f.replace(/^\s+/,"");for(var h=f.length-1;h>=0;h--)if(/\S/.test(f.charAt(h))){f=f.substring(0,h+1);break}return f},forEach:function(f,h,i){if(f&&f.length)for(var g=0,j=f.length;g<j;++g)h.call(i||window,f[g],g,f)},byId:function(f,h){return typeof f=="string"?(h||document).getElementById(f):f},doc:document,NodeList:Array};var a=navigator,c=a.userAgent;
a=a.appVersion;var e=parseFloat(a);acme.isOpera=c.indexOf("Opera")>=0?e:undefined;acme.isKhtml=a.indexOf("Konqueror")>=0?e:undefined;acme.isWebKit=parseFloat(c.split("WebKit/")[1])||undefined;acme.isChrome=parseFloat(c.split("Chrome/")[1])||undefined;if((c=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome){acme.isSafari=parseFloat(a.split("Version/")[1]);if(!acme.isSafari||parseFloat(a.substr(c+7))<=419.3)acme.isSafari=2}if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||
undefined;Array._wrap=function(f){return f};return acme};typeof define=="function"&&define("dojo/_base/query",["dojo/lib/kernel","dojo/_base/NodeList","dojo/_base/lang","dojo/_base/window"],function(a){b(this.queryPortability||this.acme||a)});if(typeof define!="function")if(this.dojo){dojo.provide("dojo._base.query");dojo.require("dojo._base.NodeList");dojo.require("dojo._base.lang");b(this.queryPortability||this.acme||dojo)}else b(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(b){(function(){function d(q,r,v){if(v!==null){var u=q[r];if(typeof u=="string")q[r]=[u,v];else if(a.isArray(u))u.push(v);else q[r]=v}}var a=b,c=a.config;b.fieldToObject=function(q){var r=null;if(q=a.byId(q)){var v=q.name,u=(q.type||"").toLowerCase();if(v&&u&&!q.disabled)if(u=="radio"||u=="checkbox"){if(q.checked)r=q.value}else if(q.multiple){r=[];a.query("option",q).forEach(function(x){x.selected&&
r.push(x.value)})}else r=q.value}return r};b.formToObject=function(q){var r={};a.forEach(b.byId(q).elements,function(v){var u=v.name,x=(v.type||"").toLowerCase();if(u&&x&&"file|submit|image|reset|button|".indexOf(x)==-1&&!v.disabled){d(r,u,a.fieldToObject(v));if(x=="image")r[u+".x"]=r[u+".y"]=r[u].x=r[u].y=0}});return r};b.objectToQuery=function(q){var r=encodeURIComponent,v=[],u={};for(var x in q){var C=q[x];if(C!=u[x]){var D=r(x)+"=";if(a.isArray(C))for(var z=0;z<C.length;z++)v.push(D+r(C[z]));
else v.push(D+r(C))}}return v.join("&")};b.formToQuery=function(q){return a.objectToQuery(a.formToObject(q))};b.formToJson=function(q,r){return a.toJson(a.formToObject(q),r)};b.queryToObject=function(q){var r={};q=q.split("&");var v=decodeURIComponent;a.forEach(q,function(u){if(u.length){var x=u.split("=");u=v(x.shift());x=v(x.join("="));if(typeof r[u]=="string")r[u]=[r[u]];if(a.isArray(r[u]))r[u].push(x);else r[u]=x}});return r};b._blockAsync=false;var e=a._contentHandlers=b.contentHandlers={text:function(q){return q.responseText},
json:function(q){return a.fromJson(q.responseText||null)},"json-comment-filtered":function(q){b.config.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");q=q.responseText;var r=q.indexOf("/*"),v=q.lastIndexOf("*/");if(r==-1||v==-1)throw new Error("JSON was not comment filtered");
return a.fromJson(q.substring(r+2,v))},javascript:function(q){return a.eval(q.responseText)},xml:function(q){var r=q.responseXML;if(a.isIE&&(!r||!r.documentElement)){var v=function(u){return"MSXML"+u+".DOMDocument"};v=["Microsoft.XMLDOM",v(6),v(4),v(3),v(2)];a.some(v,function(u){try{var x=new ActiveXObject(u);x.async=false;x.loadXML(q.responseText);r=x}catch(C){return false}return true})}return r},"json-comment-optional":function(q){return q.responseText&&/^[^{\[]*\/\*/.test(q.responseText)?e["json-comment-filtered"](q):
e.json(q)}};b._ioSetArgs=function(q,r,v,u){var x={args:q,url:q.url},C=null;if(q.form){C=a.byId(q.form);var D=C.getAttributeNode("action");x.url=x.url||(D?D.value:null);C=a.formToObject(C)}D=[{}];C&&D.push(C);q.content&&D.push(q.content);q.preventCache&&D.push({"dojo.preventCache":(new Date).valueOf()});x.query=a.objectToQuery(a.mixin.apply(null,D));x.handleAs=q.handleAs||"text";var z=new a.Deferred(r);z.addCallbacks(v,function(G){return u(G,z)});var E=q.load;E&&a.isFunction(E)&&z.addCallback(function(G){return E.call(q,
G,x)});var F=q.error;F&&a.isFunction(F)&&z.addErrback(function(G){return F.call(q,G,x)});var K=q.handle;K&&a.isFunction(K)&&z.addBoth(function(G){return K.call(q,G,x)});if(c.ioPublish&&a.publish&&x.args.ioPublish!==false){z.addCallbacks(function(G){a.publish("/dojo/io/load",[z,G]);return G},function(G){a.publish("/dojo/io/error",[z,G]);return G});z.addBoth(function(G){a.publish("/dojo/io/done",[z,G]);return G})}z.ioArgs=x;return z};var f=function(q){q.canceled=true;var r=q.ioArgs.xhr,v=typeof r.abort;
if(v=="function"||v=="object"||v=="unknown")r.abort();q=q.ioArgs.error;if(!q){q=new Error("xhr cancelled");q.dojoType="cancel"}return q},h=function(q){q=e[q.ioArgs.handleAs](q.ioArgs.xhr);return q===undefined?null:q},i=function(q,r){r.ioArgs.args.failOk||console.error(q);return q},g=null,j=[],k=0,m=function(q){if(k<=0){k=0;if(c.ioPublish&&a.publish&&(!q||q&&q.ioArgs.args.ioPublish!==false))a.publish("/dojo/io/stop")}},l=function(){var q=(new Date).getTime();if(!a._blockAsync)for(var r=0,v;r<j.length&&
(v=j[r]);r++){var u=v.dfd,x=function(){if(!u||u.canceled||!v.validCheck(u)){j.splice(r--,1);k-=1}else if(v.ioCheck(u)){j.splice(r--,1);v.resHandle(u);k-=1}else if(u.startTime)if(u.startTime+(u.ioArgs.args.timeout||0)<q){j.splice(r--,1);var D=new Error("timeout exceeded");D.dojoType="timeout";u.errback(D);u.cancel();k-=1}};if(b.config.debugAtAllCosts)x.call(this);else try{x.call(this)}catch(C){u.errback(C)}}m(u);if(!j.length){clearInterval(g);g=null}};b._ioCancelAll=function(){try{a.forEach(j,function(r){try{r.dfd.cancel()}catch(v){}})}catch(q){}};
a.isIE&&a.addOnWindowUnload(a._ioCancelAll);a._ioNotifyStart=function(q){if(c.ioPublish&&a.publish&&q.ioArgs.args.ioPublish!==false){k||a.publish("/dojo/io/start");k+=1;a.publish("/dojo/io/send",[q])}};a._ioWatch=function(q,r,v,u){var x=q.ioArgs.args;if(x.timeout)q.startTime=(new Date).getTime();j.push({dfd:q,validCheck:r,ioCheck:v,resHandle:u});g||(g=setInterval(l,50));x.sync&&l()};var n="application/x-www-form-urlencoded",o=function(q){return q.ioArgs.xhr.readyState},p=function(q){return 4==q.ioArgs.xhr.readyState},
t=function(q){var r=q.ioArgs.xhr;if(a._isDocumentOk(r))q.callback(q);else{var v=new Error("Unable to load "+q.ioArgs.url+" status:"+r.status);v.status=r.status;v.responseText=r.responseText;q.errback(v)}};b._ioAddQueryToUrl=function(q){if(q.query.length){q.url+=(q.url.indexOf("?")==-1?"?":"&")+q.query;q.query=null}};b.xhr=function(q,r,v){var u=a._ioSetArgs(r,f,h,i),x=u.ioArgs,C=x.xhr=a._xhrObj(x.args);if(!C){u.cancel();return u}if("postData"in r)x.query=r.postData;else if("putData"in r)x.query=r.putData;
else if("rawBody"in r)x.query=r.rawBody;else if(arguments.length>2&&!v||"POST|PUT".indexOf(q.toUpperCase())==-1)a._ioAddQueryToUrl(x);C.open(q,x.url,r.sync!==true,r.user||undefined,r.password||undefined);if(r.headers)for(var D in r.headers)if(D.toLowerCase()==="content-type"&&!r.contentType)r.contentType=r.headers[D];else r.headers[D]&&C.setRequestHeader(D,r.headers[D]);C.setRequestHeader("Content-Type",r.contentType||n);if(!r.headers||!("X-Requested-With"in r.headers))C.setRequestHeader("X-Requested-With",
"XMLHttpRequest");a._ioNotifyStart(u);if(b.config.debugAtAllCosts)C.send(x.query);else try{C.send(x.query)}catch(z){x.error=z;u.cancel()}a._ioWatch(u,o,p,t);return u};b.xhrGet=function(q){return a.xhr("GET",q)};b.rawXhrPost=b.xhrPost=function(q){return a.xhr("POST",q,true)};b.rawXhrPut=b.xhrPut=function(q){return a.xhr("PUT",q,true)};b.xhrDelete=function(q){return a.xhr("DELETE",q)}})();return b.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(b){(function(){var d=b._mixin;b._Line=function(i,g){this.start=i;this.end=g};b._Line.prototype.getValue=function(i){return(this.end-this.start)*i+this.start};b.Animation=function(i){d(this,i);if(b.isArray(this.curve))this.curve=new b._Line(this.curve[0],this.curve[1])};b._Animation=b.Animation;b.extend(b.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var i=this._percent,g=this.easing;return g?g(i):i},_fire:function(i,g){g=g||[];if(this[i])if(b.config.debugAtAllCosts)this[i].apply(this,g);else try{this[i].apply(this,g)}catch(j){console.error("exception in animation handler for:",i);console.error(j)}return this},play:function(i,g){var j=this;j._delayTimer&&j._clearTimer();if(g){j._stopTimer();j._active=j._paused=false;j._percent=0}else if(j._active&&!j._paused)return j;j._fire("beforeBegin",[j.node]);i=i||j.delay;var k=b.hitch(j,
"_play",g);if(i>0){j._delayTimer=setTimeout(k,i);return j}k();return j},_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 g=i.curve.getValue(i._getStep());if(!i._percent){if(!i._startRepeatCount)i._startRepeatCount=i.repeat;i._fire("onBegin",[g])}i._fire("onPlay",[g]);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,g){var j=this;j._stopTimer();j._active=j._paused=true;j._percent=i;g&&j.play();return j},stop:function(i){var g=this;g._delayTimer&&g._clearTimer();if(!g._timer)return g;g._stopTimer();if(i)g._percent=1;g._fire("onStop",[g.curve.getValue(g._getStep())]);g._active=g._paused=false;return g},status:function(){if(this._active)return this._paused?"paused":"playing";return"stopped"},_cycle:function(){var i=
this;if(i._active){var g=((new Date).valueOf()-i._startTime)/i.duration;if(g>=1)g=1;i._percent=g;if(i.easing)g=i.easing(g);i._fire("onAnimate",[i.curve.getValue(g)]);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,c=null,e={run:function(){}};b.extend(b.Animation,{_startTimer:function(){if(!this._timer){this._timer=b.connect(e,"run",this,"_cycle");a++}c||(c=setInterval(b.hitch(e,"run"),this.rate))},_stopTimer:function(){if(this._timer){b.disconnect(this._timer);this._timer=null;a--}if(a<=0){clearInterval(c);c=null;a=0}}});var f=b.isIE?function(i){var g=i.style;if(!g.width.length&&b.style(i,"width")=="auto")g.width="auto"}:function(){};b._fade=function(i){i.node=b.byId(i.node);
var g=d({properties:{}},i);i=g.properties.opacity={};i.start=!("start"in g)?function(){return+b.style(g.node,"opacity")||0}:g.start;i.end=g.end;i=b.animateProperty(g);b.connect(i,"beforeBegin",b.partial(f,g.node));return i};b.fadeIn=function(i){return b._fade(d({end:1},i))};b.fadeOut=function(i){return b._fade(d({end:0},i))};b._defaultEasing=function(i){return 0.5+Math.sin((i+1.5)*Math.PI)/2};var h=function(i){this._properties=i;for(var g in i){var j=i[g];if(j.start instanceof b.Color)j.tempColor=
new b.Color}};h.prototype.getValue=function(i){var g={};for(var j in this._properties){var k=this._properties[j],m=k.start;if(m instanceof b.Color)g[j]=b.blendColors(m,k.end,i,k.tempColor).toCss();else b.isArray(m)||(g[j]=(k.end-m)*i+m+(j!="opacity"?k.units||"px":0))}return g};b.animateProperty=function(i){var g=i.node=b.byId(i.node);if(!i.easing)i.easing=b._defaultEasing;i=new b.Animation(i);b.connect(i,"beforeBegin",i,function(){var j={};for(var k in this.properties){if(k=="width"||k=="height")this.node.display=
"block";var m=this.properties[k];if(b.isFunction(m))m=m(g);m=j[k]=d({},b.isObject(m)?m:{end:m});if(b.isFunction(m.start))m.start=m.start(g);if(b.isFunction(m.end))m.end=m.end(g);var l=k.toLowerCase().indexOf("color")>=0,n=function(o,p){var t={height:o.offsetHeight,width:o.offsetWidth}[p];if(t!==undefined)return t;t=b.style(o,p);return p=="opacity"?+t:l?t:parseFloat(t)};if("end"in m){if(!("start"in m))m.start=n(g,k)}else m.end=n(g,k);if(l){m.start=new b.Color(m.start);m.end=new b.Color(m.end)}else m.start=
k=="opacity"?+m.start:parseFloat(m.start)}this.curve=new h(j)});b.connect(i,"onAnimate",b.hitch(b,"style",i.node));return i};b.anim=function(i,g,j,k,m,l){return b.animateProperty({node:i,duration:j||b.Animation.prototype.duration,properties:g,easing:k,onEnd:m}).play(l||0)}})();return b.animateProperty});
define("dojo",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/Deferred","dojo/_base/json","dojo/_base/Color","dojo/_base/window","dojo/_base/event","dojo/_base/html","dojo/_base/NodeList","dojo/_base/query","dojo/_base/xhr","dojo/_base/fx"],function(b){return b});
define("orion/serviceregistry",["dojo"],function(b){function d(h,i,g){this.serviceId=h;this.name=i;this.properties=g}function a(h,i,g){this.serviceId=h;this.serviceReference=i;this.internalRegistry=g}function c(h,i,g){this.serviceId=h;this.implementation=i;this.internalRegistry=g;var j;for(j in i)if(typeof i[j]==="function")this[j]=function(k){return function(){if(g.isRegistered(h)){var m=new b.Deferred;try{var l=i[k].apply(i,Array.prototype.slice.call(arguments));b.when(l,b.hitch(m,m.resolve),b.hitch(m,
m.reject))}catch(n){m.reject(n)}return m.promise}throw new Error("Service was unregistered");}}(j)}function e(){this._namedlisteners={}}function f(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new e;var h=this;this.internalRegistry={isRegistered:function(i){return h._entries[i]?true:false},unregisterService:function(i){var g=h._entries[i];if(g){for(var j=g.reference,k=h._namedReferences[j.getName()],m=0;m<k.length;m++)if(k[m]===j){if(k.length===1)delete h._namedReferences[j.getName()];
else k.splice(m,1);break}h._entries[i]=null;h._serviceEventTarget.dispatchEvent("serviceRemoved",j,g.service)}},dispatchEvent:function(i,g){var j=h._entries[i];j&&j.eventTarget.dispatchEvent.apply(j.eventTarget,[g].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(i,g,j){(i=h._entries[i])&&i.eventTarget.addEventListener(g,j)},removeEventListener:function(i,g,j){(i=h._entries[i])&&i.eventTarget.removeEventListener(g,j)}}}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;c.prototype={addEventListener:function(h,i){this.internalRegistry.addEventListener(this.serviceId,h,i)},removeEventListener:function(h,i){this.internalRegistry.removeEventListener(this.serviceId,h,i)}};c.prototype.constructor=c;e.prototype={dispatchEvent:function(h){var i=this._namedlisteners[h];if(i)for(var g=0;g<i.length;g++)try{var j=Array.prototype.slice.call(arguments,1);i[g].apply(null,j)}catch(k){console.log(k)}},addEventListener:function(h,i){this._namedlisteners[h]=
this._namedlisteners[h]||[];this._namedlisteners[h].push(i)},removeEventListener:function(h,i){var g=this._namedlisteners[h];if(g)for(var j=0;j<g.length;j++)if(g[j]===i){if(g.length===1)delete this._namedlisteners[h];else g.splice(j,1);break}}};e.prototype.constructor=e;f.prototype={getService:function(h,i){var g,j=new b.Deferred;if(typeof h==="string"){if(this._namedReferences[h])for(var k=0;k<this._namedReferences[h].length;k++)if(g=this._entries[this._namedReferences[h][k].getServiceId()].service)break}else g=
this._entries[h.getServiceId()].service;if(g)j.resolve(g);else if(i===0)j.reject(new Error("timeout: getService"));else{var m=this,l=function(n,o){if(h===n||h===n.getName()){j.resolve(o);m._serviceEventTarget.removeEventListener("serviceAdded",l)}};this._serviceEventTarget.addEventListener("serviceAdded",l)}return j.promise},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,g){var j=this._entries.length;g=new d(j,h,g);i=new c(j,i,this.internalRegistry);this._namedReferences[h]=this._namedReferences[h]||[];this._namedReferences[h].push(g);this._entries.push({reference:g,service:i,eventTarget:new e});this._serviceEventTarget.dispatchEvent("serviceAdded",g,i);return new a(j,g,this.internalRegistry)},addEventListener:function(h,i){this._serviceEventTarget.addEventListener(h,i)},removeEventListener:function(h,i){this._serviceEventTarget.removeEventListener(h,
i)}};f.prototype.constructor=f;return{ServiceReference:d,ServiceRegistration:a,Service:c,EventTarget:e,ServiceRegistry:f}});define("dijit",["dojo"],function(b){return dijit=b._dijit||{}});
define("dojo/hash",["dojo"],function(b){(function(){function d(m,l){l=m.indexOf(l);return l>=0?m.substring(l+1):""}function a(){return d(location.href,"#")}function c(){b.publish("/dojo/hashchange",[a()])}function e(){if(a()!==i){i=a();c()}}function f(m){if(g)if(g.isTransitioning())setTimeout(b.hitch(null,f,m),k);else{var l=g.iframe.location.href,n=l.indexOf("?");g.iframe.location.replace(l.substring(0,n)+"?"+m)}else{location.replace("#"+m);!j&&e()}}function h(){function m(){i=a();o=r?i:d(v.href,
"?");p=false;t=null}var l=document.createElement("iframe"),n=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html");b.config.useXDomain&&!b.config.dojoBlankHtmlUrl&&console.warn("dojo.hash: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html");l.id="dojo-hash-iframe";l.src=n+"?"+a();l.style.display="none";document.body.appendChild(l);this.iframe=b.global["dojo-hash-iframe"];
var o,p,t,q,r,v=this.iframe.location;this.isTransitioning=function(){return p};this.pollLocation=function(){if(!r)try{var u=d(v.href,"?");if(document.title!=q)q=this.iframe.document.title=document.title}catch(x){r=true;console.error("dojo.hash: Error adding history entry. Server unreachable.")}var C=a();if(p&&i===C)if(r||u===t){m();c()}else{setTimeout(b.hitch(this,this.pollLocation),0);return}else if(!(i===C&&(r||o===u)))if(i!==C){i=C;p=true;t=C;l.src=n+"?"+t;r=false;setTimeout(b.hitch(this,this.pollLocation),
0);return}else if(!r){location.href="#"+v.search.substring(1);m();c()}setTimeout(b.hitch(this,this.pollLocation),k)};m();setTimeout(b.hitch(this,this.pollLocation),k)}b.hash=function(m,l){if(!arguments.length)return a();if(m.charAt(0)=="#")m=m.substring(1);if(l)f(m);else location.href="#"+m;return m};var i,g,j,k=b.config.hashPollFrequency||100;b.addOnLoad(function(){if("onhashchange"in b.global&&(!b.isIE||b.isIE>=8&&document.compatMode!="BackCompat"))j=b.connect(b.global,"onhashchange",c);else if(document.addEventListener){i=
a();setInterval(e,k)}else if(document.attachEvent)g=new h})})();return b.hash});
(function(){var b=["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,c=[];define("text",["require","exports","module"],function(){var e,f,h;if(typeof window!=="undefined"&&window.navigator&&window.document)f=function(i,g){var j=e.createXhr();j.open("GET",i,true);j.onreadystatechange=function(){j.readyState===4&&g(j.responseText)};j.send(null)};else if(typeof process!=="undefined"&&process.versions&&
process.versions.node){h=require.nodeRequire("fs");f=function(i,g){g(h.readFileSync(i,"utf8"))}}else if(typeof Packages!=="undefined")f=function(i,g){var j=new java.io.File(i);i=java.lang.System.getProperty("line.separator");j=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(j),"utf-8"));var k,m,l="";try{k=new java.lang.StringBuffer;if((m=j.readLine())&&m.length()&&m.charAt(0)===65279)m=m.substring(1);for(k.append(m);(m=j.readLine())!==null;){k.append(i);k.append(m)}l=
String(k.toString())}finally{j.close()}g(l)};return e={version:"0.24.0",strip:function(i){if(i){i=i.replace(d,"");var g=i.match(a);if(g)i=g[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,g,j;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(g=0;g<3;g++){j=b[g];try{i=new ActiveXObject(j)}catch(k){}if(i){b=
[j];break}}if(!i)throw new Error("require.getXhr(): XMLHttpRequest not available");return i},get:f,load:function(i,g,j,k){var m=false,l=i.indexOf("."),n=i.substring(0,l),o=i.substring(l+1,i.length);l=o.indexOf("!");if(l!==-1){m=o.substring(l+1,o.length);m=m==="strip";o=o.substring(0,l)}g=g.nameToUrl(n,"."+o);e.get(g,function(p){p=m?e.strip(p):p;if(k.isBuild&&k.inlineText)c[i]=p;j(p)})},write:function(i,g,j){if(g in c){var k=e.jsEscape(c[g]);j("define('"+i+"!"+g+"', function () { return '"+k+"';});\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(b,d){d.getObject("i18n",true,d);d.i18n.getLocalization=d.i18n.getLocalization||function(a,c,e){e=d.i18n.normalizeLocale(e);var f=e.split("-"),h=[a,"nls",c].join(".");if(typeof d.global.require!=="undefined"){var i=b("i18n!"+[a.replace(/\./g,"/"),"nls",c].join("/"));(d._loadedModules[h]=d._loadedModules[h]||{})[f.join("_")]=i.root||i}if(h=d._loadedModules[h]){var g;for(i=f.length;i>0;i--){var j=f.slice(0,i).join("_");if(h[j]){g=h[j];break}}if(!g)g=h.ROOT;
if(g){a=function(){};a.prototype=g;return new a}}throw new Error("Bundle not found: "+c+" in "+a+" , locale="+e);};d.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():d.locale;if(a=="root")a="ROOT";return a};d.i18n._requireLocalization=function(a,c,e,f){e=d.i18n.normalizeLocale(e);var h=[a,"nls",c].join("."),i="";if(f){for(var g=f.split(","),j=0;j<g.length;j++)if(e.indexOf(g[j])==0)if(g[j].length>i.length)i=g[j];i||(i="ROOT")}g=f?i:e;var k=d._loadedModules[h];j=null;if(k){if(d.config.localizationComplete&&
k._built)return;j=g.replace(/-/g,"_");j=d._loadedModules[h+"."+j]}if(!j){k=d.provide(h);var m=d._getModuleSymbols(a).concat("nls").join("/"),l;d.i18n._searchLocalePath(g,f,function(n){var o=n.replace(/-/g,"_"),p=h+"."+o,t=false;if(d._loadedModules[p])t=true;else{d.provide(p);p=[m];n!="ROOT"&&p.push(n);p.push(c);n=p.join("/")+".js";t=d._loadPath(n,null,function(q){q=q.root||q;var r=function(){};r.prototype=l;k[o]=new r;for(var v in q)k[o][v]=q[v]})}if(t&&k[o])l=k[o];else k[o]=l;if(f)return true})}if(f&&
e!=i)k[e.replace(/-/g,"_")]=k[i.replace(/-/g,"_")]};(function(){var a=d.config.extraLocale;if(a){if(!a instanceof Array)a=[a];var c=d.i18n._requireLocalization;d.i18n._requireLocalization=function(e,f,h,i){c(e,f,h,i);if(!h)for(h=0;h<a.length;h++)c(e,f,a[h],i)}}})();d.i18n._searchLocalePath=function(a,c,e){a=d.i18n.normalizeLocale(a);var f=a.split("-");a=[];for(var h=f.length;h>0;h--)a.push(f.slice(0,h).join("-"));a.push(false);c&&a.reverse();for(c=a.length-1;c>=0;c--)if(e(a[c]||"ROOT"))break};d.i18n._preloadLocalizations=
function(a,c){function e(i){i=d.i18n.normalizeLocale(i);d.i18n._searchLocalePath(i,true,function(g){for(var j=0;j<c.length;j++)if(c[j]==g){d.require(a+"_"+g);return true}return false})}e();for(var f=d.config.extraLocale||[],h=0;h<f.length;h++)e(f[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(b){b.getObject("window",true,b);b.window.getBox=function(){var d=b.doc.compatMode=="BackCompat"?b.body():b.doc.documentElement,a=b._docScroll();return{w:d.clientWidth,h:d.clientHeight,l:a.x,t:a.y}};b.window.get=function(d){if(b.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};b.window.scrollIntoView=function(d,
a){try{d=b.byId(d);var c=d.ownerDocument||b.doc,e=c.body||b.body(),f=c.documentElement||e.parentNode,h=b.isIE,i=b.isWebKit;if((!(b.isMoz||h||i||b.isOpera)||d==e||d==f)&&typeof d.scrollIntoView!="undefined")d.scrollIntoView(false);else{var g=c.compatMode=="BackCompat",j=h>=9&&d.ownerDocument.parentWindow.frameElement?f.clientHeight>0&&f.clientWidth>0&&(e.clientHeight==0||e.clientWidth==0||e.clientHeight>f.clientHeight||e.clientWidth>f.clientWidth)?f:e:g?e:f;c=i?e:j;var k=j.clientWidth,m=j.clientHeight,
l=!b._isBodyLtr(),n=a||b.position(d),o=d.parentNode;a=function(F){return h<=6||h&&g?false:b.style(F,"position").toLowerCase()=="fixed"};if(!a(d))for(;o;){if(o==e)o=c;var p=b.position(o),t=a(o);if(o==c){p.w=k;p.h=m;if(c==f&&h&&l)p.x+=c.offsetWidth-p.w;if(p.x<0||!h)p.x=0;if(p.y<0||!h)p.y=0}else{var q=b._getPadBorderExtents(o);p.w-=q.w;p.h-=q.h;p.x+=q.l;p.y+=q.t;var r=o.clientWidth,v=p.w-r;if(r>0&&v>0){p.w=r;p.x+=l&&(h||o.clientLeft>q.l)?v:0}r=o.clientHeight;v=p.h-r;if(r>0&&v>0)p.h=r}if(t){if(p.y<0){p.h+=
p.y;p.y=0}if(p.x<0){p.w+=p.x;p.x=0}if(p.y+p.h>m)p.h=m-p.y;if(p.x+p.w>k)p.w=k-p.x}var u=n.x-p.x,x=n.y-Math.max(p.y,0),C=u+n.w-p.w,D=x+n.h-p.h;if(C*u>0){var z=Math[u<0?"max":"min"](u,C);if(l&&(h==8&&!g||h>=9))z=-z;n.x+=o.scrollLeft;o.scrollLeft+=z;n.x-=o.scrollLeft}if(D*x>0){n.y+=o.scrollTop;o.scrollTop+=Math[x<0?"max":"min"](x,D);n.y-=o.scrollTop}o=o!=c&&!t&&o.parentNode}}}catch(E){console.error("scrollIntoView: "+E);d.scrollIntoView(false)}};return b.window});
define("dijit/_base/manager",["dojo","dijit"],function(b,d){b.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,c){c=c||b.global;var e=0,f;for(f in this._hash)a.call(c,this._hash[f],e++,this._hash);return this},
filter:function(a,c){c=c||b.global;var e=new d.WidgetSet,f=0,h;for(h in this._hash){var i=this._hash[h];a.call(c,i,f++,this._hash)&&e.add(i)}return e},byId:function(a){return this._hash[a]},byClass:function(a){var c=new d.WidgetSet,e,f;for(e in this._hash){f=this._hash[e];f.declaredClass==a&&c.add(f)}return c},toArray:function(){var a=[];for(var c in this._hash)a.push(this._hash[c]);return a},map:function(a,c){return b.map(this.toArray(),a,c)},every:function(a,c){c=c||b.global;var e=0,f;for(f in this._hash)if(!a.call(c,
this._hash[f],e++,this._hash))return false;return true},some:function(a,c){c=c||b.global;var e=0,f;for(f in this._hash)if(a.call(c,this._hash[f],e++,this._hash))return true;return false}});(function(){d.registry=new d.WidgetSet;var a=d.registry._hash,c=b.attr,e=b.hasAttr,f=b.style;d.byId=function(j){return typeof j=="string"?a[j]:j};var h={};d.getUniqueId=function(j){var k;do k=j+"_"+(j in h?++h[j]:(h[j]=0));while(a[k]);return d._scopeName=="dijit"?k:d._scopeName+"_"+k};d.findWidgets=function(j){function k(l){for(l=
l.firstChild;l;l=l.nextSibling)if(l.nodeType==1){var n=l.getAttribute("widgetId");if(n)(n=a[n])&&m.push(n);else k(l)}}var m=[];k(j);return m};d._destroyAll=function(){d._curFocus=null;d._prevFocus=null;d._activeStack=[];b.forEach(d.findWidgets(b.body()),function(j){if(!j._destroyed)if(j.destroyRecursive)j.destroyRecursive();else j.destroy&&j.destroy()})};b.isIE&&b.addOnWindowUnload(function(){d._destroyAll()});d.byNode=function(j){return a[j.getAttribute("widgetId")]};d.getEnclosingWidget=function(j){for(;j;){var k=
j.getAttribute&&j.getAttribute("widgetId");if(k)return a[k];j=j.parentNode}return null};var i=d._isElementShown=function(j){var k=f(j);return k.visibility!="hidden"&&k.visibility!="collapsed"&&k.display!="none"&&c(j,"type")!="hidden"};d.hasDefaultTabStop=function(j){switch(j.nodeName.toLowerCase()){case "a":return e(j,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var k;try{var m=j.contentDocument;if("designMode"in m&&m.designMode==
"on")return true;k=m.body}catch(l){try{k=j.contentWindow.document.body}catch(n){return false}}return k.contentEditable=="true"||k.firstChild&&k.firstChild.contentEditable=="true";default:return j.contentEditable=="true"}};var g=d.isTabNavigable=function(j){return c(j,"disabled")?false:e(j,"tabIndex")?c(j,"tabIndex")>=0:d.hasDefaultTabStop(j)};d._getTabNavigable=function(j){function k(u){return u&&u.tagName.toLowerCase()=="input"&&u.type&&u.type.toLowerCase()=="radio"&&u.name&&u.name.toLowerCase()}
function m(u){return r[k(u)]||u}var l,n,o,p,t,q,r={},v=function(u){b.query("> *",u).forEach(function(x){if(!(b.isIE&&x.scopeName!=="HTML"||!i(x))){if(g(x)){var C=c(x,"tabIndex");if(!e(x,"tabIndex")||C==0){l||(l=x);n=x}else if(C>0){if(!o||C<p){p=C;o=x}if(!t||C>=q){q=C;t=x}}C=k(x);if(b.attr(x,"checked")&&C)r[C]=x}x.nodeName.toUpperCase()!="SELECT"&&v(x)}})};i(j)&&v(j);return{first:m(l),last:m(n),lowest:m(o),highest:m(t)}};d.getFirstInTabbingOrder=function(j){j=d._getTabNavigable(b.byId(j));return j.lowest?
j.lowest:j.first};d.getLastInTabbingOrder=function(j){j=d._getTabNavigable(b.byId(j));return j.last?j.last:j.highest};d.defaultDuration=b.config.defaultDuration||200})();return d});
define("dojo/Stateful",["dojo"],function(b){b.declare("dojo.Stateful",null,{postscript:function(d){d&&b.mixin(this,d)},get:function(d){return this[d]},set:function(d,a){if(typeof d==="object"){for(var c in d)this.set(c,d[c]);return this}c=this[d];this[d]=a;this._watchCallbacks&&this._watchCallbacks(d,c,a);return this},watch:function(d,a){var c=this._watchCallbacks;if(!c){var e=this;c=this._watchCallbacks=function(h,i,g,j){var k=function(m){if(m){m=m.slice();for(var l=0,n=m.length;l<n;l++)try{m[l].call(e,
h,i,g)}catch(o){console.error(o)}}};k(c["_"+h]);j||k(c["*"])}}if(!a&&typeof d==="function"){a=d;d="*"}else d="_"+d;var f=c[d];if(typeof f!=="object")f=c[d]=[];f.push(a);return{unwatch:function(){f.splice(b.indexOf(f,a),1)}}}});return b.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(b,d){(function(){b.declare("dijit._WidgetBase",b.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,c){this.create(a,c)},create:function(a,c){this.srcNodeRef=
b.byId(c);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a){this.params=a;b._mixin(this,a)}this.postMixInProperties();if(!this.id)this.id=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(e,f){if(f.params&&e in f.params||f[e])f.set(e,f[e])};for(var c in this.attributeMap)a(c,this);b.forEach(this._getSetterAttributes(),function(e){e in this.attributeMap||a(e,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var c=a._setterAttrs=[],e,f=a.prototype;for(var h in f)if(b.isFunction(f[h])&&(e=h.match(/^_set([a-zA-Z]*)Attr$/))&&
e[1])c.push(e[1].charAt(0).toLowerCase()+e[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||b.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(b.map(a,function(c){return c+"Rtl"})));b.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 c=b.forEach,e=b.unsubscribe;c(this._connects,function(f){c(f,b.disconnect)});c(this._subscribes,function(f){e(f)});c(this._supportingWidgets||[],function(f){if(f.destroyRecursive)f.destroyRecursive();else f.destroy&&f.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?b.removeAttr(this.domNode,
"widgetId"):b.destroy(this.domNode);delete this.domNode}if(this.srcNodeRef){a||b.destroy(this.srcNodeRef);delete this.srcNodeRef}},destroyDescendants:function(a){b.forEach(this.getChildren(),function(c){c.destroyRecursive&&c.destroyRecursive(a)})},uninitialize:function(){return false},_setClassAttr:function(a){b.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var c=this[this.attributeMap.style||"domNode"];if(b.isObject(a))b.style(c,
a);else if(c.style.cssText)c.style.cssText+="; "+a;else c.style.cssText=a;this._set("style",a)},_attrToDom:function(a,c){var e=this.attributeMap[a];b.forEach(b.isArray(e)?e:[e],function(f){var h=this[f.node||f||"domNode"];switch(f.type||"attribute"){case "attribute":if(b.isFunction(c))c=b.hitch(this,c);f=f.attribute?f.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;b.attr(h,f,c);break;case "innerText":h.innerHTML="";h.appendChild(b.doc.createTextNode(c));break;case "innerHTML":h.innerHTML=
c;break;case "class":b.replaceClass(h,c,this[a]);break}},this)},get:function(a){var c=this._getAttrNames(a);return this[c.g]?this[c.g]():this[a]},set:function(a,c){if(typeof a==="object"){for(var e in a)this.set(e,a[e]);return this}e=this._getAttrNames(a);if(this[e.s])var f=this[e.s].apply(this,Array.prototype.slice.call(arguments,1));else{a in this.attributeMap&&this._attrToDom(a,c);this._set(a,c)}return f||this},_attrPairNames:{},_getAttrNames:function(a){var c=this._attrPairNames;if(c[a])return c[a];
var e=a.charAt(0).toUpperCase()+a.substr(1);return c[a]={n:a+"Node",s:"_set"+e+"Attr",g:"_get"+e+"Attr"}},_set:function(a,c){var e=this[a];this[a]=c;this._watchCallbacks&&this._created&&c!==e&&this._watchCallbacks(a,e,c)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?b.query("[widgetId]",this.containerNode).map(d.byNode):[]},getChildren:function(){return this.containerNode?d.findWidgets(this.containerNode):
[]},connect:function(a,c,e){a=[b._connect(a,c,this,e)];this._connects.push(a);return a},disconnect:function(a){for(var c=0;c<this._connects.length;c++)if(this._connects[c]==a){b.forEach(a,b.disconnect);this._connects.splice(c,1);return}},subscribe:function(a,c){a=b.subscribe(a,this,c);this._subscribes.push(a);return a},unsubscribe:function(a){for(var c=0;c<this._subscribes.length;c++)if(this._subscribes[c]==a){b.unsubscribe(a);this._subscribes.splice(c,1);return}},isLeftToRight:function(){return this.dir?
this.dir=="ltr":b._isBodyLtr()},placeAt:function(a,c){a.declaredClass&&a.addChild?a.addChild(this,c):b.place(this.domNode,a,c);return this}})})();return d._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(b,d){b.mixin(d,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return d.getBookmark().isCollapsed},getBookmark:function(){var a,c,e=b.doc.selection,f=d._curFocus;if(b.global.getSelection){if(e=b.global.getSelection())if(e.isCollapsed){if(a=f?f.tagName:""){a=a.toLowerCase();if(a=="textarea"||a=="input"&&(!f.type||f.type.toLowerCase()=="text")){e={start:f.selectionStart,end:f.selectionEnd,node:f,pRange:true};
return{isCollapsed:e.end<=e.start,mark:e}}}a={isCollapsed:true};if(e.rangeCount)a.mark=e.getRangeAt(0).cloneRange()}else{c=e.getRangeAt(0);a={isCollapsed:false,mark:c.cloneRange()}}}else if(e){a=f?f.tagName:"";a=a.toLowerCase();if(f&&a&&(a=="button"||a=="textarea"||a=="input"))if(e.type&&e.type.toLowerCase()=="none")return{isCollapsed:true,mark:null};else{c=e.createRange();return{isCollapsed:c.text&&c.text.length?false:true,mark:{range:c,pRange:true}}}a={};try{c=e.createRange();a.isCollapsed=!(e.type==
"Text"?c.htmlText.length:c.length)}catch(h){a.isCollapsed=true;return a}if(e.type.toUpperCase()=="CONTROL")if(c.length){a.mark=[];e=0;for(f=c.length;e<f;)a.mark.push(c.item(e++))}else{a.isCollapsed=true;a.mark=null}else a.mark=c.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var c=b.doc;if(a=a.mark)if(b.global.getSelection){var e=b.global.getSelection();if(e&&e.removeAllRanges)if(a.pRange){e=a.node;e.selectionStart=
a.start;e.selectionEnd=a.end}else{e.removeAllRanges();e.addRange(a)}else console.warn("No idea how to restore selection for this browser!")}else if(c.selection&&a){var f;if(a.pRange)f=a.range;else if(b.isArray(a)){f=c.body.createControlRange();b.forEach(a,function(h){f.addElement(h)})}else{f=c.body.createTextRange();f.moveToBookmark(a)}f.select()}},getFocus:function(a,c){a=!d._curFocus||a&&b.isDescendant(d._curFocus,a.domNode)?d._prevFocus:d._curFocus;return{node:a,bookmark:a==d._curFocus&&b.withGlobal(c||
b.global,d.getBookmark),openedForWindow:c}},focus:function(a){if(a){var c="node"in a?a.node:a,e=a.bookmark;a=a.openedForWindow;var f=e?e.isCollapsed:false;if(c){var h=c.tagName.toLowerCase()=="iframe"?c.contentWindow:c;if(h&&h.focus)try{h.focus()}catch(i){}d._onFocusNode(c)}if(e&&b.withGlobal(a||b.global,d.isCollapsed)&&!f){a&&a.focus();try{b.withGlobal(a||b.global,d.moveToBookmark,null,[e])}catch(g){}}}},_activeStack:[],registerIframe:function(a){return d.registerWin(a.contentWindow,a)},unregisterIframe:function(a){d.unregisterWin(a)},
registerWin:function(a,c){var e=function(k){d._justMouseDowned=true;setTimeout(function(){d._justMouseDowned=false},0);b.isIE&&k&&k.srcElement&&k.srcElement.parentNode==null||d._onTouchNode(c||k.target||k.srcElement,"mouse")},f=b.isIE?a.document.documentElement:a.document;if(f)if(b.isIE){a.document.body.attachEvent("onmousedown",e);var h=function(k){k.srcElement.tagName.toLowerCase()!="#document"&&d.isTabNavigable(k.srcElement)?d._onFocusNode(c||k.srcElement):d._onTouchNode(c||k.srcElement)};f.attachEvent("onactivate",
h);var i=function(k){d._onBlurNode(c||k.srcElement)};f.attachEvent("ondeactivate",i);return function(){a.document.detachEvent("onmousedown",e);f.detachEvent("onactivate",h);f.detachEvent("ondeactivate",i);f=null}}else{f.body.addEventListener("mousedown",e,true);var g=function(k){d._onFocusNode(c||k.target)};f.addEventListener("focus",g,true);var j=function(k){d._onBlurNode(c||k.target)};f.addEventListener("blur",j,true);return function(){f.body.removeEventListener("mousedown",e,true);f.removeEventListener("focus",
g,true);f.removeEventListener("blur",j,true);f=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,c){if(d._clearActiveWidgetsTimer){clearTimeout(d._clearActiveWidgetsTimer);delete d._clearActiveWidgetsTimer}var e=
[];try{for(;a;){var f=b.attr(a,"dijitPopupParent");if(f)a=d.byId(f).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===b.body())break;a=b.window.get(a.ownerDocument).frameElement}else{var h=a.getAttribute&&a.getAttribute("widgetId"),i=h&&d.byId(h);i&&!(c=="mouse"&&i.get("disabled"))&&e.unshift(h);a=a.parentNode}}}catch(g){}d._setStack(e,c)},_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;b.publish("focusNode",
[a])}}},_setStack:function(a,c){var e=d._activeStack;d._activeStack=a;for(var f=0;f<Math.min(e.length,a.length);f++)if(e[f]!=a[f])break;for(var h,i=e.length-1;i>=f;i--)if(h=d.byId(e[i])){h._focused=false;h.set("focused",false);h._hasBeenBlurred=true;h._onBlur&&h._onBlur(c);b.publish("widgetBlur",[h,c])}for(i=f;i<a.length;i++)if(h=d.byId(a[i])){h._focused=true;h.set("focused",true);h._onFocus&&h._onFocus(c);b.publish("widgetFocus",[h,c])}}});b.addOnLoad(function(){var a=d.registerWin(window);b.isIE&&
b.addOnWindowUnload(function(){d.unregisterWin(a);a=null})});return d});
define("dojo/AdapterRegistry",["dojo"],function(b){b.AdapterRegistry=function(d){this.pairs=[];this.returnWrappers=d||false};b.extend(b.AdapterRegistry,{register:function(d,a,c,e,f){this.pairs[f?"unshift":"push"]([d,a,c,e])},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 b.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(b,d){d.getViewport=function(){return b.window.getBox()};d.placeOnScreen=function(a,c,e,f){e=b.map(e,function(h){var i={corner:h,pos:{x:c.x,y:c.y}};if(f){i.pos.x+=h.charAt(1)=="L"?f.x:-f.x;i.pos.y+=h.charAt(0)=="T"?f.y:-f.y}return i});return d._place(a,e)};d._place=function(a,c,e,f){var h=b.window.getBox();if(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")b.body().appendChild(a);var i=null;
b.some(c,function(j){var k=j.corner,m=j.pos,l=0,n={w:k.charAt(1)=="L"?h.l+h.w-m.x:m.x-h.l,h:k.charAt(1)=="T"?h.t+h.h-m.y:m.y-h.t};if(e){l=e(a,j.aroundCorner,k,n,f);l=typeof l=="undefined"?0:l}var o=a.style,p=o.display,t=o.visibility;o.visibility="hidden";o.display="";var q=b.marginBox(a);o.display=p;o.visibility=t;o=Math.max(h.l,k.charAt(1)=="L"?m.x:m.x-q.w);p=Math.max(h.t,k.charAt(0)=="T"?m.y:m.y-q.h);t=Math.min(h.l+h.w,k.charAt(1)=="L"?o+q.w:m.x);m=Math.min(h.t+h.h,k.charAt(0)=="T"?p+q.h:m.y);t=
t-o;m=m-p;l+=q.w-t+(q.h-m);if(i==null||l<i.overflow)i={corner:k,aroundCorner:j.aroundCorner,x:o,y:p,w:t,h:m,overflow:l,spaceAvailable:n};return!l});i.overflow&&e&&e(a,i.aroundCorner,i.corner,i.spaceAvailable,f);c=b._isBodyLtr();var g=a.style;g.top=i.y+"px";g[c?"left":"right"]=(c?i.x:h.w-i.x-i.w)+"px";return i};d.placeOnScreenAroundNode=function(a,c,e,f){c=b.byId(c);c=b.position(c,true);return d._placeOnScreenAroundRect(a,c.x,c.y,c.w,c.h,e,f)};d.placeOnScreenAroundRectangle=function(a,c,e,f){return d._placeOnScreenAroundRect(a,
c.x,c.y,c.width,c.height,e,f)};d._placeOnScreenAroundRect=function(a,c,e,f,h,i,g){var j=[];for(var k in i)j.push({aroundCorner:k,corner:i[k],pos:{x:c+(k.charAt(1)=="L"?0:f),y:e+(k.charAt(0)=="T"?0:h)}});return d._place(a,j,g,{w:f,h:h})};d.placementRegistry=new b.AdapterRegistry;d.placementRegistry.register("node",function(a,c){return typeof c=="object"&&typeof c.offsetWidth!="undefined"&&typeof c.offsetHeight!="undefined"},d.placeOnScreenAroundNode);d.placementRegistry.register("rect",function(a,
c){return typeof c=="object"&&"x"in c&&"y"in c&&"width"in c&&"height"in c},d.placeOnScreenAroundRectangle);d.placeOnScreenAroundElement=function(){return d.placementRegistry.match.apply(d.placementRegistry,arguments)};d.getPopupAroundAlignment=function(a,c){var e={};b.forEach(a,function(f){switch(f){case "after":e[c?"BR":"BL"]=c?"BL":"BR";break;case "before":e[c?"BL":"BR"]=c?"BR":"BL";break;case "below-alt":c=!c;case "below":e[c?"BL":"BR"]=c?"TL":"TR";e[c?"BR":"BL"]=c?"TR":"TL";break;case "above-alt":c=
!c;case "above":default:e[c?"TL":"TR"]=c?"BL":"BR";e[c?"TR":"TL"]=c?"BR":"BL";break}});return e};return d});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(b,d){d.getDocumentWindow=function(a){return b.window.get(a)};return d});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(b,d){d.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var c=a.declaredClass?a._popupWrapper:a.parentNode&&b.hasClass(a.parentNode,"dijitPopup"),e=a.domNode||a;if(!c){c=b.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},b.body());c.appendChild(e);e=e.style;e.display="";e.visibility="";e.position="";e.top="0px";if(a.declaredClass){a._popupWrapper=
c;b.connect(a,"destroy",function(){b.destroy(c);delete a._popupWrapper})}}return c},moveOffScreen:function(a){a=this._createWrapper(a);b.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);b.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,c=a.length-1;c>0&&a[c].parent===a[c-1].widget;c--);return a[c]},open:function(a){for(var c=this._stack,e=a.popup,f=a.orient||((a.parent?a.parent.isLeftToRight():b._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),h=a.around,i=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;c.length&&(!a.parent||!b.isDescendant(a.parent.domNode,c[c.length-1].widget.domNode));)d.popup.close(c[c.length-1].widget);var g=this._createWrapper(e);b.attr(g,{id:i,style:{zIndex:this._beginZIndex+c.length},"class":"dijitPopup "+(e.baseClass||e["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if(b.isIE||b.isMoz)if(!e.bgIframe)e.bgIframe=
new d.BackgroundIframe(g);f=h?d.placeOnScreenAroundElement(g,h,f,e.orient?b.hitch(e,"orient"):null):d.placeOnScreen(g,a,f=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);g.style.display="";g.style.visibility="visible";e.domNode.style.visibility="visible";h=[];h.push(b.connect(g,"onkeypress",this,function(j){if(j.charOrCode==b.keys.ESCAPE&&a.onCancel){b.stopEvent(j);a.onCancel()}else if(j.charOrCode===b.keys.TAB){b.stopEvent(j);(j=this.getTopPopup())&&j.onCancel&&j.onCancel()}}));e.onCancel&&
h.push(b.connect(e,"onCancel",a.onCancel));h.push(b.connect(e,e.onExecute?"onExecute":"onChange",this,function(){var j=this.getTopPopup();j&&j.onExecute&&j.onExecute()}));c.push({widget:e,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:h});e.onOpen&&e.onOpen(f);return f},close:function(a){for(var c=this._stack;a&&b.some(c,function(i){return i.widget==a})||!a&&c.length;){var e=c.pop(),f=e.widget,h=e.onClose;f.onClose&&f.onClose();b.forEach(e.handlers,b.disconnect);
f&&f.domNode&&this.hide(f);h&&h()}}};d._frames=new (function(){var a=[];this.pop=function(){var c;if(a.length){c=a.pop();c.style.display=""}else{if(b.isIE<9){c="<iframe src='"+(b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";c=b.doc.createElement(c)}else{c=b.create("iframe");c.src='javascript:""';c.className="dijitBackgroundIframe";b.style(c,"opacity",0.1)}c.tabIndex=
-1;d.setWaiRole(c,"presentation")}return c};this.push=function(c){c.style.display="none";a.push(c)}});d.BackgroundIframe=function(a){if(!a.id)throw new Error("no id");if(b.isIE||b.isMoz){var c=this.iframe=d._frames.pop();a.appendChild(c);if(b.isIE<7||b.isQuirks){this.resize(a);this._conn=b.connect(a,"onresize",this,function(){this.resize(a)})}else b.style(c,{width:"100%",height:"100%"})}};b.extend(d.BackgroundIframe,{resize:function(a){this.iframe&&b.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+
"px"})},destroy:function(){if(this._conn){b.disconnect(this._conn);this._conn=null}if(this.iframe){d._frames.push(this.iframe);delete this.iframe}}});return d.popup});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(b,d){d.scrollIntoView=function(a,c){b.window.scrollIntoView(a,c)};return d.scrollIntoView});
define("dojo/uacss",["dojo"],function(b){(function(){var d=b.doc.documentElement,a=b.isIE,c=b.isOpera,e=Math.floor,f=b.isFF,h=b.boxModel.replace(/-/,"");a={dj_ie:a,dj_ie6:e(a)==6,dj_ie7:e(a)==7,dj_ie8:e(a)==8,dj_ie9:e(a)==9,dj_quirks:b.isQuirks,dj_iequirks:a&&b.isQuirks,dj_opera:c,dj_khtml:b.isKhtml,dj_webkit:b.isWebKit,dj_safari:b.isSafari,dj_chrome:b.isChrome,dj_gecko:b.isMozilla,dj_ff3:e(f)==3};a["dj_"+h]=true;var i="";for(var g in a)if(a[g])i+=g+" ";d.className=b.trim(d.className+" "+i);b._loaders.unshift(function(){if(!b._isBodyLtr()){var j=
"dj_rtl dijitRtl "+i.replace(/ /g,"-rtl ");d.className=b.trim(d.className+" "+j)}})})();return b});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(b,d){return d});
define("dijit/_base/typematic",["dojo","dijit"],function(b,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(b.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,c,e,f,h,i,g,j){if(h!=this._obj){this.stop();
this._initialDelay=g||500;this._subsequentDelay=i||0.9;this._minDelay=j||10;this._obj=h;this._evt=a;this._node=e;this._count=this._currentTimeout=-1;this._callback=b.hitch(c,f);this._fireEventAndReload();this._evt=b.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,c,e,f,h,i,g){if(c.keyCode){c.charOrCode=c.keyCode;b.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0")}else if(c.charCode){c.charOrCode=String.fromCharCode(c.charCode);b.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}return[b.connect(a,"onkeypress",this,function(j){if(j.charOrCode==c.charOrCode&&(c.ctrlKey===undefined||c.ctrlKey==j.ctrlKey)&&(c.altKey===undefined||c.altKey==j.altKey)&&(c.metaKey===undefined||c.metaKey==(j.metaKey||false))&&(c.shiftKey===undefined||c.shiftKey==j.shiftKey)){b.stopEvent(j);d.typematic.trigger(j,
e,a,f,c,h,i,g)}else d.typematic._obj==c&&d.typematic.stop()}),b.connect(a,"onkeyup",this,function(){d.typematic._obj==c&&d.typematic.stop()})]},addMouseListener:function(a,c,e,f,h,i){var g=b.connect;return[g(a,"mousedown",this,function(j){b.stopEvent(j);d.typematic.trigger(j,c,a,e,a,f,h,i)}),g(a,"mouseup",this,function(j){b.stopEvent(j);d.typematic.stop()}),g(a,"mouseout",this,function(j){b.stopEvent(j);d.typematic.stop()}),g(a,"mousemove",this,function(j){j.preventDefault()}),g(a,"dblclick",this,
function(j){b.stopEvent(j);if(b.isIE){d.typematic.trigger(j,c,a,e,a,f,h,i);setTimeout(b.hitch(this,d.typematic.stop),50)}})]},addListener:function(a,c,e,f,h,i,g,j){return this.addKeyListener(c,e,f,h,i,g,j).concat(this.addMouseListener(a,f,h,i,g,j))}};return d.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(b,d){d.wai={onload:function(){var a=b.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif"))+'");'}},b.body()),c=b.getComputedStyle(a);if(c){var e=c.backgroundImage;b[c.borderTopColor==c.borderRightColor||e!=null&&(e=="none"||e=="url(invalid-url:)")?"addClass":"removeClass"](b.body(),
"dijit_a11y");if(b.isIE)a.outerHTML="";else b.body().removeChild(a)}}};if(b.isIE||b.isMoz)b._loaders.unshift(d.wai.onload);b.mixin(d,{hasWaiRole:function(a,c){a=this.getWaiRole(a);return c?a.indexOf(c)>-1:a.length>0},getWaiRole:function(a){return b.trim((b.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,c){b.attr(a,"role",c)},removeWaiRole:function(a,c){var e=b.attr(a,"role");if(e)if(c){c=b.trim((" "+e+" ").replace(" "+c+" "," "));b.attr(a,"role",c)}else a.removeAttribute("role")},
hasWaiState:function(a,c){return a.hasAttribute?a.hasAttribute("aria-"+c):!!a.getAttribute("aria-"+c)},getWaiState:function(a,c){return a.getAttribute("aria-"+c)||""},setWaiState:function(a,c,e){a.setAttribute("aria-"+c,e)},removeWaiState:function(a,c){a.removeAttribute("aria-"+c)}});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(b,d){return d._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(b,d){b.connect(b,"_connect",function(a,c){a&&b.isFunction(a._onConnect)&&a._onConnect(c)});d._connectOnUseEventHandler=function(){};d._lastKeyDownNode=null;b.isIE?function(){var a=function(c){d._lastKeyDownNode=c.srcElement};b.doc.attachEvent("onkeydown",a);b.addOnWindowUnload(function(){b.doc.detachEvent("onkeydown",a)})}():b.doc.addEventListener("keydown",function(a){d._lastKeyDownNode=a.target},true);(function(){b.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=b.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&&b.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,c){b.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,c)},attr:function(a){if(b.config.isDebug){var c=
arguments.callee._ach||(arguments.callee._ach={}),e=(arguments.callee.caller||"unknown caller").toString();if(!c[e]){b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+e,"","2.0");c[e]=true}}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,c,e){var f=b._connect,h=this.inherited(arguments,[a,c=="ondijitclick"?"onclick":c,e]);if(c=="ondijitclick")if(b.indexOf(this.nodesWithKeyClick,
a.nodeName.toLowerCase())==-1){var i=b.hitch(this,e);h.push(f(a,"onkeydown",this,function(g){if((g.keyCode==b.keys.ENTER||g.keyCode==b.keys.SPACE)&&!g.ctrlKey&&!g.shiftKey&&!g.altKey&&!g.metaKey){d._lastKeyDownNode=g.target;"openDropDown"in this&&a==this._buttonNode||g.preventDefault()}}),f(a,"onkeyup",this,function(g){if((g.keyCode==b.keys.ENTER||g.keyCode==b.keys.SPACE)&&g.target==d._lastKeyDownNode&&!g.ctrlKey&&!g.shiftKey&&!g.altKey&&!g.metaKey){d._lastKeyDownNode=null;return i(g)}}))}return h},
_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return true}})})();return d._Widget});
define("dojo/string",["dojo"],function(b){b.getObject("string",true,b);b.string.rep=function(d,a){if(a<=0||!d)return"";for(var c=[];;){a&1&&c.push(d);if(!(a>>=1))break;d+=d}return c.join("")};b.string.pad=function(d,a,c,e){c||(c="0");d=String(d);a=b.string.rep(c,Math.ceil((a-d.length)/c.length));return e?d+a:a+d};b.string.substitute=function(d,a,c,e){e=e||b.global;c=c?b.hitch(e,c):function(f){return f};return d.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(f,h,i){f=b.getObject(h,false,
a);if(i)f=b.getObject(i,false,e).call(e,f,h);return c(f,h).toString()})};b.string.trim=String.prototype.trim?b.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 b.string});
define("dojo/date/stamp",["dojo"],function(b){b.getObject("date.stamp",true,b);b.date.stamp.fromISOString=function(d,a){if(!b.date.stamp._isoRegExp)b.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var c=b.date.stamp._isoRegExp.exec(d);d=null;if(c){c.shift();c[1]&&c[1]--;if(c[6])c[6]*=1E3;if(a){a=new Date(a);b.forEach(b.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(h){return a["get"+
h]()}),function(h,i){c[i]=c[i]||h})}d=new Date(c[0]||1970,c[1]||0,c[2]||1,c[3]||0,c[4]||0,c[5]||0,c[6]||0);if(c[0]<100)d.setFullYear(c[0]||1970);var e=0,f=c[7]&&c[7].charAt(0);if(f!="Z"){e=(c[8]||0)*60+(Number(c[9])||0);if(f!="-")e*=-1}if(f)e-=d.getTimezoneOffset();e&&d.setTime(d.getTime()+e*6E4)}return d};b.date.stamp.toISOString=function(d,a){var c=function(i){return i<10?"0"+i:i};a=a||{};var e=[],f=a.zulu?"getUTC":"get",h="";if(a.selector!="time"){h=d[f+"FullYear"]();h=["0000".substr((h+"").length)+
h,c(d[f+"Month"]()+1),c(d[f+"Date"]())].join("-")}e.push(h);if(a.selector!="date"){h=[c(d[f+"Hours"]()),c(d[f+"Minutes"]()),c(d[f+"Seconds"]())].join(":");f=d[f+"Milliseconds"]();if(a.milliseconds)h+="."+(f<100?"0":"")+c(f);if(a.zulu)h+="Z";else if(a.selector!="time"){d=d.getTimezoneOffset();a=Math.abs(d);h+=(d>0?"-":"+")+c(Math.floor(a/60))+":"+c(a%60)}e.push(h)}return e.join("T")};return b.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(b){b.parser=new (function(){function d(g){if(f.isString(g))return"string";if(typeof g=="number")return"number";if(typeof g=="boolean")return"boolean";if(f.isFunction(g))return"function";if(f.isArray(g))return"array";if(g instanceof Date)return"date";if(g instanceof f._Url)return"url";return"object"}function a(g,j){switch(j){case "string":return g;case "number":return g.length?Number(g):NaN;case "boolean":return typeof g=="boolean"?g:g.toLowerCase()!=
"false";case "function":if(f.isFunction(g)){g=g.toString();g=f.trim(g.substring(g.indexOf("{")+1,g.length-1))}try{return g===""||g.search(/[^\w\.]+/i)!=-1?new Function(g):f.getObject(g,false)||new Function(g)}catch(k){return new Function}case "array":return g?g.split(/\s*,\s*/):[];case "date":switch(g){case "":return new Date("");case "now":return new Date;default:return f.date.stamp.fromISOString(g)}case "url":return f.baseUrl+g;default:return f.fromJson(g)}}function c(g,j){for(var k in g)if(k.charAt(0)!=
"_")k in h||(j[k]=d(g[k]));return j}function e(g,j){var k=i[g];if(k){if(!j&&!k.params)k.params=c(k.cls.prototype,{})}else{g=f.getObject(g);k=null;if(!g)return null;j||(k=c(g.prototype,{}));k={cls:g,params:k}}return k}var f=b,h={},i={};f.connect(f,"extend",function(){i={}});this._functionFromScript=function(g,j){var k="",m="";(j=g.getAttribute(j+"args")||g.getAttribute("args"))&&f.forEach(j.split(/\s*,\s*/),function(l,n){k+="var "+l+" = arguments["+n+"]; "});(j=g.getAttribute("with"))&&j.length&&f.forEach(j.split(/\s*,\s*/),
function(l){k+="with("+l+"){";m+="}"});return new Function(k+g.innerHTML+m)};this.instantiate=function(g,j,k){var m=[];j=j||{};k=k||{};var l=(k.scope||f._scopeName)+"Type",n="data-"+(k.scope||f._scopeName)+"-";f.forEach(g,function(o){if(o){var p,t,q,r,v,u;if(o.node){p=o.node;t=o.type;u=o.fastpath;r=(q=o.clsInfo||t&&e(t,u))&&q.cls;v=o.scripts}else{p=o;v=(r=(q=(t=l in j?j[l]:p.getAttribute(l))&&e(t))&&q.cls)&&(r._noScript||r.prototype._noScript)?[]:f.query("> script[type^='dojo/']",p)}if(!q)throw new Error("Could not load class '"+
t);var x={};k.defaults&&f._mixin(x,k.defaults);o.inherited&&f._mixin(x,o.inherited);if(u){if((q=p.getAttribute(n+"props"))&&q.length)try{q=f.fromJson.call(k.propsThis,"{"+q+"}");f._mixin(x,q)}catch(C){throw new Error(C.toString()+" in data-dojo-props='"+q+"'");}if(q=p.getAttribute(n+"attach-point"))x.dojoAttachPoint=q;if(q=p.getAttribute(n+"attach-event"))x.dojoAttachEvent=q;b.mixin(x,j)}else{o=p.attributes;for(var D in q.params){t=D in j?{value:j[D],specified:true}:o.getNamedItem(D);if(!(!t||!t.specified&&
(!b.isIE||D.toLowerCase()!="value"))){t=t.value;switch(D){case "class":t="className"in j?j.className:p.className;break;case "style":t="style"in j?j.style:p.style&&p.style.cssText}var z=q.params[D];x[D]=typeof t=="string"?a(t,z):t}}}var E=[],F=[];f.forEach(v,function(G){p.removeChild(G);var M=G.getAttribute(n+"event")||G.getAttribute("event"),L=G.getAttribute("type");G=f.parser._functionFromScript(G,n);if(M)if(L=="dojo/connect")E.push({event:M,func:G});else x[M]=G;else F.push(G)});var K=(v=r.markupFactory||
r.prototype&&r.prototype.markupFactory)?v(x,p,r):new r(x,p);m.push(K);(r=p.getAttribute(n+"id")||p.getAttribute("jsId"))&&f.setObject(r,K);f.forEach(E,function(G){f.connect(K,G.event,null,G.func)});f.forEach(F,function(G){G.call(K)})}});j._started||f.forEach(m,function(o){if(!k.noStart&&o&&b.isFunction(o.startup)&&!o._started&&(!o.getParent||!o.getParent()))o.startup()});return m};this.parse=function(g,j){function k(p,t){var q=b.clone(p.inherited);b.forEach(["dir","lang"],function(D){var z=p.node.getAttribute(D);
if(z)q[D]=z});for(var r=p.clsInfo&&!p.clsInfo.cls.prototype._noScript?p.scripts:null,v=!p.clsInfo||!p.clsInfo.cls.prototype.stopParser||j&&j.template,u=p.node.firstChild;u;u=u.nextSibling)if(u.nodeType==1){var x,C=v&&u.getAttribute(l+"type");x=C?C:v&&u.getAttribute(m);C=C==x;if(x){x={type:x,fastpath:C,clsInfo:e(x,C),node:u,scripts:[],inherited:q};t.push(x);k(x,t)}else if(r&&u.nodeName.toLowerCase()=="script")(x=u.getAttribute("type"))&&/^dojo\/\w/i.test(x)&&r.push(u);else v&&k({node:u,inherited:q},
t)}}if(!j&&g&&g.rootNode){j=g;g=j.rootNode}else g=g;g=g?b.byId(g):b.body();j=j||{};var m=(j.scope||f._scopeName)+"Type",l="data-"+(j.scope||f._scopeName)+"-",n={};if(j&&j.inherited)for(var o in j.inherited)if(j.inherited[o])n[o]=j.inherited[o];o=[];k({node:g,inherited:n},o);return this.instantiate(o,j&&j.template?{template:true}:null,j)}});(function(){var d=function(){b.config.parseOnLoad&&b.parser.parse()};b.getObject("dijit.wai.onload")===b._loaders[0]?b._loaders.splice(1,0,d):b._loaders.unshift(d)})();
return b.parser});
define("dojo/cache",["dojo"],function(b){var d={};b.cache=function(a,c,e){if(typeof a=="string")var f=b.moduleUrl(a,c);else{f=a;e=c}f=f.toString();var h=e;if(e!=undefined&&!b.isString(e))h="value"in e?e.value:undefined;e=e&&e.sanitize?true:false;if(typeof h=="string")h=d[f]=e?b.cache._sanitize(h):h;else if(h===null)delete d[f];else{if(!(f in d)){h=undefined;if(b.isFunction(require)&&b.isString(a))try{var i=(a?a.replace(/\./g,"/")+"/":"")+c;h=require("text!"+i)}catch(g){}if(typeof h==="undefined")h=
b._getText(f);d[f]=e?b.cache._sanitize(h):h}h=d[f]}return h};b.cache._sanitize=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(c)a=c[1]}else a="";return a};return b.cache});
define("dijit/_Templated",["dojo","dijit","dijit/_Widget","dojo/string","dojo/parser","dojo/cache"],function(b,d){b.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var c=this.declaredClass,e=this;return b.string.substitute(a,this,function(f,h){if(h.charAt(0)=="!")f=b.getObject(h.substr(1),false,e);if(typeof f==
"undefined")throw new Error(c+" template:"+h);if(f==null)return"";return h.charAt(0)=="!"?f:f.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=d._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),c;if(b.isString(a)){c=b._toDom(this._stringRepl(a));if(c.nodeType!=1)throw new Error("Invalid template: "+a);}else c=a.cloneNode(true);this.domNode=c;this.inherited(arguments);this._attachTemplateNodes(c);if(this.widgetsInTemplate){a=this._startupWidgets=
b.parser.parse(c,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"});this._supportingWidgets=d.findWidgets(c);this._attachTemplateNodes(a,function(e,f){return e[f]})}this._fillContent(this.srcNodeRef)},_fillContent:function(a){var c=this.containerNode;if(a&&c)for(;a.hasChildNodes();)c.appendChild(a.firstChild)},_attachTemplateNodes:function(a,c){c=c||function(m,l){return m.getAttribute(l)};for(var e=b.isArray(a)?a:a.all||a.getElementsByTagName("*"),
f=b.isArray(a)?0:-1;f<e.length;f++){var h=f==-1?a:e[f];if(!(this.widgetsInTemplate&&(c(h,"dojoType")||c(h,"data-dojo-type")))){var i=c(h,"dojoAttachPoint")||c(h,"data-dojo-attach-point");if(i)for(var g=i.split(/\s*,\s*/);i=g.shift();){if(b.isArray(this[i]))this[i].push(h);else this[i]=h;this._attachPoints.push(i)}if(i=c(h,"dojoAttachEvent")||c(h,"data-dojo-attach-event")){g=i.split(/\s*,\s*/);for(var j=b.trim;i=g.shift();)if(i){var k=null;if(i.indexOf(":")!=-1){k=i.split(":");i=j(k[0]);k=j(k[1])}else i=
j(i);k||(k=i);this._attachEvents.push(this.connect(h,i,k))}}(i=c(h,"waiRole"))&&d.setWaiRole(h,i);(i=c(h,"waiState"))&&b.forEach(i.split(/\s*,\s*/),function(m){if(m.indexOf("-")!=-1){m=m.split("-");d.setWaiState(h,m[0],m[1])}})}}},startup:function(){b.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){b.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];b.forEach(this._attachEvents,
this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});d._Templated._templateCache={};d._Templated.getCachedTemplate=function(a,c,e){var f=d._Templated._templateCache,h=c||a,i=f[h];if(i){try{if(!i.ownerDocument||i.ownerDocument==b.doc)return i}catch(g){}b.destroy(i)}c||(c=b.cache(a,{sanitize:true}));c=b.string.trim(c);if(e||c.match(/\$\{([^\}]+)\}/g))return f[h]=c;else{a=b._toDom(c);if(a.nodeType!=1)throw new Error("Invalid template: "+c);return f[h]=a}};b.isIE&&b.addOnWindowUnload(function(){var a=
d._Templated._templateCache;for(var c in a){var e=a[c];typeof e=="object"&&b.destroy(e);delete a[c]}});b.extend(d._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return d._Templated});
define("dijit/_CssStateMixin",["dojo","dijit"],function(b,d){b.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);b.forEach(["onmouseenter","onmouseleave","onmousedown"],function(c){this.connect(this.domNode,c,"_cssMouseEvent")},this);b.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active"],function(c){this.watch(c,b.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseenter":case "mouseover":this._set("hovering",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 c=this.connect(b.body(),"onmouseup",function(){this._mouseDown=false;this._set("active",false);this.disconnect(c)});break}},_setStateClass:function(){function a(g){c=
c.concat(b.map(c,function(j){return j+g}),"dijit"+g)}var c=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 e=this.stateNode||this.domNode,f={};b.forEach(e.className.split(" "),function(g){f[g]=true});"_stateClasses"in this&&b.forEach(this._stateClasses,
function(g){delete f[g]});b.forEach(c,function(g){f[g]=true});var h=[];for(var i in f)h.push(i);e.className=h.join(" ");this._stateClasses=c},_trackMouseState:function(a,c){function e(){var k="disabled"in g&&g.disabled||"readonly"in g&&g.readonly;b.toggleClass(a,c+"Hover",f&&!h&&!k);b.toggleClass(a,c+"Active",h&&!k);b.toggleClass(a,c+"Focused",i&&!k)}var f=false,h=false,i=false,g=this,j=b.hitch(this,"connect",a);j("onmouseenter",function(){f=true;e()});j("onmouseleave",function(){h=f=false;e()});
j("onmousedown",function(){h=true;e()});j("onmouseup",function(){h=false;e()});j("onfocus",function(){i=true;e()});j("onblur",function(){i=false;e()});this.watch("disabled",e);this.watch("readOnly",e)}});return d._CssStateMixin});
define("dijit/form/_FormWidget",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated","dijit/_CssStateMixin"],function(b,d){b.declare("dijit.form._FormWidget",[d._Widget,d._Templated,d._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:b.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);b.attr(this.focusNode,"disabled",a);this.valueNode&&b.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";
b.forEach(b.isArray(a)?a:[a],function(c){c=this[c];b.isWebKit||d.hasDefaultTabStop(c)?c.setAttribute("tabIndex","-1"):c.removeAttribute("tabIndex")},this)}else this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){b.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(){this.scrollOnFocus&&b.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&
this.focusNode&&b.style(this.domNode,"display")!="none"},focus:function(){this.disabled||d.focus(this.focusNode)},compare:function(a,c){return typeof a=="number"&&typeof c=="number"?isNaN(a)&&isNaN(c)?0:a-c:a>c?1:a<c?-1:0},onChange:function(){},_onChangeActive:false,_handleOnChange:function(a,c){if(this._lastValueReported==undefined&&(c===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||c||c===undefined)&&this._pendingOnChange){this._lastValueReported=a;this._pendingOnChange=false;if(this._onChangeActive){this._onChangeHandle&&clearTimeout(this._onChangeHandle);this._onChangeHandle=setTimeout(b.hitch(this,function(){this._onChangeHandle=null;this.onChange(a)}),0)}}},create:function(){this.inherited(arguments);this._onChangeActive=true},destroy:function(){if(this._onChangeHandle){clearTimeout(this._onChangeHandle);this.onChange(this._lastValueReported)}this.inherited(arguments)},
setValue:function(a){b.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){b.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&b.mouseButtons.isLeft(a)&&this.isFocusable())var c=this.connect(b.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(c)})}});b.declare("dijit.form._FormValueWidget",
d.form._FormWidget,{readOnly:false,attributeMap:b.delegate(d.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){b.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(b.isIE<9||b.isIE&&b.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===undefined)this._lastValueReported=this._resetValue=this.value},
_setValueAttr:function(a,c){this._handleOnChange(a,c)},_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==b.keys.ESCAPE&&!(a.ctrlKey||a.altKey||a.metaKey)){var c;if(b.isIE){a.preventDefault();c=document.createEventObject();c.keyCode=b.keys.ESCAPE;c.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",
c)}}},_layoutHackIE7:function(){if(b.isIE==7)for(var a=this.domNode,c=a.parentNode,e=a.firstChild||a,f=e.style.filter,h=this;c&&c.clientHeight==0;){(function(){var i=h.connect(c,"onscroll",function(){h.disconnect(i);e.style.filter=(new Date).getMilliseconds();setTimeout(function(){e.style.filter=f},0)})})();c=c.parentNode}}});return d.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(b,d){b.declare("dijit.form.TextBox",d.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",templateString:b.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:b.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:b.delegate(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=b.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after")}this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));this._updatePlaceHolder()},_updatePlaceHolder:function(){if(this._phspan)this._phspan.style.display=this.placeHolder&&!this._focused&&!this.textbox.value?"":"none"},_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,
c,e){var f;if(a!==undefined){f=this.filter(a);if(typeof e!="string")e=f!==null&&(typeof f!="number"||!isNaN(f))?this.filter(this.format(f,this.constraints)):""}if(e!=null&&e!=undefined&&(typeof e!="number"||!isNaN(e))&&this.textbox.value!=e){this.textbox.value=e;this._set("displayedValue",this.get("displayedValue"))}this._updatePlaceHolder();this.inherited(arguments,[f,c])},displayedValue:"",getDisplayedValue:function(){b.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.",
"","2.0");return this.get("displayedValue")},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},setDisplayedValue:function(a){b.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_setDisplayedValueAttr:function(a){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 b.keys.SHIFT:case b.keys.ALT:case b.keys.CTRL:case b.keys.TAB:return}if(this.intermediateChanges){var c=this;setTimeout(function(){c._handleOnChange(c.get("value"),false)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},
postCreate:function(){b.isIE&&setTimeout(b.hitch(this,function(){var a=b.getComputedStyle(this.domNode);if(a)if(a=a.fontFamily){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(var e=0;e<c.length;e++)c[e].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(b.isMoz||b.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=b.trim(a);if(this.uppercase)a=a.toUpperCase();if(this.lowercase)a=a.toLowerCase();if(this.propercase)a=a.replace(/[^\s]+/g,function(c){return c.substring(0,1).toUpperCase()+c.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&&b.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 c;if(b.isIE){c=b.doc.selection.createRange();c=c.parentElement()==this.textbox&&
c.text.length==0}else c=this.textbox.selectionStart==this.textbox.selectionEnd;c&&d.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});d.selectInputText=function(a,c,e){var f=b.global,h=b.doc;a=b.byId(a);if(isNaN(c))c=0;if(isNaN(e))e=a.value?a.value.length:0;d.focus(a);if(h.selection&&b.body().createTextRange){if(a.createTextRange){a=a.createTextRange();a.collapse(true);a.moveStart("character",
-99999);a.moveStart("character",c);a.moveEnd("character",e-c);a.select()}}else f.getSelection&&a.setSelectionRange&&a.setSelectionRange(c,e)};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(b,d){b.declare("dijit._MasterTooltip",[d._Widget,d._Templated],{duration:d.defaultDuration,templateString:b.cache("dijit","templates/Tooltip.html"),postCreate:function(){b.body().appendChild(this.domNode);this.bgIframe=new d.BackgroundIframe(this.domNode);this.fadeIn=b.fadeIn({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onShow")});this.fadeOut=b.fadeOut({node:this.domNode,
duration:this.duration,onEnd:b.hitch(this,"_onHide")})},show:function(a,c,e,f){if(!(this.aroundNode&&this.aroundNode===c)){this.domNode.width="auto";if(this.fadeOut.status()=="playing")this._onDeck=arguments;else{this.containerNode.innerHTML=a;d.placeOnScreenAroundElement(this.domNode,c,d.getPopupAroundAlignment(e&&e.length?e:d.Tooltip.defaultPosition,!f),b.hitch(this,"orient"));b.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=c}}},orient:function(a,c,e,
f,h){this.connectorNode.style.top="";var i=f.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"}[c+"-"+e];this.domNode.style.width="auto";var g=b.contentBox(this.domNode),j=Math.min(Math.max(i,1),g.w),k=j<g.w;this.domNode.style.width=j+"px";if(k){this.containerNode.style.overflow=
"auto";k=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(k>j){k=k+b.style(this.domNode,"paddingLeft")+b.style(this.domNode,"paddingRight");this.domNode.style.width=k+"px"}}if(e.charAt(0)=="B"&&c.charAt(0)=="B"){a=b.marginBox(a);c=this.connectorNode.offsetHeight;if(a.h>f.h){this.connectorNode.style.top=f.h-h.h/2-c/2+"px";this.connectorNode.style.bottom=""}else{this.connectorNode.style.bottom=Math.min(Math.max(h.h/2-c/2,0),a.h-c)+"px";this.connectorNode.style.top=""}}else{this.connectorNode.style.top=
"";this.connectorNode.style.bottom=""}return Math.max(0,g.w-i)},_onShow:function(){if(b.isIE)this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a){this.fadeIn.stop();this.isShowingNow=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,c,e,f){if(!d._masterTT)d._masterTT=
new d._MasterTooltip;return d._masterTT.show(a,c,e,f)};d.hideTooltip=function(a){if(!d._masterTT)d._masterTT=new d._MasterTooltip;return d._masterTT.hide(a)};b.declare("dijit.Tooltip",d._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){b.forEach(this._connections||[],function(e){b.forEach(e,b.hitch(this,"disconnect"))},this);var c=b.isArrayLike(a)?a:a?[a]:[];this._connections=b.map(c,function(e){return(e=b.byId(e))?[this.connect(e,"onmouseenter","_onTargetMouseEnter"),
this.connect(e,"onmouseleave","_onTargetMouseLeave"),this.connect(e,"onfocus","_onTargetFocus"),this.connect(e,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=c},addTarget:function(a){a=a.id||a;b.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=b.indexOf(this._connectIds,a.id||a);if(a>=0){this._connectIds.splice(a,1);this.set("connectId",this._connectIds)}},buildRendering:function(){this.inherited(arguments);
b.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;b.forEach(b.isArrayLike(a)?a:[a],this.addTarget,this)},_onTargetMouseEnter:function(a){this._onHover(a)},_onTargetMouseLeave:function(a){this._onUnHover(a)},_onTargetFocus:function(a){this._focus=true;this._onHover(a)},_onTargetBlur:function(a){this._focus=false;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var c=a.target;this._showTimer=setTimeout(b.hitch(this,function(){this.open(c)}),
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 b(c,e,f,h,i,g){if(e[c]){f.push(c);if(e[c]===true||e[c]===1)h.push(i+c+"/"+g)}}function d(c,e,f,h,i){e=h+e+"/"+i;require._fileExists(c.nameToUrl(e,null))&&f.push(e)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",{version:"0.24.0",load:function(c,e,f,h){h=h||{};var i=a.exec(c),g=i[1],j=i[4],k=i[5],m=j.split("-"),l=[],n={},o,p,t="";if(i[5]){g=i[1];c=g+k}else{c=c;k=i[4];j=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||
"root").toLowerCase());m=j.split("-")}if(h.isBuild){l.push(c);d(e,"root",l,g,k);for(o=0;p=m[o];o++){t+=(t?"-":"")+p;d(e,t,l,g,k)}e(l);f()}else e([c],function(q){var r=[];b("root",q,r,l,g,k);for(o=0;p=m[o];o++){t+=(t?"-":"")+p;b(t,q,r,l,g,k)}e(l,function(){var v,u;for(v=r.length-1;v>-1&&(p=r[v]);v--){u=q[p];if(u===true||u===1)u=e(g+p+"/"+k);require.mixin(n,u)}f(n)})})}})})();
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(b,d){b.declare("dijit.form.ValidationTextBox",d.form.TextBox,{templateString:b.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,c){return(new RegExp("^(?:"+this.regExpGen(c)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,c)!==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 c="",e=this.disabled||this.isValid(a);if(e)this._maskValidSubsetError=true;var f=this._isEmpty(this.textbox.value),h=!e&&a&&this._isValidSubset();this._set("state",e?"":((!this._hasBeenBlurred||a)&&f||h)&&this._maskValidSubsetError?
"Incomplete":"Error");d.setWaiState(this.focusNode,"invalid",e?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=a&&h;c=this.getErrorMessage(a)}else if(this.state=="Incomplete"){c=this.getPromptMessage(a);this._maskValidSubsetError=!this._hasBeenBlurred||a}else if(f)c=this.getPromptMessage(a);this.set("message",c);return e},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 c="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(f){switch(f.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=f;break;case ")":c+="|$)";break;
default:c+="(?:"+f+"|$)";break}});try{"".search(c)}catch(e){c=this.regExp;console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+c+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$")this.invalidMessage=this.messages.invalidMessage;if(!this.invalidMessage)this.invalidMessage=this.promptMessage;if(this.missingMessage=="$_unset_$")this.missingMessage=
this.messages.missingMessage;if(!this.missingMessage)this.missingMessage=this.invalidMessage;this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(){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)}});b.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=b.place("<input type='hidden'"+(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});b.declare("dijit.form.RangeBoundTextBox",d.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,c){return("min"in c?this.compare(a,c.min)>=0:true)&&("max"in c?this.compare(a,c.max)<=0:true)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=
this.get("value"),c=false,e=false;if("min"in this.constraints){c=this.constraints.min;c=this.compare(a,typeof c=="number"&&c>=0&&a!=0?0:c);c=typeof c=="number"&&c<0}if("max"in this.constraints){e=this.constraints.max;e=this.compare(a,typeof e!="number"||e>0?e:0);e=typeof e=="number"&&e>0}return c||e},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(a){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||
this.isInRange(a))},getErrorMessage:function(a){var c=this.get("value");if(c!==null&&c!==""&&c!==undefined&&(typeof c!="number"||!isNaN(c))&&!this.isInRange(a))return this.rangeMessage;return this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage}},_setConstraintsAttr:function(){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(b,d){function a(u){v=u}function c(){return v}function e(u){var x="",C=navigator.platform.indexOf("Mac")!==-1;if(u.mod1)x+=C?"Cmd+":"Ctrl+";if(u.mod2)x+="Shift+";if(u.mod3)x+="Alt+";if(u.alphaKey)return x+u.alphaKey;for(var D in b.keys)if(typeof(b.keys[D]==="number"))if(b.keys[D]===u.keyCode)return x+D;var z;switch(u.keyCode){case 59:z=u.mod2?":":";";break;case 61:z=u.mod2?"+":"=";break;case 188:z=u.mod2?"<":",";
break;case 190:z=u.mod2?">":".";break;case 191:z=u.mod2?"?":"/";break;case 192:z=u.mod2?"~":"`";break;case 219:z=u.mod2?"{":"[";break;case 220:z=u.mod2?"|":"\\";break;case 221:z=u.mod2?"}":"]";break;case 222:z=u.mod2?'"':"'";break}if(z)return x+z;return x+String.fromCharCode(u.keyCode)}function f(u,x){u.startup();if(typeof x==="string"){var C=b.byId(x);if(!C)if(C=d.byId(x))C=C.domNode;x=C?C:null}if(x){x=b.position(x);u._setStyleAttr("left:"+(x.x+16)+"px !important;");u._setStyleAttr("top:"+(x.y+16)+
"px !important;")}u.show()}function h(u,x,C,D,z,E,F,K){F=function(M){return function(L){var P=d.byId(u),Q=P.get("value");if(M&&L.keyCode===b.keys.ESCAPE){C&&b.style(x,"display","inline");P.destroyRecursive();E&&E()}else if(!(M&&L.keyCode!==b.keys.ENTER)){if(!P.isValid()||Q===D)C&&b.style(x,"display","inline");else z(Q);P.destroyRecursive();E&&E()}}};var G=new d.form.ValidationTextBox({id:u,required:true,value:D||""});b.place(G.domNode,x,"after");b.addClass(G.domNode,"userEditBoxPrompt");C&&b.style(x,
"display","none");b.connect(G,"onKeyDown",F(true));b.connect(G,"onBlur",F(false));window.setTimeout(function(){G.focus();if(D){var M=b.byId(u),L=K?D.indexOf(K):-1;L>0?d.selectInputText(M,0,L):M.select()}},0)}function i(u){var x=window.navigator.platform.indexOf("Mac")!==-1;return x&&u.metaKey||!x&&u.ctrlKey}function g(u,x){if(x&&i(x))window.open(u);else window.location=u}function j(u){if(!u)return u;var x=window.location.href.split("#")[0];x=x.substring(0,x.length-window.location.pathname.length);
if(u.indexOf(x)===0)return u.substring(x.length);return u}function k(u){var x,C,D,z,E;u=u.split("#");var F=u[u.length-1].split(/\?(?=(?:line|char))/);u=j(F[0]);if(F.length>1){F=F[1].split(/\&(?=(?:line|char))/);for(var K=0;K<F.length;K++){var G=F[K].split("=");if(G.length>1)switch(G[0]){case "char":G=G[1].split(",");if(D===undefined){x=window.parseInt(G[0]);if(G.length>1)C=window.parseInt(G[1])}else{z=G[0];if(G.length>1)E=window.parseInt(G[1]-z)}break;case "line":G=G[1].split(",");D=window.parseInt(G[0]);
break;default:break}}}return{filePath:u,start:x,end:C,line:D,offset:z,length:E}}function m(u,x,C,D,z,E){if(typeof x==="number"){u="#"+u+"?char="+x;if(typeof C==="number")u=u+","+C;else if(typeof E==="number")u=u+","+(x+E);return u}if(typeof D==="number"){u="#"+u+"?line="+D;if(typeof z==="number"){u=u+"&char="+z;if(typeof E==="number")u=u+","+(z+E)}return u}return"#"+u}function l(u){if(!u)return u;var x=window.location.href.split("#")[0];return x.substring(0,x.length-window.location.pathname.length)+
u}function n(u){return this.makeRelative(u).indexOf("/workspace")===0}function o(u,x){u.children=x;for(var C in x)x[C].parent=u;u.children.sort(function(D,z){var E=D.Directory;if(E!==z.Directory)return E?-1:1;D=D.Name&&D.Name.toLowerCase();z=z.Name&&z.Name.toLowerCase();if(D<z)return-1;if(D>z)return 1;return 0})}function p(u,x){u.Parents&&u.Parents.length===0&&x.getService("orion.core.preference").then(function(C){return C.getPreferences("/window/recent")}).then(function(C){var D=C.get("projects");
if(typeof D==="string")D=JSON.parse(D);var z=[];if(D&&D.length&&D.length>0)for(var E=0;E<D.length;E++)D[E].location!==u.ChildrenLocation&&D[E].name!==u.Name&&z.push(D[E]);z.push({name:u.Name,location:u.ChildrenLocation});if(z.length>5)z=z.slice(-5,z.length);C.put("projects",z)})}function t(u){return typeof u.textContent!=="undefined"?u.textContent:u.innerText}function q(u){return t(document.createTextNode(u))}function r(u,x){if(typeof u.textContent!=="undefined")u.textContent=x;else u.innerText=x}
var v=null;return{setUserName:a,getUserName:c,getUserKeyString:e,openDialog:f,getUserText:h,openInNewWindow:i,followLink:g,getPositionInfo:k,hashFromPosition:m,makeRelative:j,makeFullPath:l,isAtRoot:n,processNavigatorParent:o,rememberSuccessfulTraversal:p,getText:t,safeText:q,setText:r}});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(b,d){b.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,c){var e=this.containerNode;if(c&&typeof c=="number"){var f=this.getChildren();if(f&&f.length>=c){e=f[c-1].domNode;c="after"}}b.place(a.domNode,e,c);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){b.forEach(this.getChildren(),function(c){c.destroyRecursive(a)})},_getSiblingOfChild:function(a,c){a=a.domNode;c=c>0?"nextSibling":"previousSibling";do a=a[c];while(a&&(a.nodeType!=1||!d.byNode(a)));return a&&d.byNode(a)},getIndexOfChild:function(a){return b.indexOf(this.getChildren(),a)},startup:function(){if(!this._started){b.forEach(this.getChildren(),
function(a){a.startup()});this.inherited(arguments)}}});return d._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(b,d){b.declare("dijit._KeyNavContainer",d._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,c){var e=this._keyNavCodes={},f=b.hitch(this,this.focusPrev),h=b.hitch(this,this.focusNext);b.forEach(a,function(i){e[i]=f});b.forEach(c,function(i){e[i]=h});e[b.keys.HOME]=b.hitch(this,"focusFirstChild");e[b.keys.END]=b.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){b.forEach(this.getChildren(),b.hitch(this,"_startupChild"))},addChild:function(a){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,c){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(c?"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();b.attr(this.domNode,"tabIndex","-1")}},_onBlur:function(){this.tabIndex&&b.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!(a.ctrlKey||a.altKey)){var c=this._keyNavCodes[a.charOrCode];if(c){c();b.stopEvent(a)}}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
c){if(a)a=this._getSiblingOfChild(a,c);for(var e=this.getChildren(),f=0;f<e.length;f++){a||(a=e[c>0?0:e.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,c)}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(b,d){b.declare("dijit._Contained",null,{getParent:function(){var a=d.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var c=this.domNode;do c=c[a+"Sibling"];while(c&&c.nodeType!=1);return c&&d.byNode(c)},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(b,d){b.declare("dijit.MenuItem",[d._Widget,d._Templated,d._Contained,d._CssStateMixin],{templateString:b.cache("dijit","templates/MenuItem.html"),attributeMap:b.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";b.attr(this.containerNode,"id",a);if(this.accelKeyNode){b.attr(this.accelKeyNode,"id",this.id+"_accel");a+=" "+this.id+"_accel"}d.setWaiState(this.domNode,"labelledby",a);b.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);b.stopEvent(a)},onClick:function(){},focus:function(){try{b.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){b.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){b.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){b.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){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;b.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return d.MenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(b,d){b.declare("dijit.PopupMenuItem",d.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=b.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=b.query("[widgetId]",this.dropDownContainer)[0];this.popup=d.byNode(a)}b.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&b.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(b,d){b.declare("dijit.CheckedMenuItem",d.MenuItem,{templateString:b.cache("dijit","templates/CheckedMenuItem.html"),checked:false,_setCheckedAttr:function(a){b.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(b,d){b.declare("dijit.MenuSeparator",[d._Widget,d._Templated,d._Contained],{templateString:b.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);b.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(b,d){b.declare("dijit._MenuBase",[d._Widget,d._Templated,d._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){if(!this._started){b.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(b.hitch(this,"_openPopup"),this.popupDelay)}this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(false);var c=a.popup;if(c){this._stopPendingCloseTimer(c);c._pendingClose_timer=setTimeout(function(){c._pendingClose_timer=null;if(c.parentMenu)c.parentMenu.currentPopup=
null;d.popup.close(c)},this.popupDelay)}},onItemUnhover:function(a){this.isActive&&this._stopPopupTimer();if(this._hoveredChild==a)this._hoveredChild=null},_stopPopupTimer:function(){if(this.hover_timer){clearTimeout(this.hover_timer);this.hover_timer=null}},_stopPendingCloseTimer:function(a){if(a._pendingClose_timer){clearTimeout(a._pendingClose_timer);a._pendingClose_timer=null}},_stopFocusTimer:function(){if(this._focus_timer){clearTimeout(this._focus_timer);this._focus_timer=null}},_getTopMenu:function(){for(var a=
this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,c){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return false;if(a.popup)this._openPopup();else{this.onExecute();a.onClick(c)}},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var c=a.popup;if(!c.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);d.popup.close(this.currentPopup)}c.parentMenu=this;c.from_item=a;var e=this;d.popup.open({parent:this,
popup:c,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(){e.focusChild(a);e._cleanUp();a._setSelected(true);e.focusedChild=a},onExecute:b.hitch(this,"_cleanUp")});this.currentPopup=c;c.connect(c.domNode,"onmouseenter",b.hitch(e,"_onPopupHover"));if(c.focus)c._focus_timer=setTimeout(b.hitch(c,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=true;b.replaceClass(this.domNode,
"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=true;this._markActive()},_markInactive:function(){this.isActive=false;b.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&&b.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()}});b.declare("dijit.Menu",d._MenuBase,{constructor:function(){this._bindings=[]},templateString:b.cache("dijit",
"templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(b.body()):b.forEach(this.targetNodeIds,this.bindDomNode,this);var a=b.keys,c=this.isLeftToRight();this._openSubMenuKey=c?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=c?a.LEFT_ARROW:a.RIGHT_ARROW;this.connectKeyNavHandlers([a.UP_ARROW],[a.DOWN_ARROW])},_onKeyPress:function(a){if(!(a.ctrlKey||a.altKey))switch(a.charOrCode){case this._openSubMenuKey:this._moveToPopup(a);
b.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)this.parentMenu._isMenuBar?this.parentMenu.focusPrev():this.onCancel(false);else b.stopEvent(a);break}},_iframeContentWindow:function(a){return b.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&b.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&b.doc.frames[a.name]&&b.doc.frames[a.name].document||
null},bindDomNode:function(a){a=b.byId(a);var c;if(a.tagName.toLowerCase()=="iframe"){var e=a,f=this._iframeContentWindow(e);c=b.withGlobal(f,b.body)}else c=a==b.body()?b.doc.documentElement:a;var h={node:a,iframe:e};b.attr(a,"_dijitMenu"+this.id,this._bindings.push(h));var i=b.hitch(this,function(g){return[b.connect(g,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(j){b.stopEvent(j);this._scheduleOpen(j.target,e,{x:j.pageX,y:j.pageY})}),b.connect(g,"onkeydown",this,function(j){if(j.shiftKey&&
j.keyCode==b.keys.F10){b.stopEvent(j);this._scheduleOpen(j.target,e)}})]});h.connects=c?i(c):[];if(e){h.onloadHandler=b.hitch(this,function(){var g=this._iframeContentWindow(e);c=b.withGlobal(g,b.body);h.connects=i(c)});e.addEventListener?e.addEventListener("load",h.onloadHandler,false):e.attachEvent("onload",h.onloadHandler)}},unBindDomNode:function(a){var c;try{c=b.byId(a)}catch(e){return}a="_dijitMenu"+this.id;if(c&&b.hasAttr(c,a)){var f=b.attr(c,a)-1,h=this._bindings[f];b.forEach(h.connects,b.disconnect);
var i=h.iframe;if(i)i.removeEventListener?i.removeEventListener("load",h.onloadHandler,false):i.detachEvent("onload",h.onloadHandler);b.removeAttr(c,a);delete this._bindings[f]}},_scheduleOpen:function(a,c,e){if(!this._openTimer)this._openTimer=setTimeout(b.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:c,coords:e})}),1)},_openMyself:function(a){function c(){k.refocus&&d.focus(m);d.popup.close(k)}var e=a.target,f=a.iframe;if(a=a.coords){if(f){e=b.position(f,true);var h=
this._iframeContentWindow(f);h=b.withGlobal(h,"_docScroll",b);var i=b.getComputedStyle(f),g=b._toPixelValue,j=(b.isIE&&b.isQuirks?0:g(f,i.paddingLeft))+(b.isIE&&b.isQuirks?g(f,i.borderLeftWidth):0);f=(b.isIE&&b.isQuirks?0:g(f,i.paddingTop))+(b.isIE&&b.isQuirks?g(f,i.borderTopWidth):0);a.x+=e.x+j-h.x;a.y+=e.y+f-h.y}}else{a=b.position(e,true);a.x+=10;a.y+=10}var k=this,m=d.getFocus(this);d.popup.open({popup:this,x:a.x,y:a.y,onExecute:c,onCancel:c,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=
function(){this.inherited("_onBlur",arguments);d.popup.close(this)}},uninitialize:function(){b.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(b,d){b.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)){b.stopEvent(a);this._docHandler=this.connect(b.doc,"onmouseup","_onDropDownMouseUp");this.toggleDropDown()}},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var c=this.dropDown,e=false;if(a&&this._opened){var f=b.position(this._buttonNode,true);if(!(a.pageX>=f.x&&a.pageX<=f.x+f.w)||!(a.pageY>=f.y&&a.pageY<=f.y+f.h)){for(f=a.target;f&&!e;)if(b.hasClass(f,"dijitPopup"))e=true;else f=f.parentNode;if(e){f=a.target;if(c.onItemClick){for(var h;f&&!(h=d.byNode(f));)f=f.parentNode;h&&h.onClick&&h.getParent&&h.getParent().onItemClick(h,a)}return}}}this._opened&&c.focus&&c.autoFocus!==false&&window.setTimeout(b.hitch(c,
"focus"),1)},_onDropDownClick:function(a){this._stopClickEvents&&b.stopEvent(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";b.addClass(this._arrowWrapperNode||
this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,"onmousedown","_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp")},destroy:function(){if(this.dropDown){this.dropDown._destroyed||this.dropDown.destroyRecursive();delete this.dropDown}this.inherited(arguments)},_onKey:function(a){if(!(this.disabled||
this.readOnly)){var c=this.dropDown,e=a.target;if(c&&this._opened&&c.handleKey)if(c.handleKey(a)===false){b.stopEvent(a);return}if(c&&this._opened&&a.charOrCode==b.keys.ESCAPE){this.closeDropDown();b.stopEvent(a)}else if(!this._opened&&(a.charOrCode==b.keys.DOWN_ARROW||(a.charOrCode==b.keys.ENTER||a.charOrCode==" ")&&((e.tagName||"").toLowerCase()!=="input"||e.type&&e.type.toLowerCase()!=="text"))){this._toggleOnKeyUp=true;b.stopEvent(a)}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(b.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(d._curFocus&&this.dropDown&&b.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(b.hitch(this,"openDropDown"))},openDropDown:function(){var a=
this.dropDown,c=a.domNode,e=this._aroundNode||this.domNode,f=this;if(!this._preparedNode){this._preparedNode=true;if(c.style.width)this._explicitDDWidth=true;if(c.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="";b.style(c,h);h=this.maxHeight;if(h==-1){h=b.window.getBox();var i=b.position(e,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=b._getMarginSize(c);var g=h&&i.h>h;b.style(c,{overflowX:"hidden",overflowY:g?"auto":"hidden"});if(g){i.h=h;if("w"in i)i.w+=16}else delete i.h;if(this.forceWidth)i.w=e.offsetWidth;else if(this.autoWidth)i.w=Math.max(i.w,e.offsetWidth);else delete i.w;b.isFunction(a.resize)?a.resize(i):b.marginBox(c,i)}a=d.popup.open({parent:this,popup:a,around:e,orient:d.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:
["below"],this.isLeftToRight()),onExecute:function(){f.closeDropDown(true)},onCancel:function(){f.closeDropDown(true)},onClose:function(){b.attr(f._popupStateNode,"popupActive",false);b.removeClass(f._popupStateNode,"dijitHasDropDownOpen");f._opened=false}});b.attr(this._popupStateNode,"popupActive","true");b.addClass(f._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(b,d){b.declare("dijit.form.Button",d.form._FormWidget,{label:"",showLabel:true,iconClass:"",type:"button",baseClass:"dijitButton",templateString:b.cache("dijit.form","templates/Button.html"),attributeMap:b.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 c=this.domNode;c.parentNode;c=c.parentNode){var e=d.byNode(c);if(e&&typeof e._onSubmit=="function"){e._onSubmit(a);break}}else if(this.valueNode){this.valueNode.click();a.preventDefault()}},buildRendering:function(){this.inherited(arguments);b.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&&b.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return true},_clicked:function(){},setLabel:function(a){b.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this._set("label",a);this.containerNode.innerHTML=
a;if(this.showLabel==false&&!this.params.title)this.titleNode.title=b.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){b.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});b.declare("dijit.form.DropDownButton",[d.form.Button,d._Container,d._HasDropDown],{baseClass:"dijitDropDownButton",templateString:b.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
b.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=b.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 c=b.connect(a,"onLoad",this,function(){b.disconnect(c);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});b.declare("dijit.form.ComboButton",d.form.DropDownButton,{templateString:b.cache("dijit.form","templates/ComboButton.html"),attributeMap:b.mixin(b.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==b.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){d.focus(this._popupStateNode);b.stopEvent(a)}},_onArrowKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){d.focus(this.titleNode);b.stopEvent(a)}},focus:function(a){this.disabled||d.focus(a=="start"?this.titleNode:this._popupStateNode)}});
b.declare("dijit.form.ToggleButton",d.form.Button,{baseClass:"dijitToggleButton",checked:false,attributeMap:b.mixin(b.clone(d.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,c){this._set("checked",a);b.attr(this.focusNode||this.domNode,"checked",a);d.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,c)},setChecked:function(a){b.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(b,d){return d.form.DropDownButton});
define("orion/commands",["dojo","dijit","orion/util","dijit/Menu","dijit/form/DropDownButton","dijit/MenuItem","dijit/PopupMenuItem","dijit/MenuSeparator"],function(b,d,a){function c(i){this._domScope={};this._objectScope={};this._globalScope={};this._namedGroups={};this._activeBindings={};this._init(i)}function e(i){this._init(i)}function f(i,g,j,k,m){this.keyCode=typeof i==="string"?i.toUpperCase().charCodeAt(0):i;this.mod1=g!==undefined&&g!==null?g:false;this.mod2=j!==undefined&&j!==null?j:false;
this.mod3=k!==undefined&&k!==null?k:false;this.mod4=m!==undefined&&m!==null?m:false}c.prototype={_init:function(i){this._registry=i.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._selection=i.selection;b.connect(window.document,"onkeydown",b.hitch(this,function(g){g=g||window.event;var j=g.target.nodeName.toLowerCase();if(j==="input")switch(g.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(j===
"textarea")return;this._processKey(g)}))},_processKey:function(i){function g(l){if(window.document.all)l.keyCode=0;else{l.preventDefault();l.stopPropagation()}}for(var j in this._activeBindings)if(this._activeBindings[j]&&this._activeBindings[j].keyBinding&&this._activeBindings[j].command)if(this._activeBindings[j].keyBinding.match(i)){var k=this._activeBindings[j],m=k.command;if(m.hrefCallback){g(i);i=m.hrefCallback.call(k.handler||window,k.items,j,k.userData);i.then?i.then(function(l){window.open(l)}):
window.open(i);return}else if(m.callback){g(i);window.setTimeout(function(){m.callback.call(k.handler||window,k.items,j,null,k.userData)},0);return}}},getSelectionService:function(){return this._selection},showKeyBindings:function(i){for(var g in this._activeBindings)this._activeBindings[g]&&this._activeBindings[g].keyBinding&&this._activeBindings[g].command&&b.place("<span>"+a.getUserKeyString(this._activeBindings[g].keyBinding)+" = "+this._activeBindings[g].command.name+"<br></span>",i,"last")},
addCommand:function(i,g){switch(g){case "dom":this._domScope[i.id]=i;break;case "object":this._objectScope[i.id]=i;break;case "global":this._globalScope[i.id]=i;break;default:throw"unrecognized command scope "+g;}},addCommandGroup:function(i,g,j,k,m){var l=this._namedGroups;if(k)l=this._createEntryForPath(k);if(l[i]){if(j)l[i].title=j;if(g)l[i].position=g;if(m)l[i].scopeId=m}else{l[i]={title:j,position:g,children:{},scopeId:m};l.sortedCommands=null}},_createEntryForPath:function(i){var g=this._namedGroups;
if(i){i=i.split("/");for(var j=0;j<i.length;j++)if(i[j].length>1){g[i[j]]||(g[i[j]]={position:0,children:{}});g=g[i[j]].children}}return g},registerCommandContribution:function(i,g,j,k,m,l){k=this._createEntryForPath(k);k[i]={scopeId:j,position:g};if(m)if(g=this._domScope[i]||this._globalScope[i])this._activeBindings[i]={command:g,keyBinding:m,keyOnly:l};k.sortedCommands=null},_isLastChildSeparator:function(i,g){if(g==="image")return i.childNodes.length>0&&b.hasClass(i.childNodes[i.childNodes.length-
1],"commandSeparator");if(g==="menu"){i=i.getChildren();return i.length>0&&i[i.length-1]instanceof d.MenuSeparator}return false},renderCommands:function(i,g,j,k,m,l,n,o){if(typeof i==="string")i=b.byId(i);if(j){var p;if(g==="object")p=this._objectScope;else if(g==="dom")p=this._domScope;else if(g==="global")p=this._globalScope;else throw"Unrecognized command scope "+g;this._render(this._namedGroups,i,g,j,k,m,l,n,p,o);if(m==="image")this._isLastChildSeparator(i,m)&&i.removeChild(i.childNodes[i.childNodes.length-
1]);else if(m==="menu")if(this._isLastChildSeparator(i,m)){j=i.getChildren()[i.getChildren().length-1];i.removeChild(j);j.destroy()}}else{var t=this;this._selection&&this._selection.getSelections(function(q){t.renderCommands(i,g,q,k,m,l,n,o)})}},_render:function(i,g,j,k,m,l,n,o,p,t){var q=i.sortedCommands;if(!q){q=[];for(var r in i){var v=i[r];if(v&&typeof v.position==="number"){v.id=r;q.push(v)}}q.sort(function(E,F){return E.position-F.position});i.sortedCommands=q}for(i=0;i<q.length;i++){var u;
if(q[i].children){r=q[i];if(!(r.scopeId&&g.id!==r.scopeId)){var x;if(l==="image")if(r.title){v=new d.Menu({style:"display: none;"});v.eclipseScopeId=g.eclipseScopeId||g.id;this._render(q[i].children,v,j,k,m,"menu",n,o,p,t);x=v.getChildren();if(this._isLastChildSeparator(v,"menu")){u=x[x.length-1];v.removeChild(u);u.destroy();x=v.getChildren()}if(x.length>0){var C=true;u=x[0].eclipseCommand;if(x.length===1)C=!(u&&u.hasImage());if(C){u=new d.form.DropDownButton({label:r.title,dropDown:v});b.addClass(u.domNode,
"commandLink");n&&b.addClass(u.domNode,n);b.place(u.domNode,g,"last")}else{v="image"+u.id+i;r=u._asImage(v,k,m,o,t);b.place(r,g,"last")}}}else{var D;if(g.childNodes.length>0&&!this._isLastChildSeparator(g,l)){D=this.generateSeparatorImage();b.place(D,g,"last")}this._render(q[i].children,g,j,k,m,l,n,o,p,t);if(g.childNodes.length>0)if(g.childNodes[g.childNodes.length-1]!==D){D=this.generateSeparatorImage();b.place(D,g,"last")}}else if(r.title){v=new d.Menu;this._render(q[i].children,v,j,k,m,l,n,o,p,
t);v.getChildren().length>0&&g.addChild(new d.PopupMenuItem({label:r.title,popup:v}))}else{var z;if(g.getChildren().length>0&&!this._isLastChildSeparator(g,l)){z=new d.MenuSeparator;g.addChild(z)}this._render(q[i].children,g,j,k,m,l,n,o,p,t);r=g.getChildren();if(r[r.length-1]!==z){z=new d.MenuSeparator;g.addChild(z)}}}}else{v=(r=p[q[i].id])?true:false;if(r){if(j==="dom")v=l==="image"?g.id===q[i].scopeId:l==="menu"?g.eclipseScopeId===q[i].scopeId:false;if(this._activeBindings[r.id]&&this._activeBindings[r.id].keyBinding){u=
this._activeBindings[r.id];u.items=k;u.userData=o;u.handler=m;if(u.keyOnly)v=false}if(v&&r.visibleWhen)v=r.visibleWhen(k)}if(v)if(r.choiceCallback){v=new d.Menu({style:"display: none;"});if(l==="image"){u=new d.form.DropDownButton({label:r.name,dropDown:v});if(r.image){b.addClass(u.iconNode,"commandImage");n&&b.addClass(u.iconNode,n);u.iconNode.src=r.image}b.place(u.domNode,g,"last");u.eclipseCommand=r;u.eclipseChoices=v;b.connect(u,"onClick",u,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,
k,m,o)})}else if(l==="menu"){u=new d.PopupMenuItem({label:r.name,popup:v});g.addChild(u);u.eclipseCommand=r;u.eclipseChoices=v;b.connect(g,"_openPopup",u,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,k,m,o)})}}else if(l==="image"){v="image"+r.id+i;r=r._asImage(v,k,m,o,n,t);b.place(r,g,"last")}else l==="menu"&&r._addMenuItem(g,k,m,o,n)}}},generateSeparatorImage:function(){var i=new Image;i.src="/images/sep.gif";b.addClass(i,"commandImage");b.addClass(i,"commandSeparator");
return i}};c.prototype.constructor=c;e.prototype={_init:function(i){this.id=i.id;this.name=i.name||"Empty Command";this.tooltip=i.tooltip||i.name;this.callback=i.callback;this.hrefCallback=i.hrefCallback;this.choiceCallback=i.choiceCallback;this.image=i.image||"/images/none.png";this.visibleWhen=i.visibleWhen;this._deviceSupportsHover=false},_asImage:function(i,g,j,k,m,l){j=j||this;var n=new Image,o=b.create("a");o.id=this.name+"link";n.alt=this.name;n.title=this.name;n.name=i;n.id=i;if(l||!this.hasImage()){i=
window.document.createTextNode(this.name);b.place(i,o,"last")}if(this.hrefCallback){i=this.hrefCallback.call(j,g,this.id,k);if(i.then)i.then(function(p){o.href=p});else o.href=i}else if(this.callback)!l&&this.hasImage()?b.connect(n,"onclick",this,function(){this.callback.call(j,g,this.id,n.id,k)}):b.connect(o,"onclick",this,function(){this.callback.call(j,g,this.id,o.id,k)});if(!l&&this.hasImage()){if(this._deviceSupportsHover){n.src="/images/none.png";b.connect(n,"onmouseover",this,function(){n.src=
this.image});b.connect(n,"onmouseout",this,function(){n.src="/images/none.png"})}else{n.src=this.image;b.connect(n,"onmouseover",this,function(){b.addClass(n,"commandOver")});b.connect(n,"onmouseout",this,function(){n.src=this.image;b.removeClass(n,"commandOver")})}b.addClass(n,"commandImage");m&&b.addClass(n,m);b.place(n,o,"last")}b.addClass(o,"commandLink");m&&b.addClass(o,m);return o},_asLink:function(i,g,j){g=g||this;var k=window.document.createElement("a");b.place(window.document.createTextNode(this.name),
k,"only");k.href="";k.id=this.id+"link";if(this.callback)b.connect(k,"onclick",this,function(){this.callback.call(g,i,this.id,k.id)});else if(this.hrefCallback){var m=this.hrefCallback.call(g,i,this.id);if(m)if(m.then)m.then(function(l){k.href=l});else k.href=m}b.addClass(k,"commandLink");j&&b.addClass(k,j);return k},_addMenuItem:function(i,g,j,k,m){var l=new d.MenuItem({labelType:this.hrefCallback?"html":"text",label:this.name,tooltip:this.tooltip});if(this.hrefCallback){var n=this.hrefCallback.call(j,
g,this.id,i.id,k);if(n)if(n.then)n.then(b.hitch(this,function(o){l.set("label","<a href='"+o+"'>"+this.name+"</a>");l.onClick=function(p){a.followLink(o,p)}}));else{l.set("label","<a href='"+n+"'>"+this.name+"</a>");l.onClick=function(o){a.followLink(n,o)}}}else if(this.callback)l.onClick=b.hitch(this,function(){this.callback.call(j,g,this.id,null,k)});l.eclipseCommand=this;i.addChild(l);if(this.image){b.addClass(l.iconNode,"commandImage");m&&b.addClass(l.iconNode,m);l.iconNode.src=this.image}},populateChoicesMenu:function(i,
g,j,k){i.focusedChild=null;b.forEach(i.getChildren(),function(n){i.removeChild(n);n.destroy()});j=this.getChoices(g,j,k);for(k=0;k<j.length;k++){var m=j[k],l;if(m.name){l=new d.MenuItem({label:m.name,onClick:this.makeChoiceCallback(m,g)});if(m.image){b.addClass(l.iconNode,"commandImage");l.iconNode.src=m.image}}else l=new d.MenuSeparator;i.addChild(l)}},getChoices:function(i,g,j){if(this.choiceCallback)return this.choiceCallback.call(g,i,j);return null},makeChoiceCallback:function(i,g){return function(j){i.callback&&
i.callback.call(i,g,j)}},hasImage:function(){return this.image!=="/images/none.png"}};e.prototype.constructor=e;var h=window.navigator.platform.indexOf("Mac")!==-1;f.prototype={match:function(i){if(this.keyCode===i.keyCode){if(this.mod1!==(h?i.metaKey:i.ctrlKey))return false;if(this.mod2!==i.shiftKey)return false;if(this.mod3!==i.altKey)return false;if(h&&this.mod4!==i.ctrlKey)return false;return true}return false},equals:function(i){if(!i)return false;if(this.keyCode!==i.keyCode)return false;if(this.mod1!==
i.mod1)return false;if(this.mod2!==i.mod2)return false;if(this.mod3!==i.mod3)return false;if(this.mod4!==i.mod4)return false;return true}};f.prototype.constructor=f;return{CommandService:c,CommandKeyBinding:f,Command:e}});var orion=orion||{};orion.textview=orion.textview||{};
orion.textview.KeyBinding=function(){function b(a,c,e,f,h){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=c!==undefined&&c!==null?c:false;this.mod2=e!==undefined&&e!==null?e:false;this.mod3=f!==undefined&&f!==null?f:false;this.mod4=h!==undefined&&h!==null?h:false}var d=window.navigator.platform.indexOf("Mac")!==-1;b.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 b}();typeof window!=="undefined"&&typeof window.define!=="undefined"&&define("orion/textview/keyBinding",[],function(){return orion.textview});
define("text!dijit/templates/Dialog.html",function(){return'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>'});
define("dojo/dnd/common",["dojo"],function(b){b.getObject("dnd",true,b);b.dnd.getCopyKeyState=b.isCopyKey;b.dnd._uniqueId=0;b.dnd.getUniqueId=function(){var d;do d=b._scopeName+"Unique"+ ++b.dnd._uniqueId;while(b.byId(d));return d};b.dnd._empty={};b.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 b.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(b){b.getObject("dnd",true,b);b.dnd.getViewport=b.window.getBox;b.dnd.V_TRIGGER_AUTOSCROLL=32;b.dnd.H_TRIGGER_AUTOSCROLL=32;b.dnd.V_AUTOSCROLL_VALUE=16;b.dnd.H_AUTOSCROLL_VALUE=16;b.dnd.autoScroll=function(d){var a=b.window.getBox(),c=0,e=0;if(d.clientX<b.dnd.H_TRIGGER_AUTOSCROLL)c=-b.dnd.H_AUTOSCROLL_VALUE;else if(d.clientX>a.w-b.dnd.H_TRIGGER_AUTOSCROLL)c=b.dnd.H_AUTOSCROLL_VALUE;if(d.clientY<b.dnd.V_TRIGGER_AUTOSCROLL)e=-b.dnd.V_AUTOSCROLL_VALUE;
else if(d.clientY>a.h-b.dnd.V_TRIGGER_AUTOSCROLL)e=b.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(c,e)};b.dnd._validNodes={div:1,p:1,td:1};b.dnd._validOverflow={auto:1,scroll:1};b.dnd.autoScrollNodes=function(d){for(var a=d.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in b.dnd._validNodes){var c=b.getComputedStyle(a);if(c.overflow.toLowerCase()in b.dnd._validOverflow){var e=b._getContentBox(a,c);c=b.position(a,true);var f=Math.min(b.dnd.H_TRIGGER_AUTOSCROLL,e.w/2),h=Math.min(b.dnd.V_TRIGGER_AUTOSCROLL,
e.h/2),i=d.pageX-c.x,g=d.pageY-c.y,j=c=0;if(b.isWebKit||b.isOpera){i+=b.body().scrollLeft;g+=b.body().scrollTop}if(i>0&&i<e.w)if(i<f)c=-f;else if(i>e.w-f)c=f;if(g>0&&g<e.h)if(g<h)j=-h;else if(g>e.h-h)j=h;e=a.scrollLeft;f=a.scrollTop;a.scrollLeft+=c;a.scrollTop+=j;if(e!=a.scrollLeft||f!=a.scrollTop)return}}try{a=a.parentNode}catch(k){a=null}}b.dnd.autoScroll(d)};return b.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(b){b.declare("dojo.dnd.Mover",null,{constructor:function(d,a,c){this.node=b.byId(d);var e=a.touches?a.touches[0]:a;this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=a.button;a=this.host=c;d=d.ownerDocument;this.events=[b.connect(d,"onmousemove",this,"onFirstMove"),b.connect(d,"ontouchmove",this,"onFirstMove"),b.connect(d,"onmousemove",this,"onMouseMove"),b.connect(d,"ontouchmove",this,"onMouseMove"),b.connect(d,
"onmouseup",this,"onMouseUp"),b.connect(d,"ontouchend",this,"onMouseUp"),b.connect(d,"ondragstart",b.stopEvent),b.connect(d.body,"onselectstart",b.stopEvent)];a&&a.onMoveStart&&a.onMoveStart(this)},onMouseMove:function(d){b.dnd.autoScroll(d);var a=this.marginBox,c=d.touches?d.touches[0]:d;this.host.onMove(this,{l:a.l+c.pageX,t:a.t+c.pageY},d);b.stopEvent(d)},onMouseUp:function(d){if(b.isWebKit&&b.isMac&&this.mouseButton==2?d.button==0:this.mouseButton==d.button)this.destroy();b.stopEvent(d)},onFirstMove:function(d){var a=
this.node.style,c,e=this.host;switch(a.position){case "relative":case "absolute":c=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=b.marginBox(this.node);c=b.doc.body;var f=b.getComputedStyle(c),h=b._getMarginBox(c,f);f=b._getContentBox(c,f);c=a.l-(f.l-h.l);a=a.t-(f.t-h.t);break}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;e&&e.onFirstMove&&e.onFirstMove(this,d);b.disconnect(this.events.shift());b.disconnect(this.events.shift())},
destroy:function(){b.forEach(this.events,b.disconnect);var d=this.host;d&&d.onMoveStop&&d.onMoveStop(this);this.events=this.node=this.host=null}});return b.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(b){b.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(d,a){this.node=b.byId(d);a||(a={});this.handle=a.handle?b.byId(a.handle):null;if(!this.handle)this.handle=this.node;this.delay=a.delay>0?a.delay:0;this.skip=a.skip;this.mover=a.mover?a.mover:b.dnd.Mover;this.events=[b.connect(this.handle,"onmousedown",this,"onMouseDown"),b.connect(this.handle,"ontouchstart",this,"onMouseDown"),b.connect(this.handle,
"ondragstart",this,"onSelectStart"),b.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(d,a){return new b.dnd.Moveable(a,d)},destroy:function(){b.forEach(this.events,b.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(d){if(!(this.skip&&b.dnd.isFormElement(d))){if(this.delay){this.events.push(b.connect(this.handle,"onmousemove",this,"onMouseMove"),b.connect(this.handle,"ontouchmove",this,"onMouseMove"),b.connect(this.handle,"onmouseup",this,
"onMouseUp"),b.connect(this.handle,"ontouchend",this,"onMouseUp"));var a=d.touches?d.touches[0]:d;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(d);b.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)}b.stopEvent(d)},onMouseUp:function(d){for(var a=0;a<2;++a)b.disconnect(this.events.pop());b.stopEvent(d)},onSelectStart:function(d){if(!this.skip||
!b.dnd.isFormElement(d))b.stopEvent(d)},onDragDetected:function(d){new this.mover(this.node,d,this)},onMoveStart:function(d){b.publish("/dnd/move/start",[d]);b.addClass(b.body(),"dojoMove");b.addClass(this.node,"dojoMoveItem")},onMoveStop:function(d){b.publish("/dnd/move/stop",[d]);b.removeClass(b.body(),"dojoMove");b.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(d,a){this.onMoving(d,a);var c=d.node.style;c.left=a.l+"px";c.top=a.t+"px";this.onMoved(d,a)},onMoving:function(){},
onMoved:function(){}});return b.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(b){b.declare("dojo.dnd.move.constrainedMoveable",b.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(d,a){return new b.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=b._getMarginSize(d.node);a.r-=d.w;
a.b-=d.h}},onMove:function(d,a){var c=this.constraintBox,e=d.node.style;this.onMoving(d,a);a.l=a.l<c.l?c.l:c.r<a.l?c.r:a.l;a.t=a.t<c.t?c.t:c.b<a.t?c.b:a.t;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(d,a)}});b.declare("dojo.dnd.move.boxConstrainedMoveable",b.dnd.move.constrainedMoveable,{box:{},markupFactory:function(d,a){return new b.dnd.move.boxConstrainedMoveable(a,d)},constructor:function(d,a){var c=a&&a.box;this.constraints=function(){return c}}});b.declare("dojo.dnd.move.parentConstrainedMoveable",
b.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(d,a){return new b.dnd.move.parentConstrainedMoveable(a,d)},constructor:function(d,a){var c=a&&a.area;this.constraints=function(){var e=this.node.parentNode,f=b.getComputedStyle(e),h=b._getMarginBox(e,f);if(c=="margin")return h;var i=b._getMarginExtents(e,f);h.l+=i.l;h.t+=i.t;h.w-=i.w;h.h-=i.h;if(c=="border")return h;i=b._getBorderExtents(e,f);h.l+=i.l;h.t+=i.t;h.w-=i.w;h.h-=i.h;if(c=="padding")return h;i=b._getPadExtents(e,f);h.l+=
i.l;h.t+=i.t;h.w-=i.w;h.h-=i.h;return h}}});b.dnd.constrainedMover=b.dnd.move.constrainedMover;b.dnd.boxConstrainedMover=b.dnd.move.boxConstrainedMover;b.dnd.parentConstrainedMover=b.dnd.move.parentConstrainedMover;return b.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(b){(function(){var d=b.dnd.Moveable.prototype.onMove;b.declare("dojo.dnd.TimedMoveable",b.dnd.Moveable,{timeout:40,constructor:function(a,c){c||(c={});if(c.timeout&&typeof c.timeout=="number"&&c.timeout>=0)this.timeout=c.timeout},markupFactory:function(a,c){return new b.dnd.TimedMoveable(c,a)},onMoveStop:function(a){if(a._timer){clearTimeout(a._timer);d.call(this,a,a._leftTop)}b.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,c){a._leftTop=c;if(!a._timer){var e=this;a._timer=setTimeout(function(){a._timer=null;d.call(e,a,a._leftTop)},this.timeout)}}})})();return b.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(b){b.declare("dojo.fx.Toggler",null,{node:null,showFunc:b.fadeIn,hideFunc:b.fadeOut,showDuration:200,hideDuration:200,constructor:function(d){var a=this;b.mixin(a,d);a.node=d.node;a._showArgs=b.mixin({},d);a._showArgs.node=a.node;a._showArgs.duration=a.showDuration;a.showAnim=a.showFunc(a._showArgs);a._hideArgs=b.mixin({},d);a._hideArgs.node=a.node;a._hideArgs.duration=a.hideDuration;a.hideAnim=a.hideFunc(a._hideArgs);b.connect(a.showAnim,"beforeBegin",b.hitch(a.hideAnim,
"stop",true));b.connect(a.hideAnim,"beforeBegin",b.hitch(a.showAnim,"stop",true))},show:function(d){return this.showAnim.play(d||0)},hide:function(d){return this.hideAnim.play(d||0)}});return b.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(b){(function(){var d={_fire:function(e,f){if(this[e])this[e].apply(this,f||[]);return this}},a=function(e){this._index=-1;this._animations=e||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;b.forEach(this._animations,function(f){this.duration+=f.duration;if(f.delay)this.duration+=f.delay},this)};b.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){b.disconnect(this._onAnimateCtx);b.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length)this._fire("onEnd");else{this._current=this._animations[++this._index];this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(e,f){if(!this._current)this._current=this._animations[this._index=0];if(!f&&this._current.status()=="playing")return this;var h=b.connect(this._current,"beforeBegin",this,
function(){this._fire("beforeBegin")}),i=b.connect(this._current,"onBegin",this,function(){this._fire("onBegin",arguments)}),g=b.connect(this._current,"onPlay",this,function(){this._fire("onPlay",arguments);b.disconnect(h);b.disconnect(i);b.disconnect(g)});this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&b.disconnect(this._onEndCtx);this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,
arguments);return this},pause:function(){if(this._current){var e=b.connect(this._current,"onPause",this,function(){this._fire("onPause",arguments);b.disconnect(e)});this._current.pause()}return this},gotoPercent:function(e,f){this.pause();var h=this.duration*e;this._current=null;b.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,f);return this},stop:function(e){if(this._current){if(e){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(true);this._current=this._animations[this._index]}var f=b.connect(this._current,"onStop",this,function(){this._fire("onStop",arguments);b.disconnect(f)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onEndCtx&&b.disconnect(this._onEndCtx)}});b.extend(a,d);b.fx.chain=function(e){return new a(e)};
var c=function(e){this._animations=e||[];this._connects=[];this.duration=this._finished=0;b.forEach(e,function(h){var i=h.duration;if(h.delay)i+=h.delay;if(this.duration<i)this.duration=i;this._connects.push(b.connect(h,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new b.Animation({curve:[0,1],duration:this.duration});var f=this;b.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(h){f._connects.push(b.connect(f._pseudoAnimation,h,function(){f._fire(h,
arguments)}))})};b.extend(c,{_doAction:function(e,f){b.forEach(this._animations,function(h){h[e].apply(h,f)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(e,f){var h=this._pseudoAnimation;h[e].apply(h,f)},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(e,f){var h=
this.duration*e;b.forEach(this._animations,function(i){i.gotoPercent(i.duration<h?1:h/i.duration,f)});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(){b.forEach(this._connects,b.disconnect)}});b.extend(c,d);b.fx.combine=function(e){return new c(e)};b.fx.wipeIn=function(e){var f=e.node=b.byId(e.node),h=f.style,i;e=b.animateProperty(b.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 g=b.style(f,"height");return Math.max(g,1)}},end:function(){return f.scrollHeight}}}},e));b.connect(e,"onEnd",function(){h.height="auto";h.overflow=i});return e};b.fx.wipeOut=function(e){var f=(e.node=b.byId(e.node)).style,h;e=b.animateProperty(b.mixin({properties:{height:{end:1}}},e));b.connect(e,"beforeBegin",function(){h=f.overflow;f.overflow="hidden";f.display=
""});b.connect(e,"onEnd",function(){f.overflow=h;f.height="auto";f.display="none"});return e};b.fx.slideTo=function(e){var f=null,h=null,i=function(g){return function(){var j=b.getComputedStyle(g),k=j.position;f=k=="absolute"?g.offsetTop:parseInt(j.top)||0;h=k=="absolute"?g.offsetLeft:parseInt(j.left)||0;if(k!="absolute"&&k!="relative"){j=b.position(g,true);f=j.y;h=j.x;g.style.position="absolute";g.style.top=f+"px";g.style.left=h+"px"}}}(e.node=b.byId(e.node));i();e=b.animateProperty(b.mixin({properties:{top:e.top||
0,left:e.left||0}},e));b.connect(e,"beforeBegin",e,i);return e}})();return b.fx});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(b,d){b.declare("dijit.form._FormMixin",null,{state:"",reset:function(){b.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=false;return b.every(b.map(this.getDescendants(),function(c){c._hasBeenBlurred=true;var e=c.disabled||!c.validate||c.validate();if(!e&&!a){b.window.scrollIntoView(c.containerNode||c.domNode);c.focus();a=true}return e}),function(c){return c})},setValues:function(a){b.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var c={};b.forEach(this.getDescendants(),function(i){if(i.name)(c[i.name]||(c[i.name]=[])).push(i)});for(var e in c)if(c.hasOwnProperty(e)){var f=c[e],h=b.getObject(e,false,a);if(h!==undefined){b.isArray(h)||(h=[h]);if(typeof f[0].checked=="boolean")b.forEach(f,function(i){i.set("value",b.indexOf(h,i.value)!=-1)});else f[0].multiple?f[0].set("value",h):b.forEach(f,function(i,
g){i.set("value",h[g])})}}},getValues:function(){b.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};b.forEach(this.getDescendants(),function(c){var e=c.name;if(!(!e||c.disabled)){var f=c.get("value");if(typeof c.checked=="boolean")if(/Radio/.test(c.declaredClass))if(f!==false)b.setObject(e,f,a);else{f=b.getObject(e,false,a);f===undefined&&b.setObject(e,null,a)}else{c=b.getObject(e,false,a);
if(!c){c=[];b.setObject(e,c,a)}f!==false&&c.push(f)}else{c=b.getObject(e,false,a);if(typeof c!="undefined")b.isArray(c)?c.push(f):b.setObject(e,[c,f],a);else b.setObject(e,f,a)}}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=b.map(this._descendants,function(c){return c.get("state")||""});return b.indexOf(a,"Error")>=0?"Error":b.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){b.forEach(this._childConnections||
[],b.hitch(this,"disconnect"));b.forEach(this._childWatches||[],function(a){a.unwatch()})},connectChildren:function(a){var c=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(i,g){c[i]=g}:b.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var e=this._childConnections=[],f=this._childWatches=[];b.forEach(b.filter(this._descendants,function(i){return i.validate}),function(i){b.forEach(["state","disabled"],function(g){f.push(i.watch(g,function(){c.set("state",
c._getState())}))})});var h=function(){c._onChangeDelayTimer&&clearTimeout(c._onChangeDelayTimer);c._onChangeDelayTimer=setTimeout(function(){delete c._onChangeDelayTimer;c._set("value",c.get("value"))},10)};b.forEach(b.filter(this._descendants,function(i){return i.onChange}),function(i){e.push(c.connect(i,"onChange",h));f.push(i.watch("disabled",h))})},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(a,c,e){this.onValidStateChange(e=="")})},destroy:function(){this.disconnectChildren();
this.inherited(arguments)}});return d.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(b,d){b.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/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(b,d){b.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){b.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){b.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,c=this.domNode.style;c.display="none";var e=b.window.getBox();c.top=e.t+"px";c.left=e.l+"px";a.width=e.w+"px";a.height=e.h+"px";c.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/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(b,d){b.declare("dijit.layout._LayoutWidget",[d._Widget,d._Container,d._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!(a&&a.isLayoutContainer)){this.resize();this.connect(b.isIE?
this.domNode:b.global,"onresize",function(){this.resize()})}}},resize:function(a,c){var e=this.domNode;if(a){b.marginBox(e,a);if(a.t)e.style.top=a.t+"px";if(a.l)e.style.left=a.l+"px"}c=c||{};b.mixin(c,a||{});if(!("h"in c)||!("w"in c))c=b.mixin(b.marginBox(e),c);a=b.getComputedStyle(e);var f=b._getMarginExtents(e,a),h=b._getBorderExtents(e,a);c=this._borderBox={w:c.w-(f.w+h.w),h:c.h-(f.h+h.h)};f=b._getPadExtents(e,a);this._contentBox={l:b._toPixelValue(e,a.paddingLeft),t:b._toPixelValue(e,a.paddingTop),
w:c.w-f.w,h:c.h-f.h};this.layout()},layout:function(){},_setupChild:function(a){b.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){b.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});d.layout.marginBox2contentBox=function(a,c){var e=b.getComputedStyle(a),f=b._getMarginExtents(a,
e),h=b._getPadBorderExtents(a,e);return{l:b._toPixelValue(a,e.paddingLeft),t:b._toPixelValue(a,e.paddingTop),w:c.w-(f.w+h.w),h:c.h-(f.h+h.h)}};(function(){var a=function(e){return e.substring(0,1).toUpperCase()+e.substring(1)},c=function(e,f){var h=e.resize?e.resize(f):b.marginBox(e.domNode,f);if(h)b.mixin(e,h);else{b.mixin(e,b.marginBox(e.domNode));b.mixin(e,f)}};d.layout.layoutChildren=function(e,f,h,i,g){f=b.mixin({},f);b.addClass(e,"dijitLayoutContainer");h=b.filter(h,function(j){return j.region!=
"center"&&j.layoutAlign!="client"}).concat(b.filter(h,function(j){return j.region=="center"||j.layoutAlign=="client"}));b.forEach(h,function(j){var k=j.domNode,m=j.region||j.layoutAlign,l=k.style;l.left=f.l+"px";l.top=f.t+"px";l.position="absolute";b.addClass(k,"dijitAlign"+a(m));k={};if(i&&i==j.id)k[j.region=="top"||j.region=="bottom"?"h":"w"]=g;if(m=="top"||m=="bottom"){k.w=f.w;c(j,k);f.h-=j.h;if(m=="top")f.t+=j.h;else l.top=f.t+f.h+"px"}else if(m=="left"||m=="right"){k.h=f.h;c(j,k);f.w-=j.w;if(m==
"left")f.l+=j.w;else l.left=f.l+f.w+"px"}else if(m=="client"||m=="center")c(j,f)})}})();return d.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(b,d){b.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:true,isContainer:true,isLayoutContainer:true,_startChildren:function(){b.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(b.isIE?this.domNode:b.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=b.query("> *",this.containerNode).filter(function(f){return f.tagName!=="SCRIPT"}),c=a.filter(function(f){return b.hasAttr(f,"data-dojo-type")||b.hasAttr(f,"dojoType")||b.hasAttr(f,"widgetId")}),e=b.filter(c.map(d.byNode),function(f){return f&&
f.domNode&&f.resize});if(a.length==c.length&&e.length==1)this._singleChild=e[0];else delete this._singleChild;b.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,c){!this._wasShown&&this.open!==false&&this._onShow();this._resizeCalled=true;this._scheduleLayout(a,c)},_scheduleLayout:function(a,c){if(this._isShown())this._layout(a,c);else{this._needLayout=true;this._changeSize=a;this._resultSize=c}},_layout:function(a,c){a&&b.marginBox(this.domNode,
a);var e=this.containerNode;if(e===this.domNode){c=c||{};b.mixin(c,a||{});if(!("h"in c)||!("w"in c))c=b.mixin(b.marginBox(e),c);this._contentBox=d.layout.marginBox2contentBox(e,c)}else this._contentBox=b.contentBox(e);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||b.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else b.forEach(this.getChildren(),
function(c){c.resize&&c.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,c=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!b.hasClass(a,"dijitHidden")&&c&&c.style&&c.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(b){b.getObject("html",true,b);(function(){var d=0;b.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};b.html._emptyNode=b.empty;b.html._setNodeContent=function(a,c){b.empty(a);if(c){if(typeof c=="string")c=b._toDom(c,a.ownerDocument);if(!c.nodeType&&b.isArrayLike(c))for(var e=c.length,f=0;f<c.length;f=e==c.length?f+1:0)b.place(c[f],a,"last");else b.place(c,a,"last")}return a};b.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:b._scopeName,startup:true,constructor:function(a,c){b.mixin(this,a||{});c=this.node=b.byId(this.node||c);if(!this.id)this.id=["Setter",c?c.id||c.tagName:"",d++].join("_")},set:function(a,c){if(undefined!==a)this.content=a;c&&this._mixin(c);this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var a=this.node;if(!a)throw new Error(this.declaredClass+": setContent given no node");
try{a=b.html._setNodeContent(a,this.content)}catch(c){var e=this.onContentError(c);try{a.innerHTML=e}catch(f){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+f.message,f)}}this.node=a},empty:function(){if(this.parseResults&&this.parseResults.length){b.forEach(this.parseResults,function(a){a.destroy&&a.destroy()});delete this.parseResults}b.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(b.isString(a)){if(this.cleanContent)a=b.html._secureForInnerHtml(a);
if(this.extractContent){var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(c)a=c[1]}}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(a){return"Error occured setting content: "+a},_mixin:function(a){var c={},e;for(e in a)e in c||(this[e]=a[e])},_parse:function(){var a=this.node;try{var c={};b.forEach(["dir","lang","textDir"],
function(f){if(this[f])c[f]=this[f]},this);this.parseResults=b.parser.parse({rootNode:a,noStart:!this.startup,inherited:c,scope:this.parserScope})}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,c,e){a=this["on"+a+"Error"].call(this,c);if(e)console.error(e,c);else a&&b.html._setNodeContent(this.node,a,true)}});b.html.set=function(a,c,e){if(undefined==c){console.warn("dojo.html.set: no cont argument provided, using empty string");c=""}return e?(new b.html._ContentSetter(b.mixin(e,
{content:c,node:a}))).set():b.html._setNodeContent(a,c,true)}})();return b.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(b,d){b.declare("dijit.layout.ContentPane",[d._Widget,d.layout._ContentPaneResizeMixin],{href:"",extractContent:false,parseOnLoad:true,parserScope:b._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:b.delegate(d._Widget.prototype.attributeMap,{title:[]}),stopParser:true,template:false,create:function(a,c){if((!a||!a.template)&&c&&!("href"in a)&&!("content"in a)){var e=b.doc.createDocumentFragment();for(c=b.byId(c);c.firstChild;)e.appendChild(c.firstChild);a=b.delegate(a,{content:e})}this.inherited(arguments,[a,c])},postMixInProperties:function(){this.inherited(arguments);var a=b.i18n.getLocalization("dijit",
"loading",this.lang);this.loadingMessage=b.string.substitute(this.loadingMessage,a);this.errorMessage=b.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";b.attr(this.domNode,"role")||d.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&b.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&b.isFunction(a.startup)){a.startup();
a._started=true}},this)},setHref:function(a){b.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._set("href",a);if(this.preload||this._created&&this._isShown())this._load();else this._hrefChanged=true;return this.onLoadDeferred},setContent:function(a){b.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.",
"","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=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 b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
true);var a=this,c={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};b.isObject(this.ioArgs)&&b.mixin(c,this.ioArgs);var e=this._xhrDfd=(this.ioMethod||b.xhrGet)(c);e.addCallback(function(f){try{a._isDownloaded=true;a._setContent(f,false);a.onDownloadEnd()}catch(h){a._onError("Content",h)}delete a._xhrDfd;return f});e.addErrback(function(f){e.canceled||a._onError("Download",f);delete a._xhrDfd;return f});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
true);try{this.onLoadDeferred.callback(a)}catch(c){console.error("Error "+this.widgetId+" running custom onLoad code: "+c.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;b.forEach(this.getChildren(),function(c){c.destroyRecursive&&c.destroyRecursive()});if(a){b.forEach(a.parseResults,
function(c){c.destroyRecursive&&c.domNode&&c.domNode.parentNode==b.body()&&c.destroyRecursive()});delete a.parseResults}b.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,c){this.destroyDescendants();var e=this._contentSetter;if(!(e&&e instanceof b.html._ContentSetter))e=this._contentSetter=new b.html._ContentSetter({node:this.containerNode,_onError:b.hitch(this,this._onError),onContentError:b.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 f=b.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang},this._contentSetterParams||{});e.set(b.isObject(a)&&a.domNode?a.domNode:a,f);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();if(!c){if(this._started){this._startChildren();this._scheduleLayout()}this._onLoadHandler(a)}},
_onError:function(a,c,e){this.onLoadDeferred.errback(c);a=this["on"+a+"Error"].call(this,c);if(e)console.error(e,c);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/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("text!dijit/templates/TooltipDialog.html",function(){return'<div role="presentation" tabIndex="-1">\n\t<div class="dijitTooltipContainer" role="presentation">\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" role="dialog"></div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n</div>'});
define("dijit/TooltipDialog",["dojo","dijit","text!dijit/templates/TooltipDialog.html","dijit/layout/ContentPane","dijit/_Templated","dijit/form/_FormMixin","dijit/_DialogMixin"],function(b,d){b.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:b.cache("dijit","templates/TooltipDialog.html"),_setTitleAttr:function(a){this.containerNode.title=
a;this._set("title",a)},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey")},orient:function(a,c,e){a="dijitTooltipAB"+(e.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(e.charAt(0)=="T"?"Below":"Above");b.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 c=a.target,e=b.keys;a.charOrCode===e.TAB&&this._getFocusItems(this.containerNode);var f=this._firstFocusItem==this._lastFocusItem;if(a.charOrCode==e.ESCAPE){setTimeout(b.hitch(this,"onCancel"),0);b.stopEvent(a)}else if(c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB){f||d.focus(this._lastFocusItem);b.stopEvent(a)}else if(c==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey){f||d.focus(this._firstFocusItem);b.stopEvent(a)}else a.charOrCode===
e.TAB&&a.stopPropagation()}});return d.TooltipDialog});
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(b,d){b.declare("dijit._DialogBase",[d._Templated,d.form._FormMixin,d._DialogMixin,d._CssStateMixin],{templateString:b.cache("dijit","templates/Dialog.html"),
baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:b.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=b.i18n.getLocalization("dijit","common");b.mixin(this,a);this.inherited(arguments)},
postCreate:function(){b.style(this.domNode,{display:"none",position:"absolute"});b.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();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=
b.position(a.node)},_setup:function(){var a=this.domNode;if(this.titleBar&&this.draggable){this._moveable=b.isIE==6?new b.dnd.TimedMoveable(a,{handle:this.titleBar}):new b.dnd.Moveable(a,{handle:this.titleBar,timeout:0});this._dndListener=b.subscribe("/dnd/move/stop",this,"_endDrag")}else b.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":b.map(this["class"].split(/\s/),function(c){return c+"_underlay"}).join(" ")}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
this._singleChildOriginalStyle;delete this._singleChildOriginalStyle}else b.style(this.containerNode,{width:"auto",height:"auto"});var a=b._getMarginSize(this.domNode),c=b.window.getBox();if(a.w>=c.w||a.h>=c.h){var e=Math.min(a.w,Math.floor(c.w*0.75));a=Math.min(a.h,Math.floor(c.h*0.75));if(this._singleChild&&this._singleChild.resize){this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText;this._singleChild.resize({w:e,h:a})}else b.style(this.containerNode,{width:e+"px",height:a+"px",
overflow:"auto",position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!b.hasClass(b.body(),"dojoMove")){var a=this.domNode,c=b.window.getBox(),e=this._relativePosition,f=e?null:b._getBorderBox(a),h=Math.floor(c.l+(e?e.x:(c.w-f.w)/2));c=Math.floor(c.t+(e?e.y:(c.h-f.h)/2));b.style(a,{left:h+"px",top:c+"px"})}},_onKey:function(a){if(a.charOrCode){var c=b.keys,e=a.target;a.charOrCode===c.TAB&&this._getFocusItems(this.domNode);var f=
this._firstFocusItem==this._lastFocusItem;if(e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===c.TAB){f||d.focus(this._lastFocusItem);b.stopEvent(a)}else if(e==this._lastFocusItem&&a.charOrCode===c.TAB&&!a.shiftKey){f||d.focus(this._firstFocusItem);b.stopEvent(a)}else{for(;e;){if(e==this.domNode||b.hasClass(e,"dijitPopup"))if(a.charOrCode==c.ESCAPE)this.onCancel();else return;e=e.parentNode}if(a.charOrCode!==c.TAB)b.stopEvent(a);else if(!b.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(b.connect(window,"onscroll",this,"layout"));this._modalconnects.push(b.connect(window,"onresize",this,function(){var c=b.window.getBox();if(!this._oldViewport||c.h!=this._oldViewport.h||c.w!=this._oldViewport.w){this.layout();this._oldViewport=c}}));this._modalconnects.push(b.connect(this.domNode,
"onkeypress",this,"_onKey"));b.style(this.domNode,{opacity:0,display:""});this._set("open",true);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=b.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:b.hitch(this,function(){d._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:b.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 b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=b.fadeOut({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,function(){this.domNode.style.display="none";d._DialogLevelManager.hide(this);this.onHide();
this._fadeOutDeferred.callback(true);delete this._fadeOutDeferred})}).play();if(this._scrollConnected)this._scrollConnected=false;b.forEach(this._modalconnects,b.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&&b.unsubscribe(this._dndListener);b.forEach(this._modalconnects,b.disconnect);d._DialogLevelManager.hide(this);this.inherited(arguments)}});b.declare("dijit.Dialog",[d.layout.ContentPane,d._DialogBase],{});d._DialogLevelManager={show:function(a,c){var e=d._dialogStack;e[e.length-1].focus=d.getFocus(a);var f=d._underlay;if(!f||f._destroyed)f=d._underlay=new d.DialogUnderlay(c);else f.set(a.underlayAttrs);var h=
e[e.length-1].dialog?e[e.length-1].zIndex+2:950;e.length==1&&f.show();b.style(d._underlay.domNode,"zIndex",h-1);b.style(a.domNode,"zIndex",h);e.push({dialog:a,underlayAttrs:c,zIndex:h})},hide:function(a){var c=d._dialogStack;if(c[c.length-1].dialog==a){c.pop();var e=c[c.length-1];if(c.length==1)d._underlay._destroyed||d._underlay.hide();else{b.style(d._underlay.domNode,"zIndex",e.zIndex-1);d._underlay.set(e.underlayAttrs)}if(a.refocus){c=e.focus;if(!c||e.dialog&&!b.isDescendant(c.node,e.dialog.domNode)){e.dialog._getFocusItems(e.dialog.domNode);
c=e.dialog._firstFocusItem}try{d.focus(c)}catch(f){}}}else{e=b.indexOf(b.map(c,function(h){return h.dialog}),a);e!=-1&&c.splice(e,1)}},isTop:function(a){var c=d._dialogStack;return c[c.length-1].dialog==a}};d._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return d.Dialog});define("text!orion/widgets/templates/OpenResourceDialog.html",function(){return'<div dojoAttachPoint="containerNode">\n\t<div dojoAttachPoint="dialog" dojoType="dijit.Dialog" title="${title}" widgetsInTemplate="true">\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\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",["dojo","dijit","dijit/Dialog","dijit/form/TextBox","text!orion/widgets/templates/OpenResourceDialog.html"],function(b,d){return b.declare("orion.widgets.OpenResourceDialog",[d._Widget,d._Templated],{widgetsInTemplate:true,templateString:b.cache("orion","widgets/templates/OpenResourceDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,searchLocation:null,searcher:null,constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.searchLocation=
arguments[0]&&arguments[0].SearchLocation;this.searcher=arguments[0]&&arguments[0].searcher;if(!this.searchLocation)throw new Error("Missing required argument: SearchLocation");if(!this.searcher)throw new Error("Missing required argument: searcher");},postMixInProperties:function(){this.inherited(arguments);this.title="Open Resource";this.selectFile="Type the name of a file to open (? = any character, * = any string):";this.searchPlaceHolder="Search"},postCreate:function(){this.inherited(arguments);
b.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(b.hitch(this,this.checkSearch),0)});b.connect(this.resourceName,"onKeyPress",this,function(a){if(a.keyCode===b.keys.ENTER&&this.results){a=b.query("a",this.results);if(a.length>0){window.open(a[0].href);this.dialog.hide()}}});b.connect(this.dialog,"onMouseUp",function(a){a.target.focus()});b.connect(this.dialog,"onHide",this,function(){this.onHide()});this.dialog.refocus=
false},checkSearch:function(){clearTimeout(this.timeoutId);var a=+new Date;if(a-this.time>this.SEARCH_DELAY){this.time=a;this.doSearch()}else this.timeoutId=setTimeout(b.hitch(this,arguments.callee),50)},doSearch:function(){var a=this.resourceName&&this.resourceName.get("value");if(a){b.place("<div>Searching&#x2026;</div>",this.results,"only");var c=this;setTimeout(function(){var e=a+=/\*$/.test(a)?"":"*";c.searcher.search(c.results,c.searchLocation+"Name:"+e,false,false,b.hitch(c,c.decorateResult),
true)},0)}},decorateResult:function(a){var c=this;b.query("a",a).forEach(function(e){b.connect(e,"onmouseup",function(f){!b.mouseButtons.isMiddle(f)&&!b.isCopyKey(f)&&c.dialog.hide()})})},show:function(){this.dialog.show();this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);setTimeout(b.hitch(this,function(){this.dialog.destroyRecursive();this.destroyRecursive()}),this.dialog.duration)}})});
define("orion/globalCommands",["dojo","dijit","orion/commands","orion/util","orion/textview/keyBinding","dijit/Menu","dijit/MenuItem","dijit/form/DropDownButton","orion/widgets/OpenResourceDialog"],function(b,d,a,c,e){function f(m,l){var n=b.byId("userInfo");if(n){b.addClass(n,"globalActions");var o=d.byId("userMenu");o&&o.destroy();b.empty(n);if(m){c.setUserName(m);o=new d.Menu({style:"display: none;",id:"userMenu"});var p=new d.MenuItem({label:"Profile",onClick:b.hitch(this,function(){window.location=
"/profile/user-profile.html#/users/"+m})});o.addChild(p);p=new d.MenuItem({label:"Sign out",onClick:logout});o.addChild(p);l=new d.form.DropDownButton({label:m,dropDown:o,title:l});b.addClass(l.domNode,"commandImage");b.place(l.domNode,n,"last")}else{l=document.createElement("span");l.appendChild(document.createTextNode("Sign in"));l.onclick=function(){login()};l.id="signOutUser";n.appendChild(l);b.addClass(l,"commandLink")}k=null}else k={userName:m,userStatusText:l}}function h(m,l,n,o){var p=b.byId("pageActions");
if(n)p=b.byId(n);if(p){b.empty(p);m.renderCommands(p,"dom",l,l,"image",null,null,!o)}}function i(m,l,n,o,p,t,q,r){var v;o=b.byId(m);if(!o)throw"could not find banner parent, id was "+m;b.place(g,o,"only");b.place('<div id="keyAssist" class="keyAssistFloat"></div>',document.body,"last");var u=b.byId("primaryNav");if(u)for(var x=l.getServiceReferences("orion.page.link"),C=0;C<x.length;C++)l.getService(x[C]).then(function(){for(var F={},K=x[C].getPropertyNames(),G=0;G<K.length;G++)F[K[G]]=x[C].getProperty(K[G]);
if(F.href&&F.name){K=b.create("a",{href:F.href},u,"last");b.addClass(K,"commandLink");v=document.createTextNode(F.name);b.place(v,K,"only")}});var D=b.byId("search");if(!D)throw"failed to generate HTML for banner";b.connect(D,"onkeypress",function(F){if(F.charOrCode===b.keys.ENTER)if(D.value.length>0)window.location="/search/search.html#"+("/filesearch?q="+D.value)});if(m=b.byId("pageTitle")){v=document.createTextNode(document.title);b.place(v,m,"last")}var z=function(F,K,G){var M=new orion.widgets.OpenResourceDialog({SearchLocation:F,
searcher:K});G&&b.connect(M,"onHide",function(){G.getTextView().focus()});window.setTimeout(function(){M.show()},0)};m=new a.Command({name:"Find File Named...",id:"eclipse.openResource",callback:function(){z("/filesearch?q=",p,q)}});if(q){q.getTextView().setKeyBinding(new e.KeyBinding("r",true,true,false),"Find File Named...");q.getTextView().setAction("Find File Named...",function(){z("/filesearch?q=",p,q);return true})}n.addCommand(m,"global");n.registerCommandContribution("eclipse.openResource",
1,"globalActions",null,new a.CommandKeyBinding("t"),true);var E=b.byId("keyAssist");b.connect(document,"onkeypress",b.hitch(this,function(F){if(F.charOrCode===b.keys.ESCAPE)E.style.display="none"}));r&&r.addHandler({isActive:function(){return E.style.display==="block"},cancel:function(){if(this.isActive()){E.style.display="none";return true}return false}});r=new a.Command({name:"Show Keys",id:"eclipse.keyAssist",callback:function(){b.empty(E);if(q){b.place("<h2>Editor</h2>",E,"last");for(var F=q.getTextView().getActions(false),
K=0;K<F.length;K++)for(var G=F[K],M=q.getTextView().getKeyBindings(G),L=0;L<M.length;L++)b.place("<span>"+c.getUserKeyString(M[L])+" = "+G+"<br></span>",E,"last")}b.place("<h2>Global</h2>",E,"last");n.showKeyBindings(E);E.style.display="block";return true}});n.addCommand(r,"global");n.registerCommandContribution("eclipse.keyAssist",1,"globalActions",null,new a.CommandKeyBinding(191,false,true),true);if(q){q.getTextView().setKeyBinding(new a.CommandKeyBinding("L",true,true),"Show Keys");q.getTextView().setAction("Show Keys",
r.callback)}if(r=b.byId("globalActions")){b.empty(r);n.renderCommands(r,"global",t||{},t,"image")}k&&f(k.userName,k.userStatusText);if(j)(t=b.byId("footer"))&&b.place(j,t,"only")}var g='<table style="border: 2px solid white; margin: 0; padding: 0; border-collapse: collapse; width: 100%;"><tr class="topRowBanner" id="bannerRow1"><td rowspan=3 style="padding-top: 12px; padding-bottom: 12px; padding-left: 8px; width: 148px"><a id="home" href="/index.html"><img class="toolbarLabel" src="/images/orion.gif" alt="Orion Logo" align="top"></a></td><td class="leftGlobalToolbar" style="padding-top: 16px"><span id="pageTitle" class="pageTitle"></span></td><td class="rightGlobalToolbar" style="padding-top: 16px"><span id="primaryNav" class="globalActions"></span><span id="globalActions" class="globalActions"></span><input type="search" id="search" class="searchbox"><span id="userInfo"></span><span id="help" class="help"><a id="help" href="/help/index.jsp">?</a></span></td></tr><tr class="topRowBanner" id="bannerRow2"><td colspan=2 style="text-wrap: normal"><span id="location" class="currentLocation" style="text-wrap: normal"></span></td></tr><tr class="topRowBanner" id="bannerRow3"><td colspan=2 style="height: 16px; text-align: left"><span id="statusPane" style="color: #5a5a5a;"></span><span id="notifications"></span></td></tr><tr class="pageToolbar"><td colspan=3 style="padding-left: 16px;" id="pageToolbar" class="pageToolbar"><span id="pageActions" class="pageActions"></span></td></tr></table>',
j='<img src="http://dev.eclipse.org/small_icons/emblems/emblem-important.png"/> This is a Beta build of Orion.  You can use it, play with it and explore the capabilities but BEWARE your data may be lost. &nbsp;| <a href="http://wiki.eclipse.org/Orion/FAQ">FAQ</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=e4&component=Orion&version=0.2">Report a Bug</a> | <a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a> | <a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a> | <a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a>',
k=null;return{generateUserInfo:f,generateDomCommandsInBanner:h,generateBanner:i}});
define("dojo/date",["dojo"],function(b){b.getObject("date",true,b);b.date.getDaysInMonth=function(d){var a=d.getMonth();if(a==1&&b.date.isLeapYear(d))return 29;return[31,28,31,30,31,30,31,31,30,31,30,31][a]};b.date.isLeapYear=function(d){d=d.getFullYear();return!(d%400)||!(d%4)&&!!(d%100)};b.date.getTimezoneName=function(d){var a=d.toString(),c="",e=a.indexOf("(");if(e>-1)c=a.substring(++e,a.indexOf(")"));else{e=/([A-Z\/]+) \d{4}$/;if(a=a.match(e))c=a[1];else{a=d.toLocaleString();e=/ ([A-Z\/]+)$/;
if(a=a.match(e))c=a[1]}}return c=="AM"||c=="PM"?"":c};b.date.compare=function(d,a,c){d=new Date(+d);a=new Date(+(a||new Date));if(c=="date"){d.setHours(0,0,0,0);a.setHours(0,0,0,0)}else if(c=="time"){d.setFullYear(0,0,0);a.setFullYear(0,0,0)}if(d>a)return 1;if(d<a)return-1;return 0};b.date.add=function(d,a,c){var e=new Date(+d),f=false,h="Date";switch(a){case "day":break;case "weekday":var i;if(a=c%5){a=a;i=parseInt(c/5)}else{a=c>0?5:-5;i=c>0?(c-5)/5:(c+5)/5}var g=d.getDay(),j=0;if(g==6&&c>0)j=1;
else if(g==0&&c<0)j=-1;g=g+a;if(g==0||g==6)j=c>0?2:-2;c=7*i+a+j;break;case "year":h="FullYear";f=true;break;case "week":c*=7;break;case "quarter":c*=3;case "month":f=true;h="Month";break;default:h="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}h&&e["set"+h](e["get"+h]()+c);f&&e.getDate()<d.getDate()&&e.setDate(0);return e};b.date.difference=function(d,a,c){a=a||new Date;c=c||"day";var e=a.getFullYear()-d.getFullYear(),f=1;switch(c){case "quarter":d=d.getMonth();a=a.getMonth();d=Math.floor(d/3)+
1;a=Math.floor(a/3)+1;a+=e*4;f=a-d;break;case "weekday":e=Math.round(b.date.difference(d,a,"day"));c=parseInt(b.date.difference(d,a,"week"));f=e%7;if(f==0)e=c*5;else{var h=0,i=d.getDay();a=a.getDay();c=parseInt(e/7);f=e%7;d=new Date(d);d.setDate(d.getDate()+c*7);d=d.getDay();if(e>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+f>5:h=-2}else if(e<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+
f<0:h=2}e+=h;e-=c*2}f=e;break;case "year":f=e;break;case "month":f=a.getMonth()-d.getMonth()+e*12;break;case "week":f=parseInt(b.date.difference(d,a,"day")/7);break;case "day":f/=24;case "hour":f/=60;case "minute":f/=60;case "second":f/=1E3;case "millisecond":f*=a.getTime()-d.getTime()}return Math.round(f)};return b.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(b){b.getObject("cldr.supplemental",true,b);b.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}[b.cldr.supplemental._region(d)];return d===undefined?
1:d};b.cldr.supplemental._region=function(d){d=b.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};b.cldr.supplemental.getWeekend=function(d){var a=b.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 b.cldr.supplemental});
define("dojo/regexp",["dojo"],function(b){b.getObject("regexp",true,b);b.regexp.escapeString=function(d,a){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){if(a&&a.indexOf(c)!=-1)return c;return"\\"+c})};b.regexp.buildGroupRE=function(d,a,c){if(!(d instanceof Array))return a(d);for(var e=[],f=0;f<d.length;f++)e.push(a(d[f]));return b.regexp.group(e.join("|"),c)};b.regexp.group=function(d,a){return"("+(a?"?:":"")+d+")"};return b.regexp});
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(b){b.getObject("date.locale",true,b);(function(){function d(e,f,h,i){return i.replace(/([a-z])\1*/ig,function(g){var j,k,m=g.charAt(0);g=g.length;var l=["abbr","wide","narrow"];switch(m){case "G":j=f[g<4?"eraAbbr":"eraNames"][e.getFullYear()<0?0:1];break;case "y":j=e.getFullYear();switch(g){case 1:break;case 2:if(!h.fullYear){j=String(j);j=j.substr(j.length-
2);break}default:k=true}break;case "Q":case "q":j=Math.ceil((e.getMonth()+1)/3);k=true;break;case "M":j=e.getMonth();if(g<3){j=j+1;k=true}else{m=["months-format",l[g-3]].join("-");j=f[m][j]}break;case "w":j=b.date.locale._getWeekOfYear(e,0);k=true;break;case "d":j=e.getDate();k=true;break;case "D":j=b.date.locale._getDayOfYear(e);k=true;break;case "E":j=e.getDay();if(g<3){j=j+1;k=true}else{m=["days-format",l[g-3]].join("-");j=f[m][j]}break;case "a":j=e.getHours()<12?"am":"pm";j=h[j]||f["dayPeriods-format-wide-"+
j];break;case "h":case "H":case "K":case "k":k=e.getHours();switch(m){case "h":j=k%12||12;break;case "H":j=k;break;case "K":j=k%12;break;case "k":j=k||24;break}k=true;break;case "m":j=e.getMinutes();k=true;break;case "s":j=e.getSeconds();k=true;break;case "S":j=Math.round(e.getMilliseconds()*Math.pow(10,g-3));k=true;break;case "v":case "z":if(j=b.date.locale._getZone(e,true,h))break;g=4;case "Z":j=b.date.locale._getZone(e,false,h);j=[j<=0?"+":"-",b.string.pad(Math.floor(Math.abs(j)/60),2),b.string.pad(Math.abs(j)%
60,2)];if(g==4){j.splice(0,0,"GMT");j.splice(3,0,":")}j=j.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+i);}if(k)j=b.string.pad(j,g);return j})}function a(e,f,h,i){var g=function(m){return m};f=f||g;h=h||g;i=i||g;var j=e.match(/(''|[^'])+/g),k=e.charAt(0)=="'";b.forEach(j,function(m,l){if(m){j[l]=(k?h:f)(m.replace(/''/g,"'"));k=!k}else j[l]=""});return i(j.join(""))}function c(e,f,h,i){i=b.regexp.escapeString(i);h.strict||(i=i.replace(" a"," ?a"));return i.replace(/([a-z])\1*/ig,
function(g){var j;j=g.charAt(0);var k=g.length,m="",l="";if(h.strict){if(k>1)m="0{"+(k-1)+"}";if(k>2)l="0{"+(k-2)+"}"}else{m="0?";l="0{0,2}"}switch(j){case "y":j="\\d{2,4}";break;case "M":j=k>2?"\\S+?":"1[0-2]|"+m+"[1-9]";break;case "D":j="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+l+"[1-9][0-9]|"+m+"[1-9]";break;case "d":j="3[01]|[12]\\d|"+m+"[1-9]";break;case "w":j="[1-4][0-9]|5[0-3]|"+m+"[1-9]";break;case "E":j="\\S+";break;case "h":j="1[0-2]|"+m+"[1-9]";break;case "k":j="1[01]|"+m+"\\d";break;case "H":j=
"1\\d|2[0-3]|"+m+"\\d";break;case "K":j="1\\d|2[0-4]|"+m+"[1-9]";break;case "m":case "s":j="[0-5]\\d";break;case "S":j="\\d{"+k+"}";break;case "a":k=h.am||f["dayPeriods-format-wide-am"];m=h.pm||f["dayPeriods-format-wide-pm"];j=k+"|"+m;if(!h.strict){if(k!=k.toLowerCase())j+="|"+k.toLowerCase();if(m!=m.toLowerCase())j+="|"+m.toLowerCase();if(j.indexOf(".")!=-1)j+="|"+j.replace(/\./g,"")}j=j.replace(/\./g,"\\.");break;default:j=".*"}e&&e.push(g);return"("+j+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}b.date.locale._getZone=
function(e,f){return f?b.date.getTimezoneName(e):e.getTimezoneOffset()};b.date.locale.format=function(e,f){f=f||{};var h=b.i18n.normalizeLocale(f.locale),i=f.formatLength||"short";h=b.date.locale._getGregorianBundle(h);var g=[];e=b.hitch(this,d,e,h,f);if(f.selector=="year")return a(h["dateFormatItem-yyyy"]||"yyyy",e);var j;if(f.selector!="date")(j=f.timePattern||h["timeFormat-"+i])&&g.push(a(j,e));if(f.selector!="time")(j=f.datePattern||h["dateFormat-"+i])&&g.push(a(j,e));return g.length==1?g[0]:
h["dateTimeFormat-"+i].replace(/\{(\d+)\}/g,function(k,m){return g[m]})};b.date.locale.regexp=function(e){return b.date.locale._parseInfo(e).regexp};b.date.locale._parseInfo=function(e){e=e||{};var f=b.i18n.normalizeLocale(e.locale);f=b.date.locale._getGregorianBundle(f);var h=e.formatLength||"short",i=e.datePattern||f["dateFormat-"+h],g=e.timePattern||f["timeFormat-"+h];h=e.selector=="date"?i:e.selector=="time"?g:f["dateTimeFormat-"+h].replace(/\{(\d+)\}/g,function(k,m){return[g,i][m]});var j=[];
return{regexp:a(h,b.hitch(this,c,j,f,e)),tokens:j,bundle:f}};b.date.locale.parse=function(e,f){var h=/[\u200E\u200F\u202A\u202E]/g,i=b.date.locale._parseInfo(f),g=i.tokens,j=i.bundle;e=(new RegExp("^"+i.regexp.replace(h,"")+"$",i.strict?"":"i")).exec(e&&e.replace(h,""));if(!e)return null;var k=["abbr","wide","narrow"],m=[1970,0,1,0,0,0,0],l="";e=b.every(e,function(o,p){if(!p)return true;p=g[p-1];var t=p.length;switch(p.charAt(0)){case "y":if(t!=2&&f.strict)m[0]=o;else if(o<100){o=Number(o);t=""+(new Date).getFullYear();
p=t.substring(0,2)*100;t=Math.min(Number(t.substring(2,4))+20,99);m[0]=o<t?p+o:p-100+o}else{if(f.strict)return false;m[0]=o}break;case "M":if(t>2){p=j["months-format-"+k[t-3]].concat();if(!f.strict){o=o.replace(".","").toLowerCase();p=b.map(p,function(r){return r.replace(".","").toLowerCase()})}o=b.indexOf(p,o);if(o==-1)return false}else o--;m[1]=o;break;case "E":case "e":p=j["days-format-"+k[t-3]].concat();if(!f.strict){o=o.toLowerCase();p=b.map(p,function(r){return r.toLowerCase()})}o=b.indexOf(p,
o);if(o==-1)return false;break;case "D":m[1]=0;case "d":m[2]=o;break;case "a":p=f.am||j["dayPeriods-format-wide-am"];t=f.pm||j["dayPeriods-format-wide-pm"];if(!f.strict){var q=/\./g;o=o.replace(q,"").toLowerCase();p=p.replace(q,"").toLowerCase();t=t.replace(q,"").toLowerCase()}if(f.strict&&o!=p&&o!=t)return false;l=o==t?"p":o==p?"a":"";break;case "K":if(o==24)o=0;case "h":case "H":case "k":if(o>23)return false;m[3]=o;break;case "m":m[4]=o;break;case "s":m[5]=o;break;case "S":m[6]=o}return true});
h=+m[3];if(l==="p"&&h<12)m[3]=h+12;else if(l==="a"&&h==12)m[3]=0;h=new Date(m[0],m[1],m[2],m[3],m[4],m[5],m[6]);f.strict&&h.setFullYear(m[0]);var n=g.join("");i=n.indexOf("d")!=-1;n=n.indexOf("M")!=-1;if(!e||n&&h.getMonth()>m[1]||i&&h.getDate()>m[2])return null;if(n&&h.getMonth()<m[1]||i&&h.getDate()<m[2])h=b.date.add(h,"hour",1);return h}})();(function(){var d=[];b.date.locale.addCustomFormats=function(a,c){d.push({pkg:a,name:c})};b.date.locale._getGregorianBundle=function(a){var c={};b.forEach(d,
function(e){e=b.i18n.getLocalization(e.pkg,e.name,a);c=b.mixin(c,e)},this);return c}})();b.date.locale.addCustomFormats("dojo.cldr","gregorian");b.date.locale.getNames=function(d,a,c,e){var f;e=b.date.locale._getGregorianBundle(e);d=[d,c,a];if(c=="standAlone"){c=d.join("-");f=e[c];if(f[0]==1)f=undefined}d[1]="format";return(f||e[d.join("-")]).concat()};b.date.locale.isWeekend=function(d,a){a=b.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};b.date.locale._getDayOfYear=function(d){return b.date.difference(new Date(d.getFullYear(),0,1,d.getHours()),d)+1};b.date.locale._getWeekOfYear=function(d,a){if(arguments.length==1)a=0;var c=(new Date(d.getFullYear(),0,1)).getDay(),e=(c-a+7)%7;e=Math.floor((b.date.locale._getDayOfYear(d)+e-1)/7);c==a&&e++;return e};return b.date.locale});
define("orion/auth",["dojo","orion/globalCommands","dojo/date/locale"],function(b,d){function a(j,k,m,l){h(k.xhr,function(){var n=b.xhrGet(j);m&&n.then(m,l)})}function c(j,k){h(k.xhr,function(){b.xhrPost(j)})}function e(j,k){h(k.xhr,function(){b.xhrDelete(j)})}function f(j,k){h(k.xhr,function(){b.xhrPut(j)})}function h(j,k){if(j.status===403){if(g==null)g=new dijit.Dialog({title:"Forbidden access"});g.set("content",j.message);g.show()}if(j.status===401){var m=b.subscribe("/auth",function(){k();b.unsubscribe(m)});
if(!i){i=true;eval(j.responseText)}}}var i=false,g;b.addOnLoad(function(){window.dojo=b;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=d;b.xhrGet({url:"/auth2",handleAs:"javascript",headers:{"Orion-Version":"1"}})});return{handleGetAuthenticationError:a,handlePostAuthenticationError:c,handleDeleteAuthenticationError:e,handlePutAuthenticationError:f,handleAuthenticationError:h}});
define("orion/preferences",["dojo","orion/auth"],function(b,d){function a(i,g,j){this._name=i;this._userProvider=g;this._defaultsProvider=j;this._flushPending=false;this._defaults=this._store=null}function c(i){this.location=i;this._currentPromises={}}function e(i){this.location=i;this._currentPromise=null}function f(i,g,j){g=g||"/prefs/user";j=j||"/defaults.pref";this._userProvider=new c(g);this._defaultsProvider=new e(j);this._serviceRegistration=i.registerService("orion.core.preference",this)}
a.prototype={_flush:function(){return this._userProvider.put(this._name,this._store)},_scheduleFlush:function(){if(!this._flushPending){this._flushPending=true;window.setTimeout(b.hitch(this,function(){if(this._flushPending){this._flushPending=false;this._flush()}}),0)}},keys:function(){var i,g=[];for(i in this._store)this._store.hasOwnProperty(i)&&i.charAt(0)!=="/"&&g.push(i);for(i in this._defaults)this._defaults.hasOwnProperty(i)&&!this._store.hasOwnProperty(i)&&i.charAt(0)!=="/"&&g.push(i);return g},
get:function(i){if(i.charAt(0)==="/")throw new Error("Bad character in key name: "+i);return this._store.hasOwnProperty(i)?this._store[i]:this._defaults[i]},put:function(i,g){if(i.charAt(0)==="/")throw new Error("Bad character in key name: "+i);if(this._store[i]!==g){this._store[i]=g;this._scheduleFlush()}},remove:function(i){if(i.charAt(0)==="/")throw new Error("Bad character in key name: "+i);if(this._store[i]){delete this._store[i];this._scheduleFlush();return true}return false},clear:function(){var i;
for(i in this._store)this._store.hasOwnProperty(i)&&i.charAt(0)!=="/"&&delete this._store[i];this._scheduleFlush()},sync:function(){if(this._flushPending){this._flushPending=false;return this._flush()}return this._defaultsProvider.get(this._name).then(b.hitch(this,function(i){this._defaults=i;return this._userProvider.get(this._name).then(b.hitch(this,function(g){this._store=g}))}))},flush:function(){this._flush()}};var h={get:function(i,g){i=localStorage.getItem(i);if(i==null)return null;i=JSON.parse(i);
if(g||i._expires&&i._expires>(new Date).getTime()){delete i._expires;return i}return null},set:function(i,g){g._expires=(new Date).getTime()+36E5;var j=JSON.stringify(g);localStorage.setItem(i,j);delete g._expires}};c.prototype={get:function(i){if(this._currentPromises[i])return this._currentPromises[i];var g=new b.Deferred,j="/orion/preferences/user"+i,k=h.get(j);if(k!==null)g.resolve(k);else{this._currentPromises[i]=g;var m=this;b.xhrGet({url:this.location+i,headers:{"Orion-Version":"1"},handleAs:"json",
timeout:15E3,load:function(l){h.set(j,l);delete m._currentPromises[i];g.resolve(l)},error:function(l,n){l.log=false;if(n.xhr.status===401)d.handleGetAuthenticationError(this,n);else if(n.xhr.status===404){l={};h.set(j,l);delete m._currentPromises[i];g.resolve(l)}else{delete m._currentPromises[i];g.resolve(h.get(j,true)||{})}},failOk:true})}return g},put:function(i,g){var j=new b.Deferred;h.set("/orion/preferences/user"+i,g);b.xhrPut({url:this.location+i,putData:JSON.stringify(g),headers:{"Orion-Version":"1"},
handleAs:"json",contentType:"application/json",timeout:15E3,load:function(){j.resolve()},error:function(k,m){m.xhr.status===401?d.handlePutAuthenticationError(this,m):j.resolve()}});return j}};e.prototype={get:function(i){if(this._currentPromise)return this._currentPromise;var g=new b.Deferred,j=h.get("/orion/preferences/default");if(j!==null)g.resolve(j[i]||{});else{this._currentPromise=g;var k=this;b.xhrGet({url:this.location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(m){h.set("/orion/preferences/default",
m);k._currentPromise=null;g.resolve(m[i]||{})},error:function(m,l){if(l.xhr.status===401)d.handleGetAuthenticationError(l.xhr,l);else if(l.xhr.status===404){h.set("/orion/preferences/default",{});k._currentPromise=null;g.resolve({})}else{k._currentPromise=null;m=h.get("/orion/preferences/default",true);m!==null?g.resolve(m[i]||{}):g.resolve({})}}})}return g}};f.prototype={getPreferences:function(i){var g=new a(i,this._userProvider,this._defaultsProvider);return g.sync().then(function(){return g})}};
return{Preferences:a,PreferencesService:f}});
define("dojo/DeferredList",["dojo"],function(b){b.DeferredList=function(d,a,c,e){var f=[];b.Deferred.call(this);var h=this;d.length===0&&!a&&this.resolve([0,[]]);var i=0;b.forEach(d,function(g,j){function k(m,l){f[j]=[m,l];i++;i===d.length&&h.resolve(f)}g.then(function(m){a?h.resolve([j,m]):k(true,m)},function(m){c?h.reject(m):k(false,m);if(e)return null;throw m;})})};b.DeferredList.prototype=new b.Deferred;b.DeferredList.prototype.gatherResults=function(d){d=new b.DeferredList(d,false,true,false);
d.addCallback(function(a){var c=[];b.forEach(a,function(e){c.push(e[1])});return c});return d};return b.DeferredList});
define("orion/pluginregistry",["dojo","orion/serviceregistry","dojo/DeferredList"],function(b,d){var a=a||{};a.Plugin=function(c,e,f){function h(q,r,v,u){if(!m)throw new Error("plugin not connected");var x=o++;p[String(x)]=u;f.postMessage({id:x,serviceId:q,method:r,params:v},m)}function i(q){var r={};if(q.methods)for(var v=0;v<q.methods.length;v++){var u=q.methods[v];r[u]=function(x){return function(){var C=Array.prototype.slice.call(arguments),D=new b.Deferred;k._load().then(function(){h(q.serviceId,
x,C,D)});return D.promise}}(u)}return r}function g(){var q=e.services;if(q)for(var r=0;r<q.length;r++){var v=q[r],u=i(v);t[v.serviceId]=f.registerService(v.type,u,v.properties)}}function j(q){try{if(q.method)if("plugin"===q.method){if(e){if(JSON.stringify(e)!=JSON.stringify(q.params[0])){for(var r in t)if(t.hasOwnProperty(r)){t[r].unregister();delete t[r]}e=q.params[0];g();f.updatePlugin(k)}}else{e=q.params[0];g()}if(!n){n=true;l.resolve(k)}}else if("dispatchEvent"===q.method){var v=t[q.serviceId];
v.dispatchEvent.apply(v,q.params)}else throw new Error("Bad response method: "+q.method);else{var u=p[String(q.id)];delete p[String(q.id)];q.error?u.reject(q.error):u.resolve(q.result)}}catch(x){console.log(x)}}var k=this,m=null,l=new b.Deferred,n=false,o=0,p={},t={};this.getLocation=function(){return c};this.getData=function(){return e};this.uninstall=function(){for(var q in t)if(t.hasOwnProperty(q)){t[q].unregister();delete t[q]}if(m){f.disconnect(m);m=null}f.uninstallPlugin(this)};this.getServiceReferences=
function(){var q=[],r;for(r in t)t.hasOwnProperty(r)&&q.push(t[r].getServiceReference());return q};this._load=function(q){if(!m){m=f.connect(c,j);window.setTimeout(function(){if(!n){if(!q){e={};f.updatePlugin(k)}l.reject(new Error("Load timeout for plugin: "+c))}},15E3)}return l.promise};if(typeof c!=="string")throw new Error("invalid url:"+c);e&&g()};a.PluginRegistry=function(c,e){function f(){var r,v,u=[];if((r=k["/orion/preferences/default"]?JSON.parse(k["/orion/preferences/default"]):null)&&r["/plugins"]){p=
r["/plugins"];for(v in p)if(p.hasOwnProperty(v)){v=g(v);r="plugin."+v;if(k[r]){r=JSON.parse(k[r]);r=new a.Plugin(v,r,q);m.push(r)}else u.push(j.installPlugin(v))}}(t=k["/orion/preferences/user/plugins"]?JSON.parse(k["/orion/preferences/user/plugins"]):null)||(t={});for(v in t)if(t.hasOwnProperty(v)&&v!=="_expires"){v=g(v);r="plugin."+v;if(k[r]){r=JSON.parse(k[r]);r=new a.Plugin(v,r,q);m.push(r)}else u.push(j.installPlugin(v))}o=new b.DeferredList(u)}function h(r){var v;k["plugin."+r.getLocation()]=
JSON.stringify(r.getData());for(v in p)if(p.hasOwnProperty(v))if(r.getLocation()===g(v))return;for(v in t)if(t.hasOwnProperty(v))if(r.getLocation()===g(v))return;t[r.getLocation()]=true;k["/orion/preferences/user/plugins"]=JSON.stringify(t)}function i(r){var v;delete k["plugin."+r.getLocation()];for(v in t)if(t.hasOwnProperty(v))if(r.getLocation()===g(v)){delete t[r.getLocation()];k["/orion/preferences/user/plugins"]=JSON.stringify(t);return}}function g(r){if(r.indexOf("://")===-1){var v=document.createElement("a");
v.href=r;return v.href}return r}var j=this,k=e||localStorage||{},m=[],l=[],n=new d.EventTarget,o,p={},t;window.addEventListener("message",function(r){for(var v=0,u=r.source;v<l.length;v++)if(u===l[v].target){l[v].handler(JSON.parse(r.data));break}},false);var q={registerService:b.hitch(c,c.registerService),connect:function(r,v){var u=document.createElement("iframe");u.id=r;u.name=r;u.style.display="none";u.style.visibility="hidden";u.src=r;document.body.appendChild(u);r={iframe:u,target:u.contentWindow,
handler:v,url:r};l.push(r);return r},disconnect:function(r){for(var v=0;v<l.length;v++)if(r===l[v]){l.splice(v,1);try{document.body.removeChild(r.iframe)}catch(u){}break}},uninstallPlugin:function(r){i(r);for(var v=0;v<m.length;v++)if(r===m[v]){m.splice(v,1);n.dispatchEvent("pluginRemoved",r);break}},updatePlugin:function(r){k["plugin."+r.getLocation()]=JSON.stringify(r.getData());n.dispatchEvent("pluginUpdated",r)},postMessage:function(r,v){v.target.postMessage(JSON.stringify(r),v.url)}};this.startup=
function(){return o.promise};this.shutdown=function(){for(var r=0;r<l.length;r++)try{document.body.removeChild(l[r].iframe)}catch(v){}};this.installPlugin=function(r,v){r=g(r);for(var u=new b.Deferred,x,C=0;C<m.length;C++)if(r===m[C].getLocation()){x=m[C];break}if(x)if(x.getData())u.resolve(x);else{var D=function(z){if(z.getLocation()===r){u.resolve(z);n.removeEventListener("pluginAdded",D)}};n.addEventListener("pluginAdded",D)}else{x=new a.Plugin(r,v,q);m.push(x);if(x.getData()){h(x);n.dispatchEvent("pluginAdded",
x);u.resolve(x)}else x._load(!!o).then(function(){h(x);n.dispatchEvent("pluginAdded",x);u.resolve(x)},function(z){u.reject(z)})}return u.promise};this.getPlugins=function(){for(var r=[],v=0;v<m.length;v++)m[v].getData()&&r.push(m[v]);return r};this.getPlugin=function(r){r=g(r);for(var v=0;v<m.length;v++)if(m[v].getData()&&r===m[v].getLocation())return m[v];return null};this.addEventListener=function(r,v){n.addEventListener(r,v)};this.removeEventListener=function(r,v){n.removeEventListener(r,v)};f()};
return a});
define("orion/status",["dojo"],function(b){function d(a,c,e){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this.domId=c;this.progressDomId=e||c}d.prototype={setMessage:function(a,c){b.place(window.document.createTextNode(a),this.domId,"only");if(typeof c==="number"){var e=this;window.setTimeout(function(){var f=b.byId(e.domId);(typeof f.textContent==="string"?f.textContent:f.innerText)===a&&b.place(window.document.createTextNode(""),e.domId,"only")},
c)}},setErrorMessage:function(a){var c=a.responseText||a;try{c=JSON.parse(c)}catch(e){}a=c.Message||c;var f="red";if(c.Severity)switch(c.Severity){case "Warning":f="#FFCC00";break;case "Error":f="red";break;case "Info":case "Ok":f="green";break}c=b.create("span",{style:{color:f}});b.place(window.document.createTextNode(a),c);b.place(c,this.domId,"only")},setProgressMessage:function(a){b.place(window.document.createTextNode(a),this.progressDomId,"only")},setProgressResult:function(a){a=a.responseText||
a;try{a=JSON.parse(a)}catch(c){}var e=a.Message||a,f="/images/info.gif",h="info";if(a.Severity)switch(a.Severity){case "Warning":f="/images/warning.gif";h="warning";break;case "Error":f="/images/error.gif";h="error";break}var i=new Image;i.alt=h;i.title="Press to clear message";i.name=h;i.src=f;b.style(i,"opacity","0.7");b.connect(i,"onmouseover",this,function(){b.style(i,"opacity","1")});b.connect(i,"onmouseout",this,function(){b.style(i,"opacity","0.7")});b.connect(i,"onclick",this,function(){this.setProgressMessage("")});
b.place(i,this.progressDomId,"only");a.HTML?b.place(e,this.progressDomId,"last"):b.place(window.document.createTextNode("   "+e),this.progressDomId,"last")},showWhile:function(a,c){var e=this;e.setProgressMessage(c);return a.then(function(f){if(f&&f.Location&&f.Message&&f.Running)return e._doProgressWhile(f);e.setProgressMessage("");f&&f.Result&&e.setProgressResult(f.Result);return f})},_doProgressWhile:function(a){var c=new b.Deferred;window.setTimeout(function(){b.xhrGet({url:a.Location,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:15E3,load:function(e){c.callback(e)}})},2E3);return this.showWhile(c,a.Message)}};d.prototype.constructor=d;return{StatusReportingService:d}});
define("orion/fileClient",["dojo","orion/auth"],function(b,d){function a(c){this.fileService=c}a.prototype={setFileService:function(c){this.fileService=c},fetchChildren:function(){return this._doServiceCall("fetchChildren",arguments)},createWorkspace:function(){return this._doServiceCall("createWorkspace",arguments)},loadWorkspaces:function(){return this._doServiceCall("loadWorkspaces",arguments)},loadWorkspace:function(){return this._doServiceCall("loadWorkspace",arguments)},createProject:function(){return this._doServiceCall("createProject",
arguments)},createFolder:function(){return this._doServiceCall("createFolder",arguments)},createFile:function(){return this._doServiceCall("createFile",arguments)},deleteFile:function(){return this._doServiceCall("deleteFile",arguments)},moveFile:function(){return this._doServiceCall("moveFile",arguments)},copyFile:function(){return this._doServiceCall("copyFile",arguments)},read:function(){return this._doServiceCall("read",arguments)},write:function(){return this._doServiceCall("write",arguments)},
remoteImport:function(){return this._doServiceCall("remoteImport",arguments)},remoteExport:function(){return this._doServiceCall("remoteExport",arguments)},_doServiceCall:function(c,e){var f=new b.Deferred,h=this.fileService;h[c].apply(h,e).then(function(i){f.callback(i)},function(i){i.status===401||i.status===403?d.handleAuthenticationError(i,function(){h[c].apply(h,e).then(function(g){f.callback(g)},function(g){f.errback(g)})}):f.errback(i)});return f}};a.prototype.constructor=a;return{FileClient:a}});
define("dojo/cookie",["dojo","dojo/regexp"],function(b){b.cookie=function(d,a,c){var e=document.cookie;if(arguments.length==1){var f=e.match(new RegExp("(?:^|; )"+b.regexp.escapeString(d)+"=([^;]*)"));return f?decodeURIComponent(f[1]):undefined}else{c=c||{};e=c.expires;if(typeof e=="number"){var h=new Date;h.setTime(h.getTime()+e*24*60*60*1E3);e=c.expires=h}if(e&&e.toUTCString)c.expires=e.toUTCString();a=encodeURIComponent(a);e=d+"="+a;for(f in c){e+="; "+f;h=c[f];if(h!==true)e+="="+h}document.cookie=
e}};b.cookie.isSupported=function(){if(!("cookieEnabled"in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1})}return navigator.cookieEnabled};return b.cookie});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(b,d){b.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){b.forEach(this.getChildren(),
this._setupChild,this);this.inherited(arguments)}},_setupChild:function(a){var c=a.region;if(c){this.inherited(arguments);b.addClass(a.domNode,this.baseClass+"Pane");var e=this.isLeftToRight();if(c=="leading")c=e?"left":"right";if(c=="trailing")c=e?"right":"left";if(c!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget){var f=b.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter");e=new f({id:a.id+"_splitter",container:this,child:a,region:c,live:this.liveSplitters});e.isSplitter=
true;a._splitterWidget=e;b.place(e.domNode,a.domNode,"after");e.startup()}a.region=c}},layout:function(){this._layoutChildren()},addChild:function(){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var c=a.region,e=a._splitterWidget;if(e){e.destroy();delete a._splitterWidget}this.inherited(arguments);this._started&&this._layoutChildren();b.removeClass(a.domNode,this.baseClass+"Pane");b.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});
b.style(a.domNode,c=="top"||c=="bottom"?"width":"height","auto")},getChildren:function(){return b.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return b.filter(this.getChildren(),function(c){return c.region==a})[0]._splitterWidget},resize:function(){if(!this.cs||!this.pe){var a=this.domNode;this.cs=b.getComputedStyle(a);this.pe=b._getPadExtents(a,this.cs);this.pe.r=b._toPixelValue(a,this.cs.paddingRight);this.pe.b=b._toPixelValue(a,this.cs.paddingBottom);
b.style(a,"padding","0px")}this.inherited(arguments)},_layoutChildren:function(a,c){if(this._borderBox&&this._borderBox.h){var e=b.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);e.sort(function(h,i){h=h.weight;i=i.weight;for(var g=0;g<h.length;g++)if(h[g]!=i[g])return h[g]-i[g];return 0});var f=[];b.forEach(e,function(h){h=h.pane;f.push(h);h._splitterWidget&&f.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},f,a,c)}},destroyRecursive:function(){b.forEach(this.getChildren(),function(a){var c=a._splitterWidget;c&&c.destroy();delete a._splitterWidget});this.inherited(arguments)}});b.extend(d._Widget,{region:"",layoutPriority:0,splitter:false,minSize:0,maxSize:Infinity});b.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);b.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=b.cookie(this._cookieName);if(a)this.child.domNode.style[this.horizontal?"height":"width"]=a}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",c=b.marginBox(this.child.domNode)[a],e=b.filter(this.container.getChildren(),function(f){return f.region=="center"})[0];a=b.marginBox(e.domNode)[a];return Math.min(this.child.maxSize,c+a)},_startDrag:function(a){if(!this.cover){this.cover=b.doc.createElement("div");b.addClass(this.cover,"dijitSplitterCover");b.place(this.cover,this.child.domNode,"after")}b.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);if(!(this._resize=this.live)){(this.fake=this.domNode.cloneNode(true)).removeAttribute("id");
b.addClass(this.domNode,"dijitSplitterShadow");b.place(this.fake,this.domNode,"after")}b.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");if(this.fake)b.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var c=this._factor,e=this.horizontal,f=e?"pageY":"pageX",h=a[f],i=this.domNode.style;e=e?"h":"w";var g=b.marginBox(this.child.domNode)[e],j=this._computeMaxSize(),k=this.child.minSize||20;e=this.region;var m=e==
"top"||e=="bottom"?"top":"left",l=parseInt(i[m],10),n=this._resize,o=b.hitch(this.container,"_layoutChildren",this.child.id);e=b.doc;this._handlers=(this._handlers||[]).concat([b.connect(e,"onmousemove",this._drag=function(p,t){p=p[f]-h;var q=c*p+g,r=Math.max(Math.min(q,j),k);if(n||t)o(r);i[m]=p+l+c*(r-q)+"px"}),b.connect(e,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent),b.connect(e,"onmouseup",this,"_stopDrag")]);b.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||
a.type=="mouseenter";b.toggleClass(this.domNode,"dijitSplitterHover",a);b.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&b.removeClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);b.removeClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow");this._drag(a);this._drag(a,true)}finally{this._cleanupHandlers();delete this._drag}if(this.container.persist)b.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){b.forEach(this._handlers,b.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=true;var c=this.horizontal,e=1,f=b.keys;switch(a.charOrCode){case c?f.UP_ARROW:f.LEFT_ARROW:e*=-1;case c?f.DOWN_ARROW:f.RIGHT_ARROW:break;default:return}c=b._getMarginSize(this.child.domNode)[c?"h":"w"]+this._factor*e;this.container._layoutChildren(this.child.id,Math.max(Math.min(c,this._computeMaxSize()),
this.child.minSize));b.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});b.declare("dijit.layout._Gutter",[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);b.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return d.layout.BorderContainer});
define("orion/searchClient",["dojo","dijit","orion/auth","orion/util","dijit/form/Button","dijit/layout/BorderContainer","dijit/layout/ContentPane"],function(b,d,a,c){function e(f){this.registry=f.serviceRegistry}e.prototype={search:function(f,h,i,g,j,k){b.xhrGet({url:h,handleAs:"json",headers:{Accept:"application/json","Orion-Version":"1"},sync:false,timeout:15E3,error:b.hitch(this,function(m,l){this.handleError(m,f);a.handleGetAuthenticationError(this,l,b.hitch(this,this.showSearchResult),b.hitch(this,
function(n){this.handleError(n,f)}));return m}),load:b.hitch(this,function(m){this.showSearchResult(f,h,i,g,j,k,m)})})},handleError:function(f,h){console.error(f);var i=document.createTextNode(f);b.place(i,h,"only");return f},saveSearch:function(f,h){this.registry.getService("orion.core.favorite").then(function(i){i.addFavoriteSearch(f,h)})},formatHighlight:function(f){f=f.split(/(##match|match##)/);for(var h=b.create("div"),i,g=0;g<f.length;g++){var j=f[g];if(j==="##match")i=b.create("b");else if(j===
"match##"){b.place(i,h,"last");i=null}else b.place(document.createTextNode(j),i||h,"last")}return h},showSearchResult:function(f,h,i,g,j,k,m){h=window.location.href.split("#")[0];var l=h.substring(0,h.length-window.location.pathname.length),n=false;b.empty(f);h=m.responseHeader.params.q;h=h.substring(h.indexOf("}")+1);if(m.response.numFound>0){for(var o=document.createElement("table"),p=0;p<m.response.docs.length;p++){var t=m.response.docs[p];if(!t.Directory&&t.Location!==i){var q;if(!n){n=true;if(g){q=
o.insertRow(0).insertCell(0);q.innerHTML="<h2>Search Results</h2>"}}q=o.insertRow(-1).insertCell(0);q.colspan=2;var r=document.createElement("a");b.place(document.createTextNode(t.Name),r);t.LineNumber&&b.place(document.createTextNode(" (Line "+t.LineNumber+")"),r);var v;v=h&&t.LineNumber?l+"/edit/edit.html#"+c.hashFromPosition(t.Location,null,null,t.LineNumber,t.Offset,h.length):l+"/edit/edit.html#"+t.Location;r.setAttribute("href",v);q.appendChild(r);if(!k&&m.highlighting&&m.highlighting[t.Id]&&
m.highlighting[t.Id].Text){t=m.highlighting[t.Id].Text[0];q=o.insertRow(-1).insertCell(0);q.colspan=2;b.place(this.formatHighlight(t),q,"only")}}}b.place(o,f,"last");typeof j==="function"&&j(f)}if(!n){f=b.place("<div>No matches found for </div>",f,"only");f=b.create("b",null,f,"last");b.place(document.createTextNode(h),f,"only")}}};e.prototype.constructor=e;return{Searcher:e}});
define("orion/dialogs",[],function(){function b(d){this._serviceRegistry=d;this._serviceRegistration=d.registerService("orion.page.dialog",this)}b.prototype={confirm:function(d,a){a(window.confirm(d))},openFiles:function(){}};b.prototype.constructor=b;return{DialogService:b}});
define("siteService",["dojo","orion/auth"],function(b,d){function a(c){this._serviceRegistration=c.registerService("org.eclipse.orion.sites.siteManagement",this)}a.prototype={getSiteConfigurations:function(){return this._doServiceCall("getSiteConfigurations",arguments)},loadSiteConfiguration:function(){return this._doServiceCall("loadSiteConfiguration",arguments)},createSiteConfiguration:function(){return this._doServiceCall("createSiteConfiguration",arguments)},updateSiteConfiguration:function(){return this._doServiceCall("updateSiteConfiguration",
arguments)},deleteSiteConfiguration:function(){return this._doServiceCall("deleteSiteConfiguration",arguments)},_serviceImpl:{getSiteConfigurations:function(){return b.xhrGet({url:"/site",preventCache:true,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3}).then(function(c){return c.SiteConfigurations})},loadSiteConfiguration:function(c){return b.xhrGet({url:c,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3})},createSiteConfiguration:function(c,e,f,h){c={Name:c,Workspace:e};if(f)c.Mappings=
f;if(h)c.HostHint=h;return b.xhrPost({url:"/site",postData:b.toJson(c),headers:{"Content-Type":"application/json; charset=utf-8","Orion-Version":"1"},handleAs:"json",timeout:15E3})},updateSiteConfiguration:function(c,e){return b.xhrPut({url:c,putData:b.toJson(e),headers:{"Content-Type":"application/json; charset=utf-8","Orion-Version":"1"},handleAs:"json",timeout:15E3})},deleteSiteConfiguration:function(c){return b.xhrDelete({url:c,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3})}},_doServiceCall:function(c,
e){var f=this._serviceImpl,h=this._serviceImpl[c],i=new b.Deferred;h.apply(f,e).then(function(g){i.callback(g)},function(g){g.status===401||g.status===403?d.handleAuthenticationError(g,function(){h.apply(f,e).then(function(j){i.callback(j)},function(j){i.errback(j)})}):i.errback(g)});return i}};a.prototype.constructor=a;return{SITE_SERVICE_NAME:"org.eclipse.orion.sites.siteManagement",SiteService:a}});
define("orion/siteUtils",["dojo","orion/commands","orion/util"],function(b,d,a){function c(k){return"site.html#"+a.makeRelative(k.Location)}function e(k){k=b.queryToObject(k);var m=b.mixin({},k);for(var l in k)if(k.hasOwnProperty(l))if(k[l]===""&&l!=="action"&&l!=="actionDetails"){m.site=l;delete m[l]}return m}function f(k,m,l){var n={};if(k)n[k]="";if(m)n.action=m;if(l)n.actionDetails=l;return b.objectToQuery(n)}function h(k,m,l,n,o,p,t,q){var r=new d.Command({name:"Edit",image:"/images/editing_16.gif",
id:"eclipse.site.edit",visibleWhen:function(v){return v.HostingStatus&&v.HostingStatus.Status==="stopped"},hrefCallback:c});k.addCommand(r,"object");r=new d.Command({name:"Start",image:"/images/lrun_obj.gif",id:"eclipse.site.start",visibleWhen:function(v){return v.HostingStatus&&v.HostingStatus.Status==="stopped"},callback:function(v,u,x,C){u=C||{};u.HostingStatus={Status:"started"};v=m.updateSiteConfiguration(v.Location,u).then(o,q);l.showWhile(v,"Starting...")}});k.addCommand(r,"object");r=new d.Command({name:"Stop",
image:"/images/stop.gif",id:"eclipse.site.stop",visibleWhen:function(v){return v.HostingStatus&&v.HostingStatus.Status==="started"},callback:function(v,u,x,C){u=C||{};u.HostingStatus={Status:"stopped"};u=m.updateSiteConfiguration(v.Location,u).then(p,q);l.showWhile(u,"Stopping "+v.Name+"...")}});k.addCommand(r,"object");r=new d.Command({name:"Delete",image:"/images/delete.gif",id:"eclipse.site.delete",visibleWhen:function(v){return v.HostingStatus&&v.HostingStatus.Status==="stopped"},callback:function(v){n.confirm("Are you sure you want to delete the site configuration '"+
v.Name+"'?",function(u){u&&m.deleteSiteConfiguration(v.Location).then(t,q)})}});k.addCommand(r,"object")}function i(k){return b.filter(k,function(m){return m!==""})}function g(k){k=a.makeRelative(k).split("/");return"/"+i(k).slice(1).join("/")}function j(k){var m="/file"+k;k=k.split("/");if(i(k).length===1)m+="/";return a.makeFullPath(m)}return{generateEditSiteHref:c,parseStateFromHash:e,stateToHash:f,createSiteCommands:h,makeRelativeFilePath:g,makeFullFilePath:j}});
define("siteTree",["dojo","orion/siteUtils"],function(b,d){var a={};a.sites={};a.sites.SiteTreeModel=function(){function c(e,f){this._siteService=e;this._root={};this._id=f}c.prototype={getRoot:function(e){e(this._root)},getChildren:function(e,f){if(e.children)f(e.children);else if(e===this._root)this._siteService.getSiteConfigurations().then(function(h){e.children=h;f(h)});else return f([])},getId:function(e){return e===this._root||e===this._id?this._id:e.Id}};return c}();a.sites.SiteRenderer=function(){function c(e){this._commandService=
e}c.prototype={initTable:function(e,f){this.tableTree=f;b.addClass(e,"treetable");f=b.create("thead",null);b.create("th",{innerHTML:"Name"},f,"last");b.create("th",{innerHTML:"Status"},f,"last");b.create("th",{innerHTML:"Actions"},f,"last");e.appendChild(f)},render:function(e,f){b.style(f,"verticalAlign","baseline");b.addClass(f,"treeTableRow");var h=b.create("td",{id:f.id+"col1"}),i=b.create("td",{id:f.id+"col2"}),g=b.create("td",{id:f.id+"col3"}),j=d.generateEditSiteHref(e),k=b.create("a",{href:j},
h,"last");b.create("img",{src:"/images/config_obj.gif",style:{verticalAlign:"bottom",paddingRight:"3px"}},k,"last");j=b.create("a",{href:j},h,"last");b.place(document.createTextNode(e.Name),j,"last");j=e.HostingStatus;if(typeof j==="object")if(j.Status==="started"){b.place(document.createTextNode("Started at "),i,"last");k=b.create("a",null,i,"last");b.place(document.createTextNode(j.URL),k,"only");k.href=j.URL}else{j=j.Status.substring(0,1).toUpperCase()+j.Status.substring(1);b.place(document.createTextNode(j),
i,"only")}else b.place(document.createTextNode("Unknown"),i,"only");var m=b.create("span",{id:f.id+"actionswrapper",style:{visibility:"hidden"}},g,"only");b.connect(f,"onmouseover",f,function(){b.style(m,"visibility","visible")});b.connect(f,"onmouseout",f,function(){b.style(m,"visibility","hidden")});this._commandService.renderCommands(m,"object",e,{},"image");b.place(h,f,"last");b.place(i,f,"last");b.place(g,f,"last")},rowsChanged:function(){b.query(".treeTableRow").forEach(function(e,f){if(f%2){b.addClass(e,
"darkTreeTableRow");b.removeClass(e,"lightTreeTableRow")}else{b.addClass(e,"lightTreeTableRow");b.removeClass(e,"darkTreeTableRow")}})},labelColumnIndex:0};return c}();return a.sites});
define("orion/treetable",["dojo"],function(b){function d(a){this._init(a)}d.prototype={_init:function(a){var c=a.parent,e=this;if(typeof c==="string")c=b.byId(c);if(!c)throw"no parent";if(!a.model)throw"no tree model";if(!a.renderer)throw"no renderer";this._parent=c;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._labelColumnIndex=a.labelColumnIndex===undefined?0:a.labelColumnIndex;this._id=
a.id===undefined?"treetable":a.id;this._root=this._treeModel.getRoot(function(f){if(this._showRoot){f._depth=0;this._generate([f],0)}else e._treeModel.getChildren(f,function(h){e._generate(h,0)})})},_generate:function(a,c){b.empty(this._parent);var e=document.createElement("table");e.id=this._id;this._renderer.initTable(e,this);var f=document.createElement("tbody");f.id=this._id+"tbody";this._generateChildren(a,c,f,"last");e.appendChild(f);this._parent.appendChild(e);this._rowsChanged()},_generateChildren:function(a,
c,e,f){for(var h in a){var i=document.createElement("tr");i.id=this._treeModel.getId(a[h]);i._depth=c;i._item=a[h];this._renderer.render(a[h],i);b.style(i.childNodes[this._labelColumnIndex],"paddingLeft",this._indent*c+"px");b.place(i,e,f);if(f==="after")e=i}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(a,c,e,f,h){var i=this._treeModel.getId(a);if(i===this._id){this._removeChildRows(i);
this._generateChildren(c,0,b.byId(i+"tbody"),"last");this._rowsChanged()}else{var g=b.byId(i);if(g){g._item=a;if(g&&(e||g._expanded)){g._expanded=true;this._removeChildRows(i);if(c){this._generateChildren(c,g._depth+1,g,"after");this._rowsChanged();if(f&&h)document.images[f].src=h}else{tree=this;c=this._treeModel.getChildren(g._item,function(j){tree._generateChildren(j,g._depth+1,g,"after");tree._rowsChanged()})}}}else console.log("could not find table row "+i)}},refreshAndExpand:function(a,c,e,f){this.refresh(a,
c,true,e,f)},getItem:function(a){if(typeof a==="string"){var c=b.byId(a);if(c)return c._item}if(a._item)return a._item;return a},toggle:function(a,c,e,f){var h=b.byId(a);if(h)if(h._expanded){this.collapse(a);if(c)document.images[c].src=f}else{this.expand(a);if(c)document.images[c].src=e}},isExpanded:function(a){if(a=b.byId(a))return a._expanded;return false},expand:function(a,c,e){a=typeof a==="string"?a:this._treeModel.getId(a);var f=b.byId(a);if(f)if(!f._expanded){f._expanded=true;var h=this;this._treeModel.getChildren(f._item,
function(i){h._generateChildren(i,f._depth+1,f,"after");h._rowsChanged();c&&c.apply(this,e)})}},_removeChildRows:function(a){b.byId(this._id);var c=a===this._id,e=false,f=-1,h=[];b.query(".treeTableRow").forEach(function(j){if(!e)if(c)if(j._depth>f)h.push(j);else e=true;else if(j.id===a){c=true;f=j._depth}});for(var i in h){var g=h[i];g.parentNode.removeChild(g)}},collapse:function(a){a=typeof a==="string"?a:this._treeModel.getId(a);var c=b.byId(a);if(c)if(c._expanded){c._expanded=false;this._removeChildRows(a);
this._rowsChanged()}}};d.prototype.constructor=d;return{TableTree:d}});define("dojox",["dojo"],function(b){return dojox=b._dojox||{}});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("dojo/data/util/sorter",["dojo"],function(b){b.getObject("data.util.sorter",true,b);b.data.util.sorter.basicComparator=function(d,a){var c=-1;if(d===null)d=undefined;if(a===null)a=undefined;if(d==a)c=0;else if(d>a||d==null)c=1;return c};b.data.util.sorter.createSortFunction=function(d,a){function c(m,l,n,o){return function(p,t){p=o.getValue(p,m);t=o.getValue(t,m);return l*n(p,t)}}for(var e=[],f,h=a.comparatorMap,i=b.data.util.sorter.basicComparator,g=0;g<d.length;g++){f=d[g];var j=f.attribute;
if(j){f=f.descending?-1:1;var k=i;if(h){if(typeof j!=="string"&&"toString"in j)j=j.toString();k=h[j]||i}e.push(c(j,f,k,a))}}return function(m,l){for(var n=0;n<e.length;){var o=e[n++](m,l);if(o!==0)return o}return 0}};return b.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(b){b.getObject("data.util.simpleFetch",true,b);b.data.util.simpleFetch.fetch=function(d){d=d||{};if(!d.store)d.store=this;var a=this,c=function(f,h){if(h.onError)h.onError.call(h.scope||b.global,f,h)},e=function(f,h){var i=h.abort||null,g=false,j=h.start?h.start:0,k=h.count&&h.count!==Infinity?j+h.count:f.length;h.abort=function(){g=true;i&&i.call(h)};var m=h.scope||b.global;if(!h.store)h.store=a;h.onBegin&&h.onBegin.call(m,
f.length,h);h.sort&&f.sort(b.data.util.sorter.createSortFunction(h.sort,a));if(h.onItem)for(var l=j;l<f.length&&l<k;++l){var n=f[l];g||h.onItem.call(m,n,h)}if(h.onComplete&&!g){l=null;h.onItem||(l=f.slice(j,k));h.onComplete.call(m,l,h)}};this._fetchItems(d,e,c);return d};return b.data.util.simpleFetch});
define("dojo/data/util/filter",["dojo"],function(b){b.getObject("data.util.filter",true,b);b.data.util.filter.patternToRegExp=function(d,a){for(var c="^",e=null,f=0;f<d.length;f++){e=d.charAt(f);switch(e){case "\\":c+=e;f++;c+=d.charAt(f);break;case "*":c+=".*";break;case "?":c+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":c+="\\";default:c+=e}}c+="$";return a?new RegExp(c,"mi"):new RegExp(c,"m")};return b.data.util.filter});
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(b,d){b.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:b.cache("dijit.form","templates/DropDownBox.html"),baseClass:"dijitTextBox dijitComboBox",dropDownClass:"dijit.form._ComboBoxMenu",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(a){var c=0;if(typeof a.selectionStart=="number")c=a.selectionStart;else if(b.isIE){var e=b.doc.selection.createRange().duplicate();a=a.createTextRange();e.move("character",
0);a.move("character",0);try{a.setEndPoint("EndToEnd",e);c=String(a.text).replace(/\r/g,"").length}catch(f){}}return c},_setCaretPos:function(a,c){c=parseInt(c);d.selectInputText(a,c,c)},_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(b.hitch(this,function(){this._onKey({charOrCode:229})}),100);this.inherited(arguments)},_onKey:function(a){var c=a.charOrCode;if(!(a.altKey||(a.ctrlKey||a.metaKey)&&c!="x"&&c!="v"||c==b.keys.SHIFT)){var e=false,f=this.dropDown,h=b.keys,i=null;this._prev_key_backspace=false;this._abortQuery();this.inherited(arguments);if(this._opened)i=f.getHighlightedOption();switch(c){case h.PAGE_DOWN:case h.DOWN_ARROW:case h.PAGE_UP:case h.UP_ARROW:this._opened&&
this._announceOption(i);b.stopEvent(a);break;case h.ENTER:if(i)if(i==f.nextButton){this._nextSearch(1);b.stopEvent(a);break}else{if(i==f.previousButton){this._nextSearch(-1);b.stopEvent(a);break}}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length)}if(this._opened||this._fetchHandle)a.preventDefault();case h.TAB:c=this.get("displayedValue");if(f&&(c==f._messages.previousMessage||c==f._messages.nextMessage))break;i&&this._selectOption();if(this._opened){this._lastQuery=
null;this.closeDropDown()}break;case " ":if(i){b.stopEvent(a);this._selectOption();this.closeDropDown()}else e=true;break;case h.DELETE:case h.BACKSPACE:e=this._prev_key_backspace=true;break;default:e=typeof c=="string"||c==229}if(e){this.item=undefined;this.searchTimer=setTimeout(b.hitch(this,"_startSearchFromInput"),1)}}},_autoCompleteText:function(a){var c=this.focusNode;d.selectInputText(c,c.value.length);var e=this.ignoreCase?"toLowerCase":"substr";if(a[e](0).indexOf(this.focusNode.value[e](0))==
0){e=this._getCaretPos(c);if(e+1>c.value.length){c.value=a;d.selectInputText(c,e)}}else{c.value=a;d.selectInputText(c)}},_openResultList:function(a,c){this._fetchHandle=null;if(!(this.disabled||this.readOnly||c.query[this.searchAttr]!=this._lastQuery)){var e=this.dropDown._highlighted_option&&b.hasClass(this.dropDown._highlighted_option,"dijitMenuItemSelected");this.dropDown.clearResultList();if(!a.length&&!this._maxOptions)this.closeDropDown();else{c._maxOptions=this._maxOptions;a=this.dropDown.createOptions(a,
c,b.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if(c.direction){if(1==c.direction)this.dropDown.highlightFirstOption();else-1==c.direction&&this.dropDown.highlightLastOption();e&&this._announceOption(this.dropDown.getHighlightedOption())}else this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(c.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"),c=this.dropDown;if(c&&(a==c._messages.previousMessage||a==c._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,c,e){e||(e=this.store.getValue(a,this.searchAttr));var f=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):e;this._set("item",a);d.form.ComboBox.superclass._setValueAttr.call(this,f,c,e)},_announceOption:function(a){if(a){var c;
if(a==this.dropDown.nextButton||a==this.dropDown.previousButton){c=a.innerHTML;this.item=undefined;this.value=""}else{c=this.store.getValue(a.item,this.searchAttr).toString();this.set("item",a.item,false,c)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);d.setWaiState(this.focusNode,"activedescendant",b.attr(a,"id"));this._autoCompleteText(c)}},_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 b.string.substitute(this.queryExpr,[a])},_startSearch:function(a){if(!this.dropDown){var c=this.id+"_popup";this.dropDown=new (b.getObject(this.dropDownClass,false))({onChange:b.hitch(this,this._selectOption),id:c,dir:this.dir});d.removeWaiState(this.focusNode,
"activedescendant");d.setWaiState(this.textbox,"owns",c)}c=b.clone(this.query);this._lastInput=a;this._lastQuery=c[this.searchAttr]=this._getQueryString(a);this.searchTimer=setTimeout(b.hitch(this,function(e,f){this.searchTimer=null;e={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:e,onBegin:b.hitch(this,"_setMaxOptions"),onComplete:b.hitch(this,"_openResultList"),onError:function(h){f._fetchHandle=null;console.error("dijit.form.ComboBox: "+h);f.closeDropDown()},start:0,count:this.pageSize};
b.mixin(e,f.fetchProperties);this._fetchHandle=f.store.fetch(e);this._nextSearch=this.dropDown.onPage=b.hitch(this,function(h,i){h.start+=h.count*i;h.direction=i;this._fetchHandle=this.store.fetch(h);this.focus()},this._fetchHandle)},c,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 c=this._getValueField();this.value=this.store.getValue(a,c)}}}this.inherited(arguments)},postCreate:function(){var a=b.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 c=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){a=this.doHighlight(a,this._escapeHtml(this._lastInput));c="html"}return{html:c=="html",label:a}},doHighlight:function(a,c){var e=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),f=this.queryExpr.indexOf("${0}");c=b.regexp.escapeString(c);return this._escapeHtml(a).replace(new RegExp((f==0?"^":"")+"("+c+")"+(f==this.queryExpr.length-4?"$":""),e),'<span class="dijitComboBoxHighlightMatch">$1</span>')},
_escapeHtml:function(a){return a=String(a).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,c){return c.getValue(a,this.labelAttr||this.searchAttr).toString()}});b.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=b.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,
c){var e=b.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"});c=c(a);if(c.html)e.innerHTML=c.label;else e.appendChild(b.doc.createTextNode(c.label));if(e.innerHTML=="")e.innerHTML="&nbsp;";e.item=a;return e},createOptions:function(a,c,e){this.previousButton.style.display=c.start==0?"none":"";b.attr(this.previousButton,"id",this.id+"_prev");b.forEach(a,function(h,i){h=this._createOption(h,e);b.attr(h,"id",this.id+i);this.domNode.insertBefore(h,
this.nextButton)},this);var f=false;if(c._maxOptions&&c._maxOptions!=-1)if(c.start+c.count<c._maxOptions)f=true;else{if(c.start+c.count>c._maxOptions&&c.count==a.length)f=true}else if(c.count==a.length)f=true;this.nextButton.style.display=f?"":"none";b.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){b.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;b.addClass(this._highlighted_option,"dijitMenuItemSelected")}},_blurOptionNode:function(){if(this._highlighted_option){b.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)}b.window.scrollIntoView(this._highlighted_option)},highlightFirstOption:function(){var a=this.domNode.firstChild,c=a.nextSibling;this._focusOptionNode(c.style.display=="none"?a:c);b.window.scrollIntoView(this._highlighted_option)},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);b.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)}b.window.scrollIntoView(this._highlighted_option)},_page:function(a){var c=0,e=this.domNode.scrollTop,f=b.style(this.domNode,"height");for(this.getHighlightedOption()||this._highlightNextOption();c<f;){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;c+=(h-e)*(a?-1:1);e=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 b.keys.DOWN_ARROW:this._highlightNextOption();
return false;case b.keys.PAGE_DOWN:this.pageDown();return false;case b.keys.UP_ARROW:this._highlightPrevOption();return false;case b.keys.PAGE_UP:this.pageUp();return false;default:return true}}});b.declare("dijit.form.ComboBox",[d.form.ValidationTextBox,d.form.ComboBoxMixin],{_setValueAttr:function(a,c,e){this._set("item",null);a||(a="");d.form.ValidationTextBox.prototype._setValueAttr.call(this,a,c,e)}});b.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(a){this.root=a;if(a.tagName!=
"SELECT"&&a.firstChild){a=b.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}b.query("> option",a).forEach(function(c){c.innerHTML=b.trim(c.innerHTML)})},getValue:function(a,c){return c=="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,c){if(!a.query)a.query={};
if(!a.query.name)a.query.name="";if(!a.queryOptions)a.queryOptions={};var e=b.data.util.filter.patternToRegExp(a.query.name,a.queryOptions.ignoreCase),f=b.query("> option",this.root).filter(function(h){return(h.innerText||h.textContent||"").match(e)});a.sort&&f.sort(b.data.util.sorter.createSortFunction(a.sort,this));c(f,a)},close:function(){},getLabel:function(a){return a.innerHTML},getIdentity:function(a){return b.attr(a,"value")},fetchItemByIdentity:function(a){var c=b.query("> option[value='"+
a.identity+"']",this.root)[0];a.onItem(c)},fetchSelectedItem:function(){var a=this.root,c=a.selectedIndex;return typeof c=="number"?b.query("> option:nth-child("+(c!=-1?c+1:1)+")",a)[0]:null}});b.extend(d.form._ComboBoxDataStore,b.data.util.simpleFetch);return d.form.ComboBox});
define("dijit/form/Form",["dojo","dijit","dijit/_Widget","dijit/_Templated","dijit/form/_FormMixin","dijit/layout/_ContentPaneResizeMixin"],function(b,d){b.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:b.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;b.attr(this.domNode,"encType",a);if(b.isIE)this.domNode.encoding=a},postCreate:function(){if(b.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var a=this.srcNodeRef.attributes.getNamedItem("encType");a&&!a.specified&&typeof a.value==
"string"&&this.set("encType",a.value)}this.inherited(arguments)},reset:function(a){var c={returnValue:true,preventDefault:function(){this.returnValue=false},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(c)!==false&&c.returnValue&&this.inherited(arguments,[])},onReset:function(){return true},_onReset:function(a){this.reset(a);b.stopEvent(a);return false},_onSubmit:function(a){var c=d.form.Form.prototype;if(this.execute!=c.execute||this.onExecute!=
c.onExecute){b.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");this.onExecute();this.execute(this.getValues())}this.onSubmit(a)===false&&b.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==false&&this.containerNode.submit()}});return d.form.Form});define("text!dijit/form/templates/Select.html",function(){return'<table class="dijit dijitReset dijitInline dijitLeft"\n\tdojoAttachPoint="_buttonNode,tableNode,focusNode" cellspacing=\'0\' cellpadding=\'0\'\n\trole="combobox" aria-haspopup="true"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonContents dijitButtonNode" role="presentation"\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"  dojoAttachPoint="containerNode,_popupStateNode"></span\n\t\t\t><input type="hidden" ${!nameAttrSetting} dojoAttachPoint="valueNode" value="${value}" aria-hidden="true"\n\t\t/></td><td class="dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton"\n\t\t\t\tdojoAttachPoint="titleNode" role="presentation"\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></tr></tbody\n></table>'});
define("dijit/form/_FormSelectWidget",["dojo","dijit","dijit/form/_FormWidget","dojo/data/util/sorter"],function(b,d){b.declare("dijit.form._FormSelectWidget",d.form._FormValueWidget,{multiple:false,options:null,store:null,query:null,queryOptions:null,onFetch:null,sortByLabel:true,loadChildrenOnOpen:false,getOptions:function(a){var c=a,e=this.options||[],f=e.length;if(c===undefined)return e;if(b.isArray(c))return b.map(c,"return this.getOptions(item);",this);if(b.isObject(a))b.some(this.options,function(h,
i){if(h===c||h.value&&h.value===c.value){c=i;return true}return false})||(c=-1);if(typeof c=="string")for(a=0;a<f;a++)if(e[a].value===c){c=a;break}if(typeof c=="number"&&c>=0&&c<f)return this.options[c];return null},addOption:function(a){b.isArray(a)||(a=[a]);b.forEach(a,function(c){c&&b.isObject(c)&&this.options.push(c)},this);this._loadChildren()},removeOption:function(a){b.isArray(a)||(a=[a]);a=this.getOptions(a);b.forEach(a,function(c){if(c){this.options=b.filter(this.options,function(e){return e.value!==
c.value||e.label!==c.label});this._removeOptionItem(c)}},this);this._loadChildren()},updateOption:function(a){b.isArray(a)||(a=[a]);b.forEach(a,function(c){var e=this.getOptions(c),f;if(e)for(f in c)e[f]=c[f]},this);this._loadChildren()},setStore:function(a,c,e){var f=this.store;e=e||{};if(f!==a){b.forEach(this._notifyConnections||[],b.disconnect);delete this._notifyConnections;if(a&&a.getFeatures()["dojo.data.api.Notification"])this._notifyConnections=[b.connect(a,"onNew",this,"_onNewItem"),b.connect(a,
"onDelete",this,"_onDeleteItem"),b.connect(a,"onSet",this,"_onSetItem")];this._set("store",a)}this._onChangeActive=false;this.options&&this.options.length&&this.removeOption(this.options);if(a){this._loadingStore=true;a.fetch(b.delegate(e,{onComplete:function(h,i){this.sortByLabel&&!e.sort&&h.length&&h.sort(b.data.util.sorter.createSortFunction([{attribute:a.getLabelAttributes(h[0])[0]}],a));if(e.onFetch)h=e.onFetch.call(this,h,i);b.forEach(h,function(g){this._addOptionForItem(g)},this);this._loadingStore=
false;this.set("value","_pendingValue"in this?this._pendingValue:c);delete this._pendingValue;this.loadChildrenOnOpen?this._pseudoLoadChildren(h):this._loadChildren();this._fetchedWith=i;this._lastValueReported=this.multiple?[]:null;this._onChangeActive=true;this.onSetStore();this._handleOnChange(this.value)},scope:this}))}else delete this._fetchedWith;return f},_setValueAttr:function(a,c){if(this._loadingStore)this._pendingValue=a;else{var e=this.getOptions()||[];b.isArray(a)||(a=[a]);b.forEach(a,
function(i,g){b.isObject(i)||(i+="");if(typeof i==="string")a[g]=b.filter(e,function(j){return j.value===i})[0]||{value:"",label:""}},this);a=b.filter(a,function(i){return i&&i.value});if(!this.multiple&&(!a[0]||!a[0].value)&&e.length)a[0]=e[0];b.forEach(e,function(i){i.selected=b.some(a,function(g){return g.value===i.value})});var f=b.map(a,function(i){return i.value}),h=b.map(a,function(i){return i.label});this._set("value",this.multiple?f:f[0]);this._setDisplay(this.multiple?h:h[0]);this._updateSelection();
this._handleOnChange(this.value,c)}},_getDisplayedValueAttr:function(){var a=this.get("value");b.isArray(a)||(a=[a]);a=b.map(this.getOptions(a),function(c){if(c&&"label"in c)return c.label;else if(c)return c.value;return null},this);return this.multiple?a:a[0]},_loadChildren:function(){if(!this._loadingStore){b.forEach(this._getChildren(),function(a){a.destroyRecursive()});b.forEach(this.options,this._addOptionItem,this);this._updateSelection()}},_updateSelection:function(){this._set("value",this._getValueFromOpts());
var a=this.value;b.isArray(a)||(a=[a]);a&&a[0]&&b.forEach(this._getChildren(),function(c){var e=b.some(a,function(f){return c.option&&f===c.option.value});b.toggleClass(c.domNode,this.baseClass+"SelectedOption",e);d.setWaiState(c.domNode,"selected",e)},this)},_getValueFromOpts:function(){var a=this.getOptions()||[];if(!this.multiple&&a.length){var c=b.filter(a,function(e){return e.selected})[0];if(c&&c.value)return c.value;else{a[0].selected=true;return a[0].value}}else if(this.multiple)return b.map(b.filter(a,
function(e){return e.selected}),function(e){return e.value})||[];return""},_onNewItem:function(a,c){if(!c||!c.parent)this._addOptionForItem(a)},_onDeleteItem:function(a){this.removeOption(this.store.getIdentity(a))},_onSetItem:function(a){this.updateOption(this._getOptionObjForItem(a))},_getOptionObjForItem:function(a){var c=this.store,e=c.getLabel(a);return{value:e?c.getIdentity(a):null,label:e,item:a}},_addOptionForItem:function(a){var c=this.store;c.isItemLoaded(a)?this.addOption(this._getOptionObjForItem(a)):
c.loadItem({item:a,onComplete:function(){this._addOptionForItem(a)},scope:this})},constructor:function(a){this._oValue=(a||{}).value||null},buildRendering:function(){this.inherited(arguments);b.setSelectable(this.focusNode,false)},_fillContent:function(){var a=this.options;if(!a)a=this.options=this.srcNodeRef?b.query(">",this.srcNodeRef).map(function(c){if(c.getAttribute("type")==="separator")return{value:"",label:"",selected:false,disabled:false};return{value:c.getAttribute("data-"+b._scopeName+
"-value")||c.getAttribute("value"),label:String(c.innerHTML),selected:c.getAttribute("selected")||false,disabled:c.getAttribute("disabled")||false}},this):[];if(this.value)this.multiple&&typeof this.value=="string"&&this_set("value",this.value.split(","));else this._set("value",this._getValueFromOpts())},postCreate:function(){this.inherited(arguments);this.connect(this,"onChange","_updateSelection");this.connect(this,"startup","_loadChildren");this._setValueAttr(this.value,null)},startup:function(){this.inherited(arguments);
var a=this.store,c={};b.forEach(["query","queryOptions","onFetch"],function(e){if(this[e])c[e]=this[e];delete this[e]},this);if(a&&a.getFeatures()["dojo.data.api.Identity"]){this.store=null;this.setStore(a,this._oValue,c)}},destroy:function(){b.forEach(this._notifyConnections||[],b.disconnect);this.inherited(arguments)},_addOptionItem:function(){},_removeOptionItem:function(){},_setDisplay:function(){},_getChildren:function(){return[]},_getSelectedOptionsAttr:function(){return this.getOptions(this.get("value"))},
_pseudoLoadChildren:function(){},onSetStore:function(){}});return d.form._FormSelectWidget});
define("dijit/form/Select",["dojo","dijit","text!dijit/form/templates/Select.html","dijit/form/_FormSelectWidget","dijit/_HasDropDown","dijit/Menu","dijit/Tooltip","i18n!dijit/form/nls/validate"],function(b,d){b.declare("dijit.form._SelectMenu",d.Menu,{buildRendering:function(){this.inherited(arguments);var a=this.menuTableNode=this.domNode,c=this.domNode=b.create("div",{style:{overflowX:"hidden",overflowY:"scroll"}});a.parentNode&&a.parentNode.replaceChild(c,a);b.removeClass(a,"dijitMenuTable");
c.className=a.className+" dijitSelectMenu";a.className="dijitReset dijitMenuTable";d.setWaiRole(a,"listbox");d.setWaiRole(c,"presentation");c.appendChild(a)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousemove",b.stopEvent)},resize:function(a){if(a){b.marginBox(this.domNode,a);if("w"in a)this.menuTableNode.style.width="100%"}}});b.declare("dijit.form.Select",[d.form._FormSelectWidget,d._HasDropDown],{baseClass:"dijitSelect",templateString:b.cache("dijit.form","templates/Select.html"),
attributeMap:b.mixin(b.clone(d.form._FormSelectWidget.prototype.attributeMap),{style:"tableNode"}),required:false,state:"",message:"",tooltipPosition:[],emptyLabel:"&nbsp;",_isLoaded:false,_childrenLoaded:false,_fillContent:function(){this.inherited(arguments);if(this.options.length&&!this.value&&this.srcNodeRef){var a=this.srcNodeRef.selectedIndex||0;this.value=this.options[a>=0?a:0].value}this.dropDown=new d.form._SelectMenu({id:this.id+"_menu"});b.addClass(this.dropDown.domNode,this.baseClass+
"Menu")},_getMenuItemForOption:function(a){if(!a.value&&!a.label)return new d.MenuSeparator;else{var c=b.hitch(this,"_setValueAttr",a);a=new d.MenuItem({option:a,label:a.label||this.emptyLabel,onClick:c,disabled:a.disabled||false});d.setWaiRole(a.focusNode,"listitem");return a}},_addOptionItem:function(a){this.dropDown&&this.dropDown.addChild(this._getMenuItemForOption(a))},_getChildren:function(){if(!this.dropDown)return[];return this.dropDown.getChildren()},_loadChildren:function(a){if(a===true){this.dropDown&&
delete this.dropDown.focusedChild;if(this.options.length)this.inherited(arguments);else{b.forEach(this._getChildren(),function(c){c.destroyRecursive()});this.dropDown.addChild(new d.MenuItem({label:"&nbsp;"}))}}else this._updateSelection();this._isLoaded=false;this._childrenLoaded=true;this._loadingStore||this._setValueAttr(this.value)},_setValueAttr:function(){this.inherited(arguments);b.attr(this.valueNode,"value",this.get("value"))},_setDisplay:function(a){a=a||this.emptyLabel;this.containerNode.innerHTML=
'<span class="dijitReset dijitInline '+this.baseClass+'Label">'+a+"</span>";d.setWaiState(this.focusNode,"valuetext",a)},validate:function(a){a=this.isValid(a);this._set("state",a?"":"Error");d.setWaiState(this.focusNode,"invalid",a?"false":"true");var c=a?"":this._missingMsg;if(this.message!==c){this._set("message",c);d.hideTooltip(this.domNode);c&&d.showTooltip(c,this.domNode,this.tooltipPosition,!this.isLeftToRight())}return a},isValid:function(){return!this.required||this.value===0||!/^\s*$/.test(this.value||
"")},reset:function(){this.inherited(arguments);d.hideTooltip(this.domNode);this._set("state","");this._set("message","")},postMixInProperties:function(){this.inherited(arguments);this._missingMsg=b.i18n.getLocalization("dijit.form","validate",this.lang).missingMessage},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousemove",b.stopEvent)},_setStyleAttr:function(){this.inherited(arguments);b.toggleClass(this.domNode,this.baseClass+"FixedWidth",!!this.tableNode.style.width)},
isLoaded:function(){return this._isLoaded},loadDropDown:function(a){this._loadChildren(true);this._isLoaded=true;a()},closeDropDown:function(){this.inherited(arguments);if(this.dropDown&&this.dropDown.menuTableNode)this.dropDown.menuTableNode.style.width=""},uninitialize:function(a){if(this.dropDown&&!this.dropDown._destroyed){this.dropDown.destroyRecursive(a);delete this.dropDown}this.inherited(arguments)}});return d.form.Select});
define("dijit/form/SimpleTextarea",["dojo","dijit","dijit/form/TextBox"],function(b,d){b.declare("dijit.form.SimpleTextarea",d.form.TextBox,{baseClass:"dijitTextBox dijitTextArea",attributeMap:b.delegate(d.form._FormValueWidget.prototype.attributeMap,{rows:"textbox",cols:"textbox"}),rows:"3",cols:"20",templateString:"<textarea ${!nameAttrSetting} dojoAttachPoint='focusNode,containerNode,textbox' autocomplete='off'></textarea>",postMixInProperties:function(){if(!this.value&&this.srcNodeRef)this.value=
this.srcNodeRef.value;this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);b.isIE&&this.cols&&b.addClass(this.textbox,"dijitTextAreaCols")},filter:function(a){if(a)a=a.replace(/\r/g,"");return this.inherited(arguments)},_previousValue:"",_onInput:function(a){if(this.maxLength){var c=parseInt(this.maxLength),e=this.textbox.value.replace(/\r/g,"");c=e.length-c;if(c>0){a&&b.stopEvent(a);var f=this.textbox;if(f.selectionStart){var h=f.selectionStart,i=0;if(b.isOpera)i=(this.textbox.value.substring(0,
h).match(/\r/g)||[]).length;this.textbox.value=e.substring(0,h-c-i)+e.substring(h-i);f.setSelectionRange(h-c,h-c)}else if(b.doc.selection){f.focus();e=b.doc.selection.createRange();e.moveStart("character",-c);e.text="";e.select()}}this._previousValue=this.textbox.value}this.inherited(arguments)}});return d.form.SimpleTextarea});
define("dijit/form/Textarea",["dojo","dijit","dijit/form/SimpleTextarea"],function(b,d){b.declare("dijit.form.Textarea",d.form.SimpleTextarea,{baseClass:"dijitTextBox dijitTextArea dijitExpandingTextArea",cols:"",_previousNewlines:0,_strictMode:b.doc.compatMode!="BackCompat",_getHeight:function(a){var c=a.scrollHeight;c+=b.isIE?a.offsetHeight-a.clientHeight-(b.isIE<8&&this._strictMode?b._getPadBorderExtents(a).h:0):b.isMoz?a.offsetHeight-a.clientHeight:b.isWebKit?b._getBorderExtents(a).h:b._getPadBorderExtents(a).h;
return c},_estimateHeight:function(a){a.style.maxHeight="";a.style.height="auto";a.rows=(a.value.match(/\n/g)||[]).length+1},_needsHelpShrinking:b.isMoz||b.isWebKit,_onInput:function(){this.inherited(arguments);if(!this._busyResizing){this._busyResizing=true;var a=this.textbox;if(a.scrollHeight&&a.offsetHeight&&a.clientHeight){var c=this._getHeight(a)+"px";if(a.style.height!=c)a.style.maxHeight=a.style.height=c;if(this._needsHelpShrinking){this._setTimeoutHandle&&clearTimeout(this._setTimeoutHandle);
this._setTimeoutHandle=setTimeout(b.hitch(this,"_shrink"),0)}}else this._estimateHeight(a);this._busyResizing=false}},_busyResizing:false,_shrink:function(){this._setTimeoutHandle=null;if(this._needsHelpShrinking&&!this._busyResizing){this._busyResizing=true;var a=this.textbox,c=false;if(a.value==""){a.value=" ";c=true}var e=a.scrollHeight;if(e){var f=a.style.paddingBottom,h=b._getPadExtents(a);h=h.h-h.t;a.style.paddingBottom=h+1+"px";var i=this._getHeight(a)-1+"px";if(a.style.maxHeight!=i){a.style.paddingBottom=
h+e+"px";a.scrollTop=0;a.style.maxHeight=this._getHeight(a)-e+"px"}a.style.paddingBottom=f}else this._estimateHeight(a);if(c)a.value="";this._busyResizing=false}},resize:function(){this._onInput()},_setValueAttr:function(){this.inherited(arguments);this.resize()},buildRendering:function(){this.inherited(arguments);b.style(this.textbox,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"})},postCreate:function(){this.inherited(arguments);
this.connect(this.textbox,"onscroll","_onInput");this.connect(this.textbox,"onresize","_onInput");this.connect(this.textbox,"onfocus","_onInput");this._setTimeoutHandle=setTimeout(b.hitch(this,"resize"),0)},uninitialize:function(){this._setTimeoutHandle&&clearTimeout(this._setTimeoutHandle);this.inherited(arguments)}});return d.form.Textarea});
define("dojo/data/ItemFileReadStore",["dojo","dojo/data/util/filter","dojo/data/util/simpleFetch","dojo/date/stamp"],function(b){b.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 b.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,c){d=this.getValues(d,a);return d.length>0?d[0]:c},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 c in d)c!==this._storeRefPropName&&c!==this._itemNumPropName&&c!==this._rootItemPropName&&c!==this._reverseRefMap&&a.push(c);return a},hasAttribute:function(d,a){this._assertIsItem(d);this._assertIsAttribute(a);return a in d},containsValue:function(d,a,c){var e=undefined;if(typeof c==="string")e=b.data.util.filter.patternToRegExp(c,false);return this._containsValue(d,a,c,e)},_containsValue:function(d,a,c,e){return b.some(this.getValues(d,
a),function(f){if(f!==null&&!b.isObject(f)&&e){if(f.toString().match(e))return true}else if(c===f)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,c){var e=this,f=function(j,k){var m=[],l,n;if(j.query){var o;l=j.queryOptions?j.queryOptions.ignoreCase:false;var p={};for(n in j.query){o=j.query[n];if(typeof o==="string")p[n]=b.data.util.filter.patternToRegExp(o,l);else if(o instanceof RegExp)p[n]=o}for(l=0;l<k.length;++l){var t=true,q=k[l];if(q===null)t=false;else for(n in j.query){o=j.query[n];e._containsValue(q,n,o,p[n])||(t=false)}t&&m.push(q)}}else for(l=0;l<k.length;++l){n=k[l];n!==null&&m.push(n)}a(m,
j)};if(this._loadFinished)f(d,this._getItemsArray(d.queryOptions));else{if(this._jsonFileUrl!==this._ccUrl){b.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:f});else{this._loadInProgress=true;var h=b.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});h.addCallback(function(j){try{e._getItemsFromLoadedData(j);e._loadFinished=true;e._loadInProgress=false;f(d,e._getItemsArray(d.queryOptions));e._handleQueuedFetches()}catch(k){e._loadFinished=true;e._loadInProgress=false;c(k,d)}});h.addErrback(function(j){e._loadInProgress=false;c(j,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;f(d,this._getItemsArray(d.queryOptions))}catch(g){c(g,d)}else c(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],c=a.args;(a=a.filter)?
a(c,this._getItemsArray(c.queryOptions)):this.fetchItemByIdentity(c)}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(p){return p!==null&&typeof p==="object"&&(!b.isArray(p)||e)&&!b.isFunction(p)&&(p.constructor==Object||b.isArray(p))&&typeof p._reference==="undefined"&&typeof p._type==="undefined"&&typeof p._value==="undefined"&&f.hierarchical}function c(p){f._arrayOfAllItems.push(p);for(var t in p){var q=p[t];
if(q)if(b.isArray(q))for(var r=0;r<q.length;++r){var v=q[r];a(v)&&c(v)}else a(q)&&c(q)}}var e=false,f=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(b.isArray(i))e=true;c(i);i[this._rootItemPropName]=true}var g={},j;for(h=0;h<this._arrayOfAllItems.length;++h){i=this._arrayOfAllItems[h];for(j in i){if(j!==this._rootItemPropName){var k=i[j];if(k!==null)b.isArray(k)||
(i[j]=[k]);else i[j]=[null]}g[j]=j}}for(;g[this._storeRefPropName];)this._storeRefPropName+="_";for(;g[this._itemNumPropName];)this._itemNumPropName+="_";for(;g[this._reverseRefMap];)this._reverseRefMap+="_";if(g=d.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=g;for(h=0;h<this._arrayOfAllItems.length;++h){i=this._arrayOfAllItems[h];d=i[g];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: ["+g+"].  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: ["+g+"].  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(j in i){d=i[j];for(g=0;g<d.length;++g){k=d[g];if(k!==null&&typeof k=="object"){if("_type"in k&&"_value"in k){var m=k._type,l=this._datatypeMap[m];if(l)if(b.isFunction(l))d[g]=new l(k._value);else if(b.isFunction(l.deserialize))d[g]=l.deserialize(k._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(k._reference){k=k._reference;if(b.isObject(k))for(m=0;m<this._arrayOfAllItems.length;++m){l=this._arrayOfAllItems[m];var n=true;for(var o in k)if(l[o]!=k[o])n=false;if(n)d[g]=l}else d[g]=this._getItemByIdentity(k);if(this.referenceIntegrity){k=d[g];this.isItem(k)&&this._addReferenceToMap(k,i,j)}}else this.isItem(k)&&this.referenceIntegrity&&this._addReferenceToMap(k,
i,j)}}}}},_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,c;if(this._loadFinished){a=this._getItemByIdentity(d.identity);if(d.onItem){c=d.scope?d.scope:b.global;d.onItem.call(c,a)}}else{var e=this;if(this._jsonFileUrl!==this._ccUrl){b.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;c=b.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});c.addCallback(function(f){var h=d.scope?d.scope:b.global;try{e._getItemsFromLoadedData(f);
e._loadFinished=true;e._loadInProgress=false;a=e._getItemByIdentity(d.identity);d.onItem&&d.onItem.call(h,a);e._handleQueuedFetches()}catch(i){e._loadInProgress=false;d.onError&&d.onError.call(h,i)}});c.addErrback(function(f){e._loadInProgress=false;if(d.onError)d.onError.call(d.scope?d.scope:b.global,f)})}else if(this._jsonData){e._getItemsFromLoadedData(e._jsonData);e._jsonData=null;e._loadFinished=true;a=e._getItemByIdentity(d.identity);if(d.onItem){c=d.scope?d.scope:b.global;d.onItem.call(c,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){b.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=b.xhrGet({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true});a.addCallback(function(c){try{if(d._loadInProgress!==true&&!d._loadFinished){d._getItemsFromLoadedData(c);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(e){console.log(e);throw e;}});a.addErrback(function(c){throw c;})}else if(this._jsonData){d._getItemsFromLoadedData(d._jsonData);d._jsonData=null;d._loadFinished=true}}});b.extend(b.data.ItemFileReadStore,b.data.util.simpleFetch);return b.data.ItemFileReadStore});
define("dojo/data/ItemFileWriteStore",["dojo","dojo/data/ItemFileReadStore"],function(b){b.declare("dojo.data.ItemFileWriteStore",b.data.ItemFileReadStore,{constructor:function(d){this._features["dojo.data.api.Write"]=true;this._features["dojo.data.api.Notification"]=true;this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};if(!this._datatypeMap.Date.serialize)this._datatypeMap.Date.serialize=function(a){return b.date.stamp.toISOString(a,{zulu:true})};if(d&&d.referenceIntegrity===false)this.referenceIntegrity=
false;this._saveInProgress=false},referenceIntegrity:true,_assert:function(d){if(!d)throw new Error("assertion failed in ItemFileWriteStore");},_getIdentifierAttribute:function(){return this.getFeatures()["dojo.data.api.Identity"]},newItem:function(d,a){this._assert(!this._saveInProgress);this._loadFinished||this._forceLoad();if(typeof d!="object"&&typeof d!="undefined")throw new Error("newItem() was passed something other than an object");var c=null,e=this._getIdentifierAttribute();if(e===Number)c=
this._arrayOfAllItems.length;else{c=d[e];if(typeof c==="undefined")throw new Error("newItem() was not passed an identity for the new item");if(b.isArray(c))throw new Error("newItem() was not passed an single-valued identity");}this._itemsByIdentity&&this._assert(typeof this._itemsByIdentity[c]==="undefined");this._assert(typeof this._pending._newItems[c]==="undefined");this._assert(typeof this._pending._deletedItems[c]==="undefined");var f={};f[this._storeRefPropName]=this;f[this._itemNumPropName]=
this._arrayOfAllItems.length;if(this._itemsByIdentity){this._itemsByIdentity[c]=f;f[e]=[c]}this._arrayOfAllItems.push(f);e=null;if(a&&a.parent&&a.attribute){e={item:a.parent,attribute:a.attribute,oldValue:undefined};var h=this.getValues(a.parent,a.attribute);if(h&&h.length>0){var i=h.slice(0,h.length);e.oldValue=h.length===1?h[0]:h.slice(0,h.length);i.push(f);this._setValueOrValues(a.parent,a.attribute,i,false);e.newValue=this.getValues(a.parent,a.attribute)}else{this._setValueOrValues(a.parent,a.attribute,
f,false);e.newValue=f}}else{f[this._rootItemPropName]=true;this._arrayOfTopLevelItems.push(f)}this._pending._newItems[c]=f;for(var g in d){if(g===this._storeRefPropName||g===this._itemNumPropName)throw new Error("encountered bug in ItemFileWriteStore.newItem");a=d[g];b.isArray(a)||(a=[a]);f[g]=a;if(this.referenceIntegrity)for(c=0;c<a.length;c++){h=a[c];this.isItem(h)&&this._addReferenceToMap(h,f,g)}}this.onNew(f,e);return f},_removeArrayElement:function(d,a){a=b.indexOf(d,a);if(a!=-1){d.splice(a,
1);return true}return false},deleteItem:function(d){this._assert(!this._saveInProgress);this._assertIsItem(d);var a=d[this._itemNumPropName],c=this.getIdentity(d);if(this.referenceIntegrity){var e=this.getAttributes(d);if(d[this._reverseRefMap])d["backup_"+this._reverseRefMap]=b.clone(d[this._reverseRefMap]);b.forEach(e,function(k){b.forEach(this.getValues(d,k),function(m){if(this.isItem(m)){d["backupRefs_"+this._reverseRefMap]||(d["backupRefs_"+this._reverseRefMap]=[]);d["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(m),
attr:k});this._removeReferenceFromMap(m,d,k)}},this)},this);if(e=d[this._reverseRefMap])for(var f in e){var h=null;if(h=this._itemsByIdentity?this._itemsByIdentity[f]:this._arrayOfAllItems[f])for(var i in e[f]){var g=this.getValues(h,i)||[],j=b.filter(g,function(k){return!(this.isItem(k)&&this.getIdentity(k)==c)},this);this._removeReferenceFromMap(d,h,i);j.length<g.length&&this._setValueOrValues(h,i,j,true)}}}this._arrayOfAllItems[a]=null;d[this._storeRefPropName]=null;this._itemsByIdentity&&delete this._itemsByIdentity[c];
this._pending._deletedItems[c]=d;d[this._rootItemPropName]&&this._removeArrayElement(this._arrayOfTopLevelItems,d);this.onDelete(d);return true},setValue:function(d,a,c){return this._setValueOrValues(d,a,c,true)},setValues:function(d,a,c){return this._setValueOrValues(d,a,c,true)},unsetAttribute:function(d,a){return this._setValueOrValues(d,a,[],true)},_setValueOrValues:function(d,a,c,e){this._assert(!this._saveInProgress);this._assertIsItem(d);this._assert(b.isString(a));this._assert(typeof c!==
"undefined");var f=this._getIdentifierAttribute();if(a==f)throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");f=this._getValueOrValues(d,a);var h=this.getIdentity(d);if(!this._pending._modifiedItems[h]){var i={};for(var g in d)i[g]=g===this._storeRefPropName||g===this._itemNumPropName||g===this._rootItemPropName?d[g]:g===this._reverseRefMap?b.clone(d[g]):d[g].slice(0,d[g].length);this._pending._modifiedItems[h]=i}h=false;if(b.isArray(c)&&c.length===
0){h=delete d[a];c=undefined;if(this.referenceIntegrity&&f){g=f;b.isArray(g)||(g=[g]);for(var j=0;j<g.length;j++){i=g[j];this.isItem(i)&&this._removeReferenceFromMap(i,d,a)}}}else{h=b.isArray(c)?c.slice(0,c.length):[c];if(this.referenceIntegrity)if(f){g=f;b.isArray(g)||(g=[g]);var k={};b.forEach(g,function(m){if(this.isItem(m)){m=this.getIdentity(m);k[m.toString()]=true}},this);b.forEach(h,function(m){if(this.isItem(m)){var l=this.getIdentity(m);if(k[l.toString()])delete k[l.toString()];else this._addReferenceToMap(m,
d,a)}},this);for(j in k)this._removeReferenceFromMap(this._itemsByIdentity?this._itemsByIdentity[j]:this._arrayOfAllItems[j],d,a)}else for(j=0;j<h.length;j++){i=h[j];this.isItem(i)&&this._addReferenceToMap(i,d,a)}d[a]=h;h=true}e&&this.onSet(d,a,f,c);return h},_addReferenceToMap:function(d,a,c){a=this.getIdentity(a);var e=d[this._reverseRefMap];e||(e=d[this._reverseRefMap]={});(d=e[a])||(d=e[a]={});d[c]=true},_removeReferenceFromMap:function(d,a,c){a=this.getIdentity(a);var e=d[this._reverseRefMap],
f;if(e){for(f in e)if(f==a){delete e[f][c];this._isEmpty(e[f])&&delete e[f]}this._isEmpty(e)&&delete d[this._reverseRefMap]}},_dumpReferenceMap:function(){var d;for(d=0;d<this._arrayOfAllItems.length;d++){var a=this._arrayOfAllItems[d];a&&a[this._reverseRefMap]&&console.log("Item: ["+this.getIdentity(a)+"] is referenced by: "+b.toJson(a[this._reverseRefMap]))}},_getValueOrValues:function(d,a){var c=undefined;if(this.hasAttribute(d,a)){d=this.getValues(d,a);c=d.length==1?d[0]:d}return c},_flatten:function(d){if(this.isItem(d))return{_reference:this.getIdentity(d)};
else{if(typeof d==="object")for(var a in this._datatypeMap){var c=this._datatypeMap[a];if(b.isObject(c)&&!b.isFunction(c)){if(d instanceof c.type){if(!c.serialize)throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: ["+a+"]");return{_type:a,_value:c.serialize(d)}}}else if(d instanceof c)return{_type:a,_value:d.toString()}}return d}},_getNewFileContentString:function(){var d={},a=this._getIdentifierAttribute();if(a!==Number)d.identifier=a;if(this._labelAttr)d.label=this._labelAttr;
d.items=[];for(a=0;a<this._arrayOfAllItems.length;++a){var c=this._arrayOfAllItems[a];if(c!==null){var e={};for(var f in c)if(f!==this._storeRefPropName&&f!==this._itemNumPropName&&f!==this._reverseRefMap&&f!==this._rootItemPropName){var h=f,i=this.getValues(c,h);if(i.length==1)e[h]=this._flatten(i[0]);else for(var g=[],j=0;j<i.length;++j){g.push(this._flatten(i[j]));e[h]=g}}d.items.push(e)}}return b.toJson(d,true)},_isEmpty:function(d){var a=true;if(b.isObject(d)){var c;for(c in d){a=false;break}}else if(b.isArray(d))if(d.length>
0)a=false;return a},save:function(d){this._assert(!this._saveInProgress);this._saveInProgress=true;var a=this,c=function(){a._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};a._saveInProgress=false;if(d&&d.onComplete)d.onComplete.call(d.scope||b.global)},e=function(h){a._saveInProgress=false;if(d&&d.onError)d.onError.call(d.scope||b.global,h)};if(this._saveEverything){var f=this._getNewFileContentString();this._saveEverything(c,e,f)}this._saveCustom&&this._saveCustom(c,e);!this._saveEverything&&
!this._saveCustom&&c()},revert:function(){this._assert(!this._saveInProgress);var d;for(d in this._pending._modifiedItems){var a=this._pending._modifiedItems[d],c=null;c=this._itemsByIdentity?this._itemsByIdentity[d]:this._arrayOfAllItems[d];a[this._storeRefPropName]=this;for(key in c)delete c[key];b.mixin(c,a)}var e;for(d in this._pending._deletedItems){e=this._pending._deletedItems[d];e[this._storeRefPropName]=this;a=e[this._itemNumPropName];if(e["backup_"+this._reverseRefMap]){e[this._reverseRefMap]=
e["backup_"+this._reverseRefMap];delete e["backup_"+this._reverseRefMap]}this._arrayOfAllItems[a]=e;if(this._itemsByIdentity)this._itemsByIdentity[d]=e;e[this._rootItemPropName]&&this._arrayOfTopLevelItems.push(e)}for(d in this._pending._deletedItems){e=this._pending._deletedItems[d];if(e["backupRefs_"+this._reverseRefMap]){b.forEach(e["backupRefs_"+this._reverseRefMap],function(f){this._addReferenceToMap(this._itemsByIdentity?this._itemsByIdentity[f.id]:this._arrayOfAllItems[f.id],e,f.attr)},this);
delete e["backupRefs_"+this._reverseRefMap]}}for(d in this._pending._newItems){a=this._pending._newItems[d];a[this._storeRefPropName]=null;this._arrayOfAllItems[a[this._itemNumPropName]]=null;a[this._rootItemPropName]&&this._removeArrayElement(this._arrayOfTopLevelItems,a);this._itemsByIdentity&&delete this._itemsByIdentity[d]}this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};return true},isDirty:function(d){if(d){d=this.getIdentity(d);return(new Boolean(this._pending._newItems[d]||
this._pending._modifiedItems[d]||this._pending._deletedItems[d])).valueOf()}else{if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems))return true;return false}},onSet:function(){},onNew:function(){},onDelete:function(){},close:function(){if(this.clearOnClose)if(this.isDirty())throw new Error("dojo.data.ItemFileWriteStore: There are unsaved changes present in the store.  Please save or revert the changes before invoking close.");
else this.inherited(arguments)}});return b.data.ItemFileWriteStore});define("dijit/dijit",["dojo","dijit","dijit/_base","dojo/parser","dijit/_Widget","dijit/_Templated","dijit/_Container","dijit/layout/_LayoutWidget","dijit/form/_FormWidget"],function(b,d){return d});
define("dojox/html/metrics",["dojo","dojox"],function(b,d){d.html=d.html||{};d.html.metrics=d.html.metrics||{};(function(){var a=d.html.metrics;a.getFontMeasurements=function(){var i={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0};if(b.isIE)b.doc.documentElement.style.fontSize="100%";var g=b.doc.createElement("div"),j=g.style;j.position="absolute";j.left="-100px";j.top="0";j.width="30px";j.height="1000em";j.borderWidth="0";j.margin=
"0";j.padding="0";j.outline="0";j.lineHeight="1";j.overflow="hidden";b.body().appendChild(g);for(var k in i){j.fontSize=k;i[k]=Math.round(g.offsetHeight*12/16)*16/12/1E3}b.body().removeChild(g);return i};var c=null;a.getCachedFontMeasurements=function(i){if(i||!c)c=a.getFontMeasurements();return c};var e=null,f={};a.getTextBox=function(i,g,j){var k,m;if(e)k=e;else{k=e=b.doc.createElement("div");var l=b.doc.createElement("div");l.appendChild(k);m=l.style;m.overflow="scroll";m.position="absolute";m.left=
"0px";m.top="-10000px";m.width="1px";m.height="1px";m.visibility="hidden";m.borderWidth="0";m.margin="0";m.padding="0";m.outline="0";b.body().appendChild(l)}k.className="";m=k.style;m.borderWidth="0";m.margin="0";m.padding="0";m.outline="0";if(arguments.length>1&&g)for(var n in g)n in f||(m[n]=g[n]);if(arguments.length>2&&j)k.className=j;k.innerHTML=i;m=b.position(k);m.w=k.parentNode.scrollWidth;return m};var h={w:16,h:16};a.getScrollbar=function(){return{w:h.w,h:h.h}};a._fontResizeNode=null;a.initOnFontResize=
function(){var i=a._fontResizeNode=b.doc.createElement("iframe"),g=i.style;g.position="absolute";g.width="5em";g.height="10em";g.top="-10000px";if(b.isIE)i.onreadystatechange=function(){if(i.contentWindow.document.readyState=="complete")i.onresize=i.contentWindow.parent[d._scopeName].html.metrics._fontresize};else i.onload=function(){i.contentWindow.onresize=i.contentWindow.parent[d._scopeName].html.metrics._fontresize};i.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}<\/script></head><body></body></html>'");
b.body().appendChild(i);a.initOnFontResize=function(){}};a.onFontResize=function(){};a._fontresize=function(){a.onFontResize()};b.addOnUnload(function(){var i=a._fontResizeNode;if(i){if(b.isIE&&i.onresize)i.onresize=null;else if(i.contentWindow&&i.contentWindow.onresize)i.contentWindow.onresize=null;a._fontResizeNode=null}});b.addOnLoad(function(){try{var i=b.doc.createElement("div");i.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";b.body().appendChild(i);
h.w=i.offsetWidth-i.clientWidth;h.h=i.offsetHeight-i.clientHeight;b.body().removeChild(i);delete i}catch(g){}"fontSizeWatch"in b.config&&b.config.fontSizeWatch&&a.initOnFontResize()})})()});
define("dojox/grid/util",["dojo","dijit","dojox"],function(b,d,a){a.grid=a.grid||{};a.grid.util=a.grid.util||{};(function(){var c=a.grid.util;c.na="...";c.rowIndexTag="gridRowIndex";c.gridViewTag="gridView";c.fire=function(e,f,h){var i=e&&f&&e[f];return i&&(h?i.apply(e,h):e[f]())};c.setStyleHeightPx=function(e,f){if(f>=0){var h=e.style;f=f+"px";if(e&&h.height!=f)h.height=f}};c.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];c.keyEvents=["keyup","keydown",
"keypress"];c.funnelEvents=function(e,f,h,i){i=i?i:c.mouseEvents.concat(c.keyEvents);for(var g=0,j=i.length;g<j;g++)f.connect(e,"on"+i[g],h)};c.removeNode=function(e){(e=b.byId(e))&&e.parentNode&&e.parentNode.removeChild(e);return e};c.arrayCompare=function(e,f){for(var h=0,i=e.length;h<i;h++)if(e[h]!=f[h])return false;return e.length==f.length};c.arrayInsert=function(e,f,h){if(e.length<=f)e[f]=h;else e.splice(f,0,h)};c.arrayRemove=function(e,f){e.splice(f,1)};c.arraySwap=function(e,f,h){var i=e[f];
e[f]=e[h];e[h]=i}})()});
define("dojox/grid/_Scroller",["dojo","dijit","dojox"],function(b,d,a){(function(){var c=function(g){for(var j=0,k,m=g.parentNode;k=m.childNodes[j++];)if(k==g)return j-1;return-1},e=function(g){if(g){for(var j=d.registry.filter(function(l){return l.domNode&&b.isDescendant(l.domNode,g,true)}),k=0,m;m=j[k];k++)m.destroy();delete j}},f=function(g){return(g=b.byId(g))&&g.tagName?g.tagName.toLowerCase():""},h=function(g,j){for(var k=[],m=0,l;l=g.childNodes[m];){m++;f(l)==j&&k.push(l)}return k},i=function(g){return h(g,
"div")};b.declare("dojox.grid._Scroller",null,{constructor:function(g){this.setContentNodes(g);this.pageHeights=[];this.pageNodes=[];this.stack=[]},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(g,j,k){switch(arguments.length){case 3:this.rowsPerPage=k;case 2:this.keepRows=j;case 1:this.rowCount=g;default:break}this.defaultPageHeight=
this.defaultRowHeight*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=b.hitch(this,"onscroll")}},_getPageCount:function(g,j){return g?Math.ceil(g/j)||1:0},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode},setKeepInfo:function(g){this.keepRows=g;this.keepPages=
!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2)},setContentNodes:function(g){this.colCount=(this.contentNodes=g)?this.contentNodes.length:0;this.pageNodes=[];for(g=0;g<this.colCount;g++)this.pageNodes[g]=[]},getDefaultNodes:function(){return this.pageNodes[0]||[]},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0;this.resize();
this._invalidating=false},updateRowCount:function(g){this.invalidateNodes();this.rowCount=g;g=this.pageCount;if(g===0)this.height=1;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<g)for(g=g-1;g>=this.pageCount;g--){this.height-=this.getPageHeight(g);delete this.pageHeights[g]}else if(this.pageCount>g)this.height+=this.defaultPageHeight*(this.pageCount-g-1)+this.calcLastPageHeight();this.resize()},pageExists:function(g){return Boolean(this.getDefaultPageNode(g))},
measurePage:function(g){if(this.grid.rowHeight)return((g+1)*this.rowsPerPage>this.rowCount?this.rowCount-g*this.rowsPerPage:this.rowsPerPage)*(this.grid.rowHeight+1);return(g=this.getDefaultPageNode(g))&&g.innerHTML?g.offsetHeight:undefined},positionPage:function(g,j){for(var k=0;k<this.colCount;k++)this.pageNodes[k][g].style.top=j+"px"},repositionPages:function(g){for(var j=this.getDefaultNodes(),k=0,m=0;m<this.stack.length;m++)k=Math.max(this.stack[m],k);var l=(m=j[g])?this.getPageNodePosition(m)+
this.getPageHeight(g):0;for(g=g+1;g<=k;g++){if(m=j[g]){if(this.getPageNodePosition(m)==l)return;this.positionPage(g,l)}l+=this.getPageHeight(g)}},installPage:function(g){for(var j=0;j<this.colCount;j++)this.contentNodes[j].appendChild(this.pageNodes[j][g])},preparePage:function(g,j){j=j?this.popPage():null;for(var k=0;k<this.colCount;k++){var m=this.pageNodes[k],l=j===null?this.createPageNode():this.invalidatePageNode(j,m);l.pageIndex=g;m[g]=l}},renderPage:function(g){var j=[],k;for(k=0;k<this.colCount;k++)j[k]=
this.pageNodes[k][g];k=0;for(g=g*this.rowsPerPage;k<this.rowsPerPage&&g<this.rowCount;k++,g++)this.renderRow(g,j)},removePage:function(g){var j=0;for(g=g*this.rowsPerPage;j<this.rowsPerPage;j++,g++)this.removeRow(g)},destroyPage:function(g){for(var j=0;j<this.colCount;j++){var k=this.invalidatePageNode(g,this.pageNodes[j]);k&&b.destroy(k)}},pacify:function(){},pacifying:false,pacifyTicks:200,setPacifying:function(g){if(this.pacifying!=g){this.pacifying=g;this.pacify(this.pacifying)}},startPacify:function(){this.startPacifyTicks=
(new Date).getTime()},doPacify:function(){var g=(new Date).getTime()-this.startPacifyTicks>this.pacifyTicks;this.setPacifying(true);this.startPacify();return g},endPacify:function(){this.setPacifying(false)},resize:function(){if(this.scrollboxNode)this.windowHeight=this.scrollboxNode.clientHeight;for(var g=0;g<this.colCount;g++)a.grid.util.setStyleHeightPx(this.contentNodes[g],Math.max(1,this.height));g=!this._invalidating;if(!g){var j=this.grid.get("autoHeight");if(typeof j=="number"&&j<=Math.min(this.rowsPerPage,
this.rowCount))g=true}g&&this.needPage(this.page,this.pageTop);g=this.page<this.pageCount-1?this.rowsPerPage:this.rowCount%this.rowsPerPage||this.rowsPerPage;j=this.getPageHeight(this.page);this.averageRowHeight=j>0&&g>0?j/g:0},calcLastPageHeight:function(){if(!this.pageCount)return 0;var g=(this.rowCount%this.rowsPerPage||this.rowsPerPage)*this.defaultRowHeight;return this.pageHeights[this.pageCount-1]=g},updateContentHeight:function(g){this.height+=g;this.resize()},updatePageHeight:function(g,j,
k){if(this.pageExists(g)){var m=this.getPageHeight(g),l=this.measurePage(g);if(l===undefined)l=m;this.pageHeights[g]=l;if(m!=l){this.updateContentHeight(l-m);var n=this.grid.get("autoHeight");if(typeof n=="number"&&n>this.rowCount||n===true&&!j)if(k){j=this.grid.viewsNode.style;j.height=parseInt(j.height)+l-m+"px";this.repositionPages(g)}else this.grid.sizeChange();else this.repositionPages(g)}return l}return 0},rowHeightChanged:function(g,j){this.updatePageHeight(Math.floor(g/this.rowsPerPage),false,
j)},invalidateNodes:function(){for(;this.stack.length;)this.destroyPage(this.popPage())},createPageNode:function(){var g=document.createElement("div");b.attr(g,"role","presentation");g.style.position="absolute";g.style[b._isBodyLtr()?"left":"right"]="0";return g},getPageHeight:function(g){g=this.pageHeights[g];return g!==undefined?g:this.defaultPageHeight},pushPage:function(g){return this.stack.push(g)},popPage:function(){return this.stack.shift()},findPage:function(g){for(var j=0,k=0,m=0;j<this.pageCount;j++,
k+=m){m=this.getPageHeight(j);if(k+m>=g)break}this.page=j;this.pageTop=k},buildPage:function(g,j,k){this.preparePage(g,j);this.positionPage(g,k);this.installPage(g);this.renderPage(g);this.pushPage(g)},needPage:function(g,j){var k=this.getPageHeight(g);if(this.pageExists(g))this.positionPage(g,j);else{this.buildPage(g,!this.grid._autoHeight&&this.keepPages&&this.stack.length>=this.keepPages,j);k=this.updatePageHeight(g,true)}return k},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop)},
scroll:function(g){this.grid.scrollTop=g;if(this.colCount){this.startPacify();this.findPage(g);for(var j=this.height,k=this.getScrollBottom(g),m=this.page,l=this.pageTop;m<this.pageCount&&(k<0||l<k);m++)l+=this.needPage(m,l);this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,g);this.lastVisibleRow=this.getLastVisibleRow(m-1,l,k);j!=this.height&&this.repositionPages(m-1);this.endPacify()}},getScrollBottom:function(g){return this.windowHeight>=0?g+this.windowHeight:-1},processNodeEvent:function(g,
j){for(var k=g.target;k&&k!=j&&k.parentNode&&k.parentNode.parentNode!=j;)k=k.parentNode;if(!k||!k.parentNode||k.parentNode.parentNode!=j)return false;g.topRowIndex=k.parentNode.pageIndex*this.rowsPerPage;g.rowIndex=g.topRowIndex+c(k);g.rowTarget=k;return true},processEvent:function(g){return this.processNodeEvent(g,this.contentNode)},renderRow:function(){},removeRow:function(){},getDefaultPageNode:function(g){return this.getDefaultNodes()[g]},positionPageNode:function(){},getPageNodePosition:function(g){return g.offsetTop},
invalidatePageNode:function(g,j){var k=j[g];if(k){delete j[g];this.removePage(g,k);e(k);k.innerHTML=""}return k},getPageRow:function(g){return g*this.rowsPerPage},getLastPageRow:function(g){return Math.min(this.rowCount,this.getPageRow(g+1))-1},getFirstVisibleRow:function(g,j,k){if(!this.pageExists(g))return 0;var m=this.getPageRow(g),l=this.getDefaultNodes();g=i(l[g]);l=0;for(var n=g.length;l<n&&j<k;l++,m++)j+=g[l].offsetHeight;return m?m-1:m},getLastVisibleRow:function(g,j,k){if(!this.pageExists(g))return 0;
var m=this.getDefaultNodes(),l=this.getLastPageRow(g);g=i(m[g]);for(m=g.length-1;m>=0&&j>k;m--,l--)j-=g[m].offsetHeight;return l+1},findTopRow:function(g){var j=this.getDefaultNodes();j=i(j[this.page]);for(var k=0,m=j.length,l=this.pageTop,n;k<m;k++){n=j[k].offsetHeight;l+=n;if(l>=g){this.offset=n-(l-g);return k+this.page*this.rowsPerPage}}return-1},findScrollTop:function(g){var j=Math.floor(g/this.rowsPerPage),k=0,m;for(m=0;m<j;m++)k+=this.getPageHeight(m);this.pageTop=k;this.page=j;this.needPage(j,
this.pageTop);m=this.getDefaultNodes();var l=i(m[j]);j=g-this.rowsPerPage*j;m=0;for(g=l.length;m<g&&m<j;m++)k+=l[m].offsetHeight;return k},dummy:0})})()});
define("dojox/grid/cells/_base",["dojo","dijit","dojox","dojox/grid/util","dijit/_Widget"],function(b,d,a){a.grid=a.grid||{};a.grid.cells=a.grid.cells||{};b.declare("dojox.grid._DeferredTextWidget",d._Widget,{deferred:null,_destroyOnRemove:true,postCreate:function(){this.deferred&&this.deferred.addBoth(b.hitch(this,function(c){if(this.domNode)this.domNode.innerHTML=c}))}});(function(){var c=function(h){try{a.grid.util.fire(h,"focus");a.grid.util.fire(h,"select")}catch(i){}},e=function(){setTimeout(b.hitch.apply(b,
arguments),0)},f=a.grid.cells;b.declare("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(h){this._props=h||{};b.mixin(this,h);if(this.draggable===undefined)this.draggable=true},_defaultFormat:function(h,i){var g=this.grid.formatterScope||this,j=this.formatter;if(j&&g&&typeof j=="string")j=this.formatter=g[j];h=h!=
this.defaultValue&&j?j.apply(g,i):h;if(typeof h=="undefined")return this.defaultValue;if(h&&h.addBoth)h=new a.grid._DeferredTextWidget({deferred:h},b.create("span",{innerHTML:this.defaultValue}));if(h&&h.declaredClass&&h.startup)return"<div class='dojoxGridStubNode' linkWidget='"+h.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";return h},format:function(h,i){var g=this.grid.edit.info;i=(i=this.get?this.get(h,i):this.value||this.defaultValue)&&i.replace&&this.grid.escapeHTMLInData?i.replace(/&/g,
"&amp;").replace(/</g,"&lt;"):i;return this.editable&&(this.alwaysEditing||g.rowIndex==h&&g.cell==this)?this.formatEditing(i,h):this._defaultFormat(i,[i,h,this])},formatEditing:function(){},getNode:function(h){return this.view.getCellNode(h,this.index)},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index)},getEditNode:function(h){return(this.getNode(h)||0).firstChild||0},canResize:function(){var h=this.unitWidth;return h&&h!=="auto"},isFlex:function(){var h=this.unitWidth;return h&&
b.isString(h)&&(h=="auto"||h.slice(-1)=="%")},applyEdit:function(h,i){this.grid.edit.applyCellEdit(h,this,i)},cancelEdit:function(h){this.grid.doCancelEdit(h)},_onEditBlur:function(h){this.grid.edit.isEditCell(h,this.index)&&this.grid.edit.apply()},registerOnBlur:function(h,i){this.commitOnBlur&&b.connect(h,"onblur",function(){setTimeout(b.hitch(this,"_onEditBlur",i),250)})},needFormatNode:function(h,i){this._formatPending=true;e(this,"_formatNode",h,i)},cancelFormatNode:function(){this._formatPending=
false},_formatNode:function(h,i){if(this._formatPending){this._formatPending=false;b.setSelectable(this.grid.domNode,true);this.formatNode(this.getEditNode(i),h,i)}},formatNode:function(h,i,g){b.isIE?e(this,"focus",g,h):this.focus(g,h)},dispatchEvent:function(h,i){if(h in this)return this[h](i)},getValue:function(h){return this.getEditNode(h)[this._valueProp]},setValue:function(h,i){if(h=this.getEditNode(h))h[this._valueProp]=i},focus:function(h,i){c(i||this.getEditNode(h))},save:function(h){this.value=
this.value||this.getValue(h)},restore:function(h){this.setValue(h,this.value)},_finish:function(){b.setSelectable(this.grid.domNode,false);this.cancelFormatNode()},apply:function(h){this.applyEdit(this.getValue(h),h);this._finish(h)},cancel:function(h){this.cancelEdit(h);this._finish(h)}});f._Base.markupFactory=function(h,i){var g=b.trim(b.attr(h,"formatter")||"");if(g)i.formatter=b.getObject(g)||g;if(g=b.trim(b.attr(h,"get")||""))i.get=b.getObject(g);g=function(j,k,m){var l=b.trim(b.attr(h,j)||"");
if(l)k[m||j]=l.toLowerCase()!="false"};g("sortDesc",i);g("editable",i);g("alwaysEditing",i);g("noresize",i);g("draggable",i);if(g=b.trim(b.attr(h,"loadingText")||b.attr(h,"defaultValue")||""))i.defaultValue=g;g=function(j,k,m){var l=b.trim(b.attr(h,j)||"")||undefined;if(l)k[m||j]=l};g("styles",i);g("headerStyles",i);g("cellStyles",i);g("classes",i);g("headerClasses",i);g("cellClasses",i)};b.declare("dojox.grid.cells.Cell",f._Base,{constructor:function(){this.keyFilter=this.keyFilter},keyFilter:null,
formatEditing:function(h,i){this.needFormatNode(h,i);return'<input class="dojoxGridInput" type="text" value="'+h+'">'},formatNode:function(h,i,g){this.inherited(arguments);this.registerOnBlur(h,g)},doKey:function(h){this.keyFilter&&String.fromCharCode(h.charCode).search(this.keyFilter)==-1&&b.stopEvent(h)},_finish:function(h){this.inherited(arguments);var i=this.getEditNode(h);try{a.grid.util.fire(i,"blur")}catch(g){}}});f.Cell.markupFactory=function(h,i){f._Base.markupFactory(h,i);if(h=b.trim(b.attr(h,
"keyFilter")||""))i.keyFilter=new RegExp(h)};b.declare("dojox.grid.cells.RowIndex",f.Cell,{name:"Row",postscript:function(){this.editable=false},get:function(h){return h+1}});f.RowIndex.markupFactory=function(h,i){f.Cell.markupFactory(h,i)};b.declare("dojox.grid.cells.Select",f.Cell,{options:null,values:null,returnIndex:-1,constructor:function(){this.values=this.values||this.options},formatEditing:function(h,i){this.needFormatNode(h,i);i=['<select class="dojoxGridSelect">'];for(var g=0,j,k;(j=this.options[g])!==
undefined&&(k=this.values[g])!==undefined;g++)i.push("<option",h==k?" selected":"",' value="'+k+'"',">",j,"</option>");i.push("</select>");return i.join("")},getValue:function(h){var i=this.getEditNode(h);if(i){h=i.selectedIndex;i=i.options[h];return this.returnIndex>-1?h:i.value||i.innerHTML}}});f.Select.markupFactory=function(h,i){f.Cell.markupFactory(h,i);var g=b.trim(b.attr(h,"options")||"");if(g){var j=g.split(",");if(j[0]!=g)i.options=j}if(h=b.trim(b.attr(h,"values")||"")){g=h.split(",");if(g[0]!=
h)i.values=g}};b.declare("dojox.grid.cells.AlwaysEdit",f.Cell,{alwaysEditing:true,_formatNode:function(h,i){this.formatNode(this.getEditNode(i),h,i)},applyStaticValue:function(h){var i=this.grid.edit;i.applyCellEdit(this.getValue(h),this,h);i.start(this,h,true)}});f.AlwaysEdit.markupFactory=function(h,i){f.Cell.markupFactory(h,i)};b.declare("dojox.grid.cells.Bool",f.AlwaysEdit,{_valueProp:"checked",formatEditing:function(h){return'<input class="dojoxGridInput" type="checkbox"'+(h?' checked="checked"':
"")+' style="width: auto" />'},doclick:function(h){h.target.tagName=="INPUT"&&this.applyStaticValue(h.rowIndex)}});f.Bool.markupFactory=function(h,i){f.AlwaysEdit.markupFactory(h,i)}})()});define("dojox/grid/cells",["dojo","dijit","dojox","dojox/grid/cells/_base"],function(){});
define("dojox/grid/_Builder",["dojo","dijit","dojox","dojox/grid/util","dojo/dnd/Moveable"],function(b,d,a){a.grid=a.grid||{};(function(){var c=a.grid,e=function(l){return l.cellIndex>=0?l.cellIndex:b.indexOf(l.parentNode.cells,l)},f=function(l){return l.rowIndex>=0?l.rowIndex:b.indexOf(l.parentNode.childNodes,l)},h=function(l,n){return l&&((l.rows||0)[n]||l.childNodes[n])},i=function(l){for(l=l;l&&l.tagName!="TABLE";l=l.parentNode);return l},g=function(l,n){for(l=l;l&&n(l);l=l.parentNode);return l},
j=function(l){var n=l.toUpperCase();return function(o){return o.tagName!=n}},k=a.grid.util.rowIndexTag,m=a.grid.util.gridViewTag;c._Builder=b.extend(function(l){if(l){this.view=l;this.grid=l.grid}},{view:null,_table:'<table class="dojoxGridRowTable" border="0" cellspacing="0" cellpadding="0" role="presentation"',getTableArray:function(){var l=[this._table];this.view.viewWidth&&l.push([' style="width:',this.view.viewWidth,';"'].join(""));l.push(">");return l},generateCellMarkup:function(l,n,o,p){var t=
[],q;if(p){q=l.index!=l.grid.getSortIndex()?"":l.grid.sortInfo>0?'aria-sort="ascending"':'aria-sort="descending"';if(!l.id)l.id=this.grid.id+"Hdr"+l.index;q=['<th tabIndex="-1" aria-readonly="true" role="columnheader"',q,'id="',l.id,'"']}else q=['<td tabIndex="-1" role="gridcell"',this.grid.editable&&!l.editable?'aria-readonly="true"':""];l.colSpan&&q.push(' colspan="',l.colSpan,'"');l.rowSpan&&q.push(' rowspan="',l.rowSpan,'"');q.push(' class="dojoxGridCell ');l.classes&&q.push(l.classes," ");o&&
q.push(o," ");t.push(q.join(""));t.push("");q=['" idx="',l.index,'" style="'];if(n&&n[n.length-1]!=";")n+=";";q.push(l.styles,n||"",l.hidden?"display:none;":"");l.unitWidth&&q.push("width:",l.unitWidth,";");t.push(q.join(""));t.push("");q=['"'];l.attrs&&q.push(" ",l.attrs);q.push(">");t.push(q.join(""));t.push("");t.push(p?"</th>":"</td>");return t},isCellNode:function(l){return Boolean(l&&l!=b.doc&&b.attr(l,"idx"))},getCellNodeIndex:function(l){return l?Number(b.attr(l,"idx")):-1},getCellNode:function(l,
n){for(var o=0,p;(p=h(l.firstChild,o))&&p.cells;o++)for(var t=0,q;q=p.cells[t];t++)if(this.getCellNodeIndex(q)==n)return q;return null},findCellTarget:function(l,n){for(l=l;l&&(!this.isCellNode(l)||l.offsetParent&&m in l.offsetParent.parentNode&&l.offsetParent.parentNode[m]!=this.view.id)&&l!=n;)l=l.parentNode;return l!=n?l:null},baseDecorateEvent:function(l){l.dispatch="do"+l.type;l.grid=this.grid;l.sourceView=this.view;l.cellNode=this.findCellTarget(l.target,l.rowNode);l.cellIndex=this.getCellNodeIndex(l.cellNode);
l.cell=l.cellIndex>=0?this.grid.getCell(l.cellIndex):null},findTarget:function(l,n){for(l=l;l&&l!=this.domNode&&(!(n in l)||m in l&&l[m]!=this.view.id);)l=l.parentNode;return l!=this.domNode?l:null},findRowTarget:function(l){return this.findTarget(l,k)},isIntraNodeEvent:function(l){try{return l.cellNode&&l.relatedTarget&&b.isDescendant(l.relatedTarget,l.cellNode)}catch(n){return false}},isIntraRowEvent:function(l){try{var n=l.relatedTarget&&this.findRowTarget(l.relatedTarget);return!n&&l.rowIndex==
-1||n&&l.rowIndex==n.gridRowIndex}catch(o){return false}},dispatchEvent:function(l){if(l.dispatch in this)return this[l.dispatch](l);return false},domouseover:function(l){if(l.cellNode&&l.cellNode!=this.lastOverCellNode){this.lastOverCellNode=l.cellNode;this.grid.onMouseOver(l)}this.grid.onMouseOverRow(l)},domouseout:function(l){if(l.cellNode&&l.cellNode==this.lastOverCellNode&&!this.isIntraNodeEvent(l,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(l);this.isIntraRowEvent(l)||
this.grid.onMouseOutRow(l)}},domousedown:function(l){l.cellNode&&this.grid.onMouseDown(l);this.grid.onMouseDownRow(l)}});c._ContentBuilder=b.extend(function(l){c._Builder.call(this,l)},c._Builder.prototype,{update:function(){this.prepareHtml()},prepareHtml:function(){for(var l=this.grid.get,n=this.view.structure.cells,o=0,p;p=n[o];o++)for(var t=0,q;q=p[t];t++){q.get=q.get||q.value==undefined&&l;q.markup=this.generateCellMarkup(q,q.cellStyles,q.cellClasses,false);if(!this.grid.editable&&q.editable)this.grid.editable=
true}},generateHtml:function(l,n){l=this.getTableArray();var o=this.view.structure.cells,p=this.grid.getItem(n);a.grid.util.fire(this.view,"onBeforeRow",[n,o]);for(var t=0,q;q=o[t];t++)if(!(q.hidden||q.header)){l.push(!q.invisible?"<tr>":'<tr class="dojoxGridInvisible">');for(var r=0,v,u,x,C;v=q[r];r++){u=v.markup;x=v.customClasses=[];C=v.customStyles=[];u[5]=v.format(n,p);u[1]=x.join(" ");u[3]=C.join(";");l.push.apply(l,u)}l.push("</tr>")}l.push("</table>");return l.join("")},decorateEvent:function(l){l.rowNode=
this.findRowTarget(l.target);if(!l.rowNode)return false;l.rowIndex=l.rowNode[k];this.baseDecorateEvent(l);l.cell=this.grid.getCell(l.cellIndex);return true}});c._HeaderBuilder=b.extend(function(l){this.moveable=null;c._Builder.call(this,l)},c._Builder.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap)this.tableMap.mapRows(this.view.structure.cells);else this.tableMap=new c._TableMap(this.view.structure.cells)},generateHtml:function(l,n){var o=this.getTableArray(),
p=this.view.structure.cells;a.grid.util.fire(this.view,"onBeforeRow",[-1,p]);for(var t=0,q;q=p[t];t++)if(!q.hidden){o.push(!q.invisible?"<tr>":'<tr class="dojoxGridInvisible">');for(var r=0,v,u;v=q[r];r++){v.customClasses=[];v.customStyles=[];if(this.view.simpleStructure){if(v.draggable)if(v.headerClasses){if(v.headerClasses.indexOf("dojoDndItem")==-1)v.headerClasses+=" dojoDndItem"}else v.headerClasses="dojoDndItem";if(v.attrs){if(v.attrs.indexOf("dndType='gridColumn_")==-1)v.attrs+=" dndType='gridColumn_"+
this.grid.id+"'"}else v.attrs="dndType='gridColumn_"+this.grid.id+"'"}u=this.generateCellMarkup(v,v.headerStyles,v.headerClasses,true);u[5]=n!=undefined?n:l(v);u[3]=v.customStyles.join(";");u[1]=v.customClasses.join(" ");o.push(u.join(""))}o.push("</tr>")}o.push("</table>");return o.join("")},getCellX:function(l){var n,o=l.layerX;if(b.isMoz||b.isIE>=9){n=g(l.target,j("th"));o-=n&&n.offsetLeft||0;l.sourceView.getScrollbarWidth();if(!b._isBodyLtr()){table=g(n,j("table"));o-=table&&table.offsetLeft||
0}}n=g(l.target,function(){if(!n||n==l.cellNode)return false;o+=n.offsetLeft<0?0:n.offsetLeft;return true});return o},decorateEvent:function(l){this.baseDecorateEvent(l);l.rowIndex=-1;l.cellX=this.getCellX(l);return true},prepareResize:function(l,n){do{var o=e(l.cellNode);l.cellNode=o?l.cellNode.parentNode.cells[o+n]:null;l.cellIndex=l.cellNode?this.getCellNodeIndex(l.cellNode):-1}while(l.cellNode&&l.cellNode.style.display=="none");return Boolean(l.cellNode)},canResize:function(l){if(!l.cellNode||
l.cellNode.colSpan>1)return false;l=this.grid.getCell(l.cellIndex);return!l.noresize&&l.canResize()},overLeftResizeArea:function(l){if(b.hasClass(b.body(),"dojoDndMove"))return false;if(b.isIE){var n=l.target;if(b.hasClass(n,"dojoxGridArrowButtonNode")||b.hasClass(n,"dojoxGridArrowButtonChar"))return false}if(b._isBodyLtr())return l.cellIndex>0&&l.cellX>0&&l.cellX<this.overResizeWidth&&this.prepareResize(l,-1);return l.cellNode&&l.cellX>0&&l.cellX<this.overResizeWidth},overRightResizeArea:function(l){if(b.hasClass(b.body(),
"dojoDndMove"))return false;if(b.isIE){var n=l.target;if(b.hasClass(n,"dojoxGridArrowButtonNode")||b.hasClass(n,"dojoxGridArrowButtonChar"))return false}if(b._isBodyLtr())return l.cellNode&&l.cellX>=l.cellNode.offsetWidth-this.overResizeWidth;return l.cellIndex>0&&l.cellX>=l.cellNode.offsetWidth-this.overResizeWidth&&this.prepareResize(l,-1)},domousemove:function(l){if(!this.moveable){var n=this.overRightResizeArea(l)?"dojoxGridColResize":this.overLeftResizeArea(l)?"dojoxGridColResize":"";if(n&&!this.canResize(l))n=
"dojoxGridColNoResize";b.toggleClass(l.sourceView.headerNode,"dojoxGridColNoResize",n=="dojoxGridColNoResize");b.toggleClass(l.sourceView.headerNode,"dojoxGridColResize",n=="dojoxGridColResize");if(b.isIE)l.sourceView.headerNode.scrollLeft=l.sourceView.headerNode.scrollLeft;n&&b.stopEvent(l)}},domousedown:function(l){if(!this.moveable)if((this.overRightResizeArea(l)||this.overLeftResizeArea(l))&&this.canResize(l))this.beginColumnResize(l);else{this.grid.onMouseDown(l);this.grid.onMouseOverRow(l)}},
doclick:function(l){if(this._skipBogusClicks){b.stopEvent(l);return true}return false},colResizeSetup:function(l,n){var o=b.contentBox(l.sourceView.headerNode);if(n){this.lineDiv=document.createElement("div");n=(b.position||b._abs)(l.sourceView.headerNode,true);var p=b.contentBox(l.sourceView.domNode),t=l.pageX;if(!b._isBodyLtr()&&b.isIE<8)t-=a.html.metrics.getScrollbar().w;b.style(this.lineDiv,{top:n.y+"px",left:t+"px",height:p.h+o.h+"px"});b.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=
t;b.body().appendChild(this.lineDiv)}n=[];p=this.tableMap.findOverlappingNodes(l.cellNode);t=0;for(var q;q=p[t];t++)n.push({node:q,index:this.getCellNodeIndex(q),width:q.offsetWidth});p=l.sourceView;q=b._isBodyLtr()?1:-1;var r=l.grid.views.views;t=[];for(var v=p.idx+q,u;u=r[v];v+=q)t.push({node:u.headerNode,left:window.parseInt(u.headerNode.style.left)});q=p.headerContentNode.firstChild;return{scrollLeft:l.sourceView.headerNode.scrollLeft,view:p,node:l.cellNode,index:l.cellIndex,w:b.contentBox(l.cellNode).w,
vw:o.w,table:q,tw:b.contentBox(q).w,spanners:n,followers:t}},beginColumnResize:function(l){this.moverDiv=document.createElement("div");b.style(this.moverDiv,{position:"absolute",left:0});b.body().appendChild(this.moverDiv);b.addClass(this.grid.domNode,"dojoxGridColumnResizing");var n=this.moveable=new b.dnd.Moveable(this.moverDiv),o=this.colResizeSetup(l,true);n.onMove=b.hitch(this,"doResizeColumn",o);b.connect(n,"onMoveStop",b.hitch(this,function(){this.endResizeColumn(o);o.node.releaseCapture&&
o.node.releaseCapture();this.moveable.destroy();delete this.moveable;this.moveable=null;b.removeClass(this.grid.domNode,"dojoxGridColumnResizing")}));l.cellNode.setCapture&&l.cellNode.setCapture();n.onMouseDown(l)},doResizeColumn:function(l,n,o){var p=o.l;p={deltaX:p,w:l.w+(b._isBodyLtr()?p:-p),vw:l.vw+p,tw:l.tw+p};this.dragRecord={inDrag:l,mover:n,leftTop:o};if(p.w>=this.minColWidth)n?b.style(this.lineDiv,"left",this.lineDiv._origLeft+p.deltaX+"px"):this.doResizeNow(l,p)},endResizeColumn:function(l){if(this.dragRecord){var n=
this.dragRecord.leftTop;n=b._isBodyLtr()?n.l:-n.l;n+=Math.max(l.w+n,this.minColWidth)-(l.w+n);if(b.isWebKit&&l.spanners.length)n+=b._getPadBorderExtents(l.spanners[0].node).w;this.doResizeNow(l,{deltaX:n,w:l.w+n,vw:l.vw+n,tw:l.tw+n});delete this.dragRecord}b.destroy(this.lineDiv);b.destroy(this.moverDiv);b.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;l.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(l.index)},doResizeNow:function(l,n){l.view.convertColPctToFixed();
if(l.view.flexCells&&!l.view.testFlexCells()){var o=i(l.node);if(o)o.style.width=""}var p,t;for(o=0;p=l.spanners[o];o++){t=p.width+n.deltaX;if(t>0){p.node.style.width=t+"px";l.view.setColWidth(p.index,t)}}if(b._isBodyLtr()||!b.isIE)for(o=0;p=l.followers[o];o++){t=p.left+n.deltaX;p.node.style.left=t+"px"}l.node.style.width=n.w+"px";l.view.setColWidth(l.index,n.w);l.view.headerNode.style.width=n.vw+"px";l.view.setColumnsWidth(n.tw);if(!b._isBodyLtr())l.view.headerNode.scrollLeft=l.scrollLeft+n.deltaX}});
c._TableMap=b.extend(function(l){this.mapRows(l)},{map:null,mapRows:function(l){if(l.length){this.map=[];var n;for(n=0;l[n];n++)this.map[n]=[];for(var o=0;n=l[o];o++)for(var p=0,t=0,q,r;q=n[p];p++){for(;this.map[o][t];)t++;this.map[o][t]={c:p,r:o};r=q.rowSpan||1;q=q.colSpan||1;for(var v=0;v<r;v++)for(var u=0;u<q;u++)this.map[o+v][t+u]=this.map[o][t];t+=q}}},dumpMap:function(){for(var l=0,n,o="";n=this.map[l];l++,o="")for(var p=0,t;t=n[p];p++)o+=t.r+","+t.c+"   "},getMapCoords:function(l,n){for(var o=
0,p;p=this.map[o];o++)for(var t=0,q;q=p[t];t++)if(q.c==n&&q.r==l)return{j:o,i:t};return{j:-1,i:-1}},getNode:function(l,n,o){return(l=l&&l.rows[n])&&l.cells[o]},_findOverlappingNodes:function(l,n,o){var p=[];n=this.getMapCoords(n,o);o=0;for(var t;t=this.map[o];o++)if(o!=n.j)(t=(t=t[n.i])?this.getNode(l,t.r,t.c):null)&&p.push(t);return p},findOverlappingNodes:function(l){return this._findOverlappingNodes(i(l),f(l.parentNode),e(l))}})})()});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(b){b.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(d,a){this.node=b.byId(d);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&b.byId(a.dropParent);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");a&&a._skipStartup||this.startup();this.events=[b.connect(this.node,"onmouseover",this,"onMouseOver"),b.connect(this.node,
"onmouseout",this,"onMouseOut"),b.connect(this.node,"ondragstart",this,"onSelectStart"),b.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||b.global;var c=this.map,e=b.dnd._empty;for(var f in c)f in e||d.call(a,c[f],f,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return b.query("> .dojoDndItem",this.parent)},
sync:function(){var d={};this.getAllNodes().forEach(function(a){if(a.id){var c=this.getItem(a.id);if(c){d[a.id]=c;return}}else a.id=b.dnd.getUniqueId();c=a.getAttribute("dndType");var e=a.getAttribute("dndData");d[a.id]={data:e||a.innerHTML,type:c?c.split(/\s*,\s*/):["text"]}},this);this.map=d;return this},insertNodes:function(d,a,c){if(this.parent.firstChild)if(a){if(!c)c=this.parent.firstChild}else{if(c)c=c.nextSibling}else c=null;if(c)for(a=0;a<d.length;++a){var e=this._normalizedCreator(d[a]);
this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.insertBefore(e.node,c)}else for(a=0;a<d.length;++a){e=this._normalizedCreator(d[a]);this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.appendChild(e.node)}return this},destroy:function(){b.forEach(this.events,b.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(d,a){d._skipStartup=true;return new b.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=b.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(c){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||!b.dnd.isFormElement(d))b.stopEvent(d)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(d,a){var c="dojoDnd"+d;d=d.toLowerCase()+"State";b.replaceClass(this.node,c+a,c+this[d]);this[d]=a},_addItemClass:function(d,a){b.addClass(d,
"dojoDndItem"+a)},_removeItemClass:function(d,a){b.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&&b.hasClass(d,"dojoDndItem"))return d;return null},_normalizedCreator:function(d,a){d=(this.creator||this.defaultCreator).call(this,d,a);if(!b.isArray(d.type))d.type=["text"];if(!d.node.id)d.node.id=b.dnd.getUniqueId();b.addClass(d.node,"dojoDndItem");return d}});b.dnd._createNode=function(d){if(!d)return b.dnd._createSpan;
return function(a){return b.create(d,{innerHTML:a})}};b.dnd._createTrTd=function(d){var a=b.create("tr");b.create("td",{innerHTML:d},a);return a};b.dnd._createSpan=function(d){return b.create("span",{innerHTML:d})};b.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};b.dnd._defaultCreator=function(d){d=d.tagName.toLowerCase();var a=d=="tbody"||d=="thead"?b.dnd._createTrTd:b.dnd._createNode(b.dnd._defaultCreatorNodes[d]);return function(c,e){var f=c&&b.isObject(c),h;if(f&&c.tagName&&c.nodeType&&
c.getAttribute){h=c.getAttribute("dndData")||c.innerHTML;f=(f=c.getAttribute("dndType"))?f.split(/\s*,\s*/):["text"];c=c}else{h=f&&c.data?c.data:c;f=f&&c.type?c.type:["text"];c=(e=="avatar"?b.dnd._createSpan:a)(String(h))}if(!c.id)c.id=b.dnd.getUniqueId();return{node:c,data:h,type:f}}};return b.dnd.Container});
define("dojo/dnd/Selector",["dojo","dojo/dnd/common","dojo/dnd/Container"],function(b){b.declare("dojo.dnd.Selector",b.dnd.Container,{constructor:function(d,a){a||(a={});this.singular=a.singular;this.autoSync=a.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(b.connect(this.node,"onmousedown",this,"onMouseDown"),b.connect(this.node,"onmouseup",this,"onMouseUp"))},singular:false,getSelectedNodes:function(){var d=new b.NodeList,a=b.dnd._empty;for(var c in this.selection)c in
a||d.push(b.byId(c));return d},selectNone:function(){return this._removeSelection()._removeAnchor()},selectAll:function(){this.forInItems(function(d,a){this._addItemClass(b.byId(a),"Selected");this.selection[a]=1},this);return this._removeAnchor()},deleteSelectedNodes:function(){var d=b.dnd._empty;for(var a in this.selection)if(!(a in d)){var c=b.byId(a);this.delItem(a);b.destroy(c)}this.anchor=null;this.selection={};return this},forInSelectedItems:function(d,a){a=a||b.global;var c=this.selection,
e=b.dnd._empty;for(var f in c)f in e||d.call(a,this.getItem(f),f,this)},sync:function(){b.dnd.Selector.superclass.sync.call(this);if(this.anchor)if(!this.getItem(this.anchor.id))this.anchor=null;var d=[],a=b.dnd._empty;for(var c in this.selection)c in a||this.getItem(c)||d.push(c);b.forEach(d,function(e){delete this.selection[e]},this);return this},insertNodes:function(d,a,c,e){var f=this._normalizedCreator;this._normalizedCreator=function(h,i){h=f.call(this,h,i);if(d){if(this.anchor){if(this.anchor!=
h.node){this._removeItemClass(h.node,"Anchor");this._addItemClass(h.node,"Selected")}}else{this.anchor=h.node;this._removeItemClass(h.node,"Selected");this._addItemClass(this.anchor,"Anchor")}this.selection[h.node.id]=1}else{this._removeItemClass(h.node,"Selected");this._removeItemClass(h.node,"Anchor")}return h};b.dnd.Selector.superclass.insertNodes.call(this,a,c,e);this._normalizedCreator=f;return this},destroy:function(){b.dnd.Selector.superclass.destroy.call(this);this.selection=this.anchor=null},
markupFactory:function(d,a){d._skipStartup=true;return new b.dnd.Selector(a,d)},onMouseDown:function(d){this.autoSync&&this.sync();if(this.current)if(!this.singular&&!b.isCopyKey(d)&&!d.shiftKey&&this.current.id in this.selection){this.simpleSelection=true;d.button===b.mouseButtons.LEFT&&b.stopEvent(d)}else{if(!this.singular&&d.shiftKey){b.isCopyKey(d)||this._removeSelection();var a=this.getAllNodes();if(a.length){if(!this.anchor){this.anchor=a[0];this._addItemClass(this.anchor,"Anchor")}this.selection[this.anchor.id]=
1;if(this.anchor!=this.current){for(var c=0;c<a.length;++c){var e=a[c];if(e==this.anchor||e==this.current)break}for(++c;c<a.length;++c){e=a[c];if(e==this.anchor||e==this.current)break;this._addItemClass(e,"Selected");this.selection[e.id]=1}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1}}}else if(this.singular)if(this.anchor==this.current)b.isCopyKey(d)&&this.selectNone();else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=
1}else if(b.isCopyKey(d))if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor()}else if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id]}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected")}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1}else if(!(this.current.id in this.selection)){this.selectNone();
this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1}b.stopEvent(d)}},onMouseUp:function(){if(this.simpleSelection){this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1}}},onMouseMove:function(){this.simpleSelection=false},onOverEvent:function(){this.onmousemoveEvent=b.connect(this.node,"onmousemove",this,"onMouseMove")},onOutEvent:function(){b.disconnect(this.onmousemoveEvent);
delete this.onmousemoveEvent},_removeSelection:function(){var d=b.dnd._empty;for(var a in this.selection)if(!(a in d)){var c=b.byId(a);c&&this._removeItemClass(c,"Selected")}this.selection={};return this},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null}return this}});return b.dnd.Selector});
define("dojo/dnd/Avatar",["dojo","dojo/dnd/common"],function(b){b.declare("dojo.dnd.Avatar",null,{constructor:function(d){this.manager=d;this.construct()},construct:function(){this.isA11y=b.hasClass(b.body(),"dijit_a11y");var d=b.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),a=this.manager.source,c,e=b.create("tbody",null,d),f=b.create("tr",null,e),h=b.create("td",null,f);if(this.isA11y)b.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":
"<"},h);b.create("span",{innerHTML:a.generateText?this._generateText():""},h);var i=Math.min(5,this.manager.nodes.length),g=0;for(b.attr(f,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});g<i;++g){if(a.creator)c=a._normalizedCreator(a.getItem(this.manager.nodes[g].id).data,"avatar").node;else{c=this.manager.nodes[g].cloneNode(true);if(c.tagName.toLowerCase()=="tr"){f=b.create("table");b.create("tbody",null,f).appendChild(c);c=f}}c.id="";f=b.create("tr",null,e);h=b.create("td",null,f);h.appendChild(c);
b.attr(f,{"class":"dojoDndAvatarItem",style:{opacity:(9-g)/10}})}this.node=d},destroy:function(){b.destroy(this.node);this.node=false},update:function(){b[(this.manager.canDropFlag?"add":"remove")+"Class"](this.node,"dojoDndAvatarCanDrop");if(this.isA11y){var d=b.byId("a11yIcon"),a="+";if(this.manager.canDropFlag&&!this.manager.copy)a="< ";else if(!this.manager.canDropFlag&&!this.manager.copy)a="o";else this.manager.canDropFlag||(a="x");d.innerHTML=a}b.query("tr.dojoDndAvatarHeader td span"+(this.isA11y?
" span":""),this.node).forEach(function(c){c.innerHTML=this._generateText()},this)},_generateText:function(){return this.manager.nodes.length.toString()}});return b.dnd.Avatar});
define("dojo/dnd/Manager",["dojo","dojo/dnd/common","dojo/dnd/autoscroll","dojo/dnd/Avatar"],function(b){b.declare("dojo.dnd.Manager",null,{constructor:function(){this.source=this.avatar=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[]},OFFSET_X:16,OFFSET_Y:16,overSource:function(d){if(this.avatar){this.target=d&&d.targetState!="Disabled"?d:null;this.canDropFlag=Boolean(this.target);this.avatar.update()}b.publish("/dnd/source/over",[d])},outSource:function(d){if(this.avatar){if(this.target==
d){this.target=null;this.canDropFlag=false;this.avatar.update();b.publish("/dnd/source/over",[null])}}else b.publish("/dnd/source/over",[null])},startDrag:function(d,a,c){this.source=d;this.nodes=a;this.copy=Boolean(c);this.avatar=this.makeAvatar();b.body().appendChild(this.avatar.node);b.publish("/dnd/start",[d,a,this.copy]);this.events=[b.connect(b.doc,"onmousemove",this,"onMouseMove"),b.connect(b.doc,"onmouseup",this,"onMouseUp"),b.connect(b.doc,"onkeydown",this,"onKeyDown"),b.connect(b.doc,"onkeyup",
this,"onKeyUp"),b.connect(b.doc,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent)];d="dojoDnd"+(c?"Copy":"Move");b.addClass(b.body(),d)},canDrop:function(d){d=Boolean(this.target&&d);if(this.canDropFlag!=d){this.canDropFlag=d;this.avatar.update()}},stopDrag:function(){b.removeClass(b.body(),["dojoDndCopy","dojoDndMove"]);b.forEach(this.events,b.disconnect);this.events=[];this.avatar.destroy();this.source=this.target=this.avatar=null;this.nodes=[]},makeAvatar:function(){return new b.dnd.Avatar(this)},
updateAvatar:function(){this.avatar.update()},onMouseMove:function(d){var a=this.avatar;if(a){b.dnd.autoScrollNodes(d);a=a.node.style;a.left=d.pageX+this.OFFSET_X+"px";a.top=d.pageY+this.OFFSET_Y+"px";d=Boolean(this.source.copyState(b.isCopyKey(d)));this.copy!=d&&this._setCopyStatus(d)}},onMouseUp:function(d){if(this.avatar){if(this.target&&this.canDropFlag){d=[this.source,this.nodes,Boolean(this.source.copyState(b.isCopyKey(d))),this.target,d];b.publish("/dnd/drop/before",d);b.publish("/dnd/drop",
d)}else b.publish("/dnd/cancel");this.stopDrag()}},onKeyDown:function(d){if(this.avatar)switch(d.keyCode){case b.keys.CTRL:d=Boolean(this.source.copyState(true));this.copy!=d&&this._setCopyStatus(d);break;case b.keys.ESCAPE:b.publish("/dnd/cancel");this.stopDrag();break}},onKeyUp:function(d){if(this.avatar&&d.keyCode==b.keys.CTRL){d=Boolean(this.source.copyState(false));this.copy!=d&&this._setCopyStatus(d)}},_setCopyStatus:function(d){this.copy=d;this.source._markDndStatus(this.copy);this.updateAvatar();
b.replaceClass(b.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"))}});b.dnd._manager=null;b.dnd.manager=function(){if(!b.dnd._manager)b.dnd._manager=new b.dnd.Manager;return b.dnd._manager};return b.dnd.Manager});
define("dojo/dnd/Source",["dojo","dojo/dnd/Selector","dojo/dnd/Manager"],function(b){b.declare("dojo.dnd.Source",b.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(d,a){b.mixin(this,b.mixin({},a));d=this.accept;if(d.length){this.accept={};for(a=0;a<d.length;++a)this.accept[d[a]]=1}this.mouseDown=this.isDragging=false;this.targetBox=this.targetAnchor=
null;this.before=true;this._lastY=this._lastX=0;this.sourceState="";this.isSource&&b.addClass(this.node,"dojoDndSource");this.targetState="";this.accept&&b.addClass(this.node,"dojoDndTarget");this.horizontal&&b.addClass(this.node,"dojoDndHorizontal");this.topics=[b.subscribe("/dnd/source/over",this,"onDndSourceOver"),b.subscribe("/dnd/start",this,"onDndStart"),b.subscribe("/dnd/drop",this,"onDndDrop"),b.subscribe("/dnd/cancel",this,"onDndCancel")]},checkAcceptance:function(d,a){if(this==d)return!this.copyOnly||
this.selfAccept;for(var c=0;c<a.length;++c){for(var e=d.getItem(a[c].id).type,f=false,h=0;h<e.length;++h)if(e[h]in this.accept){f=true;break}if(!f)return false}return true},copyState:function(d,a){if(d)return true;if(arguments.length<2)a=this==b.dnd.manager().target;if(a){if(this.copyOnly)return this.selfCopy}else return this.copyOnly;return false},destroy:function(){b.dnd.Source.superclass.destroy.call(this);b.forEach(this.topics,b.unsubscribe);this.targetAnchor=null},markupFactory:function(d,a){d._skipStartup=
true;return new b.dnd.Source(a,d)},onMouseMove:function(d){if(!(this.isDragging&&this.targetState=="Disabled")){b.dnd.Source.superclass.onMouseMove.call(this,d);var a=b.dnd.manager();if(!this.isDragging)if(this.mouseDown&&this.isSource&&(Math.abs(d.pageX-this._lastX)>this.delay||Math.abs(d.pageY-this._lastY)>this.delay)){var c=this.getSelectedNodes();c.length&&a.startDrag(this,c,this.copyState(b.isCopyKey(d),true))}if(this.isDragging){c=false;if(this.current){if(!this.targetBox||this.targetAnchor!=
this.current)this.targetBox=b.position(this.current,true);c=this.horizontal?d.pageX-this.targetBox.x<this.targetBox.w/2:d.pageY-this.targetBox.y<this.targetBox.h/2}if(this.current!=this.targetAnchor||c!=this.before){this._markTargetAnchor(c);a.canDrop(!this.current||a.source!=this||!(this.current.id in this.selection))}}}},onMouseDown:function(d){if(!this.mouseDown&&this._legalMouseDown(d)&&(!this.skipForm||!b.dnd.isFormElement(d))){this.mouseDown=true;this._lastX=d.pageX;this._lastY=d.pageY;b.dnd.Source.superclass.onMouseDown.call(this,
d)}},onMouseUp:function(d){if(this.mouseDown){this.mouseDown=false;b.dnd.Source.superclass.onMouseUp.call(this,d)}},onDndSourceOver:function(d){if(this!=d){this.mouseDown=false;this.targetAnchor&&this._unmarkTargetAnchor()}else if(this.isDragging){d=b.dnd.manager();d.canDrop(this.targetState!="Disabled"&&(!this.current||d.source!=this||!(this.current.id in this.selection)))}},onDndStart:function(d,a,c){this.autoSync&&this.sync();if(this.isSource)this._changeState("Source",this==d?c?"Copied":"Moved":
"");this._changeState("Target",this.accept&&this.checkAcceptance(d,a)?"":"Disabled");this==d&&b.dnd.manager().overSource(this);this.isDragging=true},onDndDrop:function(d,a,c,e){this==e&&this.onDrop(d,a,c);this.onDndCancel()},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null}this.before=true;this.mouseDown=this.isDragging=false;this._changeState("Source","");this._changeState("Target","")},onDrop:function(d,a,c){this!=d?this.onDropExternal(d,a,c):this.onDropInternal(a,
c)},onDropExternal:function(d,a,c){var e=this._normalizedCreator;this._normalizedCreator=this.creator?function(f,h){return e.call(this,d.getItem(f.id).data,h)}:c?function(f){var h=d.getItem(f.id);f=f.cloneNode(true);f.id=b.dnd.getUniqueId();return{node:f,data:h.data,type:h.type}}:function(f){var h=d.getItem(f.id);d.delItem(f.id);return{node:f,data:h.data,type:h.type}};this.selectNone();!c&&!this.creator&&d.selectNone();this.insertNodes(true,a,this.before,this.current);!c&&this.creator&&d.deleteSelectedNodes();
this._normalizedCreator=e},onDropInternal:function(d,a){var c=this._normalizedCreator;if(!(this.current&&this.current.id in this.selection)){if(a)this._normalizedCreator=this.creator?function(e,f){return c.call(this,this.getItem(e.id).data,f)}:function(e){var f=this.getItem(e.id);e=e.cloneNode(true);e.id=b.dnd.getUniqueId();return{node:e,data:f.data,type:f.type}};else{if(!this.current)return;this._normalizedCreator=function(e){var f=this.getItem(e.id);return{node:e,data:f.data,type:f.type}}}this._removeSelection();
this.insertNodes(true,d,this.before,this.current);this._normalizedCreator=c}},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){b.dnd.Source.superclass.onOverEvent.call(this);b.dnd.manager().overSource(this);this.isDragging&&this.targetState!="Disabled"&&this.onDraggingOver()},onOutEvent:function(){b.dnd.Source.superclass.onOutEvent.call(this);b.dnd.manager().outSource(this);this.isDragging&&this.targetState!="Disabled"&&this.onDraggingOut()},_markTargetAnchor:function(d){if(!(this.current==
this.targetAnchor&&this.before==d)){if(this.targetAnchor)this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=this.current;this.targetBox=null;this.before=d;if(this.targetAnchor)this._addItemClass(this.targetAnchor,this.before?"Before":"After")}},_unmarkTargetAnchor:function(){if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetBox=this.targetAnchor=null;this.before=true}},_markDndStatus:function(d){this._changeState("Source",
d?"Copied":"Moved")},_legalMouseDown:function(d){if(!b.mouseButtons.isLeft(d))return false;if(!this.withHandles)return true;for(d=d.target;d&&d!==this.node;d=d.parentNode){if(b.hasClass(d,"dojoDndHandle"))return true;if(b.hasClass(d,"dojoDndItem")||b.hasClass(d,"dojoDndIgnore"))break}return false}});b.declare("dojo.dnd.Target",b.dnd.Source,{constructor:function(){this.isSource=false;b.removeClass(this.node,"dojoDndSource")},markupFactory:function(d,a){d._skipStartup=true;return new b.dnd.Target(a,
d)}});b.declare("dojo.dnd.AutoSource",b.dnd.Source,{constructor:function(){this.autoSync=true},markupFactory:function(d,a){d._skipStartup=true;return new b.dnd.AutoSource(a,d)}});return b.dnd.Source});
define("dojox/grid/_View",["dojo","dijit","dojox","dijit/_Widget","dijit/_Templated","dojox/grid/_Builder","dojox/html/metrics","dojox/grid/util","dojo/dnd/Source","dojo/dnd/Manager"],function(b,d,a){(function(){var c=function(f){return f.style.cssText==undefined?f.getAttribute("style"):f.style.cssText};b.declare("dojox.grid._View",[d._Widget,d._Templated],{defaultWidth:"18em",viewWidth:"",templatePath:b.moduleUrl("dojox.grid","resources/View.html"),themeable:false,classTag:"dojoxGrid",marginBottom:0,
rowPad:2,_togglingColumn:-1,_headerBuilderClass:a.grid._HeaderBuilder,_contentBuilderClass:a.grid._ContentBuilder,postMixInProperties:function(){this.rowNodes={}},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");a.grid.util.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);a.grid.util.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click",
"contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!b._isBodyLtr())this.headerNodeContainer.style.width=""},destroy:function(){b.destroy(this.headerNode);delete this.headerNode;for(var f in this.rowNodes)b.destroy(this.rowNodes[f]);this.rowNodes={};this.source&&this.source.destroy();this.inherited(arguments)},focus:function(){b.isIE||b.isWebKit||b.isOpera?this.hiddenFocusNode.focus():this.scrollboxNode.focus()},setStructure:function(f){f=
this.structure=f;this.viewWidth=f.width&&!isNaN(f.width)?f.width+"em":f.width||(f.noscroll?"auto":this.viewWidth);this._onBeforeRow=f.onBeforeRow||function(){};this._onAfterRow=f.onAfterRow||function(){};if(this.noscroll=f.noscroll)this.scrollboxNode.style.overflow="hidden";this.simpleStructure=Boolean(f.cells.length==1);this.testFlexCells();this.updateStructure()},_cleanupRowWidgets:function(f){f&&b.forEach(b.query("[widgetId]",f).map(d.byNode),function(h){if(h._destroyOnRemove){h.destroy();delete h}else h.domNode&&
h.domNode.parentNode&&h.domNode.parentNode.removeChild(h.domNode)})},onBeforeRow:function(f,h){this._onBeforeRow(f,h);f>=0&&this._cleanupRowWidgets(this.getRowNode(f))},onAfterRow:function(f,h,i){this._onAfterRow(f,h,i);var g=this.grid;b.forEach(b.query(".dojoxGridStubNode",i),function(j){if(j&&j.parentNode){var k=j.getAttribute("linkWidget"),m=window.parseInt(b.attr(j,"cellIdx"),10);g.getCell(m);if(k=d.byId(k)){j.parentNode.replaceChild(k.domNode,j);k._started||k.startup()}else j.innerHTML=""}},
this)},testFlexCells:function(){this.flexCells=false;for(var f=0,h;h=this.structure.cells[f];f++)for(var i=0,g;g=h[i];i++){g.view=this;this.flexCells=this.flexCells||g.isFlex()}return this.flexCells},updateStructure:function(){this.header.update();this.content.update()},getScrollbarWidth:function(){var f=this.hasVScrollbar(),h=b.style(this.scrollboxNode,"overflow");if(this.noscroll||!h||h=="hidden")f=false;else if(h=="scroll")f=true;return f?a.html.metrics.getScrollbar().w:0},getColumnsWidth:function(){var f=
this.headerContentNode;return f&&f.firstChild?f.firstChild.offsetWidth:0},setColumnsWidth:function(f){this.headerContentNode.firstChild.style.width=f+"px";if(this.viewWidth)this.viewWidth=f+"px"},getWidth:function(){return this.viewWidth||this.getColumnsWidth()+this.getScrollbarWidth()+"px"},getContentWidth:function(){return Math.max(0,b._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px"},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=
0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1}var f=this.grid.layout.cells,h=b.hitch(this,function(g,j){!b._isBodyLtr()&&(j=!j);j=j?-1:1;g=this.header.getCellNodeIndex(g)+j;for(var k=f[g];k&&k.getHeaderNode()&&k.getHeaderNode().style.display=="none";){g+=j;k=f[g]}if(k)return k.getHeaderNode();return null});if(this.grid.columnReordering&&this.simpleStructure){this.source&&this.source.destroy();this.bottomMarker&&b.destroy(this.bottomMarker);this.bottomMarker=
b.byId("dojoxGrid_bottomMarker");this.topMarker&&b.destroy(this.topMarker);this.topMarker=b.byId("dojoxGrid_topMarker");if(!this.bottomMarker){this.bottomMarker=b.create("div",{id:"dojoxGrid_bottomMarker","class":"dojoxGridColPlaceBottom"},b.body());this._hide(this.bottomMarker);this.topMarker=b.create("div",{id:"dojoxGrid_topMarker","class":"dojoxGridColPlaceTop"},b.body());this._hide(this.topMarker)}this.arrowDim=b.contentBox(this.bottomMarker);var i=b.contentBox(this.headerContentNode.firstChild.rows[0]).h;
this.source=new b.dnd.Source(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:b.hitch(this,function(g){this.header.decorateEvent(g);if((this.header.overRightResizeArea(g)||this.header.overLeftResizeArea(g))&&this.header.canResize(g)&&!this.header.moveable)this.header.beginColumnResize(g);else{this.grid.headerMenu&&this.grid.headerMenu.onCancel(true);if(g.button===(b.isIE?1:0))b.dnd.Source.prototype.onMouseDown.call(this.source,
g)}}),onMouseOver:b.hitch(this,function(g){var j=this.source;j._getChildByEvent(g)&&b.dnd.Source.prototype.onMouseOver.apply(j,arguments)}),_markTargetAnchor:b.hitch(this,function(g){var j=this.source;if(!(j.current==j.targetAnchor&&j.before==g)){if(j.targetAnchor&&h(j.targetAnchor,j.before))j._removeItemClass(h(j.targetAnchor,j.before),j.before?"After":"Before");b.dnd.Source.prototype._markTargetAnchor.call(j,g);var k=g?j.targetAnchor:h(j.targetAnchor,j.before);g=0;if(!k){k=j.targetAnchor;g=b.contentBox(k).w+
this.arrowDim.w/2+2}k=(b.position||b._abs)(k,true);g=Math.floor(k.x-this.arrowDim.w/2+g);b.style(this.bottomMarker,"visibility","visible");b.style(this.topMarker,"visibility","visible");b.style(this.bottomMarker,{left:g+"px",top:i+k.y+"px"});b.style(this.topMarker,{left:g+"px",top:k.y-this.arrowDim.h+"px"});if(j.targetAnchor&&h(j.targetAnchor,j.before))j._addItemClass(h(j.targetAnchor,j.before),j.before?"After":"Before")}}),_unmarkTargetAnchor:b.hitch(this,function(){var g=this.source;if(g.targetAnchor){if(g.targetAnchor&&
h(g.targetAnchor,g.before))g._removeItemClass(h(g.targetAnchor,g.before),g.before?"After":"Before");this._hide(this.bottomMarker);this._hide(this.topMarker);b.dnd.Source.prototype._unmarkTargetAnchor.call(g)}}),destroy:b.hitch(this,function(){b.disconnect(this._source_conn);b.unsubscribe(this._source_sub);b.dnd.Source.prototype.destroy.call(this.source);if(this.bottomMarker){b.destroy(this.bottomMarker);delete this.bottomMarker}if(this.topMarker){b.destroy(this.topMarker);delete this.topMarker}}),
onDndCancel:b.hitch(this,function(){b.dnd.Source.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker)})});this._source_conn=b.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=b.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup()}},_hide:function(f){b.style(f,{left:"-10000px",top:"-10000px",visibility:"hidden"})},_onDndDropBefore:function(f){if(b.dnd.manager().target===this.source){this.source._targetNode=this.source.targetAnchor;
this.source._beforeTarget=this.source.before;var h=this.grid.views.views;f=h[f.viewIndex];h=h[this.index];if(h!=f){f.convertColPctToFixed();h.convertColPctToFixed()}}},_onDndDrop:function(f,h){if(b.dnd.manager().target!==this.source){if(b.dnd.manager().source===this.source)this._removingColumn=true}else{this._hide(this.bottomMarker);this._hide(this.topMarker);var i=function(l){return l?b.attr(l,"idx"):null},g=b.marginBox(h[0]).w;if(f.viewIndex!==this.index){var j=this.grid.views.views,k=j[f.viewIndex];
j=j[this.index];k.viewWidth&&k.viewWidth!="auto"&&k.setColumnsWidth(k.getColumnsWidth()-g);j.viewWidth&&j.viewWidth!="auto"&&j.setColumnsWidth(j.getColumnsWidth())}g=this.source._targetNode;k=this.source._beforeTarget;!b._isBodyLtr()&&(k=!k);j=this.grid.layout;var m=this.index;delete this.source._targetNode;delete this.source._beforeTarget;j.moveColumn(f.viewIndex,m,i(h[0]),i(g),k)}},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=
this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth}a.grid.util.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode])},_getHeaderContent:function(f){var h=f.name||f.grid.getCellName(f),i=['<div class="dojoxGridSortNode'];if(f.index!=f.grid.getSortIndex())i.push('">');else i=i.concat([" ",f.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown",'"><div class="dojoxGridArrowButtonChar">',f.grid.sortInfo>0?"&#9650;":"&#9660;",'</div><div class="dojoxGridArrowButtonNode" role="presentation"></div>',
'<div class="dojoxGridColCaption">']);i=i.concat([h,"</div></div>"]);return i.join("")},resize:function(){this.adaptHeight();this.adaptWidth()},hasHScrollbar:function(f){var h=this._hasHScroll||false;if(this._hasHScroll==undefined||f)if(this.noscroll)this._hasHScroll=false;else{f=b.style(this.scrollboxNode,"overflow");this._hasHScroll=f=="hidden"?false:f=="scroll"?true:this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth}h!==this._hasHScroll&&this.grid.update();return this._hasHScroll},
hasVScrollbar:function(f){var h=this._hasVScroll||false;if(this._hasVScroll==undefined||f)if(this.noscroll)this._hasVScroll=false;else{f=b.style(this.scrollboxNode,"overflow");this._hasVScroll=f=="hidden"?false:f=="scroll"?true:this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight}h!==this._hasVScroll&&this.grid.update();return this._hasVScroll},convertColPctToFixed:function(){var f=false;this.grid.initialWidth="";var h=b.query("th",this.headerContentNode),i=b.map(h,function(g,j){var k=
g.style.width;b.attr(g,"vIdx",j);if(k&&k.slice(-1)=="%")f=true;else if(k&&k.slice(-2)=="px")return window.parseInt(k,10);return b.contentBox(g).w});if(f){b.forEach(this.grid.layout.cells,function(g,j){if(g.view==this)if((g=g.view.getHeaderCellNode(g.index))&&b.hasAttr(g,"vIdx")){var k=window.parseInt(b.attr(g,"vIdx"));this.setColWidth(j,i[k]);b.removeAttr(g,"vIdx")}},this);return true}return false},adaptHeight:function(f){if(!this.grid._autoHeight){var h=this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,
""),10)||this.domNode.clientHeight,i=this,g=function(){var j;for(var k in i.grid.views.views){j=i.grid.views.views[k];if(j!==i&&j.hasHScrollbar())return true}return false};if(f||this.noscroll&&g())h-=a.html.metrics.getScrollbar().h;a.grid.util.setStyleHeightPx(this.scrollboxNode,h)}this.hasVScrollbar(true)},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth}var f=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();
if(this._removingColumn){f=Math.min(f,this.getColumnsWidth())+"px";this._removingColumn=false}else f=Math.max(f,this.getColumnsWidth())+"px";this.contentNode.style.width=f;this.hasHScrollbar(true)},setSize:function(f,h){var i=this.domNode.style,g=this.headerNode.style;if(f){i.width=f;g.width=f}i.height=h>=0?h+"px":""},renderRow:function(f){var h=this.createRowNode(f);this.buildRow(f,h);this.grid.edit.restore(this,f);return h},createRowNode:function(f){var h=document.createElement("div");h.className=
this.classTag+"Row";if(this instanceof a.grid._RowSelector)b.attr(h,"role","presentation");else{b.attr(h,"role","row");this.grid.selectionMode!="none"&&b.attr(h,"aria-selected","false")}h[a.grid.util.gridViewTag]=this.id;h[a.grid.util.rowIndexTag]=f;return this.rowNodes[f]=h},buildRow:function(f,h){this.buildRowContent(f,h);this.styleRow(f,h)},buildRowContent:function(f,h){h.innerHTML=this.content.generateHtml(f,f);if(this.flexCells&&this.contentWidth)h.firstChild.style.width=this.contentWidth;a.grid.util.fire(this,
"onAfterRow",[f,this.structure.cells,h])},rowRemoved:function(f){f>=0&&this._cleanupRowWidgets(this.getRowNode(f));this.grid.edit.save(this,f);delete this.rowNodes[f]},getRowNode:function(f){return this.rowNodes[f]},getCellNode:function(f,h){if(f=this.getRowNode(f))return this.content.getCellNode(f,h)},getHeaderCellNode:function(f){if(this.headerContentNode)return this.header.getCellNode(this.headerContentNode,f)},styleRow:function(f,h){h._style=c(h);this.styleRowNode(f,h)},styleRowNode:function(f,
h){h&&this.doStyleRowNode(f,h)},doStyleRowNode:function(f,h){this.grid.styleRowNode(f,h)},updateRow:function(f){var h=this.getRowNode(f);if(h){h.style.height="";this.buildRow(f,h)}return h},updateRowStyles:function(f){this.styleRowNode(f,this.getRowNode(f))},lastTop:0,firstScroll:0,doscroll:function(){var f=b._isBodyLtr();if(this.firstScroll<2){if(!f&&this.firstScroll==1||f&&this.firstScroll===0){var h=b.marginBox(this.headerNodeContainer);if(b.isIE)this.headerNodeContainer.style.width=h.w+this.getScrollbarWidth()+
"px";else if(b.isMoz){this.headerNodeContainer.style.width=h.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=f?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth}}this.firstScroll++}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;f=this.scrollboxNode.scrollTop;f!==this.lastTop&&this.grid.scrollTo(f)},setScrollTop:function(f){this.lastTop=f;this.scrollboxNode.scrollTop=f;return this.scrollboxNode.scrollTop},
doContentEvent:function(f){this.content.decorateEvent(f)&&this.grid.onContentEvent(f)},doHeaderEvent:function(f){this.header.decorateEvent(f)&&this.grid.onHeaderEvent(f)},dispatchContentEvent:function(f){return this.content.dispatchEvent(f)},dispatchHeaderEvent:function(f){return this.header.dispatchEvent(f)},setColWidth:function(f,h){this.grid.setCellWidth(f,h+"px")},update:function(){if(this.domNode){this.content.update();this.grid.update();var f=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=
f;this.headerNode.scrollLeft=f}}});b.declare("dojox.grid._GridAvatar",b.dnd.Avatar,{construct:function(){var f=b.doc,h=f.createElement("table");h.cellPadding=h.cellSpacing="0";h.className="dojoxGridDndAvatar";h.style.position="absolute";h.style.zIndex=1999;h.style.margin="0px";var i=f.createElement("tbody"),g=f.createElement("tr"),j=f.createElement("td"),k=f.createElement("td");g.className="dojoxGridDndAvatarItem";k.className="dojoxGridDndAvatarItemImage";k.style.width="16px";var m=this.manager.source;
if(m.creator)m=m._normalizedCreator(m.getItem(this.manager.nodes[0].id).data,"avatar").node;else{m=this.manager.nodes[0].cloneNode(true);var l,n;if(m.tagName.toLowerCase()=="tr"){l=f.createElement("table");n=f.createElement("tbody");n.appendChild(m);l.appendChild(n);m=l}else if(m.tagName.toLowerCase()=="th"){l=f.createElement("table");n=f.createElement("tbody");f=f.createElement("tr");l.cellPadding=l.cellSpacing="0";f.appendChild(m);n.appendChild(f);l.appendChild(n);m=l}}m.id="";j.appendChild(m);
g.appendChild(k);g.appendChild(j);b.style(g,"opacity",0.9);i.appendChild(g);h.appendChild(i);this.node=h;h=b.dnd.manager();this.oldOffsetY=h.OFFSET_Y;h.OFFSET_Y=1},destroy:function(){b.dnd.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments)}});var e=b.dnd.manager().makeAvatar;b.dnd.manager().makeAvatar=function(){if(this.source.viewIndex!==undefined&&!b.hasClass(b.body(),"dijit_a11y"))return new a.grid._GridAvatar(this);return e.call(b.dnd.manager())}})()});
define("dojox/grid/_RowSelector",["dojo","dijit","dojox","dojox/grid/_View"],function(b,d,a){b.declare("dojox.grid._RowSelector",a.grid._View,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden"},getWidth:function(){return this.viewWidth||this.defaultWidth},buildRowContent:function(c,e){e.innerHTML='<table class="dojoxGridRowbarTable" style="width:'+
(this.contentWidth||0)+'px;height:1px;" border="0" cellspacing="0" cellpadding="0" role="presentation"><tr><td class="dojoxGridRowbarInner">&nbsp;</td></tr></table>'},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight()},adaptWidth:function(){if(!("contentWidth"in this)&&this.contentNode)this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth},doStyleRowNode:function(c,e){var f=["dojoxGridRowbar dojoxGridNonNormalizedCell"];this.grid.rows.isOver(c)&&f.push("dojoxGridRowbarOver");
this.grid.selection.isSelected(c)&&f.push("dojoxGridRowbarSelected");e.className=f.join(" ")},domouseover:function(c){this.grid.onMouseOverRow(c)},domouseout:function(c){this.isIntraRowEvent(c)||this.grid.onMouseOutRow(c)}})});
define("dojox/grid/_Layout",["dojo","dijit","dojox","dojox/grid/cells","dojox/grid/_RowSelector"],function(b,d,a){b.declare("dojox.grid._Layout",null,{constructor:function(c){this.grid=c},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(c,e,f,h,i){var g=this.structure[c].cells[0],j=this.structure[e].cells[0],k=null,m=k=0;c=0;for(var l;l=g[c];c++)if(l.index==f){k=c;break}k=g.splice(k,1)[0];k.view=this.grid.views.views[e];c=0;for(l=null;l=j[c];c++)if(l.index==h){m=c;break}i||(m+=1);j.splice(m,
0,k);if(f=this.grid.getCell(this.grid.getSortIndex()))f._currentlySorted=this.grid.getSortAsc();this.cells=[];for(c=f=0;e=this.structure[c];c++)for(h=0;i=e.cells[h];h++)for(g=0;l=i[g];g++){l.index=f;this.cells.push(l);if("_currentlySorted"in l){j=f+1;j*=l._currentlySorted?1:-1;this.grid.sortInfo=j;delete l._currentlySorted}f++}b.forEach(this.cells,function(n){var o=n.markup[2].split(" ");if(parseInt(o[1].substring(5))!=n.index){o[1]='idx="'+n.index+'"';n.markup[2]=o.join(" ")}});this.grid.setupHeaderMenu()},
setColumnVisibility:function(c,e){c=this.cells[c];if(c.hidden==e){c.hidden=!e;e=c.view;var f=e.viewWidth;if(f&&f!="auto")e._togglingColumn=b.marginBox(c.getHeaderNode()).w||0;e.update();return true}else return false},addCellDef:function(c,e,f){var h=this,i=function(g){var j=0;if(g.colSpan>1)j=0;else{j=g.width||h._defaultCellProps.width||h.defaultWidth;isNaN(j)||(j+="em")}return j};c={grid:this.grid,subrow:c,layoutIndex:e,index:this.cells.length};if(f&&f instanceof a.grid.cells._Base){e=b.clone(f);
c.unitWidth=i(e._props);return e=b.mixin(e,this._defaultCellProps,f._props,c)}e=f.type||f.cellType||this._defaultCellProps.type||this._defaultCellProps.cellType||a.grid.cells.Cell;c.unitWidth=i(f);return new e(b.mixin({},this._defaultCellProps,f,c))},addRowDef:function(c,e){for(var f=[],h=0,i=0,g=true,j=0,k;k=e[j];j++){k=this.addCellDef(c,j,k);f.push(k);this.cells.push(k);if(g&&k.relWidth)h+=k.relWidth;else if(k.width){k=k.width;if(typeof k=="string"&&k.slice(-1)=="%")i+=window.parseInt(k,10);else if(k==
"auto")g=false}}h&&g&&b.forEach(f,function(m){if(m.relWidth)m.width=m.unitWidth=m.relWidth/h*(100-i)+"%"});return f},addRowsDef:function(c){var e=[];if(b.isArray(c))if(b.isArray(c[0]))for(var f=0,h;c&&(h=c[f]);f++)e.push(this.addRowDef(f,h));else e.push(this.addRowDef(0,c));return e},addViewDef:function(c){this._defaultCellProps=c.defaultCell||{};c.width&&c.width=="auto"&&delete c.width;return b.mixin({},c,{cells:this.addRowsDef(c.rows||c.cells)})},setStructure:function(c){this.fieldIndex=0;this.cells=
[];var e=this.structure=[];if(this.grid.rowSelector){var f={type:a._scopeName+".grid._RowSelector"};if(b.isString(this.grid.rowSelector)){var h=this.grid.rowSelector;if(h=="false")f=null;else if(h!="true")f.width=h}else this.grid.rowSelector||(f=null);f&&e.push(this.addViewDef(f))}var i=function(m){return"name"in m||"field"in m||"get"in m};f=function(m){if(b.isArray(m))if(b.isArray(m[0])||i(m[0]))return true;return false};h=function(m){return m!==null&&b.isObject(m)&&("cells"in m||"rows"in m||"type"in
m&&!i(m))};if(b.isArray(c)){for(var g=false,j=0,k;k=c[j];j++)if(h(k)){g=true;break}if(g)for(j=0;k=c[j];j++)if(f(k))e.push(this.addViewDef({cells:k}));else h(k)&&e.push(this.addViewDef(k));else e.push(this.addViewDef({cells:c}))}else h(c)&&e.push(this.addViewDef(c));this.cellCount=this.cells.length;this.grid.setupHeaderMenu()}})});
define("dojox/grid/_ViewManager",["dojo","dijit","dojox"],function(b){b.declare("dojox.grid._ViewManager",null,{constructor:function(d){this.grid=d},defaultWidth:200,views:[],resize:function(){this.onEach("resize")},render:function(){this.onEach("render")},addView:function(d){d.idx=this.views.length;this.views.push(d)},destroyViews:function(){for(var d=0,a;a=this.views[d];d++)a.destroy();this.views=[]},getContentNodes:function(){for(var d=[],a=0,c;c=this.views[a];a++)d.push(c.contentNode);return d},
forEach:function(d){for(var a=0,c;c=this.views[a];a++)d(c,a)},onEach:function(d,a){a=a||[];for(var c=0,e;e=this.views[c];c++)d in e&&e[d].apply(e,a)},normalizeHeaderNodeHeight:function(){for(var d=[],a=0,c;c=this.views[a];a++)c.headerContentNode.firstChild&&d.push(c.headerContentNode);this.normalizeRowNodeHeights(d)},normalizeRowNodeHeights:function(d){var a=0,c=[];if(this.grid.rowHeight)a=this.grid.rowHeight;else{if(d.length<=1)return;for(var e=0,f;f=d[e];e++)if(!b.hasClass(f,"dojoxGridNonNormalizedCell")){c[e]=
f.firstChild.offsetHeight;a=Math.max(a,c[e])}a=a>=0?a:0;b.isMoz&&a&&a++}for(e=0;f=d[e];e++)if(c[e]!=a)f.firstChild.style.height=a+"px"},resetHeaderNodeHeight:function(){for(var d=0,a;a=this.views[d];d++)if(a=a.headerContentNode.firstChild)a.style.height=""},renormalizeRow:function(d){for(var a=[],c=0,e,f;(e=this.views[c])&&(f=e.getRowNode(d));c++){f.firstChild.style.height="";a.push(f)}this.normalizeRowNodeHeights(a)},getViewWidth:function(d){return this.views[d].getWidth()||this.defaultWidth},measureHeader:function(){this.resetHeaderNodeHeight();
this.forEach(function(a){a.headerContentNode.style.height=""});var d=0;this.forEach(function(a){d=Math.max(a.headerNode.offsetHeight,d)});return d},measureContent:function(){var d=0;this.forEach(function(a){d=Math.max(a.domNode.offsetHeight,d)});return d},findClient:function(){var d=this.grid.elasticView||-1;if(d<0)for(var a=1,c;c=this.views[a];a++)if(c.viewWidth){for(a=1;c=this.views[a];a++)if(!c.viewWidth){d=a;break}break}if(d<0)d=Math.floor(this.views.length/2);return d},arrange:function(d,a){var c,
e,f,h=this.views.length,i=a<=0?h:this.findClient(),g=function(k,m){var l=k.domNode.style,n=k.headerNode.style;if(b._isBodyLtr()){l.left=m+"px";n.left=m+"px"}else{l.right=m+"px";if(b.isMoz){n.right=m+k.getScrollbarWidth()+"px";n.width=parseInt(n.width,10)-k.getScrollbarWidth()+"px"}else n.right=m+"px"}l.top="0px";n.top=0};for(c=0;(e=this.views[c])&&c<i;c++){f=this.getViewWidth(c);e.setSize(f,0);g(e,d);f=e.headerContentNode&&e.headerContentNode.firstChild?e.getColumnsWidth()+e.getScrollbarWidth():e.domNode.offsetWidth;
d+=f}c++;a=a;for(var j=h-1;(e=this.views[j])&&c<=j;j--){f=this.getViewWidth(j);e.setSize(f,0);f=e.domNode.offsetWidth;a-=f;g(e,a)}if(i<h){e=this.views[i];f=Math.max(1,a-d);e.setSize(f+"px",0);g(e,d)}return d},renderRow:function(d,a,c){for(var e=[],f=0,h,i;(h=this.views[f])&&(i=a[f]);f++){h=h.renderRow(d);i.appendChild(h);e.push(h)}c||this.normalizeRowNodeHeights(e)},rowRemoved:function(d){this.onEach("rowRemoved",[d])},updateRow:function(d,a){for(var c=0,e;e=this.views[c];c++)e.updateRow(d);a||this.renormalizeRow(d)},
updateRowStyles:function(d){this.onEach("updateRowStyles",[d])},setScrollTop:function(d){for(var a=d,c=0,e;e=this.views[c];c++){a=e.setScrollTop(d);if(b.isIE&&e.headerNode&&e.scrollboxNode)e.headerNode.scrollLeft=e.scrollboxNode.scrollLeft}return a},getFirstScrollingView:function(){for(var d=0,a;a=this.views[d];d++)if(a.hasHScrollbar()||a.hasVScrollbar())return a;return null}})});
define("dojox/grid/_RowManager",["dojo","dijit","dojox"],function(b){(function(){var d=function(a,c){if(a.style.cssText==undefined)a.setAttribute("style",c);else a.style.cssText=c};b.declare("dojox.grid._RowManager",null,{constructor:function(a){this.grid=a},linesToEms:2,overRow:-2,prepareStylingRow:function(a,c){return{index:a,node:c,odd:Boolean(a&1),selected:!!this.grid.selection.isSelected(a),over:this.isOver(a),customStyles:"",customClasses:"dojoxGridRow"}},styleRowNode:function(a,c){a=this.prepareStylingRow(a,
c);this.grid.onStyleRow(a);this.applyStyles(a)},applyStyles:function(a){a.node.className=a.customClasses;var c=a.node.style.height;d(a.node,a.customStyles+";"+(a.node._style||""));a.node.style.height=c},updateStyles:function(a){this.grid.updateRowStyles(a)},setOverRow:function(a){var c=this.overRow;this.overRow=a;if(c!=this.overRow&&(b.isString(c)||c>=0))this.updateStyles(c);this.updateStyles(this.overRow)},isOver:function(a){return this.overRow==a&&!b.hasClass(this.grid.domNode,"dojoxGridColumnResizing")}})})()});
define("dojox/grid/_FocusManager",["dojo","dijit","dojox","dojox/grid/util"],function(b,d,a){b.declare("dojox.grid._FocusManager",null,{constructor:function(c){this.grid=c;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(b.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(b.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(b.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));
this._connects.push(b.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(b.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(b.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(b.connect(this.grid,"postrender",this,"_delayedHeaderFocus"))},destroy:function(){b.forEach(this._connects,b.disconnect);b.forEach(this._headerConnects,b.disconnect);delete this.grid;delete this.cell},_colHeadNode:null,
_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders()},isFocusCell:function(c,e){return this.cell==c&&this.rowIndex==e},isLastFocusCell:function(){if(this.cell)return this.rowIndex==this.grid.rowCount-1&&this.cell.index==this.grid.layout.cellCount-1;return false},isFirstFocusCell:function(){if(this.cell)return this.rowIndex===
0&&this.cell.index===0;return false},isNoFocusCell:function(){return this.rowIndex<0||!this.cell},isNavHeader:function(){return!!this._colHeadNode},getHeaderIndex:function(){return this._colHeadNode?b.indexOf(this._findHeaderCells(),this._colHeadNode):-1},_focusifyCellNode:function(c){var e=this.cell&&this.cell.getNode(this.rowIndex);if(e){b.toggleClass(e,this.focusClass,c);if(c){c=this.scrollIntoView();try{if(!this.grid.edit.isEditing()){a.grid.util.fire(e,"focus");if(c)this.cell.view.scrollboxNode.scrollLeft=
c}}catch(f){}}}},_delayedCellFocus:function(){if(!(this.isNavHeader()||!this.grid._focused)){var c=this.cell&&this.cell.getNode(this.rowIndex);if(c)try{if(!this.grid.edit.isEditing()){b.toggleClass(c,this.focusClass,true);this.blurHeader();a.grid.util.fire(c,"focus")}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();this.grid.domNode.focus()}},_initColumnHeaders:function(){b.forEach(this._headerConnects,b.disconnect);this._headerConnects=[];for(var c=this._findHeaderCells(),
e=0;e<c.length;e++){this._headerConnects.push(b.connect(c[e],"onfocus",this,"doColHeaderFocus"));this._headerConnects.push(b.connect(c[e],"onblur",this,"doColHeaderBlur"))}},_findHeaderCells:function(){for(var c=b.query("th",this.grid.viewsHeaderNode),e=[],f=0;f<c.length;f++){var h=c[f],i=b.hasAttr(h,"tabIndex"),g=b.attr(h,"tabIndex");i&&g<0&&e.push(h)}return e},_setActiveColHeader:function(c,e,f){b.attr(this.grid.domNode,"aria-activedescendant",c.id);f!=null&&f>=0&&f!=e&&b.toggleClass(this._findHeaderCells()[f],
this.focusClass,false);b.toggleClass(c,this.focusClass,true);this._colHeadNode=c;this._colHeadFocusIdx=e;this._scrollHeader(this._colHeadFocusIdx)},scrollIntoView:function(){var c=this.cell?this._scrollInfo(this.cell):null;if(!c||!c.s)return null;var e=this.grid.scroller.findScrollTop(this.rowIndex);if(c.n&&c.sr)if(c.n.offsetLeft+c.n.offsetWidth>c.sr.l+c.sr.w)c.s.scrollLeft=c.n.offsetLeft+c.n.offsetWidth-c.sr.w;else if(c.n.offsetLeft<c.sr.l)c.s.scrollLeft=c.n.offsetLeft;if(c.r&&c.sr)if(e+c.r.offsetHeight>
c.sr.t+c.sr.h)this.grid.setScrollTop(e+c.r.offsetHeight-c.sr.h);else e<c.sr.t&&this.grid.setScrollTop(e);return c.s.scrollLeft},_scrollInfo:function(c,e){if(c){var f=c.view.scrollboxNode,h={w:f.clientWidth,l:f.scrollLeft,t:f.scrollTop,h:f.clientHeight},i=c.view.getRowNode(this.rowIndex);return{c:c,s:f,sr:h,n:e?e:c.getNode(this.rowIndex),r:i}}return null},_scrollHeader:function(c){var e=null;if(this._colHeadNode){var f=this.grid.getCell(c);e=this._scrollInfo(f,f.getNode(0))}if(e&&e.s&&e.sr&&e.n)if(e.n.offsetLeft+
e.n.offsetWidth>e.sr.l+e.sr.w)e.s.scrollLeft=e.n.offsetLeft+e.n.offsetWidth-e.sr.w;else if(e.n.offsetLeft<e.sr.l)e.s.scrollLeft=e.n.offsetLeft;else if(b.isIE<=7&&f&&f.view.headerNode)f.view.headerNode.scrollLeft=e.s.scrollLeft},_isHeaderHidden:function(){var c=this.focusView;if(!c)for(var e=0,f;f=this.grid.views.views[e];e++)if(f.headerNode){c=f;break}return c&&b.getComputedStyle(c.headerNode).display=="none"},colSizeAdjust:function(c,e,f){var h=this._findHeaderCells(),i=this.focusView;if(!i)for(var g=
0,j;j=this.grid.views.views[g];g++)if(j.header.tableMap.map){i=j;break}g=h[e];if(!(!i||e==h.length-1&&e===0)){i.content.baseDecorateEvent(c);c.cellNode=g;c.cellIndex=i.content.getCellNodeIndex(c.cellNode);c.cell=c.cellIndex>=0?this.grid.getCell(c.cellIndex):null;if(i.header.canResize(c)){e={l:f};c=i.header.colResizeSetup(c,false);i.header.doResizeColumn(c,null,e);i.update()}}},styleRow:function(){},setFocusIndex:function(c,e){this.setFocusCell(this.grid.getCell(e),c)},setFocusCell:function(c,e){if(c&&
!this.isFocusCell(c,e)){this.tabbingOut=false;this._colHeadNode&&this.blurHeader();this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=c;this.rowIndex=e;this._focusifyCellNode(true)}b.isOpera?setTimeout(b.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1):this.grid.onCellFocus(this.cell,this.rowIndex)},next:function(){if(this.cell){var c=this.rowIndex,e=this.cell.index+1,f=this.grid.layout.cellCount-1,h=this.grid.rowCount-1;if(e>f){e=0;
c++}if(c>h){e=f;c=h}if(this.grid.edit.isEditing()){f=this.grid.getCell(e);if(!this.isLastFocusCell()&&(!f.editable||this.grid.canEdit&&!this.grid.canEdit(f,c))){this.cell=f;this.rowIndex=c;this.next();return}}this.setFocusIndex(c,e)}},previous:function(){if(this.cell){var c=this.rowIndex||0,e=(this.cell.index||0)-1;if(e<0){e=this.grid.layout.cellCount-1;c--}if(c<0)e=c=0;if(this.grid.edit.isEditing()){var f=this.grid.getCell(e);if(!this.isFirstFocusCell()&&!f.editable){this.cell=f;this.rowIndex=c;
this.previous();return}}this.setFocusIndex(c,e)}},move:function(c,e){var f=e<0?-1:1;if(this.isNavHeader()){c=this._findHeaderCells();var h=currentIdx=b.indexOf(c,this._colHeadNode);for(currentIdx+=e;currentIdx>=0&&currentIdx<c.length&&c[currentIdx].style.display=="none";)currentIdx+=f;currentIdx>=0&&currentIdx<c.length&&this._setActiveColHeader(c[currentIdx],currentIdx,h)}else if(this.cell){var i=this.grid.scroller;h=this.rowIndex;var g=this.grid.rowCount-1,j=Math.min(g,Math.max(0,h+c));if(c)if(c>
0)j>i.getLastPageRow(i.page)&&this.grid.setScrollTop(this.grid.scrollTop+i.findScrollTop(j)-i.findScrollTop(h));else c<0&&j<=i.getPageRow(i.page)&&this.grid.setScrollTop(this.grid.scrollTop-i.findScrollTop(h)-i.findScrollTop(j));i=this.grid.layout.cellCount-1;for(var k=this.cell.index,m=Math.min(i,Math.max(0,k+e)),l=this.grid.getCell(m);m>=0&&m<i&&l&&l.hidden===true;){m+=f;l=this.grid.getCell(m)}if(!l||l.hidden===true)m=k;f=l.getNode(j);if(!f&&c){if(j+c>=0&&j+c<=g)this.move(c>0?++c:--c,e)}else if((!f||
b.style(f,"display")==="none")&&e){if(m+c>=0&&m+c<=i)this.move(c,e>0?++e:--e)}else{this.setFocusIndex(j,m);c&&this.grid.updateRow(h)}}},previousKey:function(c){if(this.grid.edit.isEditing()){b.stopEvent(c);this.previous()}else if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();b.stopEvent(c)}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){b.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null}this._focusifyCellNode(false)}},
nextKey:function(c){if(c.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();b.stopEvent(c)}else if(this.isNavHeader()){this.blurHeader();this.findAndFocusGridCell()||this.tabOut(this.grid.lastFocusNode);this._colHeadNode=this._colHeadFocusIdx=null}else if(this.grid.edit.isEditing()){b.stopEvent(c);this.next()}else this.tabOut(this.grid.lastFocusNode)},tabOut:function(c){this.tabbingOut=true;c.focus()},focusGridView:function(){a.grid.util.fire(this.focusView,"focus")},focusGrid:function(){this.focusGridView();
this._focusifyCellNode(true)},findAndFocusGridCell:function(){var c=true,e=this.grid.rowCount===0;if(this.isNoFocusCell()&&!e){e=0;if(this.grid.getCell(e).hidden)e=this.isNavHeader()?this._colHeadFocusIdx:0;this.setFocusIndex(0,e)}else if(this.cell&&!e){this.focusView&&!this.focusView.rowNodes[this.rowIndex]&&this.grid.scrollToRow(this.rowIndex);this.focusGrid()}else c=false;this._colHeadNode=this._colHeadFocusIdx=null;return c},focusHeader:function(){var c=this._findHeaderCells(),e=this._colHeadFocusIdx;
if(this._isHeaderHidden())this.findAndFocusGridCell();else if(!this._colHeadFocusIdx)this._colHeadFocusIdx=this.isNoFocusCell()?0:this.cell.index;for(this._colHeadNode=c[this._colHeadFocusIdx];this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<c.length&&this._colHeadNode.style.display=="none";){this._colHeadFocusIdx++;this._colHeadNode=c[this._colHeadFocusIdx]}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);
this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,e);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false)}else this.findAndFocusGridCell()},blurHeader:function(){b.removeClass(this._colHeadNode,this.focusClass);b.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var c=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);
this.headerMenu.bindDomNode(c);this._contextMenuBindNode=c}},doFocus:function(c){if(!(c&&c.target!=c.currentTarget)){this.tabbingOut||this.focusHeader();this.tabbingOut=false}b.stopEvent(c)},doBlur:function(c){b.stopEvent(c)},doContextMenu:function(c){this.headerMenu||b.stopEvent(c)},doLastNodeFocus:function(c){if(this.tabbingOut)this._focusifyCellNode(false);else if(this.grid.rowCount>0){this.isNoFocusCell()&&this.setFocusIndex(0,0);this._focusifyCellNode(true)}else this.focusHeader();this.tabbingOut=
false;b.stopEvent(c)},doLastNodeBlur:function(c){b.stopEvent(c)},doColHeaderFocus:function(c){this._setActiveColHeader(c.target,b.attr(c.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());b.stopEvent(c)},doColHeaderBlur:function(c){b.toggleClass(c.target,this.focusClass,false)}})});
define("dojox/grid/_EditManager",["dojo","dijit","dojox","dojox/grid/util"],function(b,d,a){b.declare("dojox.grid._EditManager",null,{constructor:function(c){this.grid=c;this.connections=b.isIE?[b.connect(document.body,"onfocus",b.hitch(this,"_boomerangFocus"))]:[b.connect(this.grid,"onBlur",this,"apply")]},info:{},destroy:function(){b.forEach(this.connections,b.disconnect)},cellFocus:function(c,e){this.grid.singleClickEdit||this.isEditRow(e)?this.setEditCell(c,e):this.apply();if(this.isEditing()||
c&&c.editable&&c.alwaysEditing)this._focusEditor(c,e)},rowClick:function(c){this.isEditing()&&!this.isEditRow(c.rowIndex)&&this.apply()},styleRow:function(c){if(c.index==this.info.rowIndex)c.customClasses+=" dojoxGridRowEditing"},dispatchEvent:function(c){var e=c.cell;return(e=e&&e.editable?e:0)&&e.dispatchEvent(c.dispatch,c)},isEditing:function(){return this.info.rowIndex!==undefined},isEditCell:function(c,e){return this.info.rowIndex===c&&this.info.cell.index==e},isEditRow:function(c){return this.info.rowIndex===
c},setEditCell:function(c,e){if(!this.isEditCell(e,c.index)&&this.grid.canEdit&&this.grid.canEdit(c,e))this.start(c,e,this.isEditRow(e)||c.editable)},_focusEditor:function(c,e){a.grid.util.fire(c,"focus",[e])},focusEditor:function(){this.isEditing()&&this._focusEditor(this.info.cell,this.info.rowIndex)},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>(new Date).getTime()},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();
this._catchBoomerang=0}},_doCatchBoomerang:function(){if(b.isIE)this._catchBoomerang=(new Date).getTime()+this._boomerangWindow},start:function(c,e,f){this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(e)){this.applyRowEdit();this.grid.updateRow(e)}if(f){this.info={cell:c,rowIndex:e};this.grid.doStartEdit(c,e);this.grid.updateRow(e)}else this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(c,e);this._doCatchBoomerang()},_editorDo:function(c){var e=
this.info.cell;e&&e.editable&&e[c](this.info.rowIndex)},editorApply:function(){this._editorDo("apply")},editorCancel:function(){this._editorDo("cancel")},applyCellEdit:function(c,e,f){this.grid.canEdit(e,f)&&this.grid.doApplyCellEdit(c,f,e.field)},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field)},apply:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang()}},
cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang()}},save:function(c,e){var f=this.info.cell;if(this.isEditRow(c)&&(!e||f.view==e)&&f.editable)f.save(f,this.info.rowIndex)},restore:function(c,e){var f=this.info.cell;this.isEditRow(e)&&f.view==c&&f.editable&&f.restore(f,this.info.rowIndex)}})});
define("dojox/grid/Selection",["dojo","dijit","dojox"],function(b){b.declare("dojox.grid.Selection",null,{constructor:function(d){this.grid=d;this.selected=[];this.setMode(d.selectionMode)},mode:"extended",selected:null,updating:0,selectedIndex:-1,setMode:function(d){this.selected.length&&this.deselectAll();this.mode=d!="extended"&&d!="multiple"&&d!="single"&&d!="none"?"extended":d},onCanSelect:function(d){return this.grid.onCanSelect(d)},onCanDeselect:function(d){return this.grid.onCanDeselect(d)},
onSelected:function(){},onDeselected:function(){},onChanging:function(){},onChanged:function(){},isSelected:function(d){if(this.mode=="none")return false;return this.selected[d]},getFirstSelected:function(){if(!this.selected.length||this.mode=="none")return-1;for(var d=0,a=this.selected.length;d<a;d++)if(this.selected[d])return d;return-1},getNextSelected:function(d){if(this.mode=="none")return-1;d=d+1;for(var a=this.selected.length;d<a;d++)if(this.selected[d])return d;return-1},getSelected:function(){for(var d=
[],a=0,c=this.selected.length;a<c;a++)this.selected[a]&&d.push(a);return d},getSelectedCount:function(){for(var d=0,a=0;a<this.selected.length;a++)this.selected[a]&&d++;return d},_beginUpdate:function(){this.updating===0&&this.onChanging();this.updating++},_endUpdate:function(){this.updating--;this.updating===0&&this.onChanged()},select:function(d){if(this.mode!="none")if(this.mode!="multiple"){this.deselectAll(d);this.addToSelection(d)}else this.toggleSelect(d)},addToSelection:function(d){if(this.mode!=
"none")if(b.isArray(d))b.forEach(d,this.addToSelection,this);else{d=Number(d);if(this.selected[d])this.selectedIndex=d;else if(this.onCanSelect(d)!==false){this.selectedIndex=d;var a=this.grid.getRowNode(d);a&&b.attr(a,"aria-selected","true");this._beginUpdate();this.selected[d]=true;this.onSelected(d);this._endUpdate()}}},deselect:function(d){if(this.mode!="none")if(b.isArray(d))b.forEach(d,this.deselect,this);else{d=Number(d);if(this.selectedIndex==d)this.selectedIndex=-1;if(this.selected[d])if(this.onCanDeselect(d)!==
false){var a=this.grid.getRowNode(d);a&&b.attr(a,"aria-selected","false");this._beginUpdate();delete this.selected[d];this.onDeselected(d);this._endUpdate()}}},setSelected:function(d,a){this[a?"addToSelection":"deselect"](d)},toggleSelect:function(d){b.isArray(d)?b.forEach(d,this.toggleSelect,this):this.setSelected(d,!this.selected[d])},_range:function(d,a,c){var e=d>=0?d:a;d=a;if(e>d){d=e;e=a}for(a=e;a<=d;a++)c(a)},selectRange:function(d,a){this._range(d,a,b.hitch(this,"addToSelection"))},deselectRange:function(d,
a){this._range(d,a,b.hitch(this,"deselect"))},insert:function(d){this.selected.splice(d,0,false);this.selectedIndex>=d&&this.selectedIndex++},remove:function(d){this.selected.splice(d,1);this.selectedIndex>=d&&this.selectedIndex--},deselectAll:function(d){for(var a in this.selected)a!=d&&this.selected[a]===true&&this.deselect(a)},clickSelect:function(d,a,c){if(this.mode!="none"){this._beginUpdate();if(this.mode!="extended")this.select(d);else{var e=this.selectedIndex;a||this.deselectAll(d);if(c)this.selectRange(e,
d);else a?this.toggleSelect(d):this.addToSelection(d)}this._endUpdate()}},clickSelectEvent:function(d){this.clickSelect(d.rowIndex,b.isCopyKey(d),d.shiftKey)},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate()}})});
define("dojox/grid/_Events",["dojo","dijit","dojox"],function(b){b.declare("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(d){this.dispatchKeyEvent(d)},onContentEvent:function(d){this.dispatchContentEvent(d)},onHeaderEvent:function(d){this.dispatchHeaderEvent(d)},onStyleRow:function(d){d.customClasses+=(d.odd?" dojoxGridRowOdd":"")+(d.selected?" dojoxGridRowSelected":"")+(d.over?" dojoxGridRowOver":"");this.focus.styleRow(d);this.edit.styleRow(d)},onKeyDown:function(d){if(!(d.altKey||
d.metaKey)){var a=b.keys,c;switch(d.keyCode){case a.ESCAPE:this.edit.cancel();break;case a.ENTER:if(!this.edit.isEditing()){c=this.focus.getHeaderIndex();if(c>=0){this.setSortIndex(c);break}else this.selection.clickSelect(this.focus.rowIndex,b.isCopyKey(d),d.shiftKey);b.stopEvent(d)}if(!d.shiftKey){a=this.edit.isEditing();this.edit.apply();a||this.edit.setEditCell(this.focus.cell,this.focus.rowIndex)}if(!this.edit.isEditing()){(this.focus.focusView||this.views.views[0]).content.decorateEvent(d);this.onRowClick(d);
b.stopEvent(d)}break;case a.SPACE:if(!this.edit.isEditing()){c=this.focus.getHeaderIndex();if(c>=0){this.setSortIndex(c);break}else this.selection.clickSelect(this.focus.rowIndex,b.isCopyKey(d),d.shiftKey);b.stopEvent(d)}break;case a.TAB:this.focus[d.shiftKey?"previousKey":"nextKey"](d);break;case a.LEFT_ARROW:case a.RIGHT_ARROW:if(!this.edit.isEditing()){var e=d.keyCode;b.stopEvent(d);c=this.focus.getHeaderIndex();if(c>=0&&d.shiftKey&&d.ctrlKey)this.focus.colSizeAdjust(d,c,(e==a.LEFT_ARROW?-1:1)*
5);else{d=e==a.LEFT_ARROW?1:-1;if(b._isBodyLtr())d*=-1;this.focus.move(0,d)}}break;case a.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){b.stopEvent(d);this.focus.move(-1,0)}break;case a.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){b.stopEvent(d);this.focus.move(1,0)}break;case a.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){b.stopEvent(d);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1)this.focus.move(this.scroller.firstVisibleRow-
this.focus.rowIndex,0);else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0)}}break;case a.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){b.stopEvent(d);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1)this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-
this.scroller.firstVisibleRow-1,0)}}break;default:break}}},onMouseOver:function(d){d.rowIndex==-1?this.onHeaderCellMouseOver(d):this.onCellMouseOver(d)},onMouseOut:function(d){d.rowIndex==-1?this.onHeaderCellMouseOut(d):this.onCellMouseOut(d)},onMouseDown:function(d){d.rowIndex==-1?this.onHeaderCellMouseDown(d):this.onCellMouseDown(d)},onMouseOverRow:function(d){if(!this.rows.isOver(d.rowIndex)){this.rows.setOverRow(d.rowIndex);d.rowIndex==-1?this.onHeaderMouseOver(d):this.onRowMouseOver(d)}},onMouseOutRow:function(d){if(this.rows.isOver(-1))this.onHeaderMouseOut(d);
else if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(d)}},onMouseDownRow:function(d){d.rowIndex!=-1&&this.onRowMouseDown(d)},onCellMouseOver:function(d){d.cellNode&&b.addClass(d.cellNode,this.cellOverClass)},onCellMouseOut:function(d){d.cellNode&&b.removeClass(d.cellNode,this.cellOverClass)},onCellMouseDown:function(){},onCellClick:function(d){this._click[0]=this._click[1];this._click[1]=d;this.edit.isEditCell(d.rowIndex,d.cellIndex)||this.focus.setFocusCell(d.cell,d.rowIndex);
this.onRowClick(d)},onCellDblClick:function(d){if(this._click.length>1&&b.isIE)this.edit.setEditCell(this._click[1].cell,this._click[1].rowIndex);else this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex?this.edit.setEditCell(this._click[0].cell,this._click[0].rowIndex):this.edit.setEditCell(d.cell,d.rowIndex);this.onRowDblClick(d)},onCellContextMenu:function(d){this.onRowContextMenu(d)},onCellFocus:function(d,a){this.edit.cellFocus(d,a)},onRowClick:function(d){this.edit.rowClick(d);
this.selection.clickSelectEvent(d)},onRowDblClick:function(){},onRowMouseOver:function(){},onRowMouseOut:function(){},onRowMouseDown:function(){},onRowContextMenu:function(d){b.stopEvent(d)},onHeaderMouseOver:function(){},onHeaderMouseOut:function(){},onHeaderCellMouseOver:function(d){d.cellNode&&b.addClass(d.cellNode,this.cellOverClass)},onHeaderCellMouseOut:function(d){d.cellNode&&b.removeClass(d.cellNode,this.cellOverClass)},onHeaderCellMouseDown:function(){},onHeaderClick:function(){},onHeaderCellClick:function(d){this.setSortIndex(d.cell.index);
this.onHeaderClick(d)},onHeaderDblClick:function(){},onHeaderCellDblClick:function(d){this.onHeaderDblClick(d)},onHeaderCellContextMenu:function(d){this.onHeaderContextMenu(d)},onHeaderContextMenu:function(d){this.headerMenu||b.stopEvent(d)},onStartEdit:function(){},onApplyCellEdit:function(){},onCancelEdit:function(){},onApplyEdit:function(){},onCanSelect:function(){return true},onCanDeselect:function(){return true},onSelected:function(d){this.updateRowStyles(d)},onDeselected:function(d){this.updateRowStyles(d)},
onSelectionChanged:function(){}})});
define("dojox/grid/_Grid",["dojo","dijit","dojox","dijit/dijit","dijit/Menu","dojox/html/metrics","dojox/grid/util","dojox/grid/_Scroller","dojox/grid/_Layout","dojox/grid/_View","dojox/grid/_ViewManager","dojox/grid/_RowManager","dojox/grid/_FocusManager","dojox/grid/_EditManager","dojox/grid/Selection","dojox/grid/_RowSelector","dojox/grid/_Events","i18n!dijit/nls/loading"],function(b,d,a){a.grid=a.grid||{};(function(){if(!b.isCopyKey)b.isCopyKey=b.dnd.getCopyKeyState;b.declare("dojox.grid._Grid",
[d._Widget,d._Templated,a.grid._Events],{templatePath:b.moduleUrl("dojox.grid","resources/_Grid.html"),classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",
errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,sortInfo:0,themeable:true,_placeholders:null,_layoutClass:a.grid._Layout,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex"))this.domNode.tabIndex="0";this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,
"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");a.html.metrics.initOnFontResize();this.connect(a.html.metrics,"onFontResize","textSizeChanged");a.grid.util.funnelEvents(this.domNode,this,"doKeyEvent",a.grid.util.keyEvents);if(this.selectionMode!="none")b.attr(this.domNode,"aria-multiselectable",this.selectionMode=="single"?"false":"true");b.addClass(this.domNode,this.classTag);this.isLeftToRight()||b.addClass(this.domNode,this.classTag+"Rtl")},postMixInProperties:function(){this.inherited(arguments);
var c=b.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=b.string.substitute(this.loadingMessage,c);this.errorMessage=b.string.substitute(this.errorMessage,c);if(this.srcNodeRef&&this.srcNodeRef.style.height)this.height=this.srcNodeRef.style.height;this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);
if(this.domNode&&this.autoWidth&&this.initialWidth)this.domNode.style.width=this.initialWidth;this.domNode&&!this.editable&&b.attr(this.domNode,"aria-readonly","true")},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.scroller){this.scroller.destroy();delete this.scroller}if(this.focus){this.focus.destroy();delete this.focus}if(this.headerMenu&&this._placeholders.length){b.forEach(this._placeholders,
function(c){c.unReplace(true)});this.headerMenu.unBindDomNode(this.viewsHeaderNode)}this.inherited(arguments)},_setAutoHeightAttr:function(c,e){if(typeof c=="string")c=!c||c=="false"?false:c=="true"?true:window.parseInt(c,10);if(typeof c=="number"){if(isNaN(c))c=false;if(c<0)c=true;else if(c===0)c=false}this.autoHeight=c;this._autoHeight=typeof c=="boolean"?c:typeof c=="number"?c>=this.get("rowCount"):false;this._started&&!e&&this.render()},_getRowCountAttr:function(){return this.updating&&this.invalidated&&
this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount},textSizeChanged:function(){this.render()},sizeChange:function(){this.update()},createManagers:function(){this.rows=new a.grid._RowManager(this);this.focus=new a.grid._FocusManager(this);this.edit=new a.grid._EditManager(this)},createSelection:function(){this.selection=new a.grid.Selection(this)},createScroller:function(){this.scroller=new a.grid._Scroller;this.scroller.grid=this;this.scroller.renderRow=b.hitch(this,"renderRow");
this.scroller.removeRow=b.hitch(this,"rowRemoved")},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn")},onMoveColumn:function(){this.render()},onResizeColumn:function(){},createViews:function(){this.views=new a.grid._ViewManager(this);this.views.createView=b.hitch(this,"createView")},createView:function(c,e){c=new (b.getObject(c))({grid:this,index:e});this.viewsNode.appendChild(c.domNode);this.viewsHeaderNode.appendChild(c.headerNode);
this.views.addView(c);b.attr(this.domNode,"align",b._isBodyLtr()?"left":"right");return c},buildViews:function(){for(var c=0,e;e=this.layout.structure[c];c++)this.createView(e.type||a._scopeName+".grid._View",c).setStructure(e);this.scroller.setContentNodes(this.views.getContentNodes())},_setStructureAttr:function(c){if((c=c)&&b.isString(c)){b.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0");c=b.getObject(c)}this.structure=c;if(!c)if(this.layout.structure)c=
this.layout.structure;else return;this.views.destroyViews();this.focus.focusView=null;c!==this.layout.structure&&this.layout.setStructure(c);this._structureChanged()},setStructure:function(c){b.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(c)},getColumnTogglingItems:function(){return b.map(this.layout.cells,function(c){if(!c.menuItems)c.menuItems=[];var e=this,f=new d.CheckedMenuItem({label:c.name,checked:!c.hidden,
_gridCell:c,onChange:function(h){if(e.layout.setColumnVisibility(this._gridCell.index,h)){var i=this._gridCell.menuItems;i.length>1&&b.forEach(i,function(g){g!==this&&g.setAttribute("checked",h)},this);h=b.filter(e.layout.cells,function(g){g.menuItems.length>1?b.forEach(g.menuItems,"item.set('disabled', false);"):g.menuItems[0].set("disabled",false);return!g.hidden});h.length==1&&b.forEach(h[0].menuItems,"item.set('disabled', true);")}},destroy:function(){this._gridCell.menuItems.splice(b.indexOf(this._gridCell.menuItems,
this),1);delete this._gridCell;d.CheckedMenuItem.prototype.destroy.apply(this,arguments)}});c.menuItems.push(f);return f},this)},_setHeaderMenuAttr:function(c){if(this._placeholders&&this._placeholders.length){b.forEach(this._placeholders,function(e){e.unReplace(true)});this._placeholders=[]}this.headerMenu&&this.headerMenu.unBindDomNode(this.viewsHeaderNode);if(this.headerMenu=c){this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders)this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel)}},
setHeaderMenu:function(c){b.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(c)},setupHeaderMenu:function(){this._placeholders&&this._placeholders.length&&b.forEach(this._placeholders,function(c){c._replaced&&c.unReplace(true);c.replace(this.getColumnTogglingItems())},this)},_fetch:function(){this.setScrollTop(0)},getItem:function(){return null},showMessage:function(c){if(c){this.messagesNode.innerHTML=c;this.messagesNode.style.display=
""}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none"}},_structureChanged:function(){this.buildViews();this.autoRender&&this._started&&this.render()},hasLayout:function(){return this.layout.cells.length},resize:function(c,e){this._pendingChangeSize=c;this._pendingResultSize=e;this.sizeChange()},_getPadBorder:function(){return this._padBorder=this._padBorder||b._getPadBorderExtents(this.domNode)},_getHeaderHeight:function(){var c=this.viewsHeaderNode.style,e=c.display=="none"?
0:this.views.measureHeader();c.height=e+"px";this.views.normalizeHeaderNodeHeight();return e},_resize:function(c,e){c=c||this._pendingChangeSize;e=e||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(this.domNode){var f=this.domNode.parentNode;if(!(!f||f.nodeType!=1||!this.hasLayout()||f.style.visibility=="hidden"||f.style.display=="none")){var h=this._getPadBorder(),i=undefined,g;if(this._autoHeight)this.domNode.style.height="auto";else if(typeof this.autoHeight==
"number"){g=i=this._getHeaderHeight();g+=this.scroller.averageRowHeight*this.autoHeight;this.domNode.style.height=g+"px"}else if(this.domNode.clientHeight<=h.h)if(f==document.body)this.domNode.style.height=this.defaultHeight;else if(this.height)this.domNode.style.height=this.height;else this.fitTo="parent";if(e)c=e;if(c){b.marginBox(this.domNode,c);this.height=this.domNode.style.height;delete this.fitTo}else if(this.fitTo=="parent"){g=this._parentContentBoxHeight=this._parentContentBoxHeight||b._getContentBox(f).h;
this.domNode.style.height=Math.max(0,g)+"px"}c=b.some(this.views.views,function(j){return j.flexCells});if(!this._autoHeight&&(g||b._getContentBox(this.domNode).h)===0)this.viewsHeaderNode.style.display="none";else{this.viewsHeaderNode.style.display="block";if(!c&&i===undefined)i=this._getHeaderHeight()}if(c)i=undefined;this.adaptWidth();this.adaptHeight(i);this.postresize()}}},adaptWidth:function(){var c=!this.initialWidth&&this.autoWidth,e=this.views.arrange(1,c?0:this.domNode.clientWidth||this.domNode.offsetWidth-
this._getPadBorder().w);this.views.onEach("adaptWidth");if(c)this.domNode.style.width=e+"px"},adaptHeight:function(c){c=c===undefined?this._getHeaderHeight():c;var e=this._autoHeight?-1:Math.max(this.domNode.clientHeight-c,0)||0;this.views.onEach("setSize",[0,e]);this.views.onEach("adaptHeight");if(!this._autoHeight){var f=0,h=0,i=b.filter(this.views.views,function(g){if(g=g.hasHScrollbar())f++;else h++;return!g});f>0&&h>0&&b.forEach(i,function(g){g.adaptHeight(true)})}this.scroller.windowHeight=
this.autoHeight===true||e!=-1||typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount")?e:Math.max(this.domNode.clientHeight-c,0)},startup:function(){if(!this._started){this.inherited(arguments);this.autoRender&&this.render()}},render:function(){if(this.domNode)if(this._started)if(this.hasLayout()){this.update=this.defaultUpdate;this._render()}else this.scroller.init(0,this.keepRows,this.rowsPerPage)},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);
this.prerender();this.setScrollTop(0);this.postrender()},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize()},postrender:function(){this.postresize();this.focus.initFocusView();b.setSelectable(this.domNode,this.selectable)},postresize:function(){if(this._autoHeight)this.viewsNode.style.height=Math.max(this.views.measureContent())+"px"},renderRow:function(c,e){this.views.renderRow(c,e,this._skipRowRenormalize)},
rowRemoved:function(c){this.views.rowRemoved(c)},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true},endUpdate:function(){this.updating=false;var c=this.invalidated,e;if(c.all)this.update();else if(c.rowCount!=undefined)this.updateRowCount(c.rowCount);else for(e in c)this.updateRow(Number(e));this.invalidated=[]},defaultUpdate:function(){if(this.domNode)if(this.updating)this.invalidated.all=true;else{this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();
this.setScrollTop(this.lastScrollTop);this.postrender()}},update:function(){this.render()},updateRow:function(c){c=Number(c);if(this.updating)this.invalidated[c]=true;else{this.views.updateRow(c);this.scroller.rowHeightChanged(c)}},updateRows:function(c,e){c=Number(c);e=Number(e);var f;if(this.updating)for(f=0;f<e;f++)this.invalidated[f+c]=true;else{for(f=0;f<e;f++)this.views.updateRow(f+c,this._skipRowRenormalize);this.scroller.rowHeightChanged(c)}},updateRowCount:function(c){if(this.updating)this.invalidated.rowCount=
c;else{this.rowCount=c;this._setAutoHeightAttr(this.autoHeight,true);this.layout.cells.length&&this.scroller.updateRowCount(c);this._resize();this.layout.cells.length&&this.setScrollTop(this.scrollTop)}},updateRowStyles:function(c){this.views.updateRowStyles(c)},getRowNode:function(c){if(this.focus.focusView&&!(this.focus.focusView instanceof a.grid._RowSelector))return this.focus.focusView.rowNodes[c];else for(var e=0,f;f=this.views.views[e];e++)if(!(f instanceof a.grid._RowSelector))return f.rowNodes[c];
return null},rowHeightChanged:function(c){this.views.renormalizeRow(c);this.scroller.rowHeightChanged(c)},fastScroll:true,delayScroll:false,scrollRedrawThreshold:b.isIE?100:50,scrollTo:function(c){if(this.fastScroll){var e=Math.abs(this.lastScrollTop-c);this.lastScrollTop=c;if(e>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=c;this.views.setScrollTop(c);this._pendingScroll&&window.clearTimeout(this._pendingScroll);var f=this;this._pendingScroll=window.setTimeout(function(){delete f._pendingScroll;
f.finishScrollJob()},200)}else this.setScrollTop(c)}else this.setScrollTop(c)},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop)},setScrollTop:function(c){this.scroller.scroll(this.views.setScrollTop(c))},scrollToRow:function(c){this.setScrollTop(this.scroller.findScrollTop(c)+1)},styleRowNode:function(c,e){e&&this.rows.styleRowNode(c,e)},_mouseOut:function(){this.rows.setOverRow(-2)},getCell:function(c){return this.layout.cells[c]},setCellWidth:function(c,e){this.getCell(c).unitWidth=
e},getCellName:function(c){return"Cell "+c.index},canSort:function(){},sort:function(){},getSortAsc:function(c){c=c==undefined?this.sortInfo:c;return Boolean(c>0)},getSortIndex:function(c){c=c==undefined?this.sortInfo:c;return Math.abs(c)-1},setSortIndex:function(c,e){var f=c+1;if(e!=undefined)f*=e?1:-1;else if(this.getSortIndex()==c)f=-this.sortInfo;this.setSortInfo(f)},setSortInfo:function(c){if(this.canSort(c)){this.sortInfo=c;this.sort();this.update()}},doKeyEvent:function(c){c.dispatch="do"+
c.type;this.onKeyEvent(c)},_dispatch:function(c,e){if(c in this)return this[c](e);return false},dispatchKeyEvent:function(c){this._dispatch(c.dispatch,c)},dispatchContentEvent:function(c){this.edit.dispatchEvent(c)||c.sourceView.dispatchContentEvent(c)||this._dispatch(c.dispatch,c)},dispatchHeaderEvent:function(c){c.sourceView.dispatchHeaderEvent(c)||this._dispatch("doheader"+c.type,c)},dokeydown:function(c){this.onKeyDown(c)},doclick:function(c){c.cellNode?this.onCellClick(c):this.onRowClick(c)},
dodblclick:function(c){c.cellNode?this.onCellDblClick(c):this.onRowDblClick(c)},docontextmenu:function(c){c.cellNode?this.onCellContextMenu(c):this.onRowContextMenu(c)},doheaderclick:function(c){c.cellNode?this.onHeaderCellClick(c):this.onHeaderClick(c)},doheaderdblclick:function(c){c.cellNode?this.onHeaderCellDblClick(c):this.onHeaderDblClick(c)},doheadercontextmenu:function(c){c.cellNode?this.onHeaderCellContextMenu(c):this.onHeaderContextMenu(c)},doStartEdit:function(c,e){this.onStartEdit(c,e)},
doApplyCellEdit:function(c,e,f){this.onApplyCellEdit(c,e,f)},doCancelEdit:function(c){this.onCancelEdit(c)},doApplyEdit:function(c){this.onApplyEdit(c)},addRow:function(){this.updateRowCount(this.get("rowCount")+1)},removeSelectedRows:function(){this.allItemsSelected?this.updateRowCount(0):this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));this.selection.clear()}});a.grid._Grid.markupFactory=function(c,e,f,h){var i=function(g){g=b.attr(g,"width")||"auto";if(g!=
"auto"&&g.slice(-2)!="em"&&g.slice(-1)!="%")g=parseInt(g,10)+"px";return g};if(!c.structure&&e.nodeName.toLowerCase()=="table"){c.structure=b.query("> colgroup",e).map(function(g){var j=b.attr(g,"span");j={noscroll:b.attr(g,"noscroll")=="true"?true:false,__span:j?parseInt(j,10):1,cells:[]};if(b.hasAttr(g,"width"))j.width=i(g);return j});c.structure.length||c.structure.push({__span:Infinity,cells:[]});b.query("thead > tr",e).forEach(function(g,j){var k=0,m=0,l,n=null;b.query("> th",g).map(function(o){if(n){if(k>=
l+n.__span){m++;l+=n.__span;n=c.structure[m]}}else{l=0;n=c.structure[0]}var p={name:b.trim(b.attr(o,"name")||o.innerHTML),colSpan:parseInt(b.attr(o,"colspan")||1,10),type:b.trim(b.attr(o,"cellType")||""),id:b.trim(b.attr(o,"id")||"")};k+=p.colSpan;var t=b.attr(o,"rowspan");if(t)p.rowSpan=t;if(b.hasAttr(o,"width"))p.width=i(o);if(b.hasAttr(o,"relWidth"))p.relWidth=window.parseInt(b.attr(o,"relWidth"),10);if(b.hasAttr(o,"hidden"))p.hidden=b.attr(o,"hidden")=="true"||b.attr(o,"hidden")===true;h&&h(o,
p);p.type=p.type?b.getObject(p.type):a.grid.cells.Cell;p.type&&p.type.markupFactory&&p.type.markupFactory(o,p);n.cells[j]||(n.cells[j]=[]);n.cells[j].push(p)})})}return new f(c,e)}})()});
define("dojox/grid/DataSelection",["dojo","dijit","dojox","dojox/grid/Selection"],function(b,d,a){b.declare("dojox.grid.DataSelection",a.grid.Selection,{getFirstSelected:function(){var c=a.grid.Selection.prototype.getFirstSelected.call(this);if(c==-1)return null;return this.grid.getItem(c)},getNextSelected:function(c){c=this.grid.getItemIndex(c);c=a.grid.Selection.prototype.getNextSelected.call(this,c);if(c==-1)return null;return this.grid.getItem(c)},getSelected:function(){for(var c=[],e=0,f=this.selected.length;e<
f;e++)this.selected[e]&&c.push(this.grid.getItem(e));return c},addToSelection:function(c){if(this.mode!="none"){var e=null;e=typeof c=="number"||typeof c=="string"?c:this.grid.getItemIndex(c);a.grid.Selection.prototype.addToSelection.call(this,e)}},deselect:function(c){if(this.mode!="none"){var e=null;e=typeof c=="number"||typeof c=="string"?c:this.grid.getItemIndex(c);a.grid.Selection.prototype.deselect.call(this,e)}},deselectAll:function(c){var e=null;if(c||typeof c=="number"){e=typeof c=="number"||
typeof c=="string"?c:this.grid.getItemIndex(c);a.grid.Selection.prototype.deselectAll.call(this,e)}else this.inherited(arguments)}})});
define("dojox/grid/DataGrid",["dojo","dijit","dojox","dojox/grid/_Grid","dojox/grid/DataSelection"],function(b,d,a){b.declare("dojox.grid.DataGrid",a.grid._Grid,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty=
{};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments)},createSelection:function(){this.selection=new a.grid.DataSelection(this)},get:function(c,e){if(e&&this.field=="_item"&&!this.fields)return e;else if(e&&this.fields){var f=[],h=this.grid.store;b.forEach(this.fields,function(i){f=f.concat(h.getValues(e,i))});return f}else if(!e&&typeof c==="string")return this.inherited(arguments);return!e?this.defaultValue:!this.field?this.value:this.field==
"_item"?e:this.grid.store.getValue(e,this.field)},_checkUpdateStatus:function(){if(this.updateDelay>0){var c=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;c=true}if(!this.updating){this.beginUpdate();c=true}if(c){var e=this;this._endUpdateDelay=setTimeout(function(){delete e._endUpdateDelay;e.endUpdate()},this.updateDelay)}}},_onSet:function(c){this._checkUpdateStatus();c=this.getItemIndex(c);c>-1&&this.updateRow(c)},_createItem:function(c,e){e=this._hasIdentity?
this.store.getIdentity(c):b.toJson(this.query)+":idx:"+e+":sort:"+b.toJson(this.getSortProps());return this._by_idty[e]={idty:e,item:c}},_addItem:function(c,e,f){this._by_idx[e]=this._createItem(c,e);f||this.updateRow(e)},_onNew:function(c){this._checkUpdateStatus();var e=this.get("rowCount");this._addingItem=true;this.updateRowCount(e+1);this._addingItem=false;this._addItem(c,e);this.showMessage()},_onDelete:function(c){this._checkUpdateStatus();c=this._getItemIndex(c,true);if(c>=0){this._pages=
[];this._eop=this._bop=-1;var e=this._by_idx[c];this._by_idx.splice(c,1);delete this._by_idty[e.idty];this.updateRowCount(this.get("rowCount")-1);this.get("rowCount")===0&&this.showMessage(this.noDataMessage)}},_onRevert:function(){this._refresh()},setStore:function(c,e,f){this._setQuery(e,f);this._setStore(c);this._refresh(true)},setQuery:function(c,e){this._setQuery(c,e);this._refresh(true)},setItems:function(c){this.items=c;this._setStore(this.store);this._refresh(true)},_setQuery:function(c,e){this.query=
c;this.queryOptions=e||this.queryOptions},_setStore:function(c){this.store&&this._store_connects&&b.forEach(this._store_connects,this.disconnect,this);if(this.store=c){c=this.store.getFeatures();var e=[];this._canEdit=!!c["dojo.data.api.Write"]&&!!c["dojo.data.api.Identity"];this._hasIdentity=!!c["dojo.data.api.Identity"];if(c["dojo.data.api.Notification"]&&!this.items){e.push(this.connect(this.store,"onSet","_onSet"));e.push(this.connect(this.store,"onNew","_onNew"));e.push(this.connect(this.store,
"onDelete","_onDelete"))}this._canEdit&&e.push(this.connect(this.store,"revert","_onRevert"));this._store_connects=e}},_onFetchBegin:function(c,e){if(this.scroller){if(this.rowCount!=c)if(e.isRender){this.scroller.init(c,this.keepRows,this.rowsPerPage);this.rowCount=c;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false}else this.updateRowCount(c);if(c)this.showMessage();else{this.views.render();this._resize();this.showMessage(this.noDataMessage);
this.focus.initFocusView()}}},_onFetchComplete:function(c,e){if(this.scroller){if(c&&c.length>0){b.forEach(c,function(f,h){this._addItem(f,e.start+h,true)},this);this.updateRows(e.start,c.length);if(e.isRender){this.setScrollTop(0);this.postrender()}else this._lastScrollTop&&this.setScrollTop(this._lastScrollTop)}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true}this._pending_requests[e.start]=false}},_onFetchError:function(c,e){console.log(c);delete this._lastScrollTop;
if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage)}this._pending_requests[e.start]=false;this.onFetchError(c,e)},onFetchError:function(){},_fetch:function(c,e){c=c||0;if(this.store&&!this._pending_requests[c]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage)}this._pending_requests[c]=true;try{if(this.items){var f=this.items,h=this.store;this.rowsPerPage=f.length;var i={start:c,count:this.rowsPerPage,isRender:e};
this._onFetchBegin(f.length,i);var g=0;b.forEach(f,function(m){h.isItemLoaded(m)||g++});if(g===0)this._onFetchComplete(f,i);else{var j=function(){g--;g===0&&this._onFetchComplete(f,i)};b.forEach(f,function(m){h.isItemLoaded(m)||h.loadItem({item:m,onItem:j,scope:this})},this)}}else this.store.fetch({start:c,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:e,onBegin:b.hitch(this,"_onFetchBegin"),onComplete:b.hitch(this,"_onFetchComplete"),onError:b.hitch(this,
"_onFetchError")})}catch(k){this._onFetchError(k,{start:c,count:this.rowsPerPage})}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoading=this._isLoaded=false},getItem:function(c){var e=this._by_idx[c];if(!e||e&&!e.item){this._preparePage(c);return null}return e.item},getItemIndex:function(c){return this._getItemIndex(c,false)},_getItemIndex:function(c,e){if(!e&&!this.store.isItem(c))return-1;e=this._hasIdentity?this.store.getIdentity(c):
null;for(var f=0,h=this._by_idx.length;f<h;f++){var i=this._by_idx[f];if(i&&(e&&i.idty==e||i.item===c))return f}return-1},filter:function(c,e){this.query=c;e&&this._clearData();this._fetch()},_getItemAttr:function(c,e){c=this.getItem(c);return!c?this.fetchText:this.store.getValue(c,e)},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true)}},_requestsPending:function(c){return this._pending_requests[c]},
_rowToPage:function(c){return this.rowsPerPage?Math.floor(c/this.rowsPerPage):c},_pageToRow:function(c){return this.rowsPerPage?this.rowsPerPage*c:c},_preparePage:function(c){if((c<this._bop||c>=this._eop)&&!this._addingItem){c=this._rowToPage(c);this._needPage(c);this._bop=c*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"))}},_needPage:function(c){if(!this._pages[c]){this._pages[c]=true;this._requestPage(c)}},_requestPage:function(c){c=this._pageToRow(c);if(Math.min(this.rowsPerPage,
this.get("rowCount")-c)>0){this._requests++;this._requestsPending(c)||setTimeout(b.hitch(this,"_fetch",c,false),1)}},getCellName:function(c){return c.field},_refresh:function(c){this._clearData();this._fetch(0,c)},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh()},canSort:function(){return!this._isLoading},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(c){var e=c.sortDesc,f=!(this.sortInfo>0);e=typeof e=="undefined"?f:f?!e:e;return[{attribute:c.field,
descending:e}]}else{if(this.sortFields)return this.sortFields;return null}},styleRowState:function(c){if(this.store&&this.store.getState){for(var e=this.store.getState(c.index),f="",h=0,i=["inflight","error","inserting"],g;g=i[h];h++)if(e[g]){f=" dojoxGridRow-"+g;break}c.customClasses+=f}},onStyleRow:function(c){this.styleRowState(c);this.inherited(arguments)},canEdit:function(){return this._canEdit},_copyAttr:function(c,e){return this.store.getValue(this.getItem(c),e)},doStartEdit:function(c,e){this._cache[e]||
(this._cache[e]=this._copyAttr(e,c.field));this.onStartEdit(c,e)},doApplyCellEdit:function(c,e,f){this.store.fetchItemByIdentity({identity:this._by_idx[e].idty,onItem:b.hitch(this,function(h){var i=this.store.getValue(h,f);if(typeof i=="number")c=isNaN(c)?c:parseFloat(c);else if(typeof i=="boolean")c=c=="true"?true:c=="false"?false:c;else if(i instanceof Date){i=new Date(c);c=isNaN(i.getTime())?c:i}this.store.setValue(h,f,c);this.onApplyCellEdit(c,e,f)})})},doCancelEdit:function(c){if(this._cache[c]){this.updateRow(c);
delete this._cache[c]}this.onCancelEdit.apply(this,arguments)},doApplyEdit:function(c){this.onApplyEdit(c)},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var c=b.hitch(this,function(e){if(e.length){b.forEach(e,this.store.deleteItem,this.store);this.selection.clear()}});this.allItemsSelected?this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:c}):c(this.selection.getSelected())}}});a.grid.DataGrid.cell_markupFactory=function(c,e,f){var h=b.trim(b.attr(e,
"field")||"");if(h)f.field=h;f.field=f.field||f.name;if(h=b.trim(b.attr(e,"fields")||""))f.fields=h.split(",");c&&c(e,f)};a.grid.DataGrid.markupFactory=function(c,e,f,h){return a.grid._Grid.markupFactory(c,e,f,b.partial(a.grid.DataGrid.cell_markupFactory,h))}});define("text!orion/widgets/templates/SiteEditor.html",function(){return'<div>\n\t<style type="text/css">\n\t\t.isValidCell {\n\t\t\ttext-align: center;\n\t\t}\n\t\t.editablePathCell {\n\t\t}\n\t\t.actionCell {\n\t\t\theight: 22px !important;\n\t\t\tpadding: 1px 1px 4px 1px;\n\t\t}\n\t\t.actionCell .commandLink {\n\t\t\tmargin: 0;\n\t\t}\n\t\t.dojoxGridRow .workspacePathCell, .dojoxGridRowOdd .workspacePathCell {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t\ttd.dojoxGridCellFocus, th.dojoxGridCellFocus {\n\t\t\t/* Remove annoying dashed border, but keep the width to avoid jiggling */\n\t\t\tborder: 1px solid transparent !important;\n\t\t}\n\t\t.dojoxGridRowOver .dojoxGridCell, .dojoxGridRowEditing .dojoxGridCell {\n\t\t\tbackground-color: inherit !important;\n\t\t}\n\t\t.mappingsGridTable {\n\t\t\tfont-size: 9pt !important;\n\t\t}\n\t</style>\n\t<div dojoAttachPoint="containerNode">\n\t\t<div dojoType="dijit.form.Form" id="siteForm">\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td style="padding: 5px; text-align: left;">\n\t\t\t\t\t\t<label dojoAttachPoint="siteConfigNameLabel" for="${id}_name">${siteConfigNameLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="padding: 10px 5px 10px 5px; text-align: left;">\n\t\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="name" id="${id}_name"\n\t\t\t\t\t\t\trequired="true" value=""\n\t\t\t\t\t\t\tstyle="display: inline-block; width: 15em;">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td style="padding: 5px; vertical-align: top">\n\t\t\t\t\t\t<label dojoAttachPoint="mappingsLabel" for="${id}_mappings">${mappingsLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="padding: 10px 25px 10px 5px; text-align: left; width:100%;">\n\t\t\t\t\t\t<div dojoType="orion.widgets.MappingsGrid" dojoAttachPoint="mappings"\n\t\t\t\t\t\t\t\tclass="mappingsGridTable"\n\t\t\t\t\t\t\t\tautoHeight="true" singleClickEdit="true" selectionMode="none"\n\t\t\t\t\t\t\t\tselectable="true">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="padding: 5px 0 0 5px;">\n\t\t\t\t\t\t\t<div dojoAttachPoint="addMappingToolbar" id="${id}_addMappingToolbar"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</td>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td style="padding: 5px;">\n\t\t\t\t\t\t<label dojoAttachPoint="hostHintLabel" for="${id}_hostHint" style="text-align: left;">${hostHintLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="padding: 10px 5px 10px 5px; text-align: left;">\n\t\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="hostHint" id="${id}_hostHint"\n\t\t\t\t\t\t\trequired="false" value=""\n\t\t\t\t\t\t\tstyle="display: inline-block; width: 12em;">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td style="padding: 5px;">\n\t\t\t\t\t\t<label dojoAttachPoint="hostingStatusLabel" style="text-align: left;">${hostingStatusLabelText}</label>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="padding: 10px 5px 10px 5px; text-align: left;">\n\t\t\t\t\t\t<p dojoAttachPoint="hostingStatus"></p>\n\t\t\t\t\t\t<p dojoAttachPoint="siteStartedWarning" style="display: none;">\n\t\t\t\t\t\t(Changes you make here won\'t affect the running copy.)\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t</table>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/SiteEditor",["dojo","dijit","dojox","orion/util","orion/siteUtils","orion/commands","dijit/form/DropDownButton","dijit/form/ComboBox","dijit/form/Form","dijit/form/Select","dijit/form/Textarea","dijit/form/TextBox","dijit/form/ValidationTextBox","dijit/Menu","dijit/layout/ContentPane","dijit/Tooltip","dijit/_Templated","dojo/data/ItemFileWriteStore","dojo/DeferredList","dojox/grid/DataGrid","dojox/grid/cells","text!orion/widgets/templates/SiteEditor.html"],function(b,d,a,c,e,
f){b.declare("orion.widgets.MappingsGrid",[a.grid.DataGrid],{_mappings:null,_workspaceToChildren:null,constructor:function(){this.inherited(arguments)},setServices:function(h,i){this._commandService=h;this._fileClient=i;this._commandService.addCommand(new f.Command({name:"Delete",image:"/images/delete.gif",id:"eclipse.site.mappings.remove",visibleWhen:function(g){return g.Source&&g.Target},callback:function(g){this._hideTooltip();this.store.deleteItem(g);this.store.save();this.render()}}),"object");
this._commandService.registerCommandContribution("eclipse.site.mappings.remove",0);this._commandService.addCommand(new f.Command({name:"Move Up",image:"/images/move_up.gif",id:"eclipse.site.mappings.moveUp",visibleWhen:b.hitch(this,function(g){return g.Source&&g.Target}),callback:function(g){this._hideTooltip();var j=this.getItemIndex(g);if(j!==0){g=this._deleteAll();g.splice(j-1,2,g[j],g[j-1]);for(j=0;j<g.length;j++)this.store.newItem(g[j]);this.store.save();this.render()}}}),"object");this._commandService.registerCommandContribution("eclipse.site.mappings.moveUp",
1);this._commandService.addCommand(new f.Command({name:"Move Down",image:"/images/move_down.gif",id:"eclipse.site.mappings.moveDown",visibleWhen:b.hitch(this,function(g){return g.Source&&g.Target}),callback:function(g){this._hideTooltip();var j=this.getItemIndex(g);if(j!==this.get("rowCount")-1){g=this._deleteAll();g.splice(j,2,g[j+1],g[j]);for(j=0;j<g.length;j++)this.store.newItem(g[j]);this.store.save();this.render()}}}),"object");this._commandService.registerCommandContribution("eclipse.site.mappings.moveDown",
2)},_deleteAll:function(){for(var h=[],i=this.store,g;this.get("rowCount")>0;){g=this.getItem(0);h.push(this._createMappingObject(i.getValue(g,"Source"),i.getValue(g,"Target")));i.deleteItem(g)}return h},setMappings:function(h){this._mappings=h;b.when(this._editor._workspaceToChildren,b.hitch(this,function(i){this._workspaceToChildren=i;this.setStore(this._createGridStore(h))}))},setEditor:function(h){this._editor=h},_createGridStore:function(h){h=new b.data.ItemFileWriteStore({data:{items:b.map(h,
b.hitch(this,function(i){return this._createMappingObject(i.Source,i.Target)}))}});b.connect(h,"setValue",h,function(){this.save()});h._saveEverything=b.hitch(this,function(i,g,j){for(g=b.fromJson(j);this._mappings.length>0;)this._mappings.pop();b.forEach(g.items,b.hitch(this,function(k){var m={};m.Source=k.Source;m.Target=k.Target;this._mappings.push(m)}));i()});return h},_createMappingObject:function(h,i){return{Source:h,Target:i,_friendlyPath:this._toFriendlyPath(i)}},_getRowNodeForItem:function(h){return this.getRowNode(this.getItemIndex(h))},
_hideTooltip:function(){d.hideTooltip(d._masterTT&&d._masterTT.aroundNode)},_addMapping:function(h,i){h=typeof h==="string"?h:"/mountPoint";i=typeof i==="string"?i:"/";var g=this.get("store"),j=this.store.newItem(this._createMappingObject(h,i)),k=this;g.save({onComplete:function(){setTimeout(function(){var m=k._getRowNodeForItem(j);if(m){var l=b.query("td",m)[k.MOUNT_AT_COL];m="Click to set the remote path where <b>"+k._toReadablePath(m)+"</b> will be accessible.";d.showTooltip(m,l,"above");b.connect("onclick",
b.hitch(d._masterTT,d._masterTT.hide,d._masterTT.aroundNode))}},1)}})},_toReadablePath:function(h){h=b.query("td",h);return c.getText(h[this.PATH_COL])},postCreate:function(){this.inherited(arguments);this.PATH_COL=1;this.MOUNT_AT_COL=2;this.set("structure",[{field:"Target",name:" ",editable:false,width:"32px",cellClasses:"isValidCell",formatter:b.hitch(this,this._isValidFormatter)},{field:"_friendlyPath",name:"Path",editable:true,commitOnBlur:true,cellClasses:"pathCell",width:"auto",formatter:b.hitch(this,
this._friendlyPathFormatter)},{field:"Source",name:"Mount at",editable:true,commitOnBlur:true,width:"30%",cellClasses:"editablePathCell"},{field:"_item",name:" ",editable:false,cellClasses:"actionCell",width:"80px",formatter:b.hitch(this,this._actionColumnFormatter)}]);b.connect(this,"onStartEdit",this,function(h){var i=this,g=b.connect(h,"registerOnBlur",h,function(j,k){var m=b.connect(j,"onblur",function(){setTimeout(b.hitch(h,"_onEditBlur",k),250);b.disconnect(m);b.disconnect(g)}),l=b.connect(j,
"onblur",h,function(){if(h.index===i.PATH_COL){var n=i.getItem(k);i._propagate(n)}b.disconnect(l)})})});b.connect(this,"onStartEdit",this,this._hideTooltip);b.connect(this,"onResizeColumn",this,this._hideTooltip);b.connect(this,"onStyleRow",this,this._renderCommands)},_isWorkspacePath:function(h){return/^\//.test(h)},_isValidFormatter:function(h,i,g){if(g.lastTarget&&g.lastTarget===h)return g.lastResult;g.lastTarget=h;var j;if(this._isWorkspacePath(h)){h=e.makeFullFilePath(h);var k=new b.Deferred;
j=c.safeText(h);b.xhrGet({url:h,headers:{"Orion-Version":"1"},handleAs:"json"}).then(function(){k.callback('<a href="'+j+'" target="_new"><img src="/images/folder.gif" title="Workspace folder '+j+'"/></a>')},function(){k.callback('<a href="'+j+'" target="_new"><img src="/images/error.gif" title="Workspace folder  not found: '+j+'"/></a>')});h=k}else{j=c.safeText(h);h='<a href="'+j+'" target="_blank"><img src="/images/link.gif" title="External link to '+j+'"/></a>'}return g.lastResult=h},_propagate:function(h){var i=
this.store.getValue(h,"_friendlyPath"),g,j=false;this._isWorkspacePath(i)&&this._everyTopLevelFolder(b.hitch(this,function(k,m,l){if(this._pathMatch(i,l)){j=true;k=i.substring(l.length);g=m+k;return false}}));j||(g=i);this.store.setValue(h,"Target",g)},_toFriendlyPath:function(h){var i,g;this._everyTopLevelFolder(b.hitch(this,function(j,k,m){if(this._pathMatch(h,k)){g=true;i=m+h.substring(k.length);return false}}));g||(i=h);return i},_everyTopLevelFolder:function(h){for(var i=this._workspaceToChildren[this._editor.getSiteConfiguration().Workspace],
g=0;g<i.length;g++){var j=i[g],k=e.makeRelativeFilePath(j.Location);if(h(j,k,"/"+j.Name)===false)break}},_friendlyPathFormatter:function(h){return c.safeText(h)},_pathMatch:function(h,i){return h===i||h.indexOf(i+"/")===0},_actionColumnFormatter:function(){return" "},_renderCommands:function(h){var i=this.getItem(h.index);(h=b.query("td.actionCell",h.node)[0])&&b.query("a",h).length===0&&this._commandService.renderCommands(h,"object",i,this,"image","actionCellCommand")}});b.declare("orion.widgets.SiteEditor",
[d.layout.ContentPane,d._Templated],{widgetsInTemplate:true,templateString:b.cache("orion","widgets/templates/SiteEditor.html"),_workspaces:null,_workspaceToChildren:null,_siteConfiguration:null,_modelListeners:null,constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};if(!this.options.fileClient)throw new Error("options.fileClient is required");if(!this.options.siteService)throw new Error("options.siteService is required");if(!this.options.commandService)throw new Error("options.commandService is required");
if(!this.options.statusService)throw new Error("options.statusService is required");this._fileClient=this.options.fileClient;this._siteService=this.options.siteService;this._commandService=this.options.commandService;this._statusService=this.options.statusService;this._commandsContainer=this.options.commandsContainer;this._workspaces=new b.Deferred;this._workspaceToChildren=new b.Deferred;this._loadWorkspaces();this.options.location&&this.load(this.options.location)},postMixInProperties:function(){this.inherited(arguments);
this.siteConfigNameLabelText="Name:";this.mappingsLabelText="Mappings:";this.hostHintLabelText="Hostname hint:";this.addMappingButtonText="Add&#8230;";this.hostingStatusLabelText="Status:"},postCreate:function(){this.inherited(arguments);this.refocus=false;this.name.set("invalidMessage","Not a valid name");this.name.set("isValid",b.hitch(this,function(h){return h||b.trim(this.name.get("value"))!==""}));this.hostHint.set("invalidMessage","Not a valid hostname");this.hostHint.set("isValid",b.hitch(this,
function(h){var i=/^(?:\s*|[A-Za-z0-9-_]+)$/;return h||i.test(this.hostHint.get("value"))}));this.mappings.setServices(this._commandService,this._fileClient);this.mappings.setEditor(this);d.byId("siteForm").onSubmit=b.hitch(this,this.onSubmit);b.when(this._workspaceToChildren,b.hitch(this,function(h){this._commandService.addCommand(new f.Command({name:"Add&#8230;",image:"/images/add.gif",id:"eclipse.site.mappings.add",visibleWhen:function(){return true},choiceCallback:b.hitch(this,this._makeAddMenuChoices,
h)}),"dom");this._commandService.registerCommandContribution("eclipse.site.mappings.add",1,this.addMappingToolbar.id);this._commandService.renderCommands(this.addMappingToolbar,"dom",this.mappings,this,"image")}));this._commandService.addCommand(new f.Command({name:"Save",image:"/images/save.gif",id:"eclipse.site.save",visibleWhen:function(h){return h.Location},callback:b.hitch(this,this.onSubmit)}),"object");this._commandService.registerCommandContribution("eclipse.site.save",0)},_makeAddMenuChoices:function(h,
i){i=b.isArray(i)?i[0]:i;i=this.getSiteConfiguration().Workspace;h=h[i];var g=this,j=this,k=function(m,l){if(l.shiftKey){m=[{Source:"/",Target:this.path+"/bundles/org.eclipse.orion.client.core/web"},{Source:"/",Target:this.path+"/bundles/org.eclipse.orion.client.editor/web"},{Source:"/file",Target:"http://localhost:8080/file"},{Source:"/prefs",Target:"http://localhost:8080/prefs"},{Source:"/workspace",Target:"http://localhost:8080/workspace"},{Source:"/org.dojotoolkit",Target:"http://localhost:8080/org.dojotoolkit"},
{Source:"/users",Target:"http://localhost:8080/users"},{Source:"/auth2",Target:"http://localhost:8080/auth2"},{Source:"/login",Target:"http://localhost:8080/login"},{Source:"/loginstatic",Target:"http://localhost:8080/loginstatic"},{Source:"/site",Target:"http://localhost:8080/site"},{Source:"/",Target:this.path+"/bundles/org.eclipse.orion.client.git/web"},{Source:"/gitapi",Target:"http://localhost:8080/gitapi"},{Source:"/",Target:this.path+"/bundles/org.eclipse.orion.client.users.ui/web"},{Source:"/xfer",
Target:"http://localhost:8080/xfer"},{Source:"/filesearch",Target:"http://localhost:8080/filesearch"},{Source:"/index.jsp",Target:"http://localhost:8080/index.jsp"},{Source:"/plugins/git",Target:"http://localhost:8080/plugins/git"},{Source:"/plugins/user",Target:"http://localhost:8080/plugins/user"},{Source:"/logout",Target:"http://localhost:8080/logout"},{Source:"/mixloginstatic",Target:"http://localhost:8080/mixloginstatic"},{Source:"/openids",Target:"http://localhost:8080/openids"}];for(l=0;l<
m.length;l++)j.mappings._addMapping(m[l].Source,m[l].Target);g.onSubmit()}else j.mappings._addMapping("/mountPoint",this.path)};i=b.map(h,function(m){return{name:"Folder: /"+m.Name,path:e.makeRelativeFilePath(m.Location),callback:k}});h.length>0&&i.push({});i.push({name:"URL",callback:function(){j.mappings._addMapping("/mountPoint","http://someurl")}});return i},startup:function(){this.inherited(arguments)},load:function(h){var i=new b.Deferred;this._busyWhile(i,"Loading...");this._siteService.loadSiteConfiguration(h).then(b.hitch(this,
function(g){this._setSiteConfiguration(g);i.callback(g)}),function(g){i.errback(g)});return i},_setSiteConfiguration:function(h){this._detachListeners(this._siteConfiguration);this._siteConfiguration=h;this._refreshFields();this._attachListeners(this._siteConfiguration)},_refreshFields:function(){this.name.set("value",this._siteConfiguration.Name);this.hostHint.set("value",this._siteConfiguration.HostHint);this.mappings.setMappings(this._siteConfiguration.Mappings);this.mappings.startup();var h=this._siteConfiguration.HostingStatus;
if(h&&h.Status==="started"){b.style(this.siteStartedWarning,{display:"block"});this.hostingStatus.innerHTML=c.safeText(h.Status[0].toLocaleUpperCase()+h.Status.substr(1)+" at ");c.safeText(h.URL);b.create("a",{href:h.URL,innerHTML:c.safeText(h.URL),target:"_new"},this.hostingStatus,"last")}else{b.style(this.siteStartedWarning,{display:"none"});c.setText(this.hostingStatus,h.Status[0].toLocaleUpperCase()+h.Status.substr(1))}b.empty(this._commandsContainer);this._commandService.renderCommands(this._commandsContainer,
"object",this._siteConfiguration,{},"image",null,this._siteConfiguration,true)},_attachListeners:function(h){function i(j,k){var m=b.connect(j,"onChange",null,function(){var l=j.get("value");h[k]=l});g._modelListeners.push(m)}this._modelListeners=[];var g=this;i(this.name,"Name");i(this.hostHint,"HostHint")},_detachListeners:function(){if(this._modelListeners)for(var h=0;h<this._modelListeners.length;h++)b.disconnect(this._modelListeners[h])},_loadWorkspaces:function(){var h=this;h._fileClient.loadWorkspaces().then(function(i){h._workspaces.callback(i);
h._loadWorkspaceChildren(i)},function(i){h._workspaces.errback(i)})},_loadWorkspaceChildren:function(h){var i=this;h=b.map(h,function(g){return i._fileClient.fetchChildren(g.Location).then(function(j){return{id:g.Id,children:j}})});(new b.DeferredList(h)).then(function(g){var j={};b.forEach(g,function(k){k=k[1];j[k.id]=k.children});i._workspaceToChildren.callback(j)})},getSiteConfiguration:function(){return this._siteConfiguration},onSubmit:function(){if(d.byId("siteForm").isValid()){var h=this,i=
h._siteConfiguration;delete i.HostingStatus;this._busyWhile(this._siteService.updateSiteConfiguration(i.Location,i).then(function(g){h._setSiteConfiguration(g);return{Result:'Saved "'+g.Name+'".'}}),"Saving...");return true}else return false},_busyWhile:function(h,i){b.forEach(this.getDescendants(),function(g){g.set("disabled",true)});h.then(b.hitch(this,this._onSuccess),b.hitch(this,this._onError));this._statusService.showWhile(h,i)},_onSuccess:function(h){b.forEach(this.getDescendants(),function(i){i.set("disabled",
false)});this.onSuccess(h)},_onError:function(h){this.saveButton.set("disabled",false);this._statusService.setErrorMessage(h);this.onError(h)},onSuccess:function(){},onError:function(){}})});
define("site",["dojo","orion/serviceregistry","orion/preferences","orion/pluginregistry","orion/status","orion/commands","orion/fileClient","orion/searchClient","orion/dialogs","orion/globalCommands","siteService","orion/siteUtils","siteTree","orion/treetable","dojo/parser","dojo/hash","dijit/layout/BorderContainer","dijit/layout/ContentPane","orion/widgets/SiteEditor"],function(b,d,a,c,e,f,h,i,g,j,k,m){b.addOnLoad(function(){document.body.style.visibility="visible";b.parser.parse();var l=new d.ServiceRegistry,
n=new c.PluginRegistry(l);b.addOnWindowUnload(function(){n.shutdown()});var o=new g.DialogService(l),p=new e.StatusReportingService(l,"statusPane","notifications"),t=new f.CommandService({serviceRegistry:l});l.getService("orion.core.file").then(function(q){var r=new h.FileClient(q),v=new k.SiteService(l);q=new a.PreferencesService(l,"/prefs/user");var u=new i.Searcher({serviceRegistry:l});j.generateBanner("toolbar",l,t,q,u);var x=function(){var z=dijit.byId("site-editor"),E=z&&z.getSiteConfiguration();
if(z&&E){z=b.byId("location");b.place(document.createTextNode(E.Name),z,"only");window.document.title=E.Name+" - Edit Site"}},C=function(){var z=b.hash();z=m.parseStateFromHash(z);var E=dijit.byId("site-editor");z.site&&E.load(z.site).then(function(){x()})};b.subscribe("/dojo/hashchange",null,C);var D;(function(){D=new orion.widgets.SiteEditor({fileClient:r,siteService:v,commandService:t,statusService:p,commandsContainer:b.byId("pageActions"),id:"site-editor"});b.place(D.domNode,b.byId("site"),"only");
D.startup();b.connect(D,"onSuccess",x);C()})();q=b.hitch(D,D._setSiteConfiguration);m.createSiteCommands(t,v,p,o,q,q,null,p);t.registerCommandContribution("eclipse.site.start",1);t.registerCommandContribution("eclipse.site.stop",2)})})});