(function(g,k){"function"===typeof define&&define.amd?define("orion/Deferred",k):"object"===typeof exports?module.exports=k():(g.orion=g.orion||{},g.orion.Deferred=k())})(this,function(){function g(){for(var e;e=c.shift();)e();l=!1}function k(e){c.push(e);l||(l=!0,b())}function f(e){return function(a){e(a)}}function d(){function e(){for(var a;a=u.shift();){var m=a.deferred,e="fulfilled"===c?"resolve":"reject";a=a[e];if("function"===typeof a)try{var h=a(b),d=h&&("object"===typeof h||"function"===typeof h)&&
h.then;if("function"===typeof d)if(h===m.promise)m.reject(new TypeError);else{var s=h.cancel;"function"===typeof s?m._parentCancel=s.bind(h):delete m._parentCancel;d.call(h,f(m.resolve),f(m.reject),f(m.progress))}else m.resolve(h)}catch(l){m.reject(l)}else m[e](b)}}function a(a){delete s._parentCancel;c="rejected";b=a;u.length&&k(e)}function m(h){function r(a){return function(m){(!c||"assumed"===c)&&a(m)}}delete s._parentCancel;try{var f=h&&("object"===typeof h||"function"===typeof h)&&h.then;if("function"===
typeof f)if(h===s)a(new TypeError);else{c="assumed";var l=h&&h.cancel;if("function"!==typeof l){var g=new d;h=g.promise;try{f(g.resolve,g.reject,g.progress)}catch(F){g.reject(F)}l=h.cancel;f=h.then}b=h;f.call(h,r(m),r(a));s._parentCancel=l.bind(h)}else c="fulfilled",b=h,u.length&&k(e)}catch(D){r(a)(D)}}function h(){var m=s._parentCancel;m?(delete s._parentCancel,m()):c||(m=Error("Cancel"),m.name="Cancel",a(m))}var b,c,u=[],s=this;this.resolve=function(a){c||m(a);return s};this.reject=function(m){c||
a(m);return s};this.progress=function(a){c||u.forEach(function(m){if(m.progress)try{m.progress(a)}catch(h){}});return s.promise};this.cancel=function(){s._parentCancel?setTimeout(h,0):h();return s};this.then=function(a,m,h){var b=new d;b._parentCancel=s.promise.cancel;u.push({resolve:a,reject:m,progress:h,deferred:b});("fulfilled"===c||"rejected"===c)&&k(e);return b.promise};this.promise={then:s.then,cancel:s.cancel}}var c=[],l=!1,b=function(){if("undefined"!==typeof process&&"function"===typeof process.nextTick){var e=
process.nextTick;return function(){e(g)}}if("function"===typeof MutationObserver){var a=document.createElement("div");(new MutationObserver(g)).observe(a,{attributes:!0});return function(){a.setAttribute("class","_tick")}}return function(){setTimeout(g,0)}}();d.all=function(e,a){function m(a,m){u||(c[a]=m,0===--b&&s.resolve(c))}function h(h,e){if(!u){if(a)try{m(h,a(e));return}catch(b){e=b}s.reject(e)}}var b=e.length,c=[],u=!1,s=new d;s.then(void 0,function(){u=!0;e.forEach(function(a){a.cancel&&a.cancel()})});
0===b?s.resolve(c):e.forEach(function(a,e){a.then(m.bind(void 0,e),h.bind(void 0,e))});return s.promise};d.when=function(e,a,m,h){var b;e&&"function"===typeof e.then||(b=new d,b.resolve(e),e=b.promise);return e.then(a,m,h)};return d});
define("orion/EventTarget",[],function(){function g(){this._namedListeners={}}g.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var f=this._namedListeners[g.type];f&&f.forEach(function(d){try{"function"===typeof d?d(g):d.handleEvent(g)}catch(c){"undefined"!==typeof console&&console.log(c)}});return!g.defaultPrevented},addEventListener:function(g,f){if("function"===typeof f||f.handleEvent)this._namedListeners[g]=this._namedListeners[g]||[],this._namedListeners[g].push(f)},
removeEventListener:function(g,f){var d=this._namedListeners[g];if(d)for(var c=0;c<d.length;c++)if(d[c]===f){1===d.length?delete this._namedListeners[g]:d.splice(c,1);break}}};g.prototype.constructor=g;g.attach=function(k){var f=new g;k.dispatchEvent=f.dispatchEvent.bind(f);k.addEventListener=f.addEventListener.bind(f);k.removeEventListener=f.removeEventListener.bind(f)};return g});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(g,k){function f(e,a,m){this._properties=m||{};this._properties["service.id"]=e;this._properties.objectClass=a;this._properties["service.names"]=a}function d(e,a,m){this._serviceId=e;this._serviceReference=a;this._internalRegistry=m}function c(e,a){function m(m){return function(){var h;try{if(!a())throw Error("Service was unregistered");var b=e[m].apply(e,Array.prototype.slice.call(arguments));if(b&&"function"===typeof b.then)return b;
h=new g;h.resolve(b)}catch(c){h=new g,h.reject(c)}return h.promise}}for(var h in e)"function"===typeof e[h]&&(this[h]=m(h))}function l(e,a){this.type=e;this.serviceReference=a}function b(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new k;var e=this;this._internalRegistry={isRegistered:function(a){return e._entries[a]?!0:!1},unregisterService:function(a){var m=e._entries[a];if(!m)throw Error("Service has already been unregistered: "+a);var h=m.reference;e._serviceEventTarget.dispatchEvent(new l("unregistering",
h));e._entries[a]=null;h.getProperty("objectClass").forEach(function(a){for(var m=e._namedReferences[a],b=0;b<m.length;b++)if(m[b]===h){1===m.length?delete e._namedReferences[a]:m.splice(b,1);break}})},modifyService:function(a){var m=e._entries[a];if(!m)throw Error("Service not found while trying to send modified event: "+a);e._serviceEventTarget.dispatchEvent(new l("modified",m.reference))}}}f.prototype={getPropertyKeys:function(){var e=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&
e.push(a);return e},getProperty:function(e){return this._properties[e]}};f.prototype.constructor=f;d.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("Service has already been unregistered: "+this._serviceId);return this._serviceReference},setProperties:function(e){var a=this._serviceReference._properties;this._serviceReference._properties=e||{};e["service.id"]=this._serviceId;
e.objectClass=a.objectClass;e["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};d.prototype.constructor=d;b.prototype={getService:function(e){var a;if("string"===typeof e)(e=this._namedReferences[e])&&e.some(function(m){a=this._entries[m.getProperty("service.id")].service;return!!a},this);else if(e=this._entries[e.getProperty("service.id")])a=e.service;return a||null},getServiceReferences:function(e){if(e)return this._namedReferences[e]?this._namedReferences[e]:
[];var a=[];this._entries.forEach(function(m){m&&a.push(m.reference)});return a},registerService:function(e,a,m){if("undefined"===typeof a||null===a)throw Error("invalid service");"string"===typeof e?e=[e]:Array.isArray(e)||(e=[]);var h=this._entries.length,b=new f(h,e,m),p=this._namedReferences;e.forEach(function(a){p[a]=p[a]||[];p[a].push(b)});e=new c(a,this._internalRegistry.isRegistered.bind(null,h));this._entries.push({reference:b,service:e});e=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new l("registered",
b));return new d(h,b,e)},addEventListener:function(e,a){this._serviceEventTarget.addEventListener(e,a)},removeEventListener:function(e,a){this._serviceEventTarget.removeEventListener(e,a)}};b.prototype.constructor=b;return{ServiceRegistry:b}});
define("orion/xhr",["orion/Deferred"],function(g){function k(f,d,c,l){var b="undefined"!==typeof c.response?c.response:c.responseText,e;try{e=c.status}catch(a){e=0}f={args:d,response:b,responseText:"string"===typeof b?b:null,status:e,url:f,xhr:c};"undefined"!==typeof l&&(f.error=l);return f}return function(f,d,c){c=c||{};var l=3<arguments.length&&arguments[3]?arguments[3]:new XMLHttpRequest,b=new g,e=c.headers||{},a=c.log||!1,m;"undefined"===typeof e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");
if("undefined"!==typeof c.data&&("POST"===f||"PUT"===f))m=c.data;var h=!1,n=!1;b.promise.then(void 0,function(a){h=!0;!n&&a instanceof Error&&"Cancel"===a.name&&l.abort()});l.onabort=function(){n=!0;if(!h){var a=Error("Cancel");a.name="Cancel";b.reject(a)}};l.onload=function(){var m=k(d,c,l);200<=l.status&&400>l.status?b.resolve(m):(b.reject(m),a&&"undefined"!==typeof console&&console.log(Error(l.statusText)))};l.onerror=function(){var m=k(d,c,l);b.reject(m);a&&"undefined"!==typeof console&&console.log(Error(l.statusText))};
l.onprogress=function(a){a.xhr=l;b.progress(a)};try{l.open(f,d,!0);"string"===typeof c.responseType&&(l.responseType=c.responseType);if("number"===typeof c.timeout)if("number"===typeof l.timeout)l.timeout=c.timeout,l.addEventListener("timeout",function(a){b.reject(k(d,c,l,"Timeout exceeded"))});else{var p=setTimeout(function(){b.reject(k(d,c,l,"Timeout exceeded"))},c.timeout);b.promise.then(clearTimeout.bind(null,p),clearTimeout.bind(null,p))}Object.keys(e).forEach(function(a){l.setRequestHeader(a,
e[a])});l.send(m||null)}catch(u){b.reject(k(d,c,l,u))}return b.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,k,f){function d(a,h){this._name=a;this._providers=h;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function c(a,h){return{get:function(e,b){if(0===h)return null;var c=localStorage.getItem(a+e);if(null===c)return null;c=JSON.parse(c);return b||-1===h||c._expires&&c._expires>(new Date).getTime()?(delete c._expires,c):null},set:function(e,b){if(0!==h)if(-1!==h&&(b._expires=(new Date).getTime()+
1E3*h),0===Object.keys(b).length)localStorage.removeItem(a+e);else{var c=JSON.stringify(b);localStorage.setItem(a+e,c);delete b._expires}},remove:function(h){localStorage.removeItem(a+h)}}}function l(a){this._currentPromises={};this._cache=new c("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var h=a.getServiceReferences("orion.core.preference.provider");0<h.length&&(this._service=a.getService(h[0]))}return!!this._service}}function b(a){this._location=
a;this._currentPromise=null;this._cache=new c("/orion/preferences/default",3600)}function e(){this._cache=new c("/orion/preferences/local",-1)}function a(a,h){this._userProvider=new l(a);this._localProvider=new e;h=h||"defaults.pref";-1===h.indexOf("://")&&(h=g.toUrl(h));this._defaultsProvider=new b(h);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],h=0;h<this._stores.length;++h){var b=this._stores[h];-1!==this._dirty.indexOf(b)&&
a.push(this._providers[h].put(this._name,b));if(this._pendingDeletes[h]&&0<this._pendingDeletes[h].length){for(b=0;b<this._pendingDeletes[h].length;b++)a.push(this._providers[h].remove(this._name,this._pendingDeletes[h][b]));delete this._pendingDeletes[h]}}this._dirty=[];return k.all(a)},_scheduleFlush:function(a){a&&-1===this._dirty.indexOf(a)&&this._dirty.push(a);this._flushPending||(this._flushPending=!0,window.setTimeout(function(){this._flushPending&&(this._flushPending=!1,this._flush())}.bind(this),
0))},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var h=this._stores[a],b;for(b in h)h.hasOwnProperty(b)&&"undefined"===typeof this._cached[b]&&(this._cached[b]=h[b])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(0!==this._stores.length){var e=this._stores[0];e[a]!==b&&(e[a]=b,this._cached=null,this._scheduleFlush(e))}},remove:function(a){for(var b=0;b<
this._stores.length;++b){var e=this._stores[b];if(e.hasOwnProperty(a))return delete e[a],this._pendingDeletes[b]||(this._pendingDeletes[b]=[]),this._pendingDeletes[b].push(a),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]={},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,e=[],c=0;c<this._providers.length;++c)e.push(this._providers[c].get(this._name,
a).then(function(a){return function(e){b._stores[a]=e}}(c)));return k.all(e).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};l.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var e=new k,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(null!==c)e.resolve(c);else{this._currentPromises[a]=e;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];e.resolve(b)},function(b){404===b.status?
(b={},d._cache.set(a,b),delete d._currentPromises[a],e.resolve(b)):(delete d._currentPromises[a],e.resolve(d._cache.get(a,!0)||{}))})}return e},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)},remove:function(a,b){var e=this._cache.get(a);delete e[b];this._cache.set(a,e);return this._service.remove(a,b)}};b.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;var e=new k,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(null!==c)e.resolve(c);else{this._currentPromise=
e;var d=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);d._cache.set(a,b[a]||{});d._currentPromise=null;e.resolve(b[a]||{})},function(b){401===b.xhr.status||404===b.xhr.status?(d._cache.set(a,{}),d._currentPromise=null,e.resolve({})):(d._currentPromise=null,b=d._cache.get(a,!0),null!==b?e.resolve(b[a]||{}):e.resolve({}))})}return e},put:function(a,b){var e=new k;e.resolve();return e},remove:function(a,b){var e=this._cache.get(a);
delete e[b];this.put(a,e)}};e.prototype={get:function(a){var b=new k;a=this._cache.get(a);null!==a?b.resolve(a):b.resolve({});return b},put:function(a,b){var e=new k;this._cache.set(a,b);e.resolve();return e},remove:function(a,b){var e=this._cache.get(a);delete e[b];this.put(a,e)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,e,c){if(!e||"number"!==typeof e||7<e||1>e)c=e,e=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
c,!1);return 0!==(a.USER_SCOPE&e)?"/orion/preferences/user"+b:0!==(a.LOCAL_SCOPE&e)?"/orion/preferences/local"+b:"/orion/preferences/default"+b},getPreferences:function(b,e){if(!e||"number"!==typeof e||7<e||1>e)e=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var c=[];a.USER_SCOPE&e&&this._userProvider.available()&&c.push(this._userProvider);a.LOCAL_SCOPE&e&&c.push(this._localProvider);a.DEFAULT_SCOPE&e&&c.push(this._defaultsProvider);var p=new d(b,c);return p.sync().then(function(){return p})},getSetting:function(a,
b,e){for(var c,d=0;d<a.length;d++)if(a[d].label===b)for(var f=0;f<a[d].data.length;f++)if(a[d].data[f].label===e){c=a[d].data[f].value;break}return c}};return{PreferencesService:a}});
(function(){function g(a){if("string"!==typeof a)throw new TypeError;}function k(a){return a?a.split("\x26"):[]}function f(a){return 0===a.length?"":a.join("\x26")}function d(a){var b=/([^=]*)(?:=?)(.*)/.exec(a);a=b[1]?decodeURIComponent(b[1]):"";b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function c(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="\x3d"+encodeURIComponent(a[1]));return b}function l(a,b){var e="",c=[],h=0;return{next:function(){e!==a.query&&(e=a.query,c=k(e));if(h<c.length){var m=
d(c[h++]);switch(b){case "keys":return m[0];case "values":return m[1];case "keys+values":return[m[0],m[1]];default:throw new TypeError;}}throw C;}}}function b(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function e(a){return a?/[1-9]\d*$/.exec(a)[0]:""}function a(a){var b=[];a.split("/").forEach(function(a){".."===a?b.pop():"."!==a&&b.push(a)});return b.join("/")}function m(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function h(b,c){if("string"!==
typeof b)throw new TypeError;b=m(b);var h=s.exec(b);if(!h)return null;var d={};d.scheme=h[1]||"";if(d.scheme&&!r.test(d.scheme))return null;var n=h[2];if(n&&(n=q.exec(n),d.userinfo=n[1],d.host=n[2],d.port=n[3],d.port&&!t.test(d.port)))return null;d.path=h[3];d.query=h[4];d.fragment=h[5];!d.scheme&&c&&(d.scheme=c.scheme,!d.host&&c.host&&(d.userinfo=c.userinfo,d.host=c.host,d.port=c.port,d.pathRelative=!0));d.pathRelative&&(d.path?"/"!==d.path[0]&&(h=/^(.*\/)[^\/]*$/.exec(c.path)[1]||"/",d.path=h+d.path):
d.path=c.path);d.scheme&&(d.scheme=d.scheme.toLowerCase());d.port&&(d.port=e(d.port));d.host&&d.path&&(d.path=a(d.path));return d}function n(a,e){var c;if(e){e=e.href||e;c=h(e);if(!c||!c.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:c})}c=h(a,c);if(!c)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:c,writable:!0});var m=new b(this);Object.defineProperty(this,"query",{get:function(){return this._url?
m:null},enumerable:!0})}try{var p;if("function"===typeof window.URL&&0!==window.URL.length&&"http:"===(p=new window.URL("http://www.w3.org?q")).protocol&&p.query)return}catch(u){}var s=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,q=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,r=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,t=/^\d*$/,v=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,w=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,F=/^([^?#\s]*)$/,D=/^([^\s]*)$/,x=/^\S*$/,E=/([^:]*):?(.*)/,C="undefined"!==
typeof StopIteration?StopIteration:Error("Stop Iteration"),J={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(b.prototype,{get:{value:function(a){g(a);var b;k(this._url.query).some(function(e){e=d(e);if(e[0]===a)return b=e[1],!0});return b},enumerable:!0},set:{value:function(a,b){g(a);g(b);var e=k(this._url.query);e.some(function(h,m){var n=d(h);if(n[0]===a)return n[1]=b,e[m]=c(n),!0})||e.push(c([a,b]));this._url.query=f(e)},enumerable:!0},has:{value:function(a){g(a);
return k(this._url.query).some(function(b){if(d(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){g(a);var b=k(this._url.query),e=b.filter(function(b){return d(b)[0]!==a});return e.length!==b.length?(this._url.query=f(e),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,b){if("function"!==typeof a)throw new TypeError;var e=l(this._url,"keys+values");try{for(;;){var c=e.next();a.call(b,c[1],c[0],this)}}catch(h){if(h!==C)throw h;
}},enumerable:!0},keys:{value:function(){return l(this._url,"keys")},enumerable:!0},values:{value:function(){return l(this._url,"values")},enumerable:!0},items:{value:function(){return l(this._url,"keys+values")}},size:{get:function(){return k(this._url.query).length},enumerable:!0},getAll:{value:function(a){g(a);var b=[];k(this._url.query).forEach(function(e){e=d(e);e[0]===a&&b.push(e[1])});return b},enumerable:!0},append:{value:function(a,b){g(a);g(b);var e=k(this._url.query);e.push(c([a,b]));this._url.query=
f(e)},enumerable:!0}});Object.defineProperties(n.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var b=a.scheme?a.scheme+":":"";a.host&&(b+="//",a.userinfo&&(b+=a.userinfo+"@"),b+=a.host,a.port&&(b+=":"+a.port));b+=a.path;a.query&&(b+="?"+a.query);a.fragment&&(b+="#"+a.fragment);a=b}else a=this._input;return a},set:function(a){g(a);this._input=a;this._url=h(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:
""},enumerable:!0},protocol:{get:function(){return this._url?this._url.scheme+":":":"},set:function(a){g(a);if(this._url&&(a=":"===a.slice(-1)?a.substring(0,a.length-1):a,""===a||r.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){g(a);this._url&&(this._url.userinfo=a)}},username:{get:function(){if(!this._url)return"";var a=E.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){g(a);if(this._url){var b=
E.exec(this._userinfo);a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=E.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){g(a);if(this._url){var b=[E.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},
set:function(a){g(a);if(this._url&&(a=w.exec(a)))this._url.host=a[1],this._url.port=e(a[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){g(a);this._url&&v.exec(a)&&(this._url.host=a)},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===J[this.protocol]&&(a="");return a},set:function(a){g(a);this._url&&t.exec(a)&&(this._url.port=e(a))},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(b){g(b);
this._url&&F.exec(b)&&(this._url.host&&b&&"/"!==b[0]&&(b="/"+b),this._url.path=b?a(b):"")},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){g(a);this._url&&(a&&"?"===a[0]&&(a=a.substring(1)),D.exec(a)&&(this._url.query=a))},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){g(a);this._url&&(a&&"#"===a[0]&&(a=a.substring(1)),x.exec(a)&&(this._url.fragment=a))},enumerable:!0}});
if((p=window.URL||window.webkitURL)&&p.createObjectURL)Object.defineProperty(n,"createObjectURL",{value:p.createObjectURL.bind(p),enumerable:!1}),Object.defineProperty(n,"revokeObjectURL",{value:p.revokeObjectURL.bind(p),enumerable:!1});window.URL=n})();define("orion/URL-shim",[],function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(g,k,f){function d(a,b){var e=Object.keys(a),c=Object.keys(b);if(e.length!==c.length)return!1;e.sort();c.sort();for(var h=0,m=e.length;h<m;h++){var d=e[h];if(d!==c[h])return!1;var n=a[d],d=b[d];if(n!==d&&JSON.stringify(n)!==JSON.stringify(d))return!1}return!0}function c(a){if(-1===a.indexOf("://"))try{return(new URL(a,location.href)).href}catch(b){}return a}function l(a){var b=null,e={key:function(e){return(b=
b||Object.keys(a))[e]},getItem:function(b){return a[b]},setItem:function(e,c){a[e]=c;b=null},removeItem:function(e){delete a[e];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}};Object.defineProperty(e,"length",{get:function(){return(b=b||Object.keys(a)).length}});return e}function b(a,b){if(b&&b instanceof XMLHttpRequest){var e,c;try{e=b.status,c=b.statusText}catch(h){e=0,c=""}return{status:e||0,statusText:c}}return b}function e(a){var e=a?JSON.parse(JSON.stringify(a,
b)):a;a instanceof Error&&(e.__isError=!0,e.message=e.message||a.message,e.name=e.name||a.name);return e}function a(a,b){this.type=a;this.plugin=b}function m(a,b){this.__objectId=a;this.__methods=b}function h(b,c,h){function n(a){L&&h.postMessage(a,L)}function r(a){if(!L)return(new g).reject(Error("plugin not connected"));a.id=String(Y++);var b=new g;Q[a.id]=b;b.then(null,function(b){"active"===z&&b instanceof Error&&"Cancel"===b.name&&n({requestId:a.id,method:"cancel",params:b.message?[b.message]:
[]})});var e=Object.prototype.toString;a.params.forEach(function(c,h){if("[object Object]"===e.call(c)&&!(c instanceof m)){var d,n;for(d in c)"[object Function]"===e.call(c[d])&&(n=n||[],n.push(d));if(n){var p=V++;S[p]=c;d=function(){delete S[p]};b.then(d,d);a.params[h]=new m(p,n)}}});h.postMessage(a,L);return b.promise}function f(a,b){a||0===a?n({id:a,result:null,error:b}):console.log(b)}function l(a,b,c,h){h.forEach(function(a,b){if(a&&"undefined"!==typeof a.__objectId){var e={};a.__methods.forEach(function(b){e[b]=
function(){return r({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});h[b]=e}});var m=void 0===typeof a?null:{id:a,result:null,error:null};try{var d=c.apply(b,h);m&&(d&&"function"===typeof d.then?(P[a]=d,d.then(function(b){delete P[a];m.result=b;n(m)},function(b){P[a]&&(delete P[a],m.error=e(b),n(m))},function(){n({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(m.result=d,n(m)))}catch(p){m&&(m.error=e(p),n(m))}}function w(a){try{if(a.method){var b=
a.method,e=a.params||[];if("serviceId"in a){var c=X[a.serviceId];c||f(a.id,"service not found");b in c?l(a.id,c,c[b],e):f(a.id,"method not found")}else if("objectId"in a){var m=S[a.objectId];m||f(a.id,"object not found");b in m?l(a.id,m,m[b],e):f(a.id,"method not found")}else if("requestId"in a){var d=P[a.requestId];d&&"cancel"===b&&d.cancel&&d.cancel.apply(d,e)}else if("responseId"in a){var n=Q[a.responseId];n&&"progress"===b&&n.progress&&n.progress.apply(n,e)}else if("plugin"===a.method){var p=
a.params[0];R({headers:p.headers,services:p.services}).then(function(){K&&K.resolve(C)})}else if("timeout"===a.method)K&&K.reject(a.error);else throw Error("Bad method: "+a.method);}else{var r=Q[String(a.id)];delete Q[String(a.id)];if(a.error){var q=h.handleServiceError(C,a.error);r.reject(q)}else r.resolve(a.result)}}catch(u){console.log("Plugin._messageHandler "+u)}}function F(a){var b={};if(a.methods&&(a.methods.forEach(function(e){b[e]=function(){var b={serviceId:a.serviceId,method:e,params:Array.prototype.slice.call(arguments)};
return"active"===z?r(b):C.start({"transient":!0}).then(function(){return r(b)})}}),b.addEventListener&&b.removeEventListener)){var e=new k,c=V++;S[c]={handleEvent:e.dispatchEvent.bind(e)};var h=new m(c,["handleEvent"]),d=b.addEventListener;b.addEventListener=function(a,b){e._namedListeners[a]||d(a,h);e.addEventListener(a,b)};var n=b.removeEventListener;b.removeEventListener=function(a,b){e.removeEventListener(a,b);e._namedListeners[a]||n(a,h)}}return b}function D(a){var e=JSON.parse(JSON.stringify(a.properties));
e.__plugin__=b;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);e.objectClass=a;return e}function x(a){var b=F(a),e=D(a),e=h.registerService(a.names||a.type,b,e);I[a.serviceId]={registration:e,proxy:b}}function E(){h.persist(b,{created:J,headers:G,services:y,autostart:A,lastModified:H})}var C=this;c=c||{};var J=c.created||(new Date).getTime(),G=c.headers||{},y=c.services||[],A=c.autostart,H=c.lastModified||0,z="installed",B,K,L,T,I={},Y=0,V=0,P={},Q={},S={},X={},R;this._persist=E;this._resolve=function(){z=
"resolved";h.dispatchEvent(new a("resolved",C))};this._getAutostart=function(){return A};this._getCreated=function(){return J};this.getLocation=function(){return b};this.getHeaders=function(){return JSON.parse(JSON.stringify(G))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return H};this.getServiceReferences=function(){var a=[];Object.keys(I).forEach(function(b){a.push(I[b].registration.getReference())});
return a};this.setParent=function(a){return T!==a?(T=a,C.stop({"transient":!0}).then(function(){if("started"===A)return C.start({"transient":!0});if("lazy"===A)return C.start({lazy:!0,"transient":!0})})):(new g).resolve()};this.getState=function(){return z};this.start=function(e){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if(B)return B.promise.then(this.start.bind(this,e));if("active"===z)return(new g).resolve();if(!e||!e.transient){var c=e&&e.lazy?"lazy":"started";
c!==A&&(A=c,E())}c=h.getState();if("starting"!==c&&"active"!==c)return e.transient?(new g).reject(Error("start transient error")):(new g).resolve();if("installed"===z)try{this._resolve()}catch(m){return(new g).reject(m)}"resolved"===z&&y.forEach(function(a){x(a)});if(e&&e.lazy)return"starting"!==z&&(z="starting",h.dispatchEvent(new a("lazy activation",C))),(new g).resolve();var d=new g;B=d;z="starting";h.dispatchEvent(new a("starting",C));K=new g;L=h.connect(b,w,T);K.then(function(){K=null;z="active";
h.dispatchEvent(new a("started",C));B=null;d.resolve()},function(){K=null;z="stopping";h.dispatchEvent(new a("stopping",C));Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});h.disconnect(L);L=null;z="resolved";B=null;h.dispatchEvent(new a("stopped",C));d.reject(Error("plugin activation error"))});return d.promise};this.stop=function(b){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if(B)return B.promise.then(this.stop.bind(this,b));if((!b||
!b.transient)&&"stopped"!==A)A="stopped",E();if("active"!==z&&"starting"!==z)return(new g).resolve();B=b=new g;z="stopping";h.dispatchEvent(new a("stopping",C));Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});L&&(h.disconnect(L),L=null);z="resolved";B=null;h.dispatchEvent(new a("stopped",C));b.resolve();return b.promise};R=function(e){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if(!e)return 0===H&&(H=(new Date).getTime(),E()),h.loadManifest(b).then(R);
var c=G,m=y,n=A;G=e.headers||{};y=e.services||{};A=e.autostart||A;e.lastModified?H=e.lastModified:(H=(new Date).getTime(),E());if(d(G,c)&&d(y,m)&&A===n)return(new g).resolve();if("active"===z||"starting"===z){var r=[];Object.keys(y).forEach(function(a){var b=y[a];r.push(a);var e=I[a];if(e){if(d(b.methods,Object.keys(e.proxy))){a=D(b);var c=e.registration.getReference(),h={};c.getPropertyKeys().forEach(function(a){h[a]=c.getProperty(a)});d(a,h)||e.registration.setProperties(a);return}e.registration.unregister();
delete I[a]}x(b)});Object.keys(I).forEach(function(a){-1===r.indexOf(a)&&(I[a].registration.unregister(),delete I[a])})}"active"===z&&(h.disconnect(L),K=new g,L=h.connect(b,w,T),K.then(function(){K=null},function(){K=null;z="stopping";h.dispatchEvent(new a("stopping"),C);Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});h.disconnect(L);L=null;z="resolved";h.dispatchEvent(new a("stopped",C))}));return(new g).resolve()};this.update=function(b){return R(b).then(function(){h.dispatchEvent(new a("updated",
C))})};this.uninstall=function(){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if("active"===z||"starting"===z||"stopping"===z)return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));h.removePlugin(this);z="uninstalled";h.dispatchEvent(new a("uninstalled",C));return(new g).resolve()}}var n=/^http[s]?/i;return{Plugin:h,PluginRegistry:function(b,e){function m(a){var b=a.source;w.some(function(e){if(b===e.target){try{var c;if("undefined"===typeof e.useStructuredClone){var h=
"string"!==typeof a.data;c=h?a.data:JSON.parse(a.data);e.useStructuredClone=h}else c=e.useStructuredClone?a.data:JSON.parse(a.data);e.handler(c)}catch(m){}return!0}})}e=e||{};var d=e.storage||localStorage;d.getItem||(d=l(d));var r="installed",f,v=[],w=[],F=new k,D={},x={registerService:b.registerService.bind(b),connect:function(a,b,e,c){function h(a){a=Error(a);a.name="timeout";b({method:"timeout",error:a})}var m={handler:b,url:a},d=setTimeout(h.bind(null,"Load timeout for: "+a),c||15E3),n=document.createElement("iframe");
n.name=a+"_"+(new Date).getTime();n.src=a;n.onload=function(){clearTimeout(d);d=setTimeout(h.bind(null,"Plugin handshake timeout for: "+a),5E3)};n.sandbox="allow-scripts allow-same-origin";n.style.width=n.style.height="100%";n.frameBorder=0;(e||f).appendChild(n);m.target=n.contentWindow;m.close=function(){clearTimeout(d);if(n){var a=n.parentNode;a&&a.removeChild(n);n=null}};w.push(m);return m},disconnect:function(a){for(var b=0;b<w.length;b++)if(a===w[b]){w.splice(b,1);try{a.close()}catch(e){}break}},
removePlugin:function(a){for(var b=0;b<v.length;b++)if(a===v[b]){v.splice(b,1);break}d.removeItem("plugin."+a.getLocation())},persist:function(a,b){d.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{F.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new g,e=x.connect(a,function(a){e&&a.method&&("manifest"===a.method||
"plugin"===a.method?(a=a.params[0],x.disconnect(e),e=null,b.resolve(a)):"timeout"===a.method&&(x.disconnect(e),e=null,b.reject(a.error)))});return b.promise},getState:function(){return r},handleServiceError:function(a,b){if(b&&401===b.status){var e=a.getHeaders(),c=a.getName()||a.getLocation(),h=document.createElement("span");h.appendChild(document.createTextNode("Authentication required for: "+c+"."));e.login&&(h.appendChild(document.createTextNode(" ")),c=document.createElement("a"),c.target="_blank",
c.textContent="Login",c.href=e.login,n.test(c.href)?(h.appendChild(c),h.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+e.login));return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(h)}}if(b.__isError){var m=b;b=Error(m.message);Object.keys(m).forEach(function(a){b[a]=m[a]});delete b.__isError}return b}};this.getLocation=function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};
this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=x.getState;this.init=function(){if(!("starting"===r||"active"===r||"stopping"===r)){addEventListener("message",m,!1);for(var a=[],b=0,n=d.length;b<n;b++)a.push(d.key(b));a.forEach(function(a){if(0===a.indexOf("plugin.")){var b=a.substring(7);a=JSON.parse(d.getItem(a));a.created&&v.push(new h(b,a,x))}});v.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});e.parent?f=e.parent:(f=document.createElement("div"),
e.visible||(f.style.display="none",f.style.visibility="hidden"),document.body.appendChild(f));e.plugins&&Object.keys(e.plugins).forEach(function(a){a=c(a);if(!this.getPlugin(a)){var b=e.plugins[a];"object"!==typeof b&&(b={});b.autostart=b.autostart||e.defaultAutostart||"lazy";v.push(new h(a,b,x))}}.bind(this));r="starting"}};this.start=function(){"starting"!==r&&this.init();if("starting"!==r)return(new g).reject("Cannot start framework. Framework is already "+r+".");var a=[],b=(new Date).getTime();
v.forEach(function(e){var c=e._getAutostart();0===e.getLastModified()?a.push(e.update().then(function(){if("started"===c)return e.start({"transient":!0});if("lazy"===c)return e.start({lazy:!0,"transient":!0});e._resolve()})):"started"===c?a.push(e.start({"transient":!0})):"lazy"===c?(a.push(e.start({lazy:!0,"transient":!0})),b>e.getLastModified()+864E5&&e.update()):e._resolve()});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){r="active"})};this.stop=function(){if("starting"!==
r&&"active"!==r)return(new g).reject("Cannot stop registry. Registry is already "+r+".");r="stopping";var a=[];v.forEach(function(b){a.push(b.stop({"transient":!0}))});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){if(!e.parent){var a=f.parentNode;a&&a.removeChild(f)}f=null;removeEventListener("message",m);r="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};
this.installPlugin=function(b,e){b=c(b);var m=this.getPlugin(b);if(m)return(new g).resolve(m);if(D[b])return D[b];if(e)return m=new h(b,e,x),v.push(m),m._persist(),x.dispatchEvent(new a("installed",m)),(new g).resolve(m);var d=x.loadManifest(b).then(function(e){m=new h(b,e,x);v.push(m);m._persist();delete D[b];x.dispatchEvent(new a("installed",m));return m},function(a){delete D[b];throw a;});return D[b]=d};this.getPlugins=function(){return v.slice()};this.getPlugin=function(a){var b=null;a=c(a);v.some(function(e){if(a===
e.getLocation())return b=e,!0});return b};this.addEventListener=F.addEventListener.bind(F);this.removeEventListener=F.removeEventListener.bind(F);this.resolvePlugins=function(){var a=!0;v.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function g(d,c){function l(b){var c=b.getProperty("service.id"),h=this.addingService(b);h&&(e[c]=b,a[c]=h)}function b(b){var c=b.getProperty("service.id"),h=a[c];delete e[c];delete a[c];this.removedService(b,h)}this.serviceRegistry=d;var e={},a={},m=k,h,n;this.close=function(){if(m!==f)throw"Already closed";m=k;d.removeEventListener("registered",h);d.removeEventListener("unregistering",n);n=h=null;var a=this;this.getServiceReferences().forEach(function(e){b.call(a,
e)});if("function"===typeof this.onClose)this.onClose()};this.getServiceReferences=function(){var a=Object.keys(e);return!a.length?null:a.map(function(a){return e[a]})};this.open=function(){if(m!==k)throw"Already open";m=f;var a=this;h=function(b){if(-1!==b.serviceReference.getProperty("objectClass").indexOf(c)&&(l.call(a,b.serviceReference),"function"===typeof a.onServiceAdded))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};n=function(e){-1!==e.serviceReference.getProperty("objectClass").indexOf(c)&&
b.call(a,e.serviceReference)};d.addEventListener("registered",h);d.addEventListener("unregistering",n);d.getServiceReferences(c).forEach(function(b){l.call(a,b);if("function"===typeof a.onServiceAdded)return a.onServiceAdded(b,d.getService(b))});if("function"===typeof this.onOpen)this.onOpen()}}var k=0,f=1;g.prototype={addingService:function(d){return this.serviceRegistry.getService(d)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(d,c){}};return g});
define("orion/objects",[],function(){function g(g){for(var f=1;f<arguments.length;f++){var d=arguments[f],c;for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(g[c]=d[c])}return g}return{clone:function(k){if(Array.isArray(k))return Array.prototype.slice.call(k);var f=Object.create(Object.getPrototypeOf(k));g(f,k);return f},mixin:g,toArray:function(g){return Array.isArray(g)?g:[g]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(g,k,f){var d,c,l,b,e,a="pid";d=function(b,e,c){function m(a,b,c){b.forEach(function(h,m){try{var d=a[m].getProperty("__plugin__"),p=d&&e.getPlugin(d);(!d||p&&"active"===p.getState())&&b[m].updated(c)}catch(r){"undefined"!==typeof console&&console.log(r)}})}k.call(this,b,"orion.cm.managedservice");var d={},f={},r=function(e){var m=[];e.plugin.getServiceReferences().forEach(function(e){if(-1!==e.getProperty("objectClass").indexOf("orion.cm.managedservice")){var d=
e.getProperty(a);e=b.getService(e);d&&e&&(d=(d=c._find(d))&&d.getProperties(),m.push(e.updated(d)))}});return g.all(m)};this.addingService=function(e){var c=e.getProperty(a),m=b.getService(e);if(!c||!m)return null;d[c]||(d[c]=[]);f[c]||(f[c]=[]);d[c].push(e);f[c].push(m);return m};this.onServiceAdded=function(b,e){var h=b.getProperty(a),h=c._find(h);m([b],[e],h&&h.getProperties())};this.onOpen=function(){e.addEventListener("started",r)};this.onClose=function(){e.removeEventListener("started",r)};
this.notifyUpdated=function(a){var b=a.getPid();m(d[b]||[],f[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();m(d[a]||[],f[a]||[],null)};this.removedService=function(b,e){var c=b.getProperty(a),h=d[c],m=f[c];1<h.length?h.splice(h.indexOf(b),1):delete d[c];1<m.length?m.splice(m.indexOf(e),1):delete f[c]}};c=function(){function a(e,c,h){this.store=new l(this,h);this.configAdmin=new b(this,this.store);this.tracker=new d(e,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();b=function(){function a(b,e){this.factory=b;this.store=e}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var m="/cm/configurations";
l=function(){function b(c,h){this.factory=c;this.prefsService=h;this.configs=Object.create(null);this.pref=null;var d=this;this.initPromise=this.prefsService.getPreferences(m).then(function(b){d.pref=b;b.keys().forEach(function(c){if(!d.configs[c]){var h=b.get(c);"object"===typeof h&&null!==h&&0<Object.keys(h).length&&(h[a]=c,d.configs[c]=new e(d.factory,d,h))}})})}b.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new e(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(e){(e=a._find(e))&&null!==e.getProperties()&&b.push(e)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return b}();e=function(){function b(e,c){c=f.clone(c);delete c[a];e.properties=c}function e(c,m,d){this.factory=c;this.store=m;if(null!==d&&"object"===typeof d)this.pid=d[a],b(this,
d);else if("string"===typeof d)this.pid=d,this.properties=null;else throw Error("Invalid pid/properties "+d);}e.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(b){this._checkRemoved();var e=null;this.properties&&(e=f.clone(this.properties),b||(e[a]=this.pid));return e},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(a){this._checkRemoved();b(this,a);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return e}();return{ConfigurationAdminFactory:c}});
define("orion/bootstrap","require orion/Deferred orion/serviceregistry orion/preferences orion/pluginregistry orion/config".split(" "),function(g,k,f,d,c,l){var b;return{startup:function(){if(b)return b;b=new k;var e=new f.ServiceRegistry,a=new d.PreferencesService(e);return a.getPreferences("/plugins").then(function(m){var h={plugins:{}};m.keys().forEach(function(a){var b=g.toUrl(a);h.plugins[b]=m[a]});var d=new c.PluginRegistry(e,h);return d.start().then(function(){if(0<e.getServiceReferences("orion.core.preference.provider").length)return a.getPreferences("/plugins",
a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=g.toUrl(a);d.getPlugin(a)||b.push(d.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return k.all(b,function(a){console.log(a)})})}).then(function(){return(new l.ConfigurationAdminFactory(e,d,a)).getConfigurationAdmin().then(e.registerService.bind(e,"orion.cm.configadmin"))}).then(function(){var a=e.getService("orion.core.auth");if(a){var b=a.getUser().then(function(b){if(b)localStorage.setItem("lastLogin",
(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),c=localStorage.getItem("lastLogin");if(!c||c<(new Date).getTime()-9E5)return b}}).then(function(){var c={serviceRegistry:e,preferences:a,pluginRegistry:d};b.resolve(c);return c})})}}});
(function(){function g(c,d,b,e,a,m){d[c]&&(b.push(c),(!0===d[c]||1===d[c])&&e.push(a+c+"/"+m))}function k(c,d,b,e,a){d=e+d+"/"+a;require._fileExists(c.toUrl(d+".js"))&&b.push(d)}function f(c,d,b){for(var e in d)d.hasOwnProperty(e)&&(!c.hasOwnProperty(e)||b)?c[e]=d[e]:"object"===typeof d[e]&&f(c[e],d[e],b)}var d=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(c){var l=c.config?c.config():{},l=l||{};return{version:"2.0.1+",load:function(b,e,a,c){c=c||{};c.locale&&(l.locale=
c.locale);var h=d.exec(b),n=h[1],p=h[4],u=h[5],s=p.split("-"),q=[],r={},t,v="";h[5]?(n=h[1],b=n+u):(u=h[4],p=l.locale,p||(p=l.locale="undefined"===typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),s=p.split("-"));if(c.isBuild){q.push(b);k(e,"root",q,n,u);for(t=0;t<s.length;t++)c=s[t],v+=(v?"-":"")+c,k(e,v,q,n,u);e(q,function(){a()})}else e([b],function(b){var c=[],h;g("root",b,c,q,n,u);for(t=0;t<s.length;t++)h=s[t],v+=(v?"-":"")+h,g(v,b,c,q,n,u);e(q,function(){var h,
m,d;for(h=c.length-1;-1<h&&c[h];h--){d=c[h];m=b[d];if(!0===m||1===m)m=e(n+d+"/"+u);f(r,m)}a(r)})})}}})})();
define("orion/i18n",[],function(){return{load:function(g,k,f,d){d=d||{};var c=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,l=c.exec(g);if(l){if(!k.defined||k.defined(g))try{f(k(g));return}catch(b){}if(d.isBuild||d.isTest)f({});else if(k.specified&&!k.specified("orion/bootstrap"))f({});else{var e=l[1],a=l[3]?l[2]:"",m=l[3]||l[2];k(["orion/bootstrap"],function(b){b.startup().then(function(b){var h=b.serviceRegistry;b=h.getServiceReferences("orion.i18n.message");if(a)b.some(function(a){return g===a.getProperty("name")?
(h.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),!0):!1})||f({});else{var u={},s;b.forEach(function(b){var h=b.getProperty("name");if((l=c.exec(h))&&e===l[1]&&m===(l[3]||l[2]))if(a=l[3]?l[2]:""){if((b=d.locale||("undefined"!==typeof navigator?navigator.language||navigator.userLanguage:null))&&0===b.toLowerCase().indexOf(a.toLowerCase()))u[a]=!0,(!k.specified||!k.specified(h))&&define(h,["orion/i18n!"+h],function(a){return a})}else s=b});!k.specified||!k.specified(g)?s?
h.getService(s).getMessageBundle().then(function(a){Object.keys(u).forEach(function(b){"undefined"===typeof a[b]&&(a[b]=u[b])});define(g,[],a);f(a)},function(){define(g,[],u);f(u)}):(define(g,[],u),f(u)):f(u)}})})}}else f(null)}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell",ShellLinkWorkspace:"Workspace Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor",EditorRelatedLink:"Show Current Folder",EditorRelatedLinkParent:"Show Enclosing Folder",EditorLinkWorkspace:"Show Workspace",EditorRelatedLinkProj:"Show Project","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","Orion Image Viewer":"Orion Image Viewer","Orion Markdown Viewer":"Orion Markdown Viewer","Orion JSON Editor":"Orion JSON Editor",
"View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion.","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer","Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it",
"Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was ",
Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy","Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"2014-04-02_22-01-33","LOG: ":"LOG: ",View:"View","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?",
Operations:"Operations","Operations running":"Operations running","Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry",Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Regular expression":"Regular expression",
"Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Sidebar":"Toggle Sidebar","Sample HTML5 Site":"Sample HTML5 Site",
"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin","Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion.",Browser:"Web Browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred.",Filter:"Filter (* \x3d any string, ? \x3d any character)",
"To view the browser's context menu, trigger the context menu again.":"To view the browser's context menu, trigger the context menu again.",Edit:"Edit",CentralNavTooltip:"Toggle Navigation Menu"});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/util",[],function(){var g=navigator.userAgent,k=-1!==g.indexOf("MSIE")||-1!==g.indexOf("Trident")?document.documentMode:void 0,f=parseFloat(g.split("Firefox/")[1]||g.split("Minefield/")[1])||void 0,d=-1!==g.indexOf("Opera")?parseFloat(g.split("Version/")[1]):void 0,c=parseFloat(g.split("Chrome/")[1])||void 0,l=-1!==g.indexOf("Safari")&&!c,b=parseFloat(g.split("WebKit/")[1])||void 0,e=-1!==g.indexOf("Android"),a=-1!==g.indexOf("iPad"),g=-1!==g.indexOf("iPhone"),m=a||g,h=-1!==navigator.platform.indexOf("Mac"),
n=-1!==navigator.platform.indexOf("Win"),p=-1!==navigator.platform.indexOf("Linux"),u="ontouchstart"in document.createElement("input");return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,e){return b[(e<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:k,isFirefox:f,isOpera:d,isChrome:c,isSafari:l,isWebkit:b,isAndroid:e,isIPad:a,isIPhone:g,isIOS:m,isMac:h,isWindows:n,
isLinux:p,isTouch:u,platformDelimiter:n?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(g){function k(a,b){b||(b=document);return b.querySelectorAll(a)}function f(a){var b=a.tabIndex;0===b&&g.isIE&&!{a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0}[a.nodeName.toLowerCase()]&&!a.attributes.tabIndex&&(b=-1);return b}function d(a){if(0<=f(a))return a;if(a.hasChildNodes())for(var b=0;b<a.childNodes.length;b++){var e=d(a.childNodes[b]);if(e)return e}return null}function c(a){if(0<=
f(a))return a;if(a.hasChildNodes())for(var b=a.childNodes.length-1;0<=b;b--){var e=c(a.childNodes[b]);if(e)return e}return null}function l(a,e){if(3===a.nodeType){var c=b.exec(a.nodeValue);c&&1<c.length&&e(a,c)}if(a.hasChildNodes())for(c=0;c<a.childNodes.length;c++)l(a.childNodes[c],e)}var b=/\$\{([^\}]+)\}/,e=null;return{$:function(a,b){b||(b=document);return b.querySelector(a)},$$:k,$$array:function(a,b){return Array.prototype.slice.call(k(a,b))},node:function(a){var b=a;"string"===typeof a&&(b=
document.getElementById(a));return b},contains:function(a,b){if(!a||!b)return!1;if(a===b)return!0;var e=a.compareDocumentPosition(b);return Boolean(e&16)},bounds:function(a){a=a.getBoundingClientRect();return{left:a.left+document.documentElement.scrollLeft,top:a.top+document.documentElement.scrollTop,width:a.width,height:a.height}},empty:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)},firstTabbable:d,lastTabbable:c,stop:function(a){window.document.all&&(a.keyCode=0);a.preventDefault&&
(a.preventDefault(),a.stopPropagation())},processTextNodes:function(a,b){l(a,function(a,e){a.parentNode.replaceChild(document.createTextNode(b[e[1]]||e[1]),a)})},processDOMNodes:function(a,b){l(a,function(a,e){var c=b[e[1]];if(c){var d=document.createRange(),f=e.index;d.setStart(a,f);d.setEnd(a,f+e[0].length);d.deleteContents();d.insertNode(c)}})},addAutoDismiss:function(a,b){function c(a){e.forEach(function(b){var e=!1,c=b.excludeNodes.some(function(b){return document.body.contains(b)?(e=!0,b.contains(a.target)):
!1});if(e&&!c)try{b.dismiss(a)}catch(h){"undefined"!==typeof console&&console&&console.error(h&&h.message)}});e=e.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}null===e&&(e=[],document.addEventListener("click",c,!0),g.isIOS&&document.addEventListener("touchend",function(a){function b(){a.target.removeEventListener("click",b)}0===a.touches.length&&a.target.addEventListener("click",b)},!1));e.push({excludeNodes:a,dismiss:b})},setFramesEnabled:function(a){for(var b=
document.getElementsByTagName("iframe"),e=0;e<b.length;e++)b[e].parentNode.style.pointerEvents=a?"":"none"},removeAutoDismiss:function(a){e=e.filter(function(b){return a!==b.dismiss})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("text",["module"],function(g){var k,f,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,l=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,b="undefined"!==typeof location&&location.href,e=b&&location.protocol&&location.protocol.replace(/\:/,""),a=b&&location.hostname,m=b&&(location.port||void 0),h=[],n=g.config&&g.config()||{};k={version:"2.0.5",strip:function(a){if(a){a=a.replace(c,"");var b=a.match(l);b&&(a=b[1])}else a="";return a},
jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:n.createXhr||function(){var a,b,e;if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!==typeof ActiveXObject)for(b=0;3>b;b+=1){e=d[b];try{a=new ActiveXObject(e)}catch(c){}if(a){d=[e];break}}return a},parseName:function(a){var b,
e,c=!1,h=a.indexOf(".");b=0===a.indexOf("./")||0===a.indexOf("../");-1!==h&&(!b||1<h)?(b=a.substring(0,h),e=a.substring(h+1,a.length)):b=a;a=e||b;h=a.indexOf("!");-1!==h&&(c="strip"===a.substring(h+1),a=a.substring(0,h),e?e=a:b=a);return{moduleName:b,ext:e,strip:c}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,e,c){var h,d;h=k.xdRegExp.exec(a);if(!h)return!0;a=h[2];h=h[3];h=h.split(":");d=h[1];h=h[0];return(!a||a===b)&&(!h||h.toLowerCase()===e.toLowerCase())&&(!d&&!h||d===c)},finishLoad:function(a,
b,e,c){e=b?k.strip(e):e;n.isBuild&&(h[a]=e);c(e)},load:function(c,h,d,f){if(f.isBuild&&!f.inlineText)d();else{n.isBuild=f.isBuild;var r=k.parseName(c);f=r.moduleName+(r.ext?"."+r.ext:"");var l=h.toUrl(f),g=n.useXhr||k.useXhr;!b||g(l,e,a,m)?k.get(l,function(a){k.finishLoad(c,r.strip,a,d)},function(a){d.error&&d.error(a)}):h([f],function(a){k.finishLoad(r.moduleName+"."+r.ext,r.strip,a,d)})}},write:function(a,b,e,c){h.hasOwnProperty(b)&&(c=k.jsEscape(h[b]),e.asModule(a+"!"+b,"define(function () { return '"+
c+"';});\n"))},writeFile:function(a,b,e,c,h){b=k.parseName(b);var d=b.ext?"."+b.ext:"",m=b.moduleName+d,n=e.toUrl(b.moduleName+d)+".js";k.load(m,e,function(b){b=function(a){return c(n,a)};b.asModule=function(a,b){return c.asModule(a,n,b)};k.write(a,m,b,h)},h)}};if("node"===n.env||!n.env&&"undefined"!==typeof process&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),k.get=function(a,b){var e=f.readFileSync(a,"utf8");0===e.indexOf("\ufeff")&&(e=e.substring(1));b(e)};else if("xhr"===
n.env||!n.env&&k.createXhr())k.get=function(a,b,e,c){var h=k.createXhr(),d;h.open("GET",a,!0);if(c)for(d in c)c.hasOwnProperty(d)&&h.setRequestHeader(d.toLowerCase(),c[d]);if(n.onXhr)n.onXhr(h,a);h.onreadystatechange=function(c){4===h.readyState&&(c=h.status,399<c&&600>c?(c=Error(a+" HTTP status: "+c),c.xhr=h,e(c)):b(h.responseText))};h.send(null)};else if("rhino"===n.env||!n.env&&"undefined"!==typeof Packages&&"undefined"!==typeof java)k.get=function(a,b){var e,c,h=new java.io.File(a),d=java.lang.System.getProperty("line.separator"),
h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(h),"utf-8")),m="";try{e=new java.lang.StringBuffer;(c=h.readLine())&&c.length()&&65279===c.charAt(0)&&(c=c.substring(1));for(null!==c&&e.append(c);null!==(c=h.readLine());)e.append(d),e.append(c);m=String(e.toString())}finally{h.close()}b(m)};return k});define("text!orion/banner/slideout.html",[],function(){return'\x3cdiv id\x3d"slideContainer" class\x3d"slideParameters slideContainer"\x3e\n\t\x3cspan id\x3d"pageCommandParameters" class\x3d"layoutLeft parameters"\x3e\x3c/span\x3e\n\t\x3cspan id\x3d"pageCommandDismiss" class\x3d"layoutRight parametersDismiss"\x3e\x3c/span\x3e\n\x3c/div\x3e'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(g,k,f){return{slideoutHTMLFragment:function(d){var c=document.createElement("div");c.innerHTML=f;var l=k.$("#slideContainer",c);l.id=d+l.id;l=k.$("#pageCommandParameters",c);l.id=d+l.id;l=k.$("#pageCommandDismiss",c);l.id=d+l.id;return c.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(g){function k(d,c,f,b,e,a){this.type=a||"keydown";this.keyCode="string"===typeof d&&"keydown"===this.type?d.toUpperCase().charCodeAt(0):d;this.mod1=void 0!==c&&null!==c?c:!1;this.mod2=void 0!==f&&null!==f?f:!1;this.mod3=void 0!==b&&null!==b?b:!1;this.mod4=void 0!==e&&null!==e?e:!1}function f(d){this.keys=d}k.prototype={getKeys:function(){return[this]},match:function(d,c){if(void 0!==c){if(0!==c)return!1}else if(d instanceof Array){if(1<d.length)return!1;
d=d[0]}return d.type!==this.type?!1:this.keyCode===d.keyCode||this.keyCode===String.fromCharCode(g.isOpera?d.which:void 0!==d.charCode?d.charCode:d.keyCode)?this.mod1!==(g.isMac?d.metaKey:d.ctrlKey)||"keydown"===this.type&&this.mod2!==d.shiftKey||this.mod3!==d.altKey||g.isMac&&this.mod4!==d.ctrlKey?!1:!0:!1},equals:function(d){return!d||this.keyCode!==d.keyCode||this.mod1!==d.mod1||this.mod2!==d.mod2||this.mod3!==d.mod3||this.mod4!==d.mod4||this.type!==d.type?!1:!0}};f.prototype={getKeys:function(){return this.keys.slice(0)},
match:function(d,c){var f=this.keys;if(void 0!==c)return c>f.length?!1:f[c].match(d)?c===f.length-1?!0:c+1:!1;d instanceof Array||(d=[d]);if(d.length>f.length)return!1;var b;for(b=0;b<d.length;b++)if(!f[b].match(d[b]))return!1;return b===f.length?!0:b},equals:function(d){if(!d.keys||d.keys.length!==this.keys.length)return!1;for(var c=0;c<d.keys.length;c++)if(!d.keys[c].equals(this.keys[c]))return!1;return!0}};return{KeyBinding:k,KeyStroke:k,KeySequence:f}});
define("orion/webui/dropdown",["require","orion/webui/littlelib","orion/EventTarget"],function(g,k,f){function d(b){f.attach(this);this._init(b)}function c(b,e){var a=document.createElement(void 0===e?"span":e);a.tabIndex=0;a.className="dropdownMenuItem";a.role="menuitem";var c=document.createElement("span");c.appendChild(document.createTextNode(b));c.classList.add("dropdownCommandName");a.appendChild(c);c=document.createElement("li");c.appendChild(a);return c}function l(){var b=document.createElement("li");
b.classList.add("dropdownSeparator");return b}d.prototype={_init:function(b){this._dropdownNode=k.node(b.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=b.populate;this._selectionClass=b.selectionClass;this._parentDropdown=b.parentDropdown;this._positioningNode=b.positioningNode;if(!this._parentDropdown)for(var e=this._dropdownNode.parentNode;e&&document!==e;){if(e.classList&&e.classList.contains("dropdownMenu")){this._parentDropdown=e.dropdown;break}e=e.parentNode}this._dropdownNode.tabIndex=
0;this._triggerNode=b.triggerNode?b.triggerNode:k.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!b.skipTriggerEventListeners){var a=this;this._triggerNode.addEventListener("click",function(b){a.toggle(b)&&k.stop(b)},!1);"span"===this._triggerNode.tagName.toLowerCase()&&this._triggerNode.addEventListener("keydown",function(b){if(b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.SPACE)a.toggle(),k.stop(b)},!1)}this._dropdownNode.addEventListener("keydown",
this._dropdownKeyDown.bind(this),!1)},addTriggerNode:function(b){var e=this;b.addEventListener("click",function(a){e.toggle(a)&&k.stop(a)},!1)},toggle:function(b){return this.isVisible()?this.close():this.open(b)},isVisible:function(){return this._isVisible},open:function(b){var e=!1;this.isVisible()||(this.dispatchEvent({type:"triggered",dropdown:this,event:b}),k.setFramesEnabled(!1),this._populate&&(this.empty(),this._populate(this._dropdownNode)),0<this.getItems().length&&(this._hookedAutoDismiss||
(this._boundAutoDismiss?k.removeAutoDismiss(this._boundAutoDismiss):this._boundAutoDismiss=this._autoDismiss.bind(this),e=k.$$array(".dropdownSubMenu",this._dropdownNode),k.addAutoDismiss([this._triggerNode].concat(e),this._boundAutoDismiss),this._hookedAutoDismiss=!0),this._triggerNode.classList.add("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.add(this._selectionClass),this._dropdownNode.classList.add("dropdownMenuOpen"),this._isVisible=!0,this._positionDropdown(b),this._dropdownNode.focus(),
e=!0,this._parentDropdown&&this._parentDropdown.submenuOpen(this)));return e},_autoDismiss:function(b){if(this.close(!1)&&this._dropdownNode.contains(b.target))for(b=this._parentDropdown;b;)b.close(!1),b=b._parentDropdown},_positionDropdown:function(b){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+"px";else{b=k.bounds(this._dropdownNode);var e=k.bounds(document.body);if(b.left+b.width>e.left+
e.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-b.width+"px";else{var a=k.bounds(this._boundingNode(this._triggerNode)),c=k.bounds(this._triggerNode);this._dropdownNode.style.left=c.left-a.left-b.width+c.width+"px"}b=b.top+b.height-(e.top+e.height);0<b&&(this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-b)+"px")}},_boundingNode:function(b){var e=window.getComputedStyle(b,null);return null===e||"absolute"===e.getPropertyValue("position")||
!b.parentNode||b===document.body?b:this._boundingNode(b.parentNode)},close:function(b){var e=!1;this.isVisible()&&(this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),k.setFramesEnabled(!0),b&&this._triggerNode.focus(),this._isVisible=!1,this._selectedItem&&(this._selectedItem.classList.remove("dropdownMenuItemSelected"),this._selectedItem=null),e=!0);return e},
getItems:function(){var b=[],e=this;k.$$array("li:not(.dropdownSeparator) \x3e .dropdownMenuItem",this._dropdownNode,!0).forEach(function(a){a.parentNode.parentNode===e._dropdownNode&&b.push(a)});b.forEach(function(a){a._hasDropdownMouseover||(a.addEventListener("mouseover",function(b){a.dropdown?a.dropdown.open(b):(e._closeSelectedSubmenu(),k.stop(b));e._selectItem(a)}),a._hasDropdownMouseover=!0)});return b},empty:function(){var b=this;k.$$array("li",this._dropdownNode).forEach(function(e){e.parentNode===
b._dropdownNode&&e.parentNode.removeChild(e)});this._hookedAutoDismiss=!1},_dropdownKeyDown:function(b){if(b.keyCode===k.KEY.UP||b.keyCode===k.KEY.DOWN||b.keyCode===k.KEY.RIGHT||b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.LEFT){var e=this.getItems();if(e.length&&0<e.length){if(this._selectedItem){var a=e.indexOf(this._selectedItem);0>a&&(a=e.indexOf(this._selectedItem.parentNode));0<=a&&(b.keyCode===k.KEY.UP&&0<a?(a--,this._selectItem(e[a])):b.keyCode===k.KEY.DOWN&&a<e.length-1?(a++,this._selectItem(e[a])):
b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.RIGHT?this._selectedItem.classList.contains("dropdownTrigger")&&this._selectedItem.dropdown?(this._selectedItem.dropdown.open(),this._selectedItem.dropdown._selectItem()):b.keyCode===k.KEY.ENTER&&this._selectedItem.click():b.keyCode===k.KEY.LEFT&&this._selectedItem.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&(this.close(!0),this._parentDropdown&&this._parentDropdown._dropdownNode.focus()))}else this._selectItem(e[0]);k.stop(b)}}else b.keyCode===
k.KEY.ESCAPE&&(this.close(!0),k.stop(b))},_selectItem:function(b){if(b=b||this.getItems()[0])this._selectedItem&&this._selectedItem.classList.remove("dropdownMenuItemSelected"),this._selectedItem=b,this._selectedItem.classList.add("dropdownMenuItemSelected");document.activeElement!==this._dropdownNode&&this._dropdownNode.focus()},submenuOpen:function(b){b!==this._selectedSubmenu&&(this._closeSelectedSubmenu(),this._selectedSubmenu=b)},_closeSelectedSubmenu:function(){for(var b=this._selectedSubmenu;b;)b.close(),
b=b._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&k.removeAutoDismiss(this._boundAutoDismiss)},appendMenuItem:function(b,e){var a=c(b,e);this._dropdownNode.appendChild(a);return a},appendSeparator:function(){var b=l();this._dropdownNode.appendChild(b);return b}};d.prototype.constructor=d;return{Dropdown:d,appendKeyBindingString:function(b,e){var a=document.createElement("span");a.classList.add("dropdownKeyBinding");a.appendChild(document.createTextNode(e));b.appendChild(a)},
createMenuItem:c,createSeparator:l}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'\x3cbutton class\x3d"dropdownTrigger"\x3e${ButtonText}\x3c!--span class\x3d"dropdownArrowDown core-sprite-openarrow"\x3e\x3c/span--\x3e\x3c/button\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e'});define("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'\x3cbutton class\x3d"dropdownTrigger dropdownDefaultButton"\x3e${ButtonText}\x3cspan class\x3d"dropdownArrowDown core-sprite-openarrow"\x3e\x3c/span\x3e\x3c/button\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e'});
define("text!orion/webui/submenutriggerbutton.html",[],function(){return'\x3cli class\x3d"dropdownSubMenu"\x3e\x3cspan class\x3d"dropdownTrigger dropdownMenuItem" role\x3d"menuitem" tabindex\x3d"0"\x3e\x3cspan class\x3d"dropdownCommandName"\x3e${ButtonText}\x3c/span\x3e\x3cspan class\x3d"dropdownArrowRight core-sprite-closedarrow"\x3e\x3c/span\x3e\x3c/span\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e\x3c/li\x3e'});define("text!orion/webui/checkedmenuitem.html",[],function(){return'\x3cli\x3e\x3clabel class\x3d"dropdownMenuItem"\x3e\x3cinput class\x3d"checkedMenuItem" role\x3d"menuitem" type\x3d"checkbox" /\x3e${ItemText}\x3c/label\x3e\x3c/li\x3e'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(g,k){function f(d){this._init(d)}f.prototype={_init:function(d){this._node=k.node(d.node);if(!this._node)throw"no dom node for tooltip found";this._position=d.position||["right","above","below","left"];this._text=d.text;this._hideDelay=void 0===d.hideDelay?200:d.hideDelay;this._tailSize=d.tailSize||10;this._trigger=d.trigger||"mouseover";this._afterShowing=d.afterShowing;this._afterHiding=d.afterHiding;var c=this;if("click"===
this._trigger)this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(b){b.target===c._node&&(c.show(),k.stop(b))},!1);else if("mouseover"===this._trigger){this._showDelay=void 0===d.showDelay?500:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(b){k.contains(c._node,b.target)&&(c.show(),k.stop(b))},!1);this._leaveHandler=function(b){k.contains(c._node,b.target)&&c.hide()};for(var f=0;f<d.length;f++)this._node.addEventListener(d[f],
this._leaveHandler,!1)}},_makeTipNode:function(){if(!this._tip){this._tip=document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("div");this._tipInner.classList.add("tooltip");if(this._text){this._tipTextContent=document.createElement("div");this._tipTextContent.classList.add("textContent");this._tipInner.appendChild(this._tipTextContent);var d=document.createTextNode(this._text);this._tipTextContent.appendChild(d)}this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var c=this;k.addAutoDismiss([this._tip,this._node],function(){c.hide()});"mouseover"===this._trigger&&(this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(d){c._timeout&&(window.clearTimeout(c._timeout),c._timeout=null);c._tip.addEventListener("mouseout",function(b){k.contains(c._tip,b.target)&&(c.hide(),k.stop(b))},
!1)},!1))}return this._tip},_positionTip:function(d,c){this._makeTipNode();"left"===d?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,b;for(b=k.bounds(f);f&&!b.width&&!b.height;f=f.parentNode)b=k.bounds(f);var f=k.bounds(this._tipInner),e;switch(d){case "above":e=b.top-f.height-this._tailSize-1;b=b.left-this._tailSize;break;case "below":e=b.top+b.height+this._tailSize+1;b=b.left-this._tailSize;break;case "left":e=b.top-this._tailSize/2;b=b.left-f.width-
this._tailSize-1;break;default:e=b.top-this._tailSize/2,b=b.left+b.width+this._tailSize+1}var a=k.bounds(document.documentElement);if(e+f.height>a.height)if(c)e=a.height-f.height-1;else return!1;if(b+f.width>a.width)if(c)b=a.width-f.width-1;else return!1;if(0>b)if(c)b=4;else return!1;if(0>e)if(c)e=4;else return!1;this._tail&&this._tail.previousPosition!==d&&(this._tip.removeChild(this._tail),this._tail=null);this._tail||(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+
d),"above"===d||"left"===d?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),"left"===d&&(this._tail.style.left=f.width+"px"),this._tail.previousPosition=d);this._tip.style.top=e+"px";this._tip.style.left=b+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing"))this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),this._showDelay?this._timeout=
window.setTimeout(this._showImmediately.bind(this),this._showDelay):this._showImmediately()},_showImmediately:function(){for(var d=!1,c=0;!d&&c<this._position.length;)d=this._positionTip(this._position[c]),c++;d||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(d){this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null);if(this._tip&&this._tip.classList.contains("tooltipShowing")){void 0===d&&(d=
this._hideDelay);var c=this;this._timeout=window.setTimeout(function(){c._tip.classList.remove("tooltipShowing");c._tip.removeAttribute("style");c._afterHiding&&c._afterHiding()},d)}},destroy:function(){this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null);this._tip&&(document.body.removeChild(this._tip),this._tail=this._tipTextContent=this._tipInner=this._tip=null);if(this._node){this._node.removeEventListener("click",this._clickHandler,!1);this._node.removeEventListener("mouseover",
this._mouseoverHandler,!1);for(var d=["mouseout","click"],c=0;c<d.length;c++)this._node.removeEventListener(d[c],this._leaveHandler,!1)}}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","orion/util orion/webui/littlelib orion/webui/dropdown text!orion/webui/dropdowntriggerbutton.html text!orion/webui/dropdowntriggerbuttonwitharrow.html text!orion/webui/submenutriggerbutton.html text!orion/webui/checkedmenuitem.html orion/webui/tooltip".split(" "),function(g,k,f,d,c,l,b,e){function a(a){var b=a.invocation;if(b){var e=a.command;if(e.hrefCallback)return a=e.hrefCallback.call(b.handler||window,b),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;if(b.commandRegistry)return b.commandRegistry._invoke(b),
!0;if(e.onClick||e.callback)return window.setTimeout(function(){(e.onClick||e.callback).call(b.handler||window,b)},0),!0}return!1}function m(b,e){for(var c in e)if(e[c]&&e[c].keyBinding&&e[c].command&&e[c].keyBinding.match(b)){var h=e[c],d=h.keyBinding;if((!d.domScope||k.contains(k.node(d.domScope),b.target))&&a(h)){k.stop(b);break}}}function h(){var a={};if(t){var b,e,c;e=Object.keys(v);for(b=0;b<e.length;b++)c=e[b],a[c]=v[c];var h=t();e=Object.keys(h);for(b=0;b<e.length;b++)c=e[b],a[c]=h[c]}else a=
v;return a}function n(a){m(a,h())}function p(a,b){a=a||window.event;if(function(a){if(g.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(65===a.keyCode||67===a.keyCode||86===a.keyCode||88===a.keyCode||90===a.keyCode)?!0:!1;if(a.ctrlKey)return!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(65===a.keyCode||67===a.keyCode||86===a.keyCode||88===a.keyCode||90===a.keyCode)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return 0<a["char"].length;if(a.charCode||a.keyCode)switch(a=a.charCode||
a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return 32<=a&&112>a||123<a}return!1}(a)){if("true"===a.target.contentEditable)return;var e=a.target.nodeName.toLowerCase();if("input"===e)switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if("textarea"===e)return}b?b(a):n(a)}function u(){this._init()}
function s(a,b,e){b.classList.add("commandImage");var c;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(c=document.createElement("span"),b.appendChild(c),c.classList.add(a.spriteClass),c.classList.add(a.imageClass)):(c=new Image,c.alt=a.name,c.name=e,c.id=e,c.src=a.image,b.appendChild(c));return c}function q(a,b,e,c,h){this.commandRegistry=h;this.handler=a;this.items=b;this.userData=e;this.command=c;c.parameters&&(this.parameters=c.parameters.makeCopy());this.id=c.id}function r(a){this._init(a)}
var t=null,v={};u.prototype={setProxy:function(a){this.proxy=a},setKeyBindings:function(a){this.bindings=a},_init:function(){var a=this;document.addEventListener("keydown",function(b){return p(b,function(b){var e=a.proxy,c=a.bindings;if(c&&e)for(var h=0;h<c.length;h++)c[h].match(b)&&(e.processKey({type:b.type,keyCode:b.keyCode,altKey:b.altKey,ctrlKey:b.ctrlKey,metaKey:b.metaKey,shiftKey:b.shiftKey}),k.stop(b))})})}};window.document.addEventListener("keydown",p,!1);q.prototype={collectsParameters:function(){return this.commandRegistry&&
this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new q(this.handler,this.items,this.userData,this.command,this.commandRegistry);b.domNode=this.domNode;b.domParent=this.domParent;a?b.parameters=a.makeCopy():this.parameters&&(b.parameters=this.parameters.makeCopy());return b}};q.prototype.constructor=q;r.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;
this.positioningNode=a.positioningNode;this.image=a.image||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC";this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.selectionClass=a.selectionClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters;this.isEditor=a.isEditor},populateChoicesMenu:function(a,b,e,c,
h){e=this.getChoices(b,e,c);var d=e.some(function(a){return a.checked});e.forEach(function(e){if(e.name){var c=document.createElement("li");a.appendChild(c);var m=document.createElement("span");m.tabIndex=0;m.role="menuitem";m.classList.add("dropdownMenuItem");if(d){var n=document.createElement("span");n.classList.add("check");n.appendChild(document.createTextNode(e.checked?"\u25cf":""));m.appendChild(n)}n=document.createTextNode(e.name);m.appendChild(n);c.appendChild(m);m.choice=e;m.addEventListener("click",
function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);m.addEventListener("keydown",function(a){(a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else h._generateMenuSeparator(a)})},getChoices:function(a,b,e){return this.choiceCallback?this.choiceCallback.call(b,a,e):null},makeChoiceCallback:function(a,b){return function(e){a.callback&&a.callback.call(a,b,e)}},hasImage:function(){return this.imageClass||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"!==this.image}};r.prototype.constructor=r;return{Command:r,CommandInvocation:q,createDropdownMenu:function(a,b,e,h,m,n,p,r,g){a=k.node(a);if(!a)throw"no parent node was specified";var l=document.createRange();l.selectNode(a);l=g?l.createContextualFragment(c):l.createContextualFragment(d);k.processTextNodes(l,{ButtonText:b});a.appendChild(l);a=a.lastChild;
var q;g?(g=a.previousSibling,q=g.lastChild):g=a.previousSibling;h?g.classList.add(h):(g.classList.add("orionButton"),g.classList.add("commandButton"));m&&(n||(g.textContent="",g.setAttribute("aria-label",b)),s({spriteClass:"commandSprite",imageClass:m},g,b),g.classList.add("orionButton"));g.dropdown=new f.Dropdown({dropdown:a,populate:e,selectionClass:p,skipTriggerEventListeners:!!q,positioningNode:r});a.dropdown=g.dropdown;return{menuButton:g,menu:a,dropdown:g.dropdown,dropdownArrow:q}},createCheckedMenuItem:function(a,
e,c,h){a=k.node(a);if(!a)throw"no parent node was specified";var d=document.createRange();d.selectNode(a);d=d.createContextualFragment(b);k.processTextNodes(d,{ItemText:e});a.appendChild(d);a=k.$(".checkedMenuItem",a.lastChild);a.checked=c;a.addEventListener("change",h,!1);return a},createCommandItem:function(a,b,c,h,d,m,n){var f;m=m||!b.name&&b.hasImage();if(b.hrefCallback)f=document.createElement("a"),f.id=h,m&&b.hasImage()?s(b,f,h):(f.className="commandLink",f.appendChild(document.createTextNode(b.name))),
n=b.hrefCallback.call(c.handler,c),n.then?n.then(function(a){f.href=a}):f.href=n?n:"#";else{f=document.createElement("button");f.className="orionButton";m?b.hasImage()?(s(b,f,h),b.name&&f.setAttribute("aria-label",b.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),f.appendChild(document.createTextNode(b.name))):(f.classList.add("commandButton"),h=document.createTextNode(b.name),f.appendChild(h));var p=n||b.callback;p&&(b.onClick=p,f.addEventListener("click",function(a){p.call(c.handler,
c)},!1))}"ul"===a.nodeName.toLowerCase()?(n=document.createElement("li"),a.appendChild(n),a=n):f.classList.add("commandMargins");a.appendChild(f);b.tooltip&&(f.commandTooltip=new e.Tooltip({node:f,text:b.tooltip,position:["above","below","right","left"]}));d&&(v[b.id]={keyBinding:d,command:b,invocation:c});return f},createCommandMenuItem:function(a,b,c,h,d,m){var n,p,r=a.dropdown;if(b.hrefCallback)p=f.createMenuItem(b.name,"a"),n=p.firstElementChild,d=b.hrefCallback.call(c.handler,c),d.then?d.then(function(a){n.href=
a}):n.href=d?d:"#",n.addEventListener("keydown",function(a){(a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.SPACE)&&n.click()},!1);else{p=f.createMenuItem(b.name);n=p.firstElementChild;var g=d||b.callback;g&&(b.onClick=g,n.addEventListener("click",function(a){r.close(!0);g.call(c.handler,c)},!1),n.addEventListener("keydown",function(a){if(a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.SPACE)a.preventDefault(),n.click()},!1))}b.tooltip&&(n.commandTooltip=new e.Tooltip({node:n,text:b.tooltip,position:["above",
"below","right","left"]}));m&&f.appendKeyBindingString(n,m);a.appendChild(p);h&&(v[b.id]={keyBinding:h,command:b,invocation:c});return n},executeBinding:a,setKeyBindingProvider:function(a){t=a},localKeyBindings:v,CommandsProxy:u,getKeyBindings:h,processKey:n,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:m}});
define("orion/explorers/navigationUtils",[],function(){function g(f,d,c,g){!k&&f&&(f.push({domNode:d}),d.tabIndex=-1,d.style.outline="none")}var k=-1!==navigator.userAgent.indexOf("iPad");return{addNavGrid:function(f,d,c){f&&(f=f.getGridNavHolder(d,!0))&&g(f,c)},generateNavGrid:g,removeNavGrid:function(f,d){if(f)for(var c=0;c<f.length;c++)if(f[c].domNode===d){f.splice(c,1);break}}}});
define("orion/PageUtil",[],function(){var g=/^http[s]?/i;return{hash:function(){var g=window.location.href.split("#")[1];return g?"#"+g:""},matchResourceParameters:function(g){g=g||window.location.toString();var f={resource:""},d=g.indexOf("#");if(-1!==d&&(g=g.substring(d+1),0!==g.length)){g=g.split(",");f.resource=decodeURIComponent(g[0]);for(d=1;d<g.length;d++){var c=/([^=]*)(=?)(.*)/.exec(g[d]),l=decodeURIComponent(c[1]||""),c=decodeURIComponent(c[3]||"");""!==l&&"resource"!==l&&(f[l]=c)}}return f},
validateURLScheme:function(k,f){var d=k;if(-1===k.indexOf("://")){var c=document.createElement("a");c.href=k;d=c.href}c=!1;if(c=f?f.some(function(c){return RegExp("^"+c+":","i").test(d)}):g.test(d))return k;console.log("Illegal URL Scheme: '"+k+"'");return""}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(g){function k(d){var c="",f=-1!==navigator.platform.indexOf("Mac");f?(d.mod4&&(c+="\u2303"),d.mod3&&(c+="\u2325"),d.mod2&&(c+="\u21e7"),d.mod1&&(c+="\u2318")):(d.mod1&&(c+="Ctrl+"),d.mod2&&(c+="Shift+"),d.mod3&&(c+="Alt+"));if(d.alphaKey)return c+d.alphaKey;if("keypress"===d.type)return c+d.keyCode;for(var b in g.KEY)if(typeof("number"===g.KEY[b])&&g.KEY[b]===d.keyCode){if(f)switch(g.KEY[b]){case g.KEY.BKSPC:b="\u232b";break;case g.KEY.TAB:b=
"\u21e5";break;case g.KEY.ENTER:b="\u23ce";break;case g.KEY.ESCAPE:b="\u238b";break;case g.KEY.SPACE:b="\u2423";break;case g.KEY.PAGEUP:b="\u21de";break;case g.KEY.PAGEDOWN:b="\u21df";break;case g.KEY.END:b="\u21f2";break;case g.KEY.HOME:b="\u21f1";break;case g.KEY.DEL:b="\u2326"}switch(g.KEY[b]){case g.KEY.DOWN:b="\u2193";break;case g.KEY.UP:b="\u2191";break;case g.KEY.RIGHT:b="\u2192";break;case g.KEY.LEFT:b="\u2190"}return c+b}var e;switch(d.keyCode){case 59:e=d.mod2?":":";";break;case 61:e=d.mod2?
"+":"\x3d";break;case 188:e=d.mod2?"\x3c":",";break;case 190:e=d.mod2?"\x3e":".";break;case 191:e=d.mod2?"?":"/";break;case 192:e=d.mod2?"~":"`";break;case 219:e=d.mod2?"{":"[";break;case 220:e=d.mod2?"|":"\\";break;case 221:e=d.mod2?"}":"]";break;case 222:e=d.mod2?'"':"'"}return e?c+e:112<=d.keyCode&&123>=d.keyCode?c+"F"+(d.keyCode-111):c+String.fromCharCode(d.keyCode)}function f(d){var c=-1!==window.navigator.platform.indexOf("Mac");return c&&d.metaKey||!c&&d.ctrlKey}return{getUserKeyString:function(d){var c=
"";d=d.getKeys();for(var f=0;f<d.length;f++)0!==f&&(c+=" "),c+=k(d[f]);return c},getUserText:function(d){var c=d.id,f=d.refNode,b=d.hideRefNode,e=d.initialText,a=d.onComplete,m=d.onEditDestroy,h=d.selectTo,n=d.isInitialValid;d=d.insertAsChild;var p=!1,u=function(h){return function(d){if(!p){var t=g.node(c),k=t.value;t&&(h&&d.keyCode===g.KEY.ESCAPE?(b&&(f.style.display="inline"),p=!0,t.parentNode.removeChild(t),m&&m()):h&&d.keyCode!==g.KEY.ENTER||(0===k.length||!n&&k===e?b&&(f.style.display="inline"):
(a(k),b&&f.parentNode&&(f.style.display="inline")),p=!0,t.parentNode&&t.parentNode.removeChild(t),m&&m()))}}},k=document.createElement("input");k.id=c;k.value=e||"";d?f.appendChild(k):f.parentNode.insertBefore(k,f.nextSibling);k.classList.add("userEditBoxPrompt");b&&(f.style.display="none");k.addEventListener("keydown",u(!0),!1);k.addEventListener("blur",u(!1),!1);window.setTimeout(function(){k.focus();if(e){var a=g.node(c),b=h?e.indexOf(h):-1;0<b?a.createTextRange?(a=a.createTextRange(),a.collapse(!0),
a.moveStart("character",0),a.moveEnd("character",b),a.select()):a.setSelectionRange?a.setSelectionRange(0,b):void 0!==a.selectionStart&&(a.selectionStart=0,a.selectionEnd=b):a.select()}},0)},openInNewWindow:f,followLink:function(d,c){c&&f(c)?window.open(d):window.location=d},createButton:function(d,c){var f=document.createElement("button");f.className="orionButton commandButton commandMargins";f.addEventListener("click",function(b){c();g.stop(b)},!1);d&&f.appendChild(document.createTextNode(d));return f},
createDropdownButton:function(d,c,f){},isFormElement:function(d){switch(d.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","orion/commands orion/explorers/navigationUtils orion/PageUtil orion/uiUtils orion/webui/littlelib orion/webui/dropdown orion/webui/tooltip text!orion/webui/checkedmenuitem.html text!orion/webui/dropdowntriggerbutton.html text!orion/webui/submenutriggerbutton.html".split(" "),function(g,k,f,d,c,l,b,e,a,m){function h(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function n(a,b){this.token=a;this.parameterName=b}function p(a,b,e){this.event=a;this.handler=b;this.capture=e||!1}function u(a,b,e,c,h,d){this.name=a;this.type=b;this.label=e;this.value=c;this.lines=h||1;this.eventListeners=Array.isArray(d)?d:d?[d]:[]}function s(a,b,e){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=e;this.clientCollect=b&&b.clientCollect}h.prototype={_init:function(a){this._selectionService=
a.selection;var b=this;g.setKeyBindingProvider(function(){return b._activeBindings})},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var e=this._urlBindings[b].urlBinding.match(a);if(e){var c=this._urlBindings[b],h=c.command,d=c.invocation;if(d&&d.parameters&&h.callback){d.parameters.setValue(e.parameterName,e.parameterValue);var m=this;window.setTimeout(function(){m._invoke(d)},0);break}}}},findCommand:function(a){return this._commandList[a]},
runCommand:function(a,b,e,c){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new g.CommandInvocation(e,b,null,a,this),c):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,c)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,e){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,
b,e))},confirm:function(a,b,e,c,h,d){var m=!1;if(this._parameterCollector&&!h){var n=this;this._parameterCollector.close();if(this._parameterCollector.open(a,function(a,h){var d=document.createElement("span");d.classList.add("parameterPrompt");d.textContent=b;a.appendChild(d);d=document.createElement("button");d.addEventListener("click",function(a){m=!0;n._parameterCollector.close()},!1);h.appendChild(d);d.appendChild(document.createTextNode(e));d.className="dismissButton";var f=document.createElement("button");
f.addEventListener("click",function(a){m=!1;n._parameterCollector.close()},!1);h.appendChild(f);f.appendChild(document.createTextNode(c));f.className="dismissButton";return d},function(){d(m)}))return}m=window.confirm(b);d(m)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,e){if(a)if(this._parameterCollector&&
a.parameters&&a.parameters.hasParameters()&&(e||a.parameters.shouldCollectParameters())){var c=!1;a.parameters.updateParameters(a);if(a.parameters.shouldCollectParameters()&&(c=this._parameterCollector.collectParameters(a),!c)){var h=new b.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),c=h.contentContainer();c.classList.add("parameterPopup");var d=window.document.activeElement,m=this._parameterCollector.getFillFunction(a,
function(){d&&d.focus();h.destroy()})(c);h.show();window.setTimeout(function(){m.focus();m.select()},0);c=!0}c||a.command.callback.call(a.handler||window,a)}else a.command.callback.call(a.handler||window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){function b(a){return function(){g.executeBinding(a)}}var e={},c,h,m=[],n;for(n in this._activeBindings)(h=
this._activeBindings[n])&&h.keyBinding&&h.command&&(h.command.name||h.command.tooltip)&&m.push(h);m.sort(function(a,b){return(a.command.name||a.command.tooltip).localeCompare(b.command.name||b.command.tooltip)});for(n=0;n<m.length;n++)h=m[n],h.keyBinding.scopeName?(e[h.keyBinding.scopeName]||(e[h.keyBinding.scopeName]=[]),e[h.keyBinding.scopeName].push(h)):(c=d.getUserKeyString(h.keyBinding),a.createItem(c,h.command.name||h.command.tooltip,b(h)));for(var f in e)e[f].length&&0<e[f].length&&(a.createHeader(f),
e[f].forEach(function(e){c=d.getUserKeyString(e.keyBinding);a.createItem(c,e.command.name||e.command.tooltip,b(e))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var e=this;b.forEach(function(b){e._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,e,c,h,d,m,n,f,p){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];h&&(a=this._createEntryForPath(a,
h));a[b]?(c&&(a[b].title=c),e&&(a[b].position=e),m&&(a[b].imageClass=m),n&&(a[b].tooltip=n),f&&(a[b].selectionClass=f),!0===p?a[b].pretendDefaultActionId=!0:a[b].defaultActionId=p,a[b].emptyGroupMessage=d):(a[b]={title:c,position:e,emptyGroupMessage:d,imageClass:m,tooltip:n,selectionClass:f,defaultActionId:!0===p?null:p,pretendDefaultActionId:!0===p,children:{}},a.sortedContributions=null)},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){1<b.length&&(a[b]||(a[b]={position:0,
children:{}},a.sortedContributions=null),a=a[b].children)});return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,e,c,h,d,m){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];c&&(a=this._createEntryForPath(a,c));a[b]={position:e};d&&((e=this._commandList[b])?this._addBinding(e,"key",
d,h):this._addPendingBinding(b,"key",d,h));m&&((e=this._commandList[b])?this._addBinding(e,"url",m,h):this._addPendingBinding(b,"url",m,h));a.sortedContributions=null},unregisterCommandContribution:function(a,b,e){if(this._contributionsByScopeId[a]){delete this._commandList[b];delete this._activeBindings[b];delete this._urlBindings[b];delete this._pendingBindings[b];var c=this._contributionsByScopeId[a];e&&e.split("/").forEach(function(a){1<a.length&&c[a]&&(c=c[a].children)});delete c[b];c.sortedContributions=
null}},_addBinding:function(a,b,e,c){if(!a.id)throw Error("No command id: "+a);"key"===b?this._activeBindings[a.id]={command:a,keyBinding:e,bindingOnly:c}:"url"===b&&(this._urlBindings[a.id]={command:a,urlBinding:e,bindingOnly:c})},_addPendingBinding:function(a,b,e,c){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:e,bindingOnly:c})},_checkForTrailingSeparator:function(a,b,e){var h;if("tool"===b||"button"===b)if((h=0<a.childNodes.length?a.childNodes[a.childNodes.length-
1]:null)&&h.classList.contains("commandSeparator"))return e?(a.removeChild(h),!1):!0;if("menu"===b&&(a=c.$$array("li \x3e *",a),0<a.length&&a[a.length-1].classList.contains("dropdownSeparator")))if(h=a[a.length-1],e)h.parentNode.parentNode.removeChild(h.parentNode);else return!0;return!1},renderCommands:function(a,b,e,h,d,m,n){if("string"!==typeof a)throw"a scope id for rendering must be specified";b=c.node(b);if(!b)throw"no parent";var f=this._contributionsByScopeId[a];if(!e&&f){e=f.localSelectionService||
this._selectionService;var p=this;e&&e.getSelections(function(e){p.renderCommands(a,b,e,h,d,m)})}else f&&(this._render(f,b,e,h,d||"button",m,n),this._checkForTrailingSeparator(b,d,!0))},destroy:function(a){a=c.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&b.emptyGroupTooltip.destroy();this.destroy(b);a.removeChild(b)}},_render:function(a,e,c,h,m,n,f){var p=a.sortedContributions;if(!p){var p=[],l=!1,u;for(u in a)if(Object.prototype.hasOwnProperty.call(a,
u)){var s=a[u];s&&"number"===typeof s.position&&(s.id=u,p.push(s),l=!0)}l&&(p.sort(function(a,b){return a.position-b.position}),a.sortedContributions=p)}var G=0,y=this;p.forEach(function(a){var p;a.imageClass||(a.imageClass=null);if(a.children&&0<Object.getOwnPropertyNames(a.children).length){var l=a.children;if("tool"===m||"button"===m)if(a.title){var u;a.defaultActionId&&((l=y._commandList[a.defaultActionId])&&(l.visibleWhen?l.visibleWhen(c):1)?(u=new g.CommandInvocation(h,c,n,l,y),u.domParent=
e):a.pretendDefaultActionId=!0);l=y._createDropdownMenu(e,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass,null,u,a.pretendDefaultActionId);f&&k.generateNavGrid(f,l.menuButton);l&&(y._render(a.children,l.menu,c,h,"menu",n,f),y._checkForTrailingSeparator(l.menu,"menu",!0),0===l.menu.childNodes.length?a.emptyGroupMessage?l.menuButton.emptyGroupTooltip||(l.menuButton.emptyGroupTooltip=new b.Tooltip({node:l.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above",
"left"]})):(f&&k.removeNavGrid(f,l.menuButton),a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},a(l.menu),a(l.menuButton),a(l.destroyButton)):l.menuButton.style.visibility="visible")}else{var s;0<e.childNodes.length&&!y._checkForTrailingSeparator(e,m)&&(s=y.generateSeparatorImage(e));y._render(l,e,c,h,m,n,f);0<e.childNodes.length&&e.childNodes[e.childNodes.length-1]!==s&&(s=y.generateSeparatorImage(e))}else if(a.title){if(a=y._createDropdownMenu(e,a.title,!0,null,null,a.imageClass))y._render(l,
a.menu,c,h,"menu",n,f),y._checkForTrailingSeparator(a.menu,"menu",!0),0===a.menu.childNodes.length&&a.destroyButton&&e.removeChild(a.destroyButton)}else 0<e.childNodes.length&&y._generateMenuSeparator(e),y._render(l,e,c,h,m,n,f),y._generateMenuSeparator(e)}else{var q=y._commandList[a.id],l=q?!0:!1;u=a=null;if(q){p=new g.CommandInvocation(h,c,n,q,y);p.domParent=e;s=!1;try{s=l&&(q.visibleWhen?q.visibleWhen(c):!0)}catch(E){throw console.log(E),E;}y._activeBindings[q.id]&&y._activeBindings[q.id].keyBinding&&
(a=y._activeBindings[q.id],a.invocation=s?p:null,a.bindingOnly&&(l=!1));y._urlBindings[q.id]&&y._urlBindings[q.id].urlBinding&&(u=y._urlBindings[q.id],u.invocation=s?p:null,u.bindingOnly&&(l=!1));l=l&&s}l&&(q.choiceCallback?("tool"===m||"button"===m?(a=e,l=!1,"ul"===e.nodeName.toLowerCase()&&(a=document.createElement("li"),e.appendChild(a))):(a=e,l=!0),y._createDropdownMenu(a,q.name,l,function(a){q.populateChoicesMenu(a,c,h,n,y)}.bind(q),q.imageClass,q.tooltip||q.title,q.selectionClass,q.positioningNode)):
(p.handler=p.handler||this,p.domParent=e,l=function(a){y._invoke(p)},"menu"===m?(u=null,a&&a.keyBinding&&(u=d.getUserKeyString(a.keyBinding)),a=g.createCommandMenuItem(e,q,p,null,l,u)):(a=m+q.id+G,a=g.createCommandItem(e,q,p,a,null,"tool"===m,l)),k.generateNavGrid(f,a),p.domNode=a,G++))}})},_createDropdownMenu:function(a,e,h,d,n,f,p,u,k,s){a=c.node(a);if(!a||!c.contains(document.body,a))return null;var J,G,y=a;if(h)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(m),c.processTextNodes(f,
{ButtonText:e}),a.appendChild(f),G=a.lastChild,n=G.lastChild,e=n.previousSibling,e.dropdown=new l.Dropdown({dropdown:n,populate:d,parentDropdown:a.dropdown}),n.dropdown=e.dropdown;else{"ul"===a.nodeName.toLowerCase()&&(y=document.createElement("li"),a.appendChild(y),G=y);a=null;n&&(a="dropdownButtonWithIcon",f=f||e);f=n?f||e:f;var A=g.createDropdownMenu(y,e,d,a,n,!1,p,u,k||s);J=A.dropdownArrow;e=A.menuButton;if(J){k&&(k.domNode=A.menuButton);var H=this;e.onclick=function(a){var b=c.bounds(J);a.clientX>=
b.left&&A.dropdown?A.dropdown.toggle(a):H._invoke(k)};A.dropdown&&(e.onkeydown=function(a){c.KEY.DOWN===a.keyCode&&(A.dropdown.toggle(a),c.stop(a))})}n=A.menu;var z;(d=k&&k.command&&(k.command.tooltip||k.command.name))?z=k.command.tooltip||k.command.name:d&&(z=f);z&&(e.commandTooltip=new b.Tooltip({node:e,text:z,position:["above","below","right","left"]}))}return{menuButton:e,menu:n,dropdown:e.dropdown,destroyButton:G,dropdownArrow:J}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,
"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");b.appendChild(e);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b="ul"===a.nodeName.toLowerCase()?document.createElement("li"):document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};h.prototype.constructor=h;n.prototype={match:function(a){a=
f.matchResourceParameters(a);return"undefined"!==typeof a[this.token]?(this.parameterValue=a[this.token],this):null}};n.prototype.constructor=n;p.prototype.constructor=p;u.prototype={optionsRequested:function(){return this.optionsRequested}};u.prototype.constructor=u;s.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){var b=this.parameterTable={};a.forEach(function(a){b[a.name]=a})}},updateParameters:function(a){"function"===typeof this.getParameters&&this._storeParameters(this.getParameters(a))},
hasParameters:function(){return null!==this.parameterTable},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var e=this.parameterTable[a];e&&(e.value=b)},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=
[];this.forEach(function(b){b=new u(b.name,b.type,b.label,b.value,b.lines,b.eventListeners);a.push(b)});var b=new s(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};s.prototype.constructor=s;return{CommandRegistry:h,URLBinding:n,ParametersDescription:s,CommandParameter:u,CommandEventListener:p}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,k,f){function d(c,d){this._activeContainer=null;this._getElementsFunction=c;this._toolbarLayoutFunction=d}d.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&f.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&f.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();this._oldFocusNode&&(this._oldFocusNode.focus(),this._oldFocusNode=null)}this._activeElements=null},open:function(c,d,b){"string"===typeof c&&(c=f.node(c));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===c)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(c))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=b;var e=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!e)return!1;this._activeElements.focusNode=e;c=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(0===c.length){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;c=document.createElement("button");c.id="closebox";c.className="imageSprite core-sprite-close dismissButton";c.title=g.Close;d.appendChild(c);var a=this;c.addEventListener("click",function(b){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);e&&(this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){e.focus();e.select&&e.select()},0));this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(c,d){f.$$array("input",d).forEach(function(b){"checkbox"===b.type?c.parameters.setValue(b.parameterName,b.checked):"button"!==b.type&&c.parameters.setValue(b.parameterName,b.value.trim())});f.$$array("textArea",d).forEach(function(b){c.parameters.setValue(b.parameterName,b.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?
(c.domNode&&c.domNode.classList.add("commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(c,d){var b=this;return function(e,a){var m=null,h=function(){d&&d();b.close()},n=function(a){a.keyCode===f.KEY.ENTER&&b._collectAndCall(c,e);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)h(),f.stop(a)};c.parameters.forEach(function(a){var b=null;a.label&&(b=document.createElement("label"),b.classList.add("parameterInput"),b.setAttribute("for",a.name+"parameterCollector"),
b.textContent=a.label,e.appendChild(b));var d=a.name+"parameterCollector",p,b=b||e;"text"===a.type&&"number"===typeof a.lines&&1<a.lines?(p=document.createElement("textarea"),p.rows=a.lines,p.type="textarea",p.id=d,b.appendChild(p),n=function(a){a.keyCode===f.KEY.ESCAPE&&(h(),f.stop(a))}):"boolean"===a.type?(p=document.createElement("input"),p.type="checkbox",p.id=d,b.appendChild(p),a.value&&(p.checked=!0)):(p=document.createElement("input"),p.type=a.type,p.id=d,b.appendChild(p),a.value&&(p.value=
a.value));p.classList.add("parameterInput");p.setAttribute("speech","speech");p.setAttribute("x-webkit-speech","x-webkit-speech");p.parameterName=a.name;m||(m=p);0<a.eventListeners.length&&a.eventListeners.forEach(function(a){p.addEventListener(a.event,function(b){return a.handler(b,c)},a.capture)});p.addEventListener("keydown",n,!1)});var p=a;p||(p=document.createElement("span"),p.classList.add("layoutRight"),p.classList.add("parametersDismiss"),e.appendChild(p));var k=function(a,b){var e=document.createElement("button");
b.appendChild(e);a&&e.appendChild(document.createTextNode(a));e.classList.add("dismissButton");return e};c.parameters.hasOptionalParameters()&&(c.parameters.optionsRequested=!1,k(g.More,p).addEventListener("click",function(){c.parameters.optionsRequested=!0;b._collectAndCall(c,e);h()},!1));k(g.Submit,p).addEventListener("click",function(){b._collectAndCall(c,e);h()},!1);p=k(null,p);p.id="closebox";p.classList.add("imageSprite");p.classList.add("core-sprite-close");p.title=g.Close;p.addEventListener("click",
function(a){h()},!1);return m}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});define("orion/regex",[],function(){return{escape:function(g){return g.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$\x26")},parse:function(g){return(g=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(g))?{pattern:g[1],flags:g[2]}:null}}});
define("orion/contentTypes",[],function(){function g(a,b){if("string"!==typeof a)return null;for(var e=a&&a.split(".").pop(),c=null,d=0;d<b.length;d++){var f=b[d],g;g=c;var l=f,k=e,v=0<=l.filename.indexOf(a),w;w=k.toLowerCase();w=-1!==l.extension.indexOf(w);if(v||w){if(!(w=!g))v&&(k=k.toLowerCase(),v=-1!==g.extension.indexOf(k)),w=v;w&&(g=l)}g===f&&(c=f)}return c}function k(a){return null===a||"undefined"===typeof a?[]:Array.isArray(a)?a:[a]}function f(a){return k(a).map(function(a){return String.prototype.toLowerCase.call(a)})}
function d(a){return{id:a.id,name:a.name,image:a.image,imageClass:a.imageClass,"extends":a["extends"],extension:f(a.extension),filename:k(a.filename)}}function c(a){var b=Object.create(null);a.map(d).forEach(function(a){Object.prototype.hasOwnProperty.call(b,a.id)||(b[a.id]=a)});return b}function l(d){if(d&&d.registerService){this.serviceRegistry=d;for(var h=d.getServiceReferences(e).concat(d.getServiceReferences(a)),n=[],f=0;f<h.length;f++)for(var g=k(h[f].getProperty("contentTypes")),l=0;l<g.length;l++)n.push(g[l]);
this.map=c(n);d.registerService(b,this)}else if(Array.isArray(d))this.serviceRegistry=null,this.map=c(d);else throw Error("Invalid parameter");}var b="orion.core.contentTypeRegistry",e="orion.core.contenttype",a="orion.file.contenttype";l.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),b=[],e;for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&b.push(a[e]);return b},getContentTypesMap:function(){return this.map},getFileContentType:function(a){return g(a.Name,this.getContentTypes())},
getFilenameContentType:function(a){return g(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,b){a="string"===typeof a?this.getContentType(a):a;b="string"===typeof b?this.getContentType(b):b;if(!a||!b)return!1;if(a.id===b.id)return!0;for(var e=a,c={};e&&(e=this.getContentType(e["extends"]));){if(e.id===b.id)return!0;if(c[e.id])throw Error("Cycle: "+e.id);c[e.id]=!0}return!1},isSomeExtensionOf:function(a,b){for(var e=0;e<b.length;e++)if(this.isExtensionOf(a,
b[e]))return!0;return!1}};return{ContentTypeRegistry:l,getFilenameContentType:g}});
define("orion/URITemplate",[],function(){function g(a){this._text=a}function k(a){return a.replace("%25","%")}function f(a,b){if("U"===b)return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if("U+R"===b)return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(m,k);if("U+R-,"===b)return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function d(a,b,e){for(var c=
[],d=0;d<a.length;d++)"undefined"!==typeof a[d]&&c.push(f(a[d],b));return c.join(e)}function c(a,b,e,c){for(var d=Object.keys(a),m=[],g=0;g<d.length;g++)"undefined"!==typeof a[d[g]]&&m.push(f(d[g],b)+e+f(a[d[g]],b));return m.join(c)}function l(b){if(0===b.length)throw Error("Invalid Expression: 0 length expression");(this._operator=e[b[0]])?b=b.substring(1):this._operator=e.NUL;for(var c=[],d=b.split(","),m=0;m<d.length;m++){var f=d[m].match(a);if(null===f)throw Error("Bad VarSpec: "+b);c.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=c}function b(a){for(var b=[],e=0,c=a.indexOf("{",e);-1!==c;){b.push(new g(a.substring(e,c)));e=a.indexOf("}",c+1);if(-1===e)throw Error("Invalid template: "+a);b.push(new l(a.substring(c+1,e)));e+=1;c=a.indexOf("{",e)}b.push(new g(a.substring(e)));this._templateComponents=b}var e={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},
"/":{first:"/",sep:"/",named:!1,ifemp:"",allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"\x26",named:!0,ifemp:"\x3d",allow:"U"},"\x26":{first:"\x26",sep:"\x26",named:!0,ifemp:"\x3d",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},a=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,m=/%25[0-9A-F][0-9A-F]/g;g.prototype={expand:function(a){return encodeURI(this._text)}};
l.prototype={expand:function(a){for(var b=[],e=0;e<this._varSpecList.length;e++){var m=this._varSpecList[e],g=m.name,l=a[g],k=typeof l;if("undefined"!==k&&null!==l){var t=0===b.length?this._operator.first:this._operator.sep;if("string"===k)this._operator.named&&(t+=f(g,"U+R"),t+=0===l.length?this._operator.ifemp:"\x3d"),-1!==m.prefix&&m.prefix<l.length&&(l=l.substring(0,m.prefix)),t+=f(l,this._operator.allow);else if(Array.isArray(l)){if(0===l.length)continue;m.explode?t+=d(l,this._operator.allow,
this._operator.sep):(m=d(l,this._operator.allow,","),this._operator.named&&(t+=f(g,"U+R"),t+=0===m.length?this._operator.ifemp:"\x3d"),t+=m)}else if("object"===k){if(0===Object.keys(l).length)continue;m.explode?t+=c(l,this._operator.allow,"\x3d",this._operator.sep):(m=c(l,this._operator.allow,",",","),this._operator.named&&(t+=f(g,"U+R"),t+=0===m.length?this._operator.ifemp:"\x3d"),t+=m)}else throw Error("bad param type: "+g+" : "+k);b.push(t)}}return b.join("")}};b.prototype={expand:function(a){for(var b=
[],e=0;e<this._templateComponents.length;e++)b.push(this._templateComponents[e].expand(a));return b.join("")}};return b});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,k){function f(c){if(c=localStorage.getItem("orion/messageBundle/"+c))if(c=JSON.parse(c),c._expires&&c._expires>(new Date).getTime())return delete c._expires,c;return null}var d={};return{getMessageBundle:function(c){function l(a){a?g(["i18n!"+c],function(a){if(a){var b=c;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}e.resolve(a)}):b(Error(c))}function b(a){e.reject(a)}
if(d[c])return d[c];var e=new k;d[c]=e;var a=f(c);if(a)return e.resolve(a),e;try{g([c],l,b)}catch(m){g(["orion/i18n!"+c],l,b)}return e},formatMessage:function(c){var d=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(b,e){return d[(e<<0)+1]})}}});
define("orion/PageLinks","require orion/Deferred orion/PageUtil orion/URITemplate orion/i18nUtil orion/objects orion/URL-shim".split(" "),function(g,k,f,d,c,l,b){function e(){return g.toUrl?(new URL(g.toUrl("orion/../"),window.location.href)).href.slice(0,-1):(new URL("/",window.location.href)).href.slice(0,-1)}function a(a){var b={};a.getPropertyKeys().forEach(function(e){"objectClass"!==e&&"service.names"!==e&&"service.id"!==e&&"__plugin__"!==e&&(b[e]=a.getProperty(e))});return b}function m(a){return c.getMessageBundle(a.nls).then(function(b){a.textContent=
a.nameKey?b[a.nameKey]:a.name;return a},function(b){a.textContent=a.nameKey||a.name;return a})}function h(b,c){var h=b.getServiceReferences(c||"orion.page.link"),n=f.matchResourceParameters(window.location.href),p={OrionHome:e(),Location:n.resource},g=[];h.forEach(function(b){b=a(b);if(b.uriTemplate&&(b.nls||b.name)){var e=(new d(b.uriTemplate)).expand(p),e=f.validateURLScheme(e);b.href=e;b.nls?g.push(m(b)):(b.textContent=b.name,g.push((new k).resolve(b)))}});return k.all(g)}function n(a){var b=this.categories=
Object.create(null);a.forEach(function(a){b[a.id]=a})}function p(a){this.allPageLinks=a;this.allPageLinks.sort(u)}function u(a,b){var e=a.textContent&&a.textContent.toLowerCase(),c=b.textContent&&b.textContent.toLowerCase();return e<c?-1:e>c?1:0}var s;l.mixin(n.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});l.mixin(p.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var b=a.href;a=
a.textContent;var e=document.createElement("a");e.href=b;e.target="_self";e.classList.add("targetSelector");e.textContent=a;return e})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(b){var e;return!s?(e=[],b.getServiceReferences("orion.page.link.category").forEach(function(b){b=a(b);if(b.id&&(b.name||b.nameKey))b.nls?e.push(m(b)):(b.textContent=b.name,e.push((new k).resolve(b)))}),k.all(e).then(function(a){return s=new n(a)})):(new k).resolve(s)},getPageLinksInfo:function(a,
b){return h(a,b).then(function(a){return new p(a)})},getOrionHome:e}});
define("orion/edit/nls/root/messages",{Editor:"Editor",switchEditor:"Switch Editor",Fetching:"Fetching: ${0}",confirmUnsavedChanges:"There are unsaved changes.  Do you still want to navigate away?",searchFiles:"Search Files...",searchTerm:"Enter search term:",unsavedChanges:"There are unsaved changes.",unsavedAutoSaveChanges:"Please stay on the page until Auto Save is complete.",Save:"Save",Saved:"Saved",Blame:"Blame",BlameTooltip:"Show blame annotations",saveOutOfSync:"Resource is out of sync with the server. Do you want to save it anyway?",
loadOutOfSync:"Resource is out of sync with the server. Do you want to load it anyway? This will overwrite your local changes.",ReadingMetadata:"Reading metadata of ${0}",ReadingMetadataError:"Can not get metadata of ${0}",Reading:"Reading ${0}",readonly:"Read Only.",saveFile:"Save this file",gotoLine:"Go to Line...",gotoLineTooltip:"Go to specified line number",gotoLinePrompt:"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find...",noResponse:"No response from server.  Check your internet connection and try again.",
savingFile:"Saving file ${0}",running:"Running ${0}","Saving...":"Saving...",View:"View",SidePanel:"Side Panel",SidePanelTooltip:"Choose what to show in the side panel.",Actions:"Actions",Navigator:"Navigator",FolderNavigator:"Folder Navigator",Project:"Project",New:"New",File:"File",Edit:"Edit",Tools:"Tools",Add:"Add",noActions:"There are no actions for the current selection.",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding.",LocalEditorSettings:"Local Editor Settings",
NoProject:"${0} is not a project. To convert it to a project use ${1}.",NoProjects:"There are no projects in your workspace. Use the ${0} menu to create projects.",disconnected:"(disconnected)",ChooseFS:"Choose Filesystem",ChooseFSTooltip:"Choose the filesystem you want to view.",FSTitle:"${0} (${1})",Deploy:"Deploy","Deploy As":"Deploy As",Import:"Import",Export:"Export",OpenWith:"Open With",OpenRelated:"Open Related",Dependency:"Dependency",UnnamedCommand:"Unnamed"});
define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages","orion/edit/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/extensionCommands","require orion/Deferred orion/commands orion/regex orion/contentTypes orion/URITemplate orion/i18nUtil orion/URL-shim orion/PageLinks i18n!orion/edit/nls/messages".split(" "),function(g,k,f,d,c,l,b,e,a,m){function h(a){var b={};a.getPropertyKeys().forEach(function(e){b[e]=a.getProperty(e)});return b}var n={},p=a.getOrionHome();n._cloneItemWithoutChildren=function r(a){if(null===a||"object"!==typeof a)return a;var b=a.constructor(),e;for(e in a)"children"!==e&&"Children"!==
e&&(b[e]=r(a[e]));return b};n._getOpenWithNavCommandExtensions=function(a,b){function e(a,b){for(var c=a.getServiceReferences("orion.navigate.openWith"),d=[],h=[],m=0;m<c.length;m++){var n=c[m];if(n.getProperty("editor")===b.id){var f=n.getProperty("contentType");f instanceof Array?d=d.concat(f):d.push(f||"*/*");n=n.getProperty("excludedContentTypes");n instanceof Array?h=h.concat(n):null!==n&&"undefined"!==typeof n&&h.push(n)}}0===d.length&&(d=null);0===h.length&&(h=null);return{contentTypes:d,excludedContentTypes:h}}
for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),e=[],c=0;c<b.length;c++){var d=b[c],h=d.getProperty("id");e.push({id:h,"default":d.getProperty("default")||!1,name:d.getProperty("name"),nameKey:d.getProperty("nameKey"),nls:d.getProperty("nls"),uriTemplate:d.getProperty("orionTemplate")||d.getProperty("uriTemplate"),validationProperties:d.getProperty("validationProperties")||[]})}return e}(),d=[],h=0;h<c.length;h++){var m=c[h],n=e(a,m);d.push({properties:{name:m.name||m.id,
nameKey:m.nameKey,id:"eclipse.openWithCommand."+m.id,contentType:n.contentTypes,excludedContentTypes:n.excludedContentTypes,uriTemplate:m.uriTemplate,nls:m.nls,forceSingleItem:!0,isEditor:m["default"]?"default":"editor",validationProperties:m.validationProperties},service:{}})}return d};n._makeValidator=function(a,b,e,d){function h(a,b,e,c,d){var m=!1,n;if("!"===b.charAt(0))return"undefined"===typeof a[b.substring(1)];if("undefined"!==typeof a[b]){if("undefined"===typeof e)n=a[b],m=!0;else if("string"===
typeof e){if(!typeof("string"===a[b]))return!1;if(c.variableName){if(e=RegExp(e).exec(a[b]))m=e[0],n="before"===c.variableMatchPosition?a[b].substring(0,e.index):"after"===c.variableMatchPosition?a[b].substring(e.index+m.length):"only"===c.variableMatchPosition?m:a[b],m=!0}else return RegExp(e).test(a[b])}else a[b]===e&&(n=a[b],m=!0);b=c.variableName;c=c.replacements;if(m&&b&&(d[b]=n,d.itemCached=a,c)){if("string"!==typeof n)return window.console.log("Cannot replace "+b+", value is not a string: "+
n),m;for(a=0;a<c.length;a++){n=!1;if(c[a].pattern){e=c[a].pattern;var f=c[a].replacement||"";d[b]=d[b].replace(RegExp(e),f).replace(RegExp(e),f)}else n=!0;n&&window.console.log("Invalid replacements specified in validation property.  "+c[a])}}return m}return!1}function m(a,b,e,c){var d=e.match,n,f;if(0<=(n=b.indexOf("["))){if(0>(f=b.indexOf("]")))return!1;var p=b.substring(0,n),g;if(!(g=a[p])||!Array.isArray(g))return!1;n=b.substring(n+1,f);n=parseInt(n,10);if(isNaN(n))return!1;0>n&&(n+=g.length);
b=b.substring(f+1);b=p+":"+String(n)+b}return 0<=b.indexOf("|")?(n=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),m(a,n,e,c)?!0:m(a,b,e,c)):0<=b.indexOf(":")?(n=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[n]?m(a[n],b,e,c):!1):h(a,b,d,e,c)}function n(b,e,d){if(d.info.validationProperties)for(var h=0;h<d.info.validationProperties.length;h++){var f=d.info.validationProperties[h];if("undefined"!==typeof f.source){if(!m(b,f.source,f,d))return!1}else return window.console.log("Invalid validationProperties in "+
a.id+".  No source property specified."),!1}var h=!0,p=e?c.getFilenameContentType(b.Name,e):null,p=p||{id:"application/octet-stream"};d.info.excludedContentTypes&&e&&(h=d.info.excludedContentTypes.every(function(a){a=a.replace(/([*?])/g,".$1");return-1!==p.id.search(a)?!1:!0}));h&&d.info.contentType&&e&&(h=d.info.contentType.some(function(a){a=a.replace(/([*?])/g,".$1");return-1!==p.id.search(a)?!0:!1}));return h}return{info:a,validationFunction:function(a){"function"===typeof d&&(a=d.call(this,a));
if(a){if(Array.isArray(a)){if((this.info.forceSingleItem||this.info.uriTemplate)&&1!==a.length||1>a.length)return!1}else a=[a];for(var b=0;b<a.length;b++)if(!n(a[b],e,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},e;for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(b[e]=a[e]);if(this.info.validationProperties)for(e=0;e<this.info.validationProperties.length;e++){var c=this.info.validationProperties[e];
c.source&&c.variableName&&(this.itemCached===a&&this[c.variableName]||m(a,c.source,c,this),a[c.variableName]?window.console.log("Variable name "+c.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[c.variableName]=this[c.variableName])}b.OrionHome=p;return(new l(this.info.uriTemplate)).expand(b)}return null}}};var u=m.UnnamedCommand;n._createCommandOptions=function(a,e,c,d,h,m){function f(b,p){var g=n._makeValidator(a,c,d,m);b.visibleWhen=
g.validationFunction.bind(g);if(h)if(g.generatesURI.bind(g)())b.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return g.getURI.bind(g)(a)};else{var l=a;b.callback=function(a){var d;if(l.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,d=n._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){d=[];for(var h=0;h<a.items.length;h++)d.push(n._cloneItemWithoutChildren(a.items[h]))}else d=n._cloneItemWithoutChildren(a.items);if(c)var m=c.getService("orion.page.progress");
e.run?m?m.progress(e.run(d),"Running command: "+b.name):e.run(d):c&&(m?m.progress(c.getService(e).run(d),"Running command: "+b.name):c.getService(e).run(d))}}p.resolve(b)}var p=new k;if(a.nls){var g=function(b){var e;b?(e=a.tooltipKey&&b[a.tooltipKey],b=a.nameKey&&b[a.nameKey]||a.name||u,e=e||a.tooltip||""):(b=a.name||a.nameKey||u,e=a.tooltip||a.tooltipKey||"");f({name:b,image:a.image,id:a.id||a.name,tooltip:e,isEditor:a.isEditor,showGlobally:a.showGlobally},p)};b.getMessageBundle(a.nls).then(g,g.bind(this,
null))}else f({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},p);return p};n.getOpenWithCommand=function(a,b,e){var c;a=e||n.getOpenWithCommands(a);for(e=0;e<a.length;e++)if(a[e].visibleWhen(b)){var d="default"===a[e].isEditor;if(!c||d)if(c=a[e],d)break}return c};n.getOpenWithCommands=function(a){var b=[],e;for(e in a._commandList){var c=a._commandList[e];c.isEditor&&b.push(c)}return b};var s;n.createAndPlaceFileCommandsExtension=function(a,
b,e,c,d,h){return n.createFileCommands(a,null,h?"all":void 0,!!h,b).then(function(a){d&&0<a.length&&(b.addCommandGroup(e,"eclipse.openWith",1E3,m.OpenWith,d,null,null,null,"dropdownSelection"),b.addCommandGroup(e,"eclipse.fileCommandExtensions",1E3,m.OpenRelated,d));a.forEach(function(a){var h=null;d&&(h=a.isEditor?d+"/eclipse.openWith":d+"/eclipse.fileCommandExtensions");b.registerCommandContribution(e,a.id,c,h)});return{}})};n.createFileCommands=function(a,b,e,c,d){e=void 0===e?"global":e;c=void 0===
c?!0:c;var h=[];n._cachedFileCommands||n._createCachedFileCommands(a);("all"===e||"global"===e)&&n._cachedFileCommands.forEach(function(a){var b=a.properties;("all"===e||b.forceSingleItem&&b.showGlobally)&&h.push(a)});return k.when(function(){var e=a.getService("orion.core.contentTypeRegistry")||b;return s||k.when(e.getContentTypes(),function(a){return s=a})}(),function(){c&&(n._cachedOpenWithExtensions||(n._cachedOpenWithExtensions=n._getOpenWithNavCommandExtensions(a,s)),h=h.concat(n._cachedOpenWithExtensions),
d._addedOpenWithCommands=c);var b=h.map(function(b){var e=b.properties;b=b.service;var c=d.findCommand(e.id||e.name);return c?(new k).resolve(c):n._createCommandOptions(e,b,a,s,!0).then(function(a){a=new f.Command(a);d.addCommand(a);return a})});return k.all(b,function(a){return{_error:a}}).then(function(a){return a})})};n._createCachedFileCommands=function(a){var b=a.getServiceReferences("orion.navigate.command");n._cachedFileCommands=[];for(var e=0;e<b.length;e++)if("orion.navigateFromMetadata"!==
b[e].getProperty("id")){var c=a.getService(b[e]),d=h(b[e]);n._cachedFileCommands.push({properties:d,service:c})}};n.getFileCommandIds=function(){var a=[];if(n._cachedFileCommands)n._cachedFileCommands.length&&(a=n._cachedFileCommands.map(function(a){return a.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return a};n.createOpenWithCommands=function(a,b,e){return e&&e._addedOpenWithCommands?(new k).resolve(n.getOpenWithCommands(e)):n.createFileCommands(a,b,
"none",!0,e)};return n});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,k){function f(d){this._init(d)}f.prototype={_init:function(d){var c=k.node(d.container);if(!c)throw"no parent container";this._container=c;c.classList.remove("currentLocation");this._id=d.id||"eclipse.breadcrumbs";this._resource=d.resource||null;this._rootSegmentName=d.rootSegmentName;this._workspaceRootSegmentName=d.workspaceRootSegmentName;this._workspaceRootURL=d.workspaceRootURL;this._makeHref=d.makeHref;this._makeFinalHref=
d.makeFinalHref;this._maxLength=d.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var d;if(this._resource&&this._resource.Parents&&!this._resource.skip){d=document.createElement("a");var c=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(d,c):d.href=g.toUrl("edit/edit.html")+"#"+c}else d=document.createElement("span");k.empty(d);d.appendChild(document.createTextNode(this._workspaceRootSegmentName));
return d}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(d){var c=document.createElement("a");c.classList.add("breadcrumb");c.appendChild(document.createTextNode(d));return c},addSegmentHref:function(d,c){this._makeHref?this._makeHref(d,c.Location,c):d.href=g.toUrl("edit/edit.html")+"#"+c.ChildrenLocation},buildSegments:function(d,c){if(this._resource.Parents){var f=this._resource.Parents.slice(0),b,e;f&&(f=f.slice(0),"reverse"===c&&(f=f.reverse().slice(0)),
f.forEach(function(a){a.skip||(d?(e=d,d=null):e=a.Name,b=this.buildSegment(e),this.path+=a.Name,this.addSegmentHref(b,a),b.include=!1,this.segments.push(b))}.bind(this)))}},addDivider:function(){var d=document.createElement("span");d.appendChild(document.createTextNode(" / "));this.path+="/";d.classList.add("breadcrumbSeparator");this.append(d)},refresh:function(){(this.crumbs=k.node(this._id))?k.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),
this.dirty=document.createElement("span"),this.dirty.id="dirty",this.dirty.className="modifiedFileMarker",this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(d){this.crumbs.appendChild(d)},addTitle:function(d,c){var f=c||document.title;0===this.crumbs.childNodes.length&&(d=document.createElement("span"),d.appendChild(document.createTextNode(f)),
d.classList.add("breadcrumb"),d.classList.add("currentLocation"),this.append(d))},finalSegment:function(d,c){if(!this._resource.skip){var f;f=c?c:this._resource.Name;this._makeFinalHref?(d=this.buildSegment(f),this.addSegmentHref(d,this._resource)):(d=document.createElement("span"),d.appendChild(document.createTextNode(f)));d.classList.add("currentLocation");this.path+=this._resource.Name;this.append(d)}},firstSegment:function(d){d&&(this.append(d),this._resource&&this._resource.Parents&&!this._resource.skip?
(d.classList.add("breadcrumb"),this.addDivider()):(this._resource.skip||(d.href=""),d.classList.add("currentLocation")))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(d){!0===d.include&&(this.append(d),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var d=this.segments.slice(0).reverse();d.forEach(function(c){this.append(c);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?c.include=
!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=d.reverse()}},measure:function(){var d=this._container;d.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:d.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var d=this.getNavigatorWorkspaceRootSegment(),c=this._rootSegmentName;c?this.addTitle(d,c):(this.finalSegment(d,c),this._resource&&this._resource.Parents&&(this.buildSegments(c,"reverse"),this.measureSegments(),this.firstSegment(d)),
this.crumbs.offsetWidth>=this.MAX_LENGTH&&(this.INCLUDE_FIRST_SECTION=!1))},render:function(){this.refresh();var d=this.getNavigatorWorkspaceRootSegment(),c=this._rootSegmentName;c?this.addTitle(d,c):(!0===this.INCLUDE_FIRST_SECTION&&this.firstSegment(d),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(d,c)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(g,k,f){function d(c){k.attach(this);this._init(c)}d.prototype={_init:function(c){this._tracking=null;this._animationDelay=501;this._closeReversely=c.closeReversely;this.$node=f.node(c.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(c.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(c.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=c.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");c.toggle&&(this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add(this._vertical?"splitVerticalThumbLayout":"splitThumbLayout"));this._closeByDefault="closed"===this.$node.getAttribute("data-initial-state");"undefined"!==typeof c.closeByDefault&&(this._closeByDefault=c.closeByDefault);this._initializeFromStoredSettings();
this._closed?(this._closed=!1,this._thumbDown(!0,!0)):this._adjustToSplitPosition();this.$node.style.visibility="visible";this.$mainNode.style.display="block";this.$sideNode.style.display="block";this.$node.addEventListener("mousedown",this._mouseDown.bind(this),!1);window.addEventListener("mouseup",this._mouseUp.bind(this),!1);window.addEventListener("resize",this._resize.bind(this),!1)},isClosed:function(){return this._closed},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||
this._thumbDown()},addResizeListener:function(c){this.addEventListener("resize",function(d){c(d.node)})},_initializeFromStoredSettings:function(){var c=localStorage.getItem(this._prefix+"/toggleState");this._closed="string"===typeof c?"closed"===c:this._closeByDefault;var c=f.bounds(this.$node.parentNode),d=f.bounds(this.$node),b;this._vertical?(b=localStorage.getItem(this._prefix+"/yPosition"))?(this._splitTop=parseInt(b,10),this._splitTop>c.top+c.height-d.height&&(this._splitTop=c.top+c.height/
2)):this._closeByDefault&&(this._initialSplit=this._getSplitPosition(),this._splitTop=0):(b=localStorage.getItem(this._prefix+"/xPosition"))?(this._splitLeft=parseInt(b,10),this._splitLeft>c.left+c.width-d.width&&(this._splitLeft=c.left+c.width/2)):this._closeByDefault&&(this._initialSplit=this._getSplitPosition(),this._splitLeft=0)},_getSplitPosition:function(){var c=f.bounds(this.$node),d=f.bounds(this.$node.parentNode);return this.vertical?c.top-d.top:c.left-d.left},_adjustToSplitPosition:function(c){var d=
f.bounds(this.$node),b=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=d.height;if(c||!this._splitTop)this._splitTop=d.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);c=this._splitTop;"relative"===this.$node.parentNode.style.position&&(c=this._splitTop-b.top);this.$sideNode.style.height=c+"px";this.$sideNode.style.display="block";this.$node.style.top=c+"px"}else{this._splitWidth=d.width;if(c||!this._splitLeft)this._splitLeft=d.left,localStorage.setItem(this._prefix+
"/xPosition",this._splitLeft);c=this._splitLeft;"relative"===this.$node.parentNode.style.position&&(c=this._splitLeft-b.left);this.$sideNode.style.width=c+"px";this.$sideNode.style.display="block";this.$node.style.left=c+"px"}this._resize()},_resize:function(c,d,b){c=c||0;var e=f.bounds(this.$node.parentNode),a=f.bounds(this.$node);this._vertical?(void 0===b&&(b=a.top-e.top),b+=a.height,this.$mainNode.style.top=b+"px"):(void 0===d&&(d=a.left-e.left),d+=a.width,this.$mainNode.style.left=d+"px");var m=
this;window.setTimeout(function(){m._notifyResizeListeners(m.$mainNode);m._notifyResizeListeners(m.$sideNode)},c)},_notifyResizeListeners:function(c){this.dispatchEvent({type:"resize",node:c})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(c,d){c||this._addAnimation();var b=this._splitTop,e=this._splitLeft;if(this._closed)this._closed=!1,!this._splitLeft&&!this._splitTop&&"number"===typeof this._initialSplit&&(b=e=this._initialSplit);
else if(this._closed=!0,this._closeReversely){var a=f.bounds(this.$node.parentNode),m=f.bounds(this.$node);this._vertical?b=a.height-m.height:e=a.width-m.width}else b=e=0;this._vertical?(this.$sideNode.style.height=b+"px",this.$node.style.top=b+"px"):(this.$sideNode.style.width=e+"px",this.$node.style.left=e+"px");this._resize(this._animationDelay,e,b);c||this._removeAnimation();d||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var h=this;window.setTimeout(function(){h._notifyToggleListeners()},
this._animationDelay)},_removeAnimation:function(){var c=this;window.setTimeout(function(){c.$sideNode.classList.remove(c._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");c.$mainNode.classList.remove(c._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");c.$node.classList.remove(c._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add(this._vertical?"sidePanelVerticalLayoutAnimation":
"sidePanelLayoutAnimation");this.$mainNode.classList.add(this._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");this.$node.classList.add(this._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},_mouseDown:function(c){if(c.target===this._thumb)return f.stop(c),this._thumbDown();this._tracking||(this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),
window.addEventListener("mousemove",this._tracking),f.setFramesEnabled(!1),f.stop(c))},_mouseMove:function(c){if(this._tracking){var d=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=c.clientY;this._splitTop<d.top+5?this._splitTop=d.top+5:this._splitTop>d.top+d.height-5&&(this._splitTop=d.top+d.height-5);var b=this._splitTop,b=this._splitTop-d.top;this.$node.style.top=b+"px"}else this._splitLeft=c.clientX,this._splitLeft<d.left+5?this._splitLeft=d.left+5:this._splitLeft>d.left+d.width-
5&&(this._splitLeft=d.left+d.width-5),b=this._splitLeft-2*d.left,this.$node.style.left=b+"px";this._adjustToSplitPosition(!0);f.stop(c)}},_mouseUp:function(c){this._tracking&&(f.setFramesEnabled(!0),window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),f.stop(c))}};d.prototype.constructor=d;return{Splitter:d}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(g,k,f){function d(c){this.commandRegistry=c.commandRegistry;this.create();this._filterString="";this._providers=[]}d.prototype={addProvider:function(c){this._providers.push(c)},create:function(){var c=this._keyAssistDiv=document.createElement("div");c.id="keyAssist";c.style.display="none";c.classList.add("keyAssistFloat");c.setAttribute("role","menu");var d=this._keyAssistInput=document.createElement("input");
d.classList.add("keyAssistInput");d.type="text";d.placeholder=g["Filter bindings"];c.appendChild(d);var b=this._keyAssistContents=document.createElement("div");b.classList.add("keyAssistContents");if(f.isIOS||f.isAndroid)b.style.overflowY="auto";c.appendChild(b);var e=this._keyAssistTable=document.createElement("table");e.tabIndex=0;e.classList.add("keyAssistList");b.appendChild(e);document.body.appendChild(c);d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));e.addEventListener("keydown",
function(a){this._keyDown(a)}.bind(this));d.addEventListener("input",function(a){this.filterChanged()}.bind(this));b.addEventListener(f.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===k.KEY.ESCAPE&&this.hide()}.bind(this));k.addAutoDismiss([c],function(){this.hide()}.bind(this))},createContents:function(){k.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var c=this._idCount=
this._keyAssistContents.scrollTop=0;c<this._providers.length;c++)this._providers[c].showKeyBindings(this);this.createHeader(g.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(c,d,b){if(this._filterString){var e=this._filterString.toLowerCase(),a;e!==this._filterString?(e=this._filterString,a=function(a){return a}):a=function(a){return a.toLowerCase()};if(-1===a(d).indexOf(e)&&-1===a(c).indexOf(e)&&-1===a(this._lastHeader).indexOf(e))return}var m=this._keyAssistTable.insertRow(-1);
m.id="keyAssist-keyBinding-"+this._idCount++;m.setAttribute("role","menuitem");m._execute=b;m.classList.add("keyAssistItem");m.addEventListener("click",function(a){this._selectedRow=m;this.execute();a.preventDefault()}.bind(this));b=m.insertCell(-1);b.classList.add("keyAssistName");b.appendChild(document.createTextNode(d));b=m.insertCell(-1);b.classList.add("keyAssistAccel");b.appendChild(document.createTextNode(c))},createHeader:function(c){this._lastHeader=c;var d=this._keyAssistTable.insertRow(-1);
d.classList.add("keyAssistSection");var d=d.insertCell(-1),b=document.createElement("h2");b.appendChild(document.createTextNode(c));d.appendChild(b)},execute:function(){window.setTimeout(function(){this.hide();var c=this._selectedRow;this._selectedRow=null;c&&c._execute&&c._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var c=this._keyAssistInput.value;this._filterString!==c&&(this._filterString=
c,this.createContents())}.bind(this),100)},hide:function(){if(this.isVisible()){var c=document.activeElement,d=this._keyAssistDiv,c=d===c||0!==(d.compareDocumentPosition(c)&16);d.style.display="none";c&&1!==document.compareDocumentPosition(this._previousActiveElement)&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return"block"===this._keyAssistDiv.style.display},removeProvider:function(c){c=this._providers.indexOf(c);-1!==c&&this._providers.splice(c,
1)},select:function(c){var d=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(0===d.length)this._selectedIndex=-1;else{var b=this._selectedIndex,b=(b+(c?1:-1))%d.length;0>b&&(b=d.length-1);-1!==this._selectedIndex&&(c=d[this._selectedIndex],c.classList.remove("selected"),this._selectedRow=null);this._selectedIndex=b;if(-1!==this._selectedIndex){this._selectedRow=c=d[this._selectedIndex];c.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",c.id);this._keyAssistTable.focus();
var d=c.getBoundingClientRect(),e=this._keyAssistContents,a=e.getBoundingClientRect();c.offsetTop<e.scrollTop?0===b?e.scrollTop=0:c.scrollIntoView(!0):d.bottom>a.bottom&&c.scrollIntoView(!1)}}},show:function(){this.isVisible()||(this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(0.75*this._keyAssistDiv.parentNode.clientHeight)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),
this._keyAssistInput.select())},_keyDown:function(c){if(40===c.keyCode)this.select(!0);else if(38===c.keyCode)this.select(!1);else if(13===c.keyCode)this.execute();else return;c.preventDefault()},_scrollWheel:function(c){var d=0,d=f.isIE||f.isOpera?-c.wheelDelta:f.isFirefox?40*c.detail:-c.wheelDeltaY,b=this._keyAssistContents,e=b.scrollTop;b.scrollTop+=d;if(e!==b.scrollTop)return c.preventDefault&&c.preventDefault(),!1}};return{KeyAssistPanel:d}});
define("orion/widgets/themes/ThemePreferences",[],function(){function g(g,f){this._preferences=g;this._themeData=f;var d=f.getThemeStorageInfo();this._themeVersion=d.version;var c=g.listenForChangedSettings(d.storage,2,function(d){d.key===c&&this.apply()}.bind(this))}g.prototype={_initialize:function(g,f,d){var c,l;void 0===this._themeVersion||d.get("version")===this._themeVersion?(c=d.get(g.styleset),(l=d.get("selected"))&&(l=JSON.parse(l))):l=c=null;c||(c=f.getStyles(),d.put(g.styleset,JSON.stringify(c)));
if(!l||void 0===l[g.selectedKey])l=l||{},l[g.selectedKey]=g.defaultTheme,d.put("selected",JSON.stringify(l));d.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(g){var f=this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(c){this._initialize(d,f,c);var l=JSON.parse(c.get("selected"));c=JSON.parse(c.get(d.styleset));var b;if(c)for(var e=0;e<c.length;e++)if(c[e].name===l[d.selectedKey]){b=c[e];break}g({style:b,styles:c})}.bind(this))},
setTheme:function(g,f){var d=this._themeData,c=d.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(l){this._initialize(c,d,l);var b=JSON.parse(l.get("selected"));g||(g=b[c.selectedKey]);b[c.selectedKey]=g;l.put("selected",JSON.stringify(b));f?l.put(c.styleset,JSON.stringify(f)):f=JSON.parse(l.get(c.styleset));for(var e=0;e<f.length;e++)if(f[e].name===b[c.selectedKey]){d.processSettings(f[e]);break}l.put("version",this._themeVersion)}.bind(this))},setFontSize:function(g){var f=
this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(c){this._initialize(d,f,c);var l=JSON.parse(c.get("selected")),b=JSON.parse(c.get(d.styleset)),e;if(b)for(var a=0;a<b.length;a++)b[a].fontSize=g,b[a].name===l[d.selectedKey]&&(e=b[a]);c.put(d.styleset,JSON.stringify(b));f.processSettings(e)}.bind(this))}};return{ThemePreferences:g}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile",Git:"Git","Git Settings":"Git Settings",General:"General",Navigation:"Navigation",Links:"Links","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",
Color:"Color",Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address","Email Confirmed":"Email Confirmed",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",
Password:"Password",OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git User Settings":"Update Git User Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.",
"Git user data successfully updated.":"Git user data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.","Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL",
"Plugin URL:":"Plugin URL:",Disable:"Disable",DisableTooltip:"Disable the plugin",Enable:"Enable",EnableTooltip:"Enable the plugin","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin","Find More Orion Plugins":"Find More Orion Plugins","Get Plugins":"Get Plugins",Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration",
"Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value","JavaScript Object":"JavaScript Object","click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item",
"Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",general:"General",validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}",Editor:"Editor",editorSettings:"Settings",
EditorThemes:"Themes",Import:"Import","Import a theme":"Import a theme",Export:"Export","Export a theme":"Export a theme","Theme name:":"Theme name:",yourTheme:"yourTheme",fileManagement:"File Management",typing:"Typing",autoSave:"Auto Save",autoSaveTimeout:"Save interval (ms)",autoLoad:"Auto Load",saveDiffs:"Save file as diffs",trimTrailingWhiteSpace:"Trim Trailing Whitespace on Save",Restore:"Restore Defaults",Default:"Default",keys:"Keys",tabs:"Tabs",tabSize:"Tab Size",expandTab:"Insert spaces for tabs",
smoothScrolling:"Smooth Scrolling",scrollAnimation:"Scrolling Animation",scrollAnimationTimeout:"Scrolling Duration (ms)",keyBindings:"Key Bindings",rulers:"Rulers",annotationRuler:"Show Annotation Ruler",lineNumberRuler:"Show Line Number Ruler",foldingRuler:"Show Folding Ruler",overviewRuler:"Show Overview Ruler",whitespaces:"White Spaces",wrapping:"Wrapping",wordWrap:"Word Wrap",showMargin:"Show Margin",marginOffset:"Margin Column",showTabs:"Show Tabs",showSpaces:"Show Spaces",autoSaveTimeoutInvalid:"Invalid save interval.",
scrollAnimationTimeoutInvalid:"Invalid scrolling duration.",tabSizeInvalid:"Invalid tab size.",localSettingsTooltip:"Toggle whether this setting is shown in the local editor settings drop down.",editorSettingsInfo:"Use the ${0} and ${1} to toggle whether a given setting is shown in the local editor settings drop down ${2}.",autoPairParentheses:"Autopair (Parentheses)",autoPairBraces:"Autopair {Braces}",autoPairSquareBrackets:"Autopair [Square] Brackets",autoPairAngleBrackets:"Autopair \x3cAngle\x3e Brackets",
autoPairQuotations:'Autopair "Strings"',autoCompleteComments:"Autocomplete /** Block Comments */",smartIndentation:"Smart Indentation",sourceControl:"Source Control",showBlame:"Show Blame",languageTools:"Language Tools",showOccurrences:"Show Occurrences",contentAssistAutoTrigger:"Show Content Assist automatically","Editor preferences updated":"Editor preferences updated","Editor defaults restored":"Editor defaults restored",Theme:"Theme","Font Size":"Font Size","New Theme Name:":"New Theme Name:",
"Font Size:":"Font Size:","UI Theme":"UI Theme","Navigation Bar":"Navigation Bar","Navigation Text":"Navigation Text","Search Box":"Search Box","Tool Panel":"Tool Panel","Selection Bar":"Selection Bar",Location:"Location",Content:"Content","Main Panel":"Main Panel",Button:"Button","Button Text":"Button Text","Section Text":"Section Text","Side Panel":"Side Panel","Line Color":"Line Color","Line Numbers":"Line Numbers",Foreground:"Foreground","Current Line":"Current Line","HTML Attribute":"HTML Attribute",
"Overview Ruler":"Overview Ruler","HTML Tag":"HTML Tag","Annotation Ruler":"Annotation Ruler","Show Guide":"Show Guide","Check Guide":"Check Guide",Cancel:"Cancel","Revert Theme":"Revert Theme","Update Theme":"Update Theme","Theme:":"Theme:",clickDiagram:"Click diagram to style.",clickUpdate:"Click Update button to save preview.","CSS Class Name":"CSS Class Name","CSS Attribute":"CSS Attribute","CSS Value":"CSS Value","CSS Text":"CSS Text","COLOR:":"Color:","NEW COLOR:":"New Color:",Ok:"Ok","OR HEX:":"Or Hex: "});
define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/editor/eventTarget",[],function(){function g(){}g.addMixin=function(k){var f=g.prototype,d;for(d in f)f.hasOwnProperty(d)&&(k[d]=f[d])};g.prototype={addEventListener:function(g,f,d){this._eventTypes||(this._eventTypes={});var c=this._eventTypes[g];c||(c=this._eventTypes[g]={level:0,listeners:[]});c.listeners.push({listener:f,useCapture:d})},dispatchEvent:function(g){var f=g.type;this._dispatchEvent("pre"+f,g);this._dispatchEvent(f,g);this._dispatchEvent("post"+f,g)},_dispatchEvent:function(g,
f){var d=this._eventTypes?this._eventTypes[g]:null;if(d){var c=d.listeners;try{if(d.level++,c)for(var l=0,b=c.length;l<b;l++)if(c[l]){var e=c[l].listener;"function"===typeof e?e.call(this,f):e.handleEvent&&"function"===typeof e.handleEvent&&e.handleEvent(f)}}finally{if(d.level--,d.compact&&0===d.level){for(l=c.length-1;0<=l;l--)c[l]||c.splice(l,1);0===c.length&&delete this._eventTypes[g];d.compact=!1}}}},isListening:function(g){return!this._eventTypes?!1:void 0!==this._eventTypes[g]},removeEventListener:function(g,
f,d){if(this._eventTypes){var c=this._eventTypes[g];if(c){for(var l=c.listeners,b=0,e=l.length;b<e;b++){var a=l[b];if(a&&a.listener===f&&a.useCapture===d){0!==c.level?(l[b]=null,c.compact=!0):l.splice(b,1);break}}0===l.length&&delete this._eventTypes[g]}}}};return{EventTarget:g}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(g,k,f){function d(c){c=c||{};this._document=c.document||document}var c={};d.getTheme=function(f){f=f||"default";var b=c[f];b||(b=c[f]=new d);return b};d.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(c,b){var e=this,a=e._themeClass;e._themeClass=c;this._load(c,b,function(){e.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:e.getThemeClass()})})},onThemeChanged:function(c){return this.dispatchEvent(c)},
buildStyleSheet:function(c,b){function e(b,e,d){e&&(a.push("."+c+" ."+b+" {"),a.push("\t"+(d?"background-color":"color")+": "+e+";"),a.push("}"))}var a=[];a.push("");a.push("."+c+" {");b.fontFamily&&a.push("\tfont-family: "+b.fontFamily+";");b.fontSize&&a.push("\tfont-size: "+b.fontSize+";");b.fontSize&&a.push("\tcolor: "+b.text+";");a.push("}");a.push("."+c+".textview {");b.background&&a.push("\tbackground-color: "+b.background+";");a.push("}");e("ruler.annotations",b.annotationRuler,!0);e("ruler.lines",
b.annotationRuler,!0);e("ruler.folding",b.annotationRuler,!0);e("ruler.overview",b.overviewRuler,!0);e("rulerLines",b.lineNumber,!1);e("rulerLines.even",b.lineNumberEven,!1);e("rulerLines.odd",b.lineNumberOdd,!1);e("annotationLine.currentLine",b.currentLine,!0);e("entity-name-tag",b.keyword,!1);e("entity-other-attribute-name",b.attribute,!1);e("string-quoted",b.string,!1);e("meta.annotation.currentLine",b.currentLine,!0);e("keyword",b.keyword,!1);e("string",b.string,!1);e("comment",b.comment,!1);
e("comment.block.documentation",b.comment,!1);e("keyword.other.documentation.markup",b.comment,!1);return a.join("\n")},_createStyle:function(c,b,e,a){var d=this._document;c="orion-theme-"+c;var h=d.getElementById(c);if(h){if(a||h.firstChild.data===b)return;h.removeChild(h.firstChild);h.appendChild(d.createTextNode(b))}else a?(h=f.createElement(d,"link"),h.rel="stylesheet",h.type="text/css",h.href=b,h.addEventListener("load",function(){e()})):(h=f.createElement(d,"style"),h.appendChild(d.createTextNode(b))),
h.id=c,(d.getElementsByTagName("head")[0]||d.documentElement).appendChild(h);a||e()},_load:function(c,b,e){if(c)if("string"===typeof b)this._createStyle(c,b,e);else if(b=b.href,".css"!==b.substring(b.length-4)&&(b+=".css"),/^\//.test(b)||/[a-zA-Z0-9]+:\/\//i.test(b)||!g.toUrl)this._createStyle(c,b,e,!0);else{var a=this;g(["text!"+b],function(b){a._createStyle(c,b,e,!1)})}else e()}};k.EventTarget.addMixin(d.prototype);return{TextTheme:d}});
define("orion/widgets/themes/ThemeClass",[],function(){function g(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}g.prototype.className=null;g.prototype.classString=void 0;g.prototype.style=void 0;g.prototype.closeString=" }\n";g.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:g}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(g){function k(){}k.prototype.navbar="white";k.prototype.button="#777777";k.prototype.location="#EFEFEF";k.prototype.selection="#cedce7";k.prototype.sidepanel="#F7F7F7";k.prototype.mainpanel="white";k.prototype.navtext="#bfbfbf";k.prototype.content="#3087B3";k.prototype.search="#444";k.prototype.toolpanel="white";k.prototype.writeNavigationStyle=function(){var f="",d=[],c=new g.ThemeClass("orionPage");
c.style.backgroundColor="#fdfdfd";c.style.width="100%";c.style.height="100%";d.push(c);c=new g.ThemeClass("topRowBanner");c.style.margin="0";c.style.border="0";c.style.backgroundColor=this.navbar;c.style.height="16px";c.style.padding="10px";c.style.paddingLeft="6px";c.style.paddingRight="2px";c.style.borderBottom="none";c.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";c.style.zIndex="100";d.push(c);c=new g.ThemeClass("a");c.style.textDecoration="none";c.style.color=
this.content;d.push(c);c=new g.ThemeClass("navlink");c.style.display="inline-block";c.style.padding="2px";c.style.color=this.content;c.style.verticalAlign="bottom";d.push(c);c=new g.ThemeClass("primaryNav");c.style.color=this.navtext;c.style.fontSize="8pt";c.style.fontWeight="normal";c.style.paddingTop="0";c.style.verticalAlign="baseline";d.push(c);c=new g.ThemeClass("primaryNav a");c.style.fontSize="8pt";c.style.color=this.navtext;c.style.marginRight="6px";c.style.marginLeft="6px";c.style.verticalAlign=
"baseline";c.style.textDecoration="none";d.push(c);c=new g.ThemeClass("primaryNav a:hover");c.style.color="#bfbfbf";c.style.cursor="hand";c.style.color="white";c.style.fontWeight="normal";d.push(c);for(var l in d)f+=d[l].toString();return f};k.prototype.writeLocationStyle=function(){var f="",d=[],c=new g.ThemeClass("titleArea");c.style.margin="0";c.style.paddingTop="5px";c.style.border="0";c.style.background=this.location;c.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";c.style.borderBottom="1px solid "+this.location;c.style.minHeight="20px";d.push(c);c=new g.ThemeClass("breadcrumb");c.style.fontSize="8pt";c.style.textDecoration="none";c.style.color="#f1f1f2;";c.style.paddingTop="2px";d.push(c);c=new g.ThemeClass("a.breadcrumb:hover");c.style.textDecoration="none";c.style.borderBottom="1px dotted";c.style.color="#F58B0F";c.style.cursor="pointer";d.push(c);c=new g.ThemeClass("breadcrumbSeparator");c.style.fontSize=
"8pt";c.style.textDecoration="none";c.style.color=this.separator;c.style.fontWeight="bold";d.push(c);c=new g.ThemeClass("currentLocation");c.style.fontWeight="bold";c.style.fontSize="8pt";c.style.color=this.breadcrumb;c.style.textDecoration="none";c.style.textWrap="normal";c.style.lineHeight="10pt";d.push(c);c=new g.ThemeClass("a.currentLocation:hover");c.style.fontWeight="bold";c.style.fontSize="10pt";c.style.color="#666666";c.style.textDecoration="none";c.style.borderBottom="0";d.push(c);c=new g.ThemeClass("navlinkonpage");
c.style.color=this.content;c.style.verticalAlign="middle";d.push(c);this.bannerProgress&&(c=new g.ThemeClass("topRowBanner .progressPane_running"),c.style.borderColor=this.bannerProgress,d.push(c));for(var l in d)f+=d[l].toString();return f};k.prototype.writeButtonStyle=function(){var f="",d=[],c=new g.ThemeClass("commandButton");c.style.color="#666";c.style.border="1px solid #dedede";c.style.backgroundColor="#ddd";c.style.textAlign="center";c.style.verticalAlign="middle";c.style.cursor="pointer";
c.style.display="inline-block";c.style.padding="4px 6px";c.style.borderRadius="3px";c.style.lineHeight="12px";c.style.fontSize="9pt";c.style.userSelect="none";d.push(c);c=new g.ThemeClass("commandButton:over");c.style.backgroundColor="#e6e6e6";c.style.border="1px solid #808080";d.push(c);c=new g.ThemeClass("commandMenu");c.style.color="#222";c.style.display="inline-block";c.style.verticalAlign="baseline";c.style.margin="0";c.style.fontSize="8pt";c.style.fontWeight="normal";c.style.border="1px solid #dedede";
c.style.backgroundColor="#efefef";c.style.cursor="pointer";c.style.borderRadius="1px";d.push(c);c=new g.ThemeClass("commandMenuItem");c.style.border="0";c.style.padding="0";c.style.margin="0";d.push(c);for(var l in d)f+=d[l].toString();return f};k.prototype.writeMainStyle=function(){var f="",d=[],c=new g.ThemeClass("searchbox");c.style.backgroundImage="url(../images/core_sprites.png)";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="4px -297px";c.style.width="12px";c.style.height=
"12px";c.style.backgroundColor=this.search;c.style.border="1px solid "+this.search;c.style.fontSize="11px";c.style.width="15em";c.style.height="16px";c.style.borderRadius="10px";c.style.color="#999";c.style.padding="0";c.style.paddingLeft="20px";c.style.marginLeft="5px";c.style.marginTop="6px !important";c.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";d.push(c);c=new g.ThemeClass("searchbox:focus");c.style.color="white";c.style.outline=
"none";d.push(c);c=new g.ThemeClass("checkedRow");c.style.cssText="background-color:"+this.selection+" !important;";d.push(c);c=new g.ThemeClass("navbar-item-selected");c.style.background=this.selection;c.style.color=this.content;d.push(c);c=new g.ThemeClass("auxpane");c.style.border="0";c.style.background=this.sidepanel;d.push(c);c=new g.ThemeClass("mainpane");c.style.background=this.mainpanel;c.style.border=0;d.push(c);c=new g.ThemeClass("mainToolbar");c.style.background=this.toolpanel;d.push(c);
for(var l in d)f+=d[l].toString();return f};k.prototype.render=function(f){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};k.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=
f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value,this.bannerProgress=f.bannerProgress.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel,this.bannerProgress=f.bannerProgress);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:k}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(g,k,f){function d(){}function c(){this.styles=[];var b=new d;b.name="Orion";b.navbar="white";b.button="#EFEFEF";b.location="#efefef";b.selection="FEC";b.sidepanel="#FBFBFB";b.mainpanel="white";b.toolpanel="white";b.navtext="#bfbfbf";b.content="#3087B3";b.search="#444";b.breadcrumb="#3087B3";b.separator="#333";b.bannerProgress="whitesmoke";
this.styles.push(b);b=new d;b.name="Orion2014";b.navbar="white";b.button="#EFEFEF";b.location="#EFEFEF";b.selection="FEC";b.sidepanel="#EEEEEE";b.mainpanel="#EEEEEE";b.toolpanel="#EEEEEE";b.navtext="#BFBFBF";b.content="#333333";b.search="#444444";b.breadcrumb="#333333";b.separator="#333333";b.bannerProgress="orange";this.styles.push(b);b=new d;b.name="Green Zone";b.navbar="seagreen";b.button="lavender";b.location="darkseagreen";b.selection="moccasin";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel=
"white";b.navtext="#FBFBFB";b.content="darkgreen";b.search="darkgreen";b.breadcrumb="#3087B3";b.separator="seagreen";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name="Pretty In Pink";b.navbar="plum";b.button="lavender";b.location="pink";b.selection="lavender";b.sidepanel="seashell";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumorchid";b.search="violet";b.breadcrumb="#3087B3";b.separator="plum";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name=
"Blue Monday";b.navbar="cornflowerblue";b.button="lavender";b.location="skyblue";b.selection="lavender";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="royalblue";b.search="royalblue";b.breadcrumb="#3087B3";b.separator="cornflowerblue";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name="Vanilla Skies";b.navbar="sandybrown";b.button="lemmonchiffon";b.location="cornsilk";b.selection="lemonchiffon";b.sidepanel="white";b.mainpanel="white";b.toolpanel=
"white";b.navtext="lemonchiffon";b.content="chocolate";b.search="moccasin";b.breadcrumb="#3087B3";b.separator="sandybrown";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name="Beetlejuice";b.navbar="indigo";b.button="slateblue";b.location="darkslateblue";b.selection="silver";b.sidepanel="lavender";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumslateblue";b.search="#444";b.breadcrumb="#3087B3";b.separator="indigo";b.bannerProgress="#F2F2F2";this.styles.push(b);
b=new d;b.name="Red";b.navbar="#CD2127";b.button="#777777";b.location="#D85F56";b.selection="lightcoral";b.sidepanel="#EFDAB2";b.mainpanel="#FDFADD";b.toolpanel="#FDFADD";b.navtext="#FBFBFB";b.content="darkred";b.search="#D85F56";b.breadcrumb="darkred";b.separator="#CD2127";b.bannerProgress="#F2F2F2";this.styles.push(b)}function l(){return this.styles}d.prototype.name="Orion";d.prototype.navbar="#404648";d.prototype.button="#EFEFEF";d.prototype.location="#333";d.prototype.breadcrumb="#3087B3";d.prototype.separator=
"#333";d.prototype.selection="FEC";d.prototype.sidepanel="#FBFBFB";d.prototype.mainpanel="white";d.prototype.toolpanel="white";d.prototype.navtext="#bfbfbf";d.prototype.content="#3087B3";d.prototype.search="#444";d.prototype.bannerProgress="white";c.prototype.styles=[];c.prototype.getStyles=l;c.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};c.prototype.getViewData=function(){var b={top:10,left:10,
width:350,height:350};b.shapes=[{type:"RECTANGLE",name:g["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:g["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:g["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:g["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",
name:g["Selection Bar"],x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:g.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:g["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:g.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:g.Content,label:"/",x:78,y:60,family:"content",
fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:g.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:g["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:g.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:g["Button Text"],label:"Button",x:158,y:90,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"TRIANGLE",
name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:g["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:g["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:g["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:g["Line Color"],
x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:g["Side Panel"],x:10,y:71,width:140,height:289,family:"sidepanel",fill:"#FBFBFB",order:12},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:g["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},
{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"}];for(var e=0;3>e;e++)b.shapes.push({type:"TEXT",name:g.Content,label:"org.eclipse.orion.content",x:170,y:127+20*e,fill:"#3087B3",family:"content"});for(e=0;3>e;e++)b.shapes.push({type:"TEXT",name:g.Content,label:"Item",x:25,y:115+20*e,fill:"#3087B3",family:"content"});for(e=0;3>e;e++)b.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+20*e,x2:165,y2:124+20*e,x3:160,y3:127+20*e,family:"navbar",fill:"#333"});b.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return b};c.prototype.processSettings=function(b){var e=new f.ThemeSheetWriter;(new k.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",e.getSheet(b))};return{ThemeData:c,getStyles:l}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," \x3cNo available services or timed out, check URL and try reloading\x3e":" \x3cNo available services or timed out, check URL and try reloading\x3e",Properties:"Properties",
" (Service Id: ":" (Service Id: ",Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? \x3d any character, * \x3d any string):":"Type the name of a file to open (? \x3d any character, * \x3d any string):",Search:"Search","FileName FolderName":"FileName FolderName(Optional)","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',
name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","\x3c/a\x3e":"\x3c/a\x3e","\x3e":"\x3e","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Report a Bug":"Report a Bug","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:",
"Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination","Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'.","Main Pages":"Main Pages","Related Links":"Related Links"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(g){function k(f,d,c){this.elements=c;this.taskPanel=document.createElement("div");this.taskPanel.className="UAContainer";this.taskPanel.innerHTML='\x3cheader class\x3d"UAHeader"\x3eDevelop software from within the cloud\x3c/header\x3e';this.elementNode=document.createElement("div");this.switchesContainer=document.createElement("div");this.switches=document.createElement("span");this.radioButtons=[];this.elementNode.className=
"UAContainer-body";this.taskPanel.appendChild(this.elementNode);this.switchesContainer.className="UAContainer-switch-body";this.switches.className="UAContainer-switches";this.switchesContainer.innerHTML="";this.switchesContainer.appendChild(this.switches);this.taskPanel.appendChild(this.switchesContainer);!0===d?(this.container=document.createElement("div"),this.container.className="UAModal",this.container.appendChild(this.taskPanel),this.backdrop=document.createElement("div"),this.backdrop.className=
"UAModalBackground",document.body.appendChild(this.backdrop),document.body.appendChild(this.container),g.addAutoDismiss([this.container],this.destroy.bind(this))):f.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}k.prototype.elementNode=null;k.prototype.switchesContainer=null;k.prototype.switches=null;k.prototype.radioButtons=null;k.prototype.chosenSwitch=
null;k.prototype.addElement=function(f){var d=document.createElement("span");d.className="UAContainer-icon";d.innerHTML='\x3cspan class\x3d"workingSpan"\x3e\x3cimg src\x3d"'+f.image+'" id\x3d"'+f.label+'ImageNode" alt\x3d"'+f.alt+'" height\x3d"64" width\x3d"64"\x3e\x3c/span\x3e\x3cspan class\x3d"UAIcon-label"\x3e\x3cspan class\x3d"UALabel" id\x3d"'+f.label+'LabelNode" \x3e'+f.label+"\x3c/span\x3e\x3c/span\x3e";d.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;
document.getElementById(f.label+"LabelNode").className="UALabel-live";d.className="UAContainer-icon-live"};d.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";d.className="UAContainer-icon"};var c=this;d.onclick=function(){c.showMedia(f)};this.elementNode.appendChild(d)};k.prototype.clearElements=function(){this.elementNode.innerHTML=""};k.prototype.showMedia=function(f){this.clearElements();this.addElement(f);
var d=document.createElement("span");d.className="UAContainer-media";d.innerHTML='\x3cdiv\x3e\x3c/div\x3e\x3cdiv\x3e\x3c/div\x3e\x3cspan class\x3d"mediaSpan"\x3e\x3cimg src\x3d"'+f.media+'" alt\x3d"'+f.alt+'" height\x3d"300" width\x3d"400"\x3e\x3c/span\x3e';this.elementNode.appendChild(d);setTimeout(function(){d.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};k.prototype.createSwitch=
function(f){var d;d=f?f.label+"switch":"indexSwitch";var c=document.createElement("span");c.className="workingSpan";c.innerHTML='\x3cdiv class\x3d"circle" id \x3d"'+d+'"\x3e\x3c/div\x3e';var g=this;c.onclick=f?function(){g.showMedia(f)}:function(){g.initialize();g.chosenSwitch.firstChild.className="circle";g.chosenSwitch=c;g.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(c);return this.radioButtons[this.radioButtons.length]=c};k.prototype.initialize=function(){this.clearElements();
this.elements.forEach(this.addElement.bind(this))};k.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return k});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(g,k,f,d){function c(){}var l=null;c.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'\x3cdiv class\x3d"dialog" role\x3d"dialog"\x3e\x3cdiv class\x3d"dialogTitle"\x3e\x3cspan id\x3d"title" class\x3d"dialogTitleText layoutLeft"\x3e\x3c/span\x3e\x3cbutton aria-label\x3d"Close" class\x3d"dismissButton layoutRight core-sprite-close imageSprite" id\x3d"closeDialog"\x3e\x3c/button\x3e\x3c/div\x3e\x3cdiv id\x3d"dialogContent" class\x3d"dialogContent layoutBlock"\x3e\x3c/div\x3e\x3cdiv id\x3d"buttons" class\x3d"dialogButtons"\x3e\x3c/div\x3e\x3c/div\x3e',_initialize:function(){var b=
document.body;this.$frameParent=b;this.$$modalExclusions=this.$$modalExclusions||[];var e=document.createRange();e.selectNode(b);e=e.createContextualFragment(this.CONTAINERTEMPLATE);b.appendChild(e);this.$frame=b.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(b){a.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);e=document.createRange();e.selectNode(this.$parent);
b=e.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(b,this.messages);this.$parent.appendChild(b);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(b){b.keyCode===f.KEY.ESCAPE?a.hide():b.keyCode===f.KEY.ENTER&&"function"===typeof a._defaultCallback&&a._defaultCallback()},!1);this._bindElements(this.$parent);"function"===typeof this._bindToDom&&this._bindToDom(this.$parent);this.modal&&this._makeModal()},
_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var b=this;this.buttons.forEach(function(e){var a=d.createButton(e.text,e.callback);e.id&&(a.id=e.id,b["$"+a.id]=a);e.isDefault&&(b._defaultCallback=e.callback,b._defaultButton=a);b.$buttonContainer.appendChild(a)})}},_makeModal:function(b){var e=this;this.$frame.addEventListener("blur",function(a){e.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var b=!f.contains(e.$frame,a.target);if(b)for(var c=0;c<
e.$$modalExclusions.length;c++)if(f.contains(e.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(e.$lastFocusedElement||e.$parent).focus()},0),f.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);b=this.$frameParent.childNodes;var a=!1;this._addedBackdrop=[];for(var c=0;c<b.length;c++){for(var d=0;d<this.$$modalExclusions.length;d++)if(f.contains(this.$$modalExclusions[d],b[c])){a=
!0;break}!a&&b[c]!==e.$frame&&b[c].classList&&!b[c].classList.contains("tooltipContainer")&&(d=b[c],d.classList.contains("modalBackdrop")||(d.classList.add("modalBackdrop"),this._addedBackdrop.push(d)))}(b=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&b.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var b=e._getFirstFocusField();b&&b!==a.target&&b.focus();f.stop(a)}},!1)},_addChildDialog:function(b){this.$$modalExclusions.push(b.$frame||b.$parent)},_inModalExclusion:function(b){return this.$$modalExclusions.some(function(e){return b.$frame===
e||b.$parent===e})},_bindElements:function(b){for(var e=0;e<b.childNodes.length;e++){var a=b.childNodes[e];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(b){!b&&l===this&&(l=null);"function"===typeof this._beforeHiding&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");f.setFramesEnabled(!0);"function"===
typeof this._afterHiding&&this._afterHiding();var e=this;this.keepAlive||window.setTimeout(function(){e.destroy()},0)},show:function(b){if(this.modal)if(l){if(!l._inModalExclusion(this)){this.hide(!0);return}}else l=this;"function"===typeof this._beforeShowing&&this._beforeShowing();f.setFramesEnabled(!1);var e=f.bounds(this.$frame),a=f.bounds(document.documentElement),c;b?(c=f.bounds(b),b=c.top+c.height+4,c=c.left+4,b+e.height>a.height&&(b=Math.max(0,a.height-e.height-4)),c+e.width>a.width&&(c=Math.max(0,
a.width-e.width-4))):(c=Math.max(0,(a.width-e.width)/2),b=Math.max(0,(a.height-e.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=b+"px";this.$frame.style.left=c+"px";this.$frame.classList.add("dialogShowing");"function"===typeof this._afterShowing&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return f.firstTabbable(this.$parent)||this._defaultButton||f.firstTabbable(this.$buttonContainer)||this.$close},
destroy:function(){this.$frame&&(l===this&&(l=null),f.setFramesEnabled(!0),this._addedBackdrop&&0<this._addedBackdrop.length&&this._addedBackdrop.forEach(function(b){b.classList.remove("modalBackdrop")}),this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0),this.$frameParent.removeChild(this.$frame),this.$parent=this.$frame=void 0)}};c.prototype.constructor=c;return{Dialog:c}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages require orion/webui/littlelib orion/PageLinks orion/widgets/userAssistance/UATaskPanel orion/webui/dialog orion/webui/dropdown".split(" "),function(g,k,f,d,c,l,b){function e(a){this._displaySignOut=!0;this._init(a)}e.prototype={_init:function(a){this._dropdownNode=f.node(a.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=a.dropdown;this._serviceRegistry=a.serviceRegistry;this.authenticatedServices=
{};this.unauthenticatedServices={};this._noSeparator=a.noSeparator;this._dropDownItemClass=a.dropDownItemClass;this._keyAssistClass=a.keyAssistClass;void 0!==a.signOut&&(this._displaySignOut=a.signOut)},isSingleService:function(){return 1===this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)},hasServices:function(){return 0<this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)},length:function(a){var b=0,e;for(e in a)a.hasOwnProperty(e)&&b++;
return b},_makeMenuItem:function(a,e){var c=b.createMenuItem(a).firstElementChild;"string"===typeof this._dropDownItemClass&&""!==this._dropDownItemClass&&c.classList.add(this._dropDownItemClass);c.addEventListener("click",e,!1);c.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&e()},!1);return c},_renderAuthenticatedService:function(a,b){var e=this,c=this.authenticatedServices[a].authService;if(c&&c.logout&&this._displaySignOut){var d=this._makeMenuItem(g["Sign Out"],
function(){c.logout().then(function(){e.addUserItem(a,c,e.authenticatedServices[a].label);localStorage.removeItem(a);localStorage.removeItem("lastLogin");for(var b=localStorage.length-1;0<=b;b--){var d=localStorage.key(b);d&&0===d.indexOf("/orion/preferences/user")&&localStorage.removeItem(d)}c.getAuthForm(window.location.href).then(function(a){window.location=a})})});this._dropdownNode.appendChild(d.parentNode)}},renderServices:function(){function a(a){c[a]||(c[a]=e.createDocumentFragment());return c[a]}
var e=document,c=[],n=this._serviceRegistry;d.getPageLinksInfo(n,"orion.page.link.user").then(function(d){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);d.getAllLinks().forEach(function(b){var c,d;if(b.category&&(d=/user\.(\d+)/.exec(b.category)))c=parseInt(d[1],10);if("number"!==typeof c||isNaN(c))c=1;c=a(c);d=e.createElement("li");var h=e.createElement("a");h.role="menuitem";"string"===typeof this._dropDownItemClass?""!==this._dropDownItemClass&&h.classList.add(this._dropDownItemClass):
h.classList.add("dropdownMenuItem");h.href=b.href;h.textContent=b.textContent;d.appendChild(h);c.appendChild(d);h.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&h.click()},!1)}.bind(this));this.keyAssistFunction&&(d=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction),"string"===typeof this._keyAssistClass?""!==this._keyAssistClass&&d.classList.add(this._keyAssistClass):d.classList.add("key-assist-menuitem"),d=d.parentNode,a(0).appendChild(d));
if(d=n.getServiceReferences("orion.page.getstarted")[0])d=d.getProperty("data"),d=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,d)).parentNode,a(0).appendChild(d);var k=this;c.sort(function(a,b){return a-b}).forEach(function(a,e){if(e<c.length-1&&!this._noSeparator){var d=b.createSeparator();a.appendChild(d)}k._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var l in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(l)&&this._renderAuthenticatedService(l,
0)}.bind(this))},getStartedDialog:function(a){new c(null,!0,a)},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(a,b,e,c){c?(this.unauthenticatedServices[a]&&delete this.unauthenticatedServices[a],this.authenticatedServices[a]={authService:b,label:e,data:c}):(this.authenticatedServices[a]&&delete this.authenticatedServices[a],this.unauthenticatedServices[a]=this.unauthenticatedServices[a]?{authService:b,label:e,pending:this.unauthenticatedServices[a].pending}:
{authService:b,label:e});this.renderServices()}};e.prototype.constructor=e;return{UserMenu:e}});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?","Search cancelled by user":"Search cancelled by user",
Cancel:"Cancel"});define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/searchUtils","i18n!orion/nls/messages require orion/regex orion/commandRegistry orion/PageUtil orion/URITemplate".split(" "),function(g,k,f,d,c,l){function b(a,b,e){var c="";e&&(c="^");if(c=f.parse("/"+c+a.searchStr+"/"))e=c.pattern,c=c.flags,-1===c.indexOf("i")&&!b.caseSensitive&&(c+="i"),a.regExp={pattern:e,flags:c},a.wildCard=!0}var e={ALL_FILE_TYPE:"*.*",doSearch:function(a,b,c,d){if(a){var f=!0;"*"===c&&(c="");""===c&&(f=d&&d.type!==e.ALL_FILE_TYPE);f&&(""!==c&&e.addRecentSearch(b,
c,d?d.regEx:!1),a=a.createSearchParams(c,!1,!1,d),a=e.generateSearchHref(a),window.location=a)}else window.alert(g["Can't search: no search service is available"])},generateSearchHelper:function(a,c){var d=a.keyword,f=d,g={};a.fileType&&a.fileType!==e.ALL_FILE_TYPE&&""===d&&(f="*."+a.fileType);if(a.regEx)g.searchStr=d,b(g,a,c);else{var k=-1<d.indexOf("*"),l=-1<d.indexOf("?");k&&(d=d.split("*").join(".*"));l&&(d=d.split("?").join("."));!k&&!l&&!a.nameSearch?(g.searchStr=a.caseSensitive?d.split("\\").join(""):
d.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?d:d.toLowerCase(),b(g,a,c),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:a,inFileQuery:g,displayedSearchTerm:f}},convertSearchParams:function(a){void 0!==a.rows&&(a.rows=parseInt(a.rows,10));void 0!==a.start&&(a.start=parseInt(a.start,10));"string"===typeof a.regEx&&(a.regEx="true"===a.regEx.toLowerCase());"string"===typeof a.caseSensitive&&(a.caseSensitive="true"===a.caseSensitive.toLowerCase());
"string"===typeof a.nameSearch&&(a.nameSearch="true"===a.nameSearch.toLowerCase())},copySearchParams:function(a,b){var e={},c;for(c in a)if(void 0!==a[c]&&null!==a[c]&&(b||"replace"!==c))e[c]=a[c];return e},generateSearchHref:function(a){var b=k.toUrl("search/search.html");a=e.copySearchParams(a,!0);var c=a.resource;a.resource=void 0;return"undefined"!==typeof a.keyword?(new l(b+"#{,resource,params*}")).expand({resource:c,params:a}):(new l(b+"#{,resource}")).expand({resource:c})},generateFindURLBinding:function(a,
b,e,c,d){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:"string"===typeof c?c:void 0,atLine:"number"===typeof e?e:void 0};return d?a:","+(new l("{,params*}")).expand({params:a})},convertFindURLBinding:function(a){"string"===typeof a.regEx&&(a.regEx="true"===a.regEx.toLowerCase());"string"===typeof a.caseSensitive&&(a.caseSensitive="true"===a.caseSensitive.toLowerCase());"string"===typeof a.atLine&&(a.atLine=parseInt(a.atLine,10))},replaceRegEx:function(a,
b,e){return a.replace(RegExp(b.pattern,b.flags),e)},replaceStringLiteral:function(a,b,c){b=f.parse("/"+b+"/gim");return e.replaceRegEx(a,b,c)},searchOnelineLiteral:function(a,b,e){var c;c=0;for(var d=!1,f=[];!(c=b.indexOf(a.searchStr,c),0>c);){f.push({startIndex:c,length:a.searchStrLength});d=!0;if(e)break;c+=a.searchStrLength}return d?f:null},findRegExp:function(a,b,e,c){if(!b)return null;e=e||"";e+=(-1===e.indexOf("g")?"g":"")+(-1===e.indexOf("m")?"m":"");var d=null;return(d=RegExp(b,e).exec(a.substring(c)))&&
{startIndex:d.index+c,length:d[0].length}},searchOnelineRegEx:function(a,b,c){for(var d=0,f=!1,g=[];;)if(d=e.findRegExp(b,a.regExp.pattern,a.regExp.flags,d)){g.push(d);f=!0;if(c)break;d=d.startIndex+d.length}else break;return f?g:null},generateNewContents:function(a,b,c,d,f,g){if(d&&b){a||(c.contents=[]);for(var k=0;k<b.length;k++){for(var l=b[k],r=!1,t=!1,v=[],w,F=0,D=0;D<d.children.length;D++)if(d.children[D].lineNumber-1===k){F=D;for(r=0;r<d.children[D].matches.length;r++)!1!==d.children[D+r].checked&&
v.push(r);t=0<v.length;w=d.children[D].matches;r=!0;break}if(r){if(t){v=e.replaceCheckedMatches(l,f,w,v,g);l=v.replacedStr;for(r=0;r<d.children[F].matches.length;r++)d.children[F+r].newMatches=v.newMatches}else for(r=0;r<d.children[F].matches.length;r++)d.children[F+r].newMatches=d.children[F+r].matches;a?c.contents[k]=l:c.contents.push(l)}else a||c.contents.push(l)}}},generateMatchContext:function(a,b,e){var c=[],d=2*a+1,f;b.length<=d?(f=0,a=b.length-1):(f=e-a,0>f?(f=0,a=f+d-1):(a=e+a,a>b.length-
1&&(a=b.length-1,f=a-d+1)));for(d=f;d<=a;d++)c.push({context:b[d],current:d===e});return c},splitFile:function(a){for(var b=0,e=0,c=0,d=0,f=[];;){-1!==b&&b<=c&&(b=a.indexOf("\r",c));-1!==e&&e<=c&&(e=a.indexOf("\n",c));if(-1===e&&-1===b){f.push(a.substring(d));break}var g=1;-1!==b&&-1!==e?b+1===e?(g=2,c=e+1):c=(b<e?b:e)+1:c=-1!==b?b+1:e+1;f.push(a.substring(d,c-g));d=c}return f},searchWithinFile:function(a,b,c,d,f,g){c=e.splitFile(c);f&&(b.contents=c);if(b){b.children=[];for(var k=d=0;k<c.length;k++){var l=
c[k];if(l&&0<l.length){var r=g?l:l.toLowerCase();if(r=a.wildCard?e.searchOnelineRegEx(a,r):e.searchOnelineLiteral(a,r)){var t,v=k+1;if(f)for(var w=0;w<r.length;w++)t=w+1,t={parent:b,checked:b.checked,type:"detail",matches:r,lineNumber:v,matchNumber:t,name:l,location:b.location+"-"+v+"-"+t},b.children.push(t);else t={parent:b,context:e.generateMatchContext(2,c,k),checked:b.checked,type:"detail",matches:r,lineNumber:v,name:l,location:b.location+"-"+v},b.children.push(t);d+=r.length}}}b.totalMatches=
d}},replaceCheckedMatches:function(a,b,e,c,d){for(var f=0,g="",k=[],l=0;l<e.length;l++){f!==e[l].startIndex&&(g+=a.substring(f,e[l].startIndex));e[l].length&&(d=e[l].length);for(var f=!1,t=0;t<c.length;t++)if(c[t]===l){f=!0;break}f?(k.push({startIndex:g.length,length:b.length}),g+=b):(k.push({startIndex:g.length,length:d}),g+=a.substring(e[l].startIndex,e[l].startIndex+d));f=e[l].startIndex+d}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:k}},fullPathNameByMeta:function(a){var b=
a.length,e="";if(0<b)for(b-=1;-1<b;b--)e=e+(""===e?"":"/")+a[b].Name;return e},path2FolderName:function(a,b,e){return a.substring(0,a.length-b.length-(e?0:1))},_storeRecentSearch:function(a,b,e,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);e&&window.setTimeout(function(){e.dispatchEvent({type:"inputDataListChanged",deleting:c})}.bind(this),20)})},addRecentSearch:function(a,b,c){"string"===typeof b&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f;
d=d.get("recentSearch");"string"===typeof d&&(d=JSON.parse(d));if(d){for(f in d)if(d[f].name===b)return;20<=d.length&&d.splice(19,d.length-20+1)}else d=[];d.splice(0,0,{name:b,regEx:c});e._storeRecentSearch(a,d)})},removeRecentSearch:function(a,b,c){"string"===typeof b&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f;d=d.get("recentSearch");"string"===typeof d&&(d=JSON.parse(d));if(d)for(f in d)if(d[f].name===b){d.splice(f,1);e._storeRecentSearch(a,
d,c,!0);break}})},getSearches:function(a,b,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);"string"===typeof a&&(a=JSON.parse(a));a&&e&&e(a)})},getMixedSearches:function(a,b,c,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");"string"===typeof f&&(f=JSON.parse(f));b&&(a=a.get("search"),"string"===typeof a&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(c){var b=e.parseQueryStr(a.query);
f.some(function(a){return b.searchStrTitle===a.name})||f.push({name:b.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&d&&d(f)})},getOpenSearchPref:function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&"undefined"!==a["links.newtab"]?a["links.newtab"]?!0:!1:!1)})},setOpenSearchPref:function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",
{openInNewTab:b})})}};return e});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages require orion/i18nUtil orion/searchUtils orion/contentTypes orion/Deferred".split(" "),function(g,k,f,d,c,l){function b(b,a,c,h){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=h&&h.searchOnName;this._buildSkeletonOnly=h&&h.buildSkeletonOnly;this._fetchChildrenCallBack=h&&h.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:d.generateSearchHelper(c);this._location=h&&h.location;this._childrenLocation=h&&h.childrenLocation?h.childrenLocation:this._location;this._reportOnCancel=h&&h.reportOnCancel;this._cancelled=!1;this._statusService=this.registry.getService("orion.page.message");this._progressService=this.registry.getService("orion.page.progress");this._statusService&&this._statusService.setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}b.prototype.search=function(b){var a=
this.registry.getService("orion.core.contentTypeRegistry");this._onSearchComplete=b;this._cancelled=!1;this._deferredArray=[];a.getContentTypes().then(function(a){this.contentTypesCache=a;var b=this;this._visitRecursively(this._childrenLocation).then(function(){(!b._cancelled||b._reportOnCancel)&&b._reportResult();b._cancelled&&b._HandleStatus({name:"Cancel"})}.bind(b),function(a){b._reportResult();b._HandleStatus(a)}.bind(b))}.bind(this))};b.prototype.searchName=function(b,a){b&&(this._searchParams=
b,this.searchHelper=d.generateSearchHelper(b,!0));a&&(this.onSearchNameComplete=a);var c=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(0<this.fileSkeleton.length){for(var h=0;h<this.fileSkeleton.length;h++){var f=this.fileSkeleton[h].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(c.push(this.fileSkeleton[h]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,
docs:c}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};b.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var d=this;b();c.getContentTypes().then(function(b){d.contentTypesCache=b;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};b.prototype._sort=function(b){b.sort(function(a,
b){var e,c;if("Path asc"===this._searchParams.sort){e=a.Location&&a.Location.toLowerCase();e=d.path2FolderName(e,a.Name&&a.Name.toLowerCase(),!0);c=b.Location&&b.Location.toLowerCase();c=d.path2FolderName(c,b.Name&&b.Name.toLowerCase(),!0);if(e<c)return-1;if(e>c)return 1}return this._sortOnNameSingle(a,b)}.bind(this))};b.prototype._HandleStatus=function(b){this._statusService&&"Cancel"===b.name&&(console.log("Crawling search cancelled. Deferred array length : "+this._deferredArray.length),this._statusService.setProgressResult({Message:g["Search cancelled by user"],
Severity:"Warning"}))};b.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}})};b.prototype._sortOnNameSingle=function(b,a){var c=b.Name&&b.Name.toLowerCase(),d=a.Name&&a.Name.toLowerCase();return c<d?-1:c>d?1:0};b.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===d.ALL_FILE_TYPE?!0:0<=b.extension.indexOf(this.searchHelper.params.fileType):
!0};b.prototype._visitRecursively=function(b){var a=[],d=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);return(d._progressService?this._progressService.progress(d.fileClient.fetchChildren(b),"Crawling search for children of "+b):d.fileClient.fetchChildren(b)).then(function(b){for(var e=0;e<b.length;e++)if(void 0!==b[e].Directory&&!1===b[e].Directory)if(d._searchOnName)a.push(d._buildSingleSkeleton(b[e]));else if(d._buildSkeletonOnly)a.push(d._buildSingleSkeleton(b[e]));else{if(!d._cancelled){var f=
c.getFilenameContentType(b[e].Name,d.contentTypesCache);if(f&&("text/plain"===f["extends"]||"text/plain"===f.id)&&d._onFileType(f))f=d._sniffSearch(b[e]),a.push(f),d._deferredArray.push(f)}}else if(b[e].Location)if(d._cancelled)break;else f=d._visitRecursively(b[e].ChildrenLocation),a.push(f),d._deferredArray.push(f);return l.all(a)})};b.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,
b,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};b.prototype._reportSingleHit=function(b){this._cancelled||(b.LastModified=b.LocalTimeStamp,this.fileLocations.push(b),this._hitCounter++,this._sort(this.fileLocations),this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0))};b.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(b){b.cancel()})};b.prototype._sniffSearch=function(b){this._totalCounter++;
var a=this;if(!this._cancelled)if(""===this.searchHelper.params.keyword)this._reportSingleHit(b),this._statusService&&this._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],this._hitCounter,this._totalCounter)});else return(a._progressService?a._progressService.progress(a.fileClient.read(b.Location),"Reading file "+b.Location):a.fileClient.read(b.Location)).then(function(c){a._hitOnceWithinFile(c)&&a._reportSingleHit(b);a._statusService&&a._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],
a._hitCounter,a._totalCounter)},g.Cancel)},function(a){a&&a.message&&"cancel"!==a.message.toLowerCase()&&console.error("Error loading file content: "+a.message)})};b.prototype._buildSingleSkeleton=function(b){this._totalCounter++;this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&0===this._totalCounter%100&&this.searchName();b=new l;b.resolve(this._totalCounter);return b};b.prototype.constructor=b;return{SearchCrawler:b}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages orion/crawler/searchCrawler orion/contentTypes require orion/webui/littlelib orion/util orion/webui/dialog".split(" "),function(g,k,f,d,c,l,b){function e(a){this._init(a)}e.prototype=new b.Dialog;e.prototype.TEMPLATE='\x3cdiv role\x3d"search"\x3e\x3cdiv\x3e\x3clabel id\x3d"fileNameMessage" for\x3d"fileName"\x3e${Type the name of a file to open (? \x3d any character, * \x3d any string):}\x3c/label\x3e\x3c/div\x3e\x3cdiv\x3e\x3cinput id\x3d"fileName" type\x3d"text" class\x3d"setting-control" style\x3d"width:90%;"/\x3e\x3c/div\x3e\x3cdiv id\x3d"progress" style\x3d"padding: 2px 0 0; width: 100%;"\x3e\x3cimg src\x3d"'+
d.toUrl("../../../images/progress_running.gif")+'" class\x3d"progressPane_running_dialog" id\x3d"crawlingProgress"\x3e\x3c/img\x3e\x3c/div\x3e\x3cdiv id\x3d"results" style\x3d"max-height:250px; height:auto; overflow-y:auto;" aria-live\x3d"off"\x3e\x3c/div\x3e\x3cdiv id\x3d"statusbar"\x3e\x3c/div\x3e\x3c/div\x3e';e.prototype._init=function(a){this.title=a.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=
new f.ContentTypeRegistry(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;void 0!==a.nameSearch&&(this._nameSearch=a.nameSearch);this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(g["Missing required argument: fileService"]);
this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||"function"!==typeof this._searchRenderer.makeRenderFunction)throw Error(g["Missing required argument: searchRenderer"]);this._initialize()};e.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",g["FileName FolderName"]):this.$fileName.setAttribute("placeholder",g.Search);this.$fileName.addEventListener("input",function(a){b._time=+new Date;b._timeoutId&&
clearTimeout(b._timeoutId);b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===c.KEY.ENTER){var e=c.$("a",b.$results);e&&(c.stop(a),(l.isMac?a.metaKey:a.ctrlKey)?window.open(e.href):(window.location.href=e.href,b.hide()))}},!1);a.addEventListener("keydown",function(a){var e,d,f;if(a.keyCode===c.KEY.DOWN||a.keyCode===c.KEY.UP)e=c.$$array("a",b.$results),d=document.activeElement,f=e.indexOf(d),a.keyCode===c.KEY.DOWN?0<=f?(d.classList.remove("treeIterationCursor"),
e=f<e.length-1?e[f+1]:e[0],e.focus(),e.classList.add("treeIterationCursor")):0<e.length&&(e=e[0],e.focus(),e.classList.add("treeIterationCursor")):0<=f?(d.classList.remove("treeIterationCursor"),d=b.$fileName,e=0<f?e[f-1]:d,e.focus(),0<f&&e.classList.add("treeIterationCursor")):0<e.length&&(e[e.length-1].focus(),e[e.length-1].classList.add("treeIterationCursor")),c.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=
b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new k.SearchCrawler(b._searcher.registry,b._fileService,"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(g["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),
this.$fileNameMessage.appendChild(document.createTextNode(this._message)));this._initialText&&(this.$fileName.value=this._initialText,this.doSearch())};e.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};e.prototype._detectFolderKeyword=function(a){var b,e=a,c=null;if(this._nameSearch&&(b=/(\S+)\s*(.*)/,(a=b.exec(a))&&3===a.length))a[1]&&
(e=a[1]),a[2]&&(c=a[2]);return{keyword:e,folderKeyword:c}};e.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._detectFolderKeyword(a),e=this._searcher.createSearchParams(b.keyword,this._nameSearch,this._searchOnRoot),d=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=d;var f=document.createElement("div");f.appendChild(document.createTextNode(this._nameSearch?g["Searching..."]:l.formatMessage(g["Searching for occurrences of"],
a)));c.empty(this.$results);this.$results.appendChild(f);this._searcher.search(e,b.folderKeyword,function(){d===this.currentSearch&&d.apply(null,arguments)}.bind(this))}};e.prototype.decorateResult=function(a){function b(a){0===a.button&&!a.ctrlKey&&!a.metaKey&&e.hide()}var e=this;a=c.$$array("a",a);for(var d=0;d<a.length;d++)a[d].addEventListener("click",b,!1)};e.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};e.prototype._afterHiding=function(){this._onHide&&this._onHide()};e.prototype.constructor=
e;return{OpenResourceDialog:e}});define("text!orion/banner/banner.html",[],function(){return'\x3cheader id\x3d"banner" role\x3d"banner"\x3e\n\t\x3c!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\x3e\n\n\t\x3cdiv id\x3d"staticBanner" class\x3d"layoutBlock topRowBanner"\x3e \x3c!-- primaryNav --\x3e\n\t\t\x3cdiv id\x3d"centralNavigationArea" style\x3d"position:absolute;left:0;top:0;width:39px;height:36px; z-index:1;border-right:1px solid #ddd;"\x3e\x3c/div\x3e\n\n\t\t\x3c!-- Static "Home" link. TODO delete this --\x3e\n\t\t\x3ca id\x3d"home" class\x3d"layoutLeft "\x3e\x3c/a\x3e\n\n\t\t\x3c!-- Left banner component: hamburger --\x3e\n\t\t\x3cnav id\x3d"primaryNav" class\x3d"bannerLeftArea" style\x3d"z-index:2;" role\x3d"navigation"\x3e\n\t\t\t\t\x3cbutton class\x3d"centralNavigation commandSprite core-sprite-hamburger" type\x3d"button"id\x3d"centralNavigation"\x3e\x3c/button\x3e\n\t\t\x3c/nav\x3e\n\n\t\t\x3c!-- Middle banner component: Breadcrumb bar --\x3e\n\t\t\x3cdiv class\x3d"clear navigationBreadcrumb bannerMiddleArea" \x3e\n\t\t\t\x3cdiv id\x3d"location" class\x3d"currentLocation"\x3e\x3c/div\x3e\n\t\t\x3c/div\x3e\n\n\t\t\x3c!-- Right banner component: user identity --\x3e\n\t\t\x3cdiv class\x3d"bannerRightArea" style\x3d"z-index:2;"\x3e\n\t\t\t\x3c!-- Global commands support. --\x3e\n\t\t\t\x3cdiv id\x3d"globalActions" class\x3d"spacingLeft layoutLeft"\x3e\x3c/div\x3e\n\n\t\t\t\x3c!-- Search. TODO delete this --\x3e\n\t\t\t\x3cinput type\x3d"text" id\x3d"search" autocomplete\x3d"off" class\x3d"layoutLeft spacingLeft searchbox" role\x3d"search" style\x3d"display:none;"\x3e\n\t\t\t\x3cdiv id\x3d"searchOptions" class\x3d"layoutLeft" style\x3d"padding-top:1px;display:none;"\x3e\x3c/div\x3e\n\n\t\t\t\x3c!-- User identity menu and Progress --\x3e\n\t\t\t\x3cdiv id\x3d"userMenu" class\x3d"spacingRight layoutRight" style\x3d"color:#ccc;line-height:16px;"\x3e\n\t\t\t\t\x3cdiv id\x3d"progressPane" class\x3d"progressWatch" tabindex\x3d"0" role\x3d"progressbar"\x3e\n\t\t\t\t\t\x3cdiv id\x3d"watchButton" class\x3d"watchButton"\x3e\x3c/div\x3e\n\t\t\t\t\t\x3cdiv id\x3d"watchBody" class\x3d"watchBody"\x3e\n\t\t\t\t\t\t\x3cspan class\x3d"hand longMinute"\x3e\n\t\t\t\t\t\t\t\x3cspan class\x3d"darkSide"\x3e\x3c/span\x3e\n\t\t\t\t\t\t\x3c/span\x3e\n\t\t\t\t\t\t\x3cspan class\x3d"hand longHour"\x3e\n\t\t\t\t\t\t\t\x3cspan class\x3d"darkSide"\x3e\x3c/span\x3e\n\t\t\t\t\t\t\x3c/span\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\t\n\t\t\t\t\x3cdiv style\x3d"position: absolute;right: 0px;top:0;width: 39px;height:36px; z-index:-50;border-left: 1px solid #ddd;"\x3e\x3c/div\x3e\n\t\t\t\t\x3cspan id\x3d"userTrigger" tabindex\x3d"0" role\x3d"button" class\x3d"dropdownTrigger" style\x3d"z-index:2;"\x3e\n\t\t\t\t\x3c/span\x3e\n\t\t\t\t\x3cul id\x3d"userDropdown" class\x3d"dropdownMenu" role\x3d"menu"\x3e\x3c/ul\x3e\n\t\t\t\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\n\t\x3c!-- IDE notification messages go in here --\x3e\n\t\x3cdiv id\x3d"notificationArea" class\x3d"notificationHide"\x3e\n\t\t\x3cdiv class\x3d"layoutLeft" id\x3d"notifications" aria-live\x3d"assertive" aria-atomic\x3d"true"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"layoutRight"\x3e\x3cbutton aria-label\x3d"Close" class\x3d"dismissButton layoutRight core-sprite-close imageSprite" type\x3d"button" id\x3d"closeNotifications"\x3e\x3c/span\x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/header\x3e'});
define("text!orion/banner/footer.html",[],function(){return'\x3c!--\n\x3cfooter id\x3d"footerContent" class\x3d"layoutBlock footerLayout" role\x3d"contentinfo"\x3e\n\t\x3cdiv class\x3d"logoFooter commandSprite core-sprite-orion-logo"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"footerBlock"\x3e${Orion is in Beta. Please try it out but BEWARE your data may be lost.}\x3c/div\x3e\n\t\x3cdiv class\x3d"footerRightBlock"\x3e\n\t\t\x3cul\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"https://bugs.eclipse.org/bugs/enter_bug.cgi?product\x3dOrion\x26version\x3d5.0" target\x3d"_blank"\x3e${Report a Bug}\x3c/a\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"http://www.eclipse.org/legal/privacy.php" target\x3d"_blank"\x3e${Privacy Policy}\x3c/a\x3e\x3c/li\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"http://www.eclipse.org/legal/termsofuse.php" target\x3d"_blank"\x3e${Terms of Use}\x3c/a\x3e\x3c/li\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"http://www.eclipse.org/legal/copyright.php" target\x3d"_blank"\x3e${Copyright Agent}\x3c/a\x3e\x3c/li\x3e\n\t\t\x3c/ul\x3e\n\t\x3c/div\x3e\n\x3c/footer\x3e\n--\x3e'});
define("text!orion/banner/toolbar.html",[],function(){return'\x3cul class\x3d"layoutLeft commandList pageActions" id\x3d"pageActions"\x3e\x3c/ul\x3e\n\x3cul class\x3d"layoutLeft commandList pageActions" id\x3d"selectionTools"\x3e\x3c/ul\x3e\n\x3cul class\x3d"layoutLeft commandList pageActions" id\x3d"navActions"\x3e\x3c/ul\x3e\n\x3cdiv class\x3d"layoutLeft" style\x3d"padding-left:7px;padding-right:7px;margin-top:2px;" id\x3d"filterBox" style\x3d"visibility: hidden;"\x3e\x3c/div\x3e\n\x3cul class\x3d"layoutRight commandList pageActions" id\x3d"settingsActions"\x3e\x3c/ul\x3e\n\x3cdiv class\x3d"layoutRight status" id\x3d"statusPane" role\x3d"status" aria-live\x3d"off"\x3e\x3c/div\x3e\n\x3cul class\x3d"layoutRight commandList pageActions" id\x3d"pageNavigationActions"\x3e\x3c/ul\x3e'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(g,k){function f(d,c,f){if(d=k.node(d))this._parent=d;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;d=document.createElement("div");d.classList.add("dropdownMenu");d.classList.add("dropdownMenuOpen");d.id=this.navDropDownId;d.style.display="none";this._parent.appendChild(d);this._dropdownMenu=
d;if(c=k.node(c))this._triggerNode=c;else throw"Trigger node of dropdown menu not found";"hidden"===this._triggerNode.style.visibility&&(this._triggerNode.style.visibility="visible");f.noClick||(this._triggerNode.onclick=this.click.bind(this));this._dropdownMenu.addEventListener("keydown",function(b){b.keyCode===k.KEY.ESCAPE&&this.clearPanel()}.bind(this))}g.mixin(f.prototype,{click:function(){"none"===this._dropdownMenu.style.display?this.updateContent(this.getContentNode(),function(){k.setFramesEnabled(!1);
this._dropdownMenu.style.display="";this._positionDropdown();this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=k.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this));if(this.options.onShow)this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){if(this.isVisible()&&(this._dropdownMenu.style.display="none",k.setFramesEnabled(!0),this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},
addContent:function(d){this._dropdownMenu.innerHTML=d},getContentNode:function(){return this._dropdownMenu},updateContent:function(d,c){c()},_positionDropdown:function(){this._dropdownMenu.style.right="";var d=k.bounds(this._dropdownMenu),c=k.bounds(document.body);d.left+d.width>c.left+c.width&&(d=k.bounds(this._boundingNode(this._triggerNode)),c=k.bounds(this._triggerNode),this._dropdownMenu.style.right=d.width-(c.left-d.left+c.width)+"px")},_boundingNode:function(d){var c=window.getComputedStyle(d,
null);return null===c||"absolute"===c.getPropertyValue("position")||!d.parentNode||d===document.body?d:this._boundingNode(d.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},isVisible:function(){return"none"!==this._dropdownMenu.style.display&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){this._parent&&(k.setFramesEnabled(!0),k.empty(this._parent),this._parent=this.select=null)}});return f});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize strings from JavaScript files in this folder.",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Export as zip":"Zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder",
"Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Go Into":"Go Into","Move into the selected folder":"Move into the selected folder",
"Import local file...":"File System","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With",
"Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.",
"You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.","Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,k,f){function d(b,e,a){if(!b[e])throw e+g[" is not supported in this file system"];return b[e].apply(b,a)}function c(b,e,a,f){if(!b.readBlob)throw g["source file service does not support binary read"];if(!a.writeBlob)throw g["target file service does not support binary write"];if("/"!==e[e.length-1])return d(b,"readBlob",[e]).then(function(b){return d(a,"writeBlob",[f,b])});var h=f.substring(0,
f.length-1),n=decodeURIComponent(h.substring(h.lastIndexOf("/")+1)),h=h.substring(0,h.lastIndexOf("/")+1);return d(a,"createFolder",[h,n]).then(function(){},function(){}).then(function(){return d(b,"fetchChildren",[e]).then(function(e){for(var d=[],h=0;h<e.length;++h){var g=e[h].Location,n=g;e[h].Directory&&(n=g.substring(0,g.length-1));n=decodeURIComponent(n.substring(n.lastIndexOf("/")+1));n=f+encodeURIComponent(n);e[h].Directory&&(n+="/");d[h]=c(b,g,a,n)}return k.all(d)})})}function l(b,e){function a(a){var b=
new k;b.reject(g["No Matching FileService for location:"]+a);return b}var c=b.getServiceReferences("orion.core.file"),d=c;if(e)for(var d=[],n=0;n<c.length;++n)e(c[n])&&d.push(c[n]);for(var p=[],l=[],s=[],q=[],r={fetchChildren:function(){var a=new k;a.resolve(q);return a},createWorkspace:function(){var a=new k;a.reject(g["no file service"]);return a},loadWorkspaces:function(){var a=new k;a.reject(g["no file service"]);return a},loadWorkspace:function(a){var b=new k;window.setTimeout(function(){b.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:q,ChildrenLocation:"/"})},100);return b},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},c=0;c<d.length;++c)q[c]={Directory:!0,Length:0,LocalTimeStamp:0,Location:d[c].getProperty("top"),ChildrenLocation:d[c].getProperty("top"),Name:d[c].getProperty("Name")},n=d[c].getProperty("pattern")||d[c].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"^"!==n[0]&&(n=
"^"+n),p[c]=RegExp(n),l[c]=b.getService(d[c]),s[c]=d[c].getProperty("Name"),d[c].getProperty("NameKey")&&d[c].getProperty("nls")&&f.getMessageBundle(d[c].getProperty("nls")).then(function(a,b){q[a].Name=b[d[a].getProperty("NameKey")];s[a]=b[d[a].getProperty("NameKey")]}.bind(this,c));this._getServiceIndex=function(a){if("/"===a)return-1;if(!a||a.length&&0===a.length)return l[0]?0:-1;for(var b=0;b<p.length;++b)if(p[b].test(a))return b;throw g["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return-1===a?r:l[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return-1===a?r.Name:s[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return-1===a?r.Location:q[a].Location}}l.prototype={getService:function(b){return this._getService(b)},fileServiceName:function(b){return this._getServiceName(b)},fileServiceRootURL:function(b){return this._getServiceRootURL(b)},fetchChildren:function(b){return d(this._getService(b),"fetchChildren",
arguments)},createWorkspace:function(b){return d(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return d(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,e,a,c){return d(this._getService(b),"createProject",arguments)},createFolder:function(b,e){return d(this._getService(b),"createFolder",arguments)},createFile:function(b,e){return d(this._getService(b),"createFile",
arguments)},deleteFile:function(b){return d(this._getService(b),"deleteFile",arguments)},moveFile:function(b,e,a){var f=this._getService(b),h=this._getService(e);if(f===h)return d(f,"moveFile",arguments);var g="/"===b[b.length-1],p=e;"/"!==p[p.length-1]&&(p+="/");if(a)p+=encodeURIComponent(a);else{var l=b;g&&(l=l.substring(0,l.length-1));p+=l.substring(l.lastIndexOf("/")+1)}g&&"/"!==p[p.length-1]&&(p+="/");return c(f,b,h,p).then(function(){return d(f,"deleteFile",[b])})},copyFile:function(b,e,a){var f=
this._getService(b),h=this._getService(e);if(f===h)return d(f,"copyFile",arguments);var g="/"===b[b.length-1],p=e;"/"!==p[p.length-1]&&(p+="/");if(a)p+=encodeURIComponent(a);else{var l=b;g&&(l=l.substring(0,l.length-1));p+=l.substring(l.lastIndexOf("/")+1)}g&&"/"!==p[p.length-1]&&(p+="/");return c(f,b,h,p)},read:function(b,e){return d(this._getService(b),"read",arguments)},readBlob:function(b){return d(this._getService(b),"readBlob",arguments)},write:function(b,e,a){return d(this._getService(b),"write",
arguments)},remoteImport:function(b,e){return d(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,e){return d(this._getService(b),"remoteExport",arguments)},search:function(b){return d(this._getService(b.resource),"search",arguments)}};l.prototype.constructor=l;return{FileClient:l}});
define("orion/webui/SideMenu","orion/commands orion/objects orion/webui/littlelib orion/PageLinks orion/PageUtil orion/URITemplate orion/URL-shim orion/util".split(" "),function(g,k,f,d,c,l,b,e){function a(a,b){this.parentNode=f.node(a);this.contentNode=f.node(b);if(!this.parentNode)throw Error("Missing parentNode");this.menuitems=Object.create(null);this.categories=this.links=null;this.anchor=document.createElement("ul");this.anchor.classList.add("sideMenuList");this.parentNode.appendChild(this.anchor);
this.anchor.addEventListener("click",this._handleEvent.bind(this));this.anchor.addEventListener("touchstart",this._handleEvent.bind(this));this.anchor.addEventListener("focus",this._handleEvent.bind(this),!0);f.addAutoDismiss([this.anchor],this._expandMenu.bind(this,null))}function m(a){return!a.isRelatedLink}function h(a,b){var e=a.order,c=b.order;return e<c?-1:c<e?1:0}function n(a,b){var e=a.source.order,c=b.source.order,e="number"===typeof e?e:100,c="number"===typeof c?c:100;return e===c?a.textContent.localeCompare(b.textContent):
e<c?-1:1}var p=e.isTouch;k.mixin(a.prototype,{LOCAL_STORAGE_NAME:"sideMenuNavigation",OPEN_STATE:"open",CLOSED_STATE:"closed",DEFAULT_STATE:"open",SIDE_MENU_OPEN_WIDTH:"40px",TRANSITION_DURATION_MS:301,addMenuItem:function(a,b,e){var c=this.anchor;a=this.createListItem(a,b);e&&a.classList.add("sideMenuItemActive");c.appendChild(a);this.menuitems[b]=a},setSideMenu:function(){var a=this.getDisplayState(),b=this.parentNode;b&&(a===this.CLOSED_STATE&&(this.setPageContentLeft("0"),this._timeout&&(window.clearTimeout(this._timeout),
this._timeout=null),this._timeout=window.setTimeout(function(){b.style.display="none"},this.TRANSITION_DURATION_MS),b.classList.add("animating")),a===this.OPEN_STATE&&(this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),b.classList.remove("animating"),b.style.display="block",b.style.width=this.SIDE_MENU_OPEN_WIDTH,this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH)))},setPageContentLeft:function(a){var b=this.contentNode;b&&(b.style.left=a)},toggleSideMenu:function(){var a=this.getDisplayState(),
b=this.contentNode;b&&b.classList.add("content-fixedHeight-animation");a=a===this.OPEN_STATE?this.CLOSED_STATE:this.OPEN_STATE;a===this.DEFAULT_STATE?localStorage.removeItem(this.LOCAL_STORAGE_NAME):localStorage.setItem(this.LOCAL_STORAGE_NAME,a);this.setSideMenu()},clearMenuItems:function(){this.menuitems=[];f.empty(this.anchor)},getMenuItems:function(){var a=this.menuitems;return Object.keys(a).map(function(b){return a[b]})},getMenuItem:function(a){return this.menuitems[a]},getDisplayState:function(){var a=
localStorage.getItem(this.LOCAL_STORAGE_NAME);a||(a=this.DEFAULT_STATE);return a},createListItem:function(a,b){var e=document.createElement("li");e.className=a;e.classList.add("sideMenuItem");e.categoryId=b;return e},setCategories:function(a){this.categories=a;this.links=Object.create(null)},setPageLinks:function(a){this.pageLinks=a;var b=this,e=a.createLinkElements();a.getAllLinks().forEach(function(a,c){var d=e[c];d.source=a;b._getLinksBin(a.category).push(d)});this._renderLinks()},setRelatedLinks:function(a,
b){this.relatedLinks=a;var e=this;Object.keys(this.links).forEach(function(a){var b=e._getLinksBin(a);e.links[a]=b.filter(m)});var c=document.createDocumentFragment();a.forEach(function(a){var b=a.relatedLink,d=e._getLinksBin(b.category);a=g.createCommandMenuItem(c,a.command,a.invocation);a.classList.remove("dropdownMenuItem");a.isRelatedLink=!0;a.source=b;d.push(a)});this._renderLinks(b)},_getLinksBin:function(a){if(a){var b=this.links;b[a]=b[a]||[];return b[a]}return[]},_sort:function(){var a=this.links;
Object.keys(a).forEach(function(b){a[b].sort(n)})},_renderCategories:function(){var a=this.categories,b=this,e=new URL(window.location.href),f=c.matchResourceParameters();f.OrionHome=d.getOrionHome();var m=!1;this.clearMenuItems();a.getCategoryIDs().map(function(b){return a.getCategory(b)}).sort(h).forEach(function(a){var c=b._getLinksBin(a.id);c.length&&(m?b.addMenuItem(a.imageClass,a.id,!1):(c=c.some(function(a){if(!a.source.uriTemplate)return!1;a=new l(a.source.uriTemplate);a=new URL(a.expand(f),
window.location);return a.protocol===e.protocol&&a.host===e.host&&a.hostname===e.hostname&&a.port===e.port&&a.pathname===e.pathname&&a.search===e.search?m=!0:!1}),b.addMenuItem(a.imageClass,a.id,c)))})},_renderLinks:function(a){a=a||[];this._sort();this._renderCategories();var b=this,e=window.location.href;Object.keys(this.menuitems).forEach(function(c){var d=b.getMenuItem(c);if(d){for(var h=b._getLinksBin(c).slice(),h=h.filter(function(b){var c=b.source;return 0<=a.indexOf(c.id)||!c.default&&!c.force&&
b.href===e?!1:!0}),h=h.filter(function(a){a=a.source;return!(1<h.length&&a.default&&!a.force)}),f=h.length-1;0<f;f--)h[f].href===h[f-1].href&&h.splice(f,1);if(h.length){d.appendChild(b._createCategoryElement(c,d,h[0]));var m=document.createElement("ul");m.className="sideMenuSubMenu";h.forEach(function(a){var b=document.createElement("li");b.className="sideMenuSubMenuItem";var e=document.createElement("a");e.href=a;e.className="sideMenuSubMenuItemLink";var c=document.createElement("span");c.innerHTML=
a.innerHTML;c.className="sideMenuSubMenuItemSpan";e.appendChild(c);b.appendChild(e);m.appendChild(b)});d.appendChild(m)}}})},_createCategoryElement:function(a,b,e){a=this.categories.getCategory(a);var c;p?(c=document.createElement("button"),c.type="button"):(c=document.createElement("a"),c.href=e.href);c.className+=a.imageClass;c.classList.add("submenu-trigger");c.tabIndex="0";b.classList.remove(a.imageClass);return c},_handleEvent:function(a){var b=a.target;a="focus"===a.type;if("A"!==b.tagName||
a)b.classList.contains("submenu-trigger")&&(p||a)&&this._expandMenu(f.$(".sideMenuSubMenu",b.parentNode))},_expandMenu:function(a){this.getMenuItems().forEach(function(b){b=f.$(".sideMenuSubMenu",b);a!==b&&b.classList.remove("expanded")});a&&a.classList.toggle("expanded")}});return a});
define("orion/globalCommands","i18n!orion/nls/messages require orion/commonHTMLFragments orion/keyBinding orion/EventTarget orion/commandRegistry orion/commands orion/parameterCollectors orion/extensionCommands orion/uiUtils orion/keyBinding orion/breadcrumbs orion/webui/littlelib orion/webui/splitter orion/webui/dropdown orion/webui/tooltip orion/contentTypes orion/URITemplate orion/keyAssist orion/PageUtil orion/widgets/themes/ThemePreferences orion/widgets/themes/container/ThemeData orion/Deferred orion/widgets/UserMenu orion/PageLinks orion/webui/dialogs/OpenResourceDialog text!orion/banner/banner.html text!orion/banner/footer.html text!orion/banner/toolbar.html orion/widgets/input/DropDownMenu orion/util orion/customGlobalCommands orion/fileClient orion/webui/SideMenu orion/objects".split(" "),function(g,
k,f,d,c,l,b,e,a,m,h,n,p,u,s,q,r,t,v,w,F,D,x,E,C,J,G,y,A,H,z,B,K,L,T){function I(a,b){if(a.getLabel)return a.getLabel();var e=new x;e.resolve(b.properties.name);return e}function Y(a){p.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function V(a,b){var e=a.getServiceReferences("orion.core.auth");ba=[];var c=O.createMenuGenerator.apply(this,arguments);if(c)for(var d=0;d<
e.length;d++){var h=e[d],f=a.getService(h);I(f,h).then(function(a){f.getKey().then(function(b){ba.push(b);f.getUser().then(function(e){c.addUserItem(b,f,a,e)},function(e,d){c.addUserItem(b,f,a,d)});window.addEventListener("storage",function(e){aa[b]!==localStorage.getItem(b)&&(aa[b]=localStorage.getItem(b),f.getUser().then(function(e){c.addUserItem(b,f,a,e)},function(e){c.addUserItem(b,f,a)}))},!1)})})}}function P(a){return a}function Q(e,c,d,h,f){function m(){if(u)return u;var a=e.getService("orion.core.contentTypeRegistry");
a||(a=new r.ContentTypeRegistry(e),a=e.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return u=a})}function g(a){for(var b={},e=a.getPropertyKeys(),c,d=0;d<e.length;d++)c=e[d],b[c]=a.getProperty(c);return b}function n(a,b){var e=null;a.some(function(a){return b===a.getProperty("id")?!!(e=a):!1});return e}function p(a){var e=a.command;return!e.visibleWhen||e.visibleWhen(c)?(a.invocation=new b.CommandInvocation(c,c,null,e,h),(new x).resolve(a)):"function"===
typeof f?(s||(s=f()),x.when(s,function(d){if(d&&c===ca&&(!e.visibleWhen||e.visibleWhen(d)))return a.invocation=new b.CommandInvocation(d,d,null,e,h),a})):(new x).resolve()}function l(a,e,c){return c?(new x).resolve({relatedLink:a,command:c}):e.then(function(e){return{relatedLink:a,command:new b.Command(e)}})}var k=arguments,u,s,v=e&&e.getServiceReferences("orion.page.link.related");if(v&&0!==v.length){var t=this;x.when(m(),function(){if(O.beforeGenerateRelatedLinks.apply(t,k)){var b=e.getServiceReferences("orion.navigate.command"),
c=[];v.forEach(function(d){var f=g(d);if(f.id){var m;if((f.nls&&f.nameKey||f.name)&&f.uriTemplate)m=a._createCommandOptions(f,d,e,u,!0),c.push(l(f,m,null));else if(m=n(b,f.id)){var p=g(m);d={};T.mixin(d,p,f);(f=h.findCommand(f.id))?c.push(l(d,null,f)):(m=a._createCommandOptions(p,m,e,u,!0),c.push(l(d,m,null)))}}});x.all(c,P).then(function(a){a.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});return x.all(a.map(p),P).then(function(b){var e=[];b=b.filter(function(b,c){if(b)return!0;
e.push(a[c]);return!1});O.addRelatedLinkCommands.call(t,h,b,e,d);O.afterGenerateRelatedLinks.apply(t,k)})})}})}}function S(a){var b=p.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function X(a){var b=window.getComputedStyle(a,null);return null===b||"absolute"===b.getPropertyValue("position")||!a.parentNode||a===document.body?a:X(a.parentNode)}function R(a){var b={},e=null;"string"===typeof a&&(a=p.node(a));a||(a=p.node("pageActions"));for(var c=a;c&&c.classList;){if(c.classList.contains("toolComposite")){e=
c;break}c=c.parentNode}a.classList.contains("commandMarker")&&(b.commandNode=a);e&&(b.slideContainer=p.$(".slideParameters",e),b.parameterArea=p.$(".parameters",e),b.dismissArea=p.$(".parametersDismiss",e),b.notifications=p.$("#notificationArea",e),e.parentNode&&(b.toolbarTarget=p.$(".toolbarTarget",e.parentNode),b.toolbarTarget&&(a=p.bounds(b.toolbarTarget),c=p.bounds(X(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-c.top,b.toolbar=e)));return b}function $(a){if(a=a.slideContainer)if(a.style.left=
"",a.style.top="",a.classList.contains("slideContainerActive")){var b=p.bounds(a),e=p.bounds(a.parentNode);a.style.left=(e.width-b.width)/2+"px";a.style.top="0"}}l=function(a){var b=document.createElement("a");b.href=a;return b.href}(k.toUrl("auth/NotifyAuthentication.html"));var aa={},N=null,O={createMenuGenerator:B.createMenuGenerator||function(a,b){if(p.node("userMenu")){var e=p.node("userDropdown"),c=new s.Dropdown({dropdown:e}),e=new E.UserMenu({dropdownNode:e,dropdown:c,serviceRegistry:a}),
c=p.node("userTrigger");new q.Tooltip({node:c,text:g.Options,position:["below","left"]});c=document.getElementById("userTrigger");c.className+=" imageSprite core-sprite-silhouette";e.setKeyAssist(b);return e}},beforeGenerateRelatedLinks:B.beforeGenerateRelatedLinks||function(a,b,e,c,d){return!0},addRelatedLinkCommands:B.addRelatedLinkCommands||function(a,b,e,c){this.sideMenu&&this.sideMenu.setRelatedLinks(b,c)},afterGenerateRelatedLinks:B.afterGenerateRelatedLinks||function(a,b,e,c,d){},afterSetPageTarget:B.afterSetPageTarget||
function(a){},generateNavigationMenu:B.generateNavigationMenu||function(a,b,e,c,d,h,f){if(a=p.node("sideMenu"))b=p.node("centralNavigation"),new q.Tooltip({node:b,text:g.CentralNavTooltip,position:["right"]}),N=this.sideMenu=new L(a,p.node("pageContent")),b.addEventListener("click",N.toggleSideMenu.bind(N)),(a=p.node("sideMenuToggle"))&&a.addEventListener("click",N.toggleSideMenu.bind(N))},afterGenerateNavigationMenu:B.afterGenerateNavigationMenu||function(a,b,e,c,d,h,f){},afterGenerateBanner:B.afterGenerateBanner||
function(a,b,e,c,d,h,f){}},ba=[],ca,Z=[],M,W=null,U=null,da=new c;return{generateBanner:function(a,c,h,m,n,l,s,r){function t(a){a.registerService("orion.cm.managedservice",{updated:function(a){a=a&&"undefined"!==a["links.newtab"]?a["links.newtab"]?"_blank":"_self":"_self";for(var b=p.$$array(".targetSelector"),e=0;e<b.length;e++)b[e].target=a}},{pid:"nav.config"})}(new F.ThemePreferences(m,new D.ThemeData)).apply();var q=p.node(a);if(!q)throw g["could not find banner parent, id was "]+a;var w=document.createRange();
w.selectNode(q);w=w.createContextualFragment(G);p.processTextNodes(w,g);q.firstChild?q.insertBefore(w,q.firstChild):q.appendChild(w);q=p.node("home");q.href=k.toUrl("edit/edit.html");q.setAttribute("aria-label",g["Orion Home"]);p.node("progressPane").src=b.NO_IMAGE;if(q=p.node("pageToolbar"))q.classList.add("toolbarLayout"),q.innerHTML=A+f.slideoutHTMLFragment("mainToolbar");(q=p.node("closeNotifications"))&&q.setAttribute("aria-label",g["Close notification"]);if(17>=z.isFirefox&&(q=p.node("staticBanner")))q.style.width=
"100%",q.style.MozBoxSizing="border-box";if(q=p.node("footer"))q.innerHTML=y,p.processTextNodes(q,g);h.setParameterCollector(new e.CommandParameterCollector(R,$));document.addEventListener("keydown",function(a){a.keyCode===p.KEY.ESCAPE&&(a=c.getService("orion.page.message"))&&a.setProgressMessage("")},!1);O.generateNavigationMenu.apply(this,arguments);O.afterGenerateNavigationMenu.apply(this,arguments);q=C.getCategoriesInfo(c);w=C.getPageLinksInfo(c,"orion.page.link");x.all([q,w]).then(function(a){if(N){var b=
a[1];N.setCategories(a[0]);N.setPageLinks(b);N.setSideMenu()}});if(q=p.$(".split")){var w=p.$(".sidePanelLayout"),E=p.$(".mainPanelLayout");w&&E&&(W={side:w,main:E},W.splitter=new u.Splitter({node:q,sidePanel:w,mainPanel:E,toggle:!0,closeByDefault:r}),q=new b.Command({name:g["Toggle side panel"],tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){W.splitter.toggleSidePanel()}}),h.addCommand(q),h.registerCommandContribution("pageActions","orion.toggleSidePane",1,
null,!0,new d.KeyBinding("l",z.isMac?!1:!0,!0,!1,z.isMac?!0:!1)))}var B=!1,H=function(a,b){if(!B){var e=b.getService("orion.page.progress"),c=new J.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,onHide:function(){B=!1}});window.setTimeout(function(){B=!0;c.show()},0)}},q=new b.Command({name:g["Find File Named..."],tooltip:g["Choose a file by name and open an editor on it"],id:"orion.openResource",callback:function(a){H(n,c)}});h.addCommand(q);h.registerCommandContribution("globalActions",
"orion.openResource",100,null,!0,new d.KeyBinding("f",!0,!0));q=new b.Command({name:g["Toggle banner and footer"],tooltip:g["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=p.node("banner"),b=p.node("footer"),e=p.node("sideMenu"),c=p.$(".content-fixedHeight"),d="hidden"===a.style.visibility;d?(a.style.visibility="visible",b.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized"),e&&e.classList.remove("sideMenu-maximized")):(a.style.visibility=
"hidden",b.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"),e&&e.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!d});return!0}});h.addCommand(q);h.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.KeyBinding("m",!0,!0));q=new b.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return k.toUrl("help/about.html")}});h.addCommand(q);
h.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.KeyBinding(112,!0,!0));q=new b.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return k.toUrl("operations/list.html")}});h.addCommand(q);h.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.KeyBinding("o",!0,!0));U=new v.KeyAssistPanel({commandRegistry:h});q=new b.Command({name:g["Show Keys"],
tooltip:g["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){U.isVisible()?U.hide():U.show();return!0}});h.addCommand(q);h.registerCommandContribution("globalActions","orion.keyAssist",100,null,!0,new d.KeyBinding(191,!1,!0));S(h);V(c,q.callback);Y(c);window.addEventListener("hashchange",function(){h.processURL(window.location.href)},!1);window.setTimeout(function(){t(c)},0);O.afterGenerateBanner.apply(this,arguments)},getToolbarElements:R,getMainSplitter:function(){return W},
getKeyAssist:function(){return U},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,setPageTarget:function(a){var b,e,c=a.breadcrumbRootName,d=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&!a.staticBreadcrumb&&(e=(c?c+" ":"")+a.fileService.fileServiceName(a.target.Location),c=null),b=a.name||a.target.Name,ca=a.target,Q.call(this,d,a.target,Z,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(c=
c||a.task||a.name),b=a.name,Q.call(this,d,{NoTarget:""},Z,a.commandService,a.makeAlternate));(M=a.title)||(M=b?b+" - "+a.task:a.task);window.document.title=M;O.afterSetPageTarget.apply(this,arguments);if(b=a.breadCrumbContainer?p.node(a.breadCrumbContainer):p.node("location"))if(p.empty(b),a.staticBreadcrumb)new n.BreadCrumbs({container:b,rootSegmentName:c});else{var h=d&&new K.FileClient(d),d=a.breadcrumbTarget||a.target,h=h&&d&&d.Location?h.fileServiceRootURL(d.Location):null;new n.BreadCrumbs({container:b,
resource:d,rootSegmentName:c,workspaceRootSegmentName:e,workspaceRootURL:h,makeFinalHref:a.makeBreadcrumFinalLink,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){M&&("*"===M.charAt(0)&&!a&&(M=M.substring(1)),a&&"*"!==M.charAt(0)&&(M="*"+M),window.document.title=M);var b=p.node("dirty");b&&(b.textContent=a?"*":"")},setPageCommandExclusions:function(a){Z=a},notifyAuthenticationSite:l}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(g){return{detectValidURL:function(k){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,d=f.exec(k),c=[],l=0;d;){if(3===d.length&&0<d[2].length){var b=new URL(d[2]);":"!==b.protocol&&g.validateURLScheme(b.href)&&(d.index>l&&c.push({segmentStr:k.substring(l,d.index)}),c.push({segmentStr:0<d[1].length?d[1]:d[2],urlStr:d[2]}),l=d.index+d[0].length)}d=f.exec(k)}if(0===l)return null;l<k.length-1&&c.push({segmentStr:k.substring(l)});return c},processURLSegments:function(g,
f){f.forEach(function(d){if(d.urlStr){var c=document.createElement("a");c.href=d.urlStr;c.appendChild(document.createTextNode(d.segmentStr))}else c=document.createElement("span"),c.textContent=d.segmentStr;g.appendChild(c)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(g,k,f,d){function c(b,e,a,c,d){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=e;this.notificationContainerDomId=d;this.domId=a;this.progressDomId=c||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var l;c.prototype={_init:function(){var b=k.node("closeNotifications");if(b&&
!this._hookedClose){b.style.cursor="pointer";this._hookedClose=!0;var e=k.node(this.notificationContainerDomId);k.addAutoDismiss([e],function(){this._clickToDisMiss&&this.close()}.bind(this));b.addEventListener("click",function(){this.close()}.bind(this));e.addEventListener("click",function(a){a&&a.target&&"a"===a.target.nodeName.toLowerCase()&&(a=k.$$("a",e))&&a.length&&1===a.length&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var b=k.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&b?(b.innerHTML="",b.classList.remove("cancelButton"),b.classList.add("dismissButton"),b.classList.add("core-sprite-close"),b.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null):this.setProgressMessage("")},_getNotifierElements:function(){this._notifierElements||(this._notifierElements=f.getToolbarElements(this.notificationContainerDomId));return this._notifierElements},setMessage:function(b,e,a){this._init();this.currentMessage=b;var c=k.node(this.domId);
if("boolean"===typeof a){var d=c.getAttribute("aria-live");c.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){b===this.currentMessage&&(k.empty(c),c.appendChild(document.createTextNode(b)),window.setTimeout(function(){c.setAttribute("aria-live",d)},100))}.bind(this),100)}else k.empty(c),c.appendChild(document.createTextNode(b));"number"===typeof e&&window.setTimeout(function(){b===this.currentMessage&&(k.empty(c),c.appendChild(document.createTextNode("")))}.bind(this),e)},setErrorMessage:function(b){this._clickToDisMiss=
!0;this.currentMessage=b;this._init();var e=b.responseText||b.message||b;if("string"===typeof e)try{e=JSON.parse(e)}catch(a){}b=e.Message||e;var c="red";if(e.Severity)switch(e.Severity){case "Warning":c="#FFCC00";break;case "Error":c="red";break;case "Info":case "Ok":c="green"}e=document.createElement("span");e.style.color=c;e.appendChild(document.createTextNode(b));b=k.node(this.domId);k.empty(b);b.appendChild(e)},setProgressMessage:function(b){this._clickToDisMiss=!1;this._init();this.currentMessage=
b;var e=document.createElement("span");e.classList.add("progressIcon");var a=k.node(this.progressDomId);k.empty(a);a.appendChild(e);a.appendChild(document.createTextNode(b));e=k.node(this.notificationContainerDomId);e.classList.remove("notificationHide");if(b&&0<b.length)e.classList.add("progressNormal"),e.classList.add("notificationShow");else{if(this._progressMonitors&&0<this._progressMonitors.length)return this._renderOngoingMonitors();e.classList.remove("notificationShow");e.classList.add("notificationHide")}},
setCancelFunction:function(b){this._cancelFunc=b},setProgressResult:function(b,e){this._clickToDisMiss=!1;this._cancelMsg=e;this.currentMessage=b;var a=b.responseText||b;if("string"===typeof a)try{a=JSON.parse(a)}catch(c){}this._init();var h=a.Message||a.toString(),f=g.UnknownError,p="core-sprite-information",l="progressNormal",s=document.createElement("span");s.classList.add("imageSprite");s.classList.add("progressIcon");var q=[];if(a.Severity)switch(a.Severity){case "Warning":f=g.UnknownWarning;
p="core-sprite-warning";l="progressWarning";q.push("progressInfo");q.push("progressError");q.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":p="core-sprite-error";l="progressError";q.push("progressWarning");q.push("progressInfo");q.push("progressNormal");this._clickToDisMiss=!0;break;default:l="progressNormal",q.push("progressWarning"),q.push("progressError"),q.push("progressNormal")}q.push("notificationHide");s.classList.add(p);var r=k.node(this.progressDomId),p=k.node(this.notificationContainerDomId);
k.empty(r);r.appendChild(s);h===Object.prototype.toString()&&(h=f);a.HTML?(a=document.createElement("span"),a.innerHTML=h,r.appendChild(a)):((f=d.detectValidURL(h))?(h=document.createDocumentFragment(),d.processURLSegments(h,f),Array.prototype.forEach.call(k.$$("a",h),function(a){a.target="_blank"})):("Warning"!==a.Severity&&"Error"!==a.Severity&&!e&&(this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3)),
h=document.createTextNode(h)),r.appendChild(h));if(l&&this.progressDomId!==this.domId){p.classList.add(l);for(l=0;l<q.length;l++)p.classList.remove(q[l])}p.classList.add("notificationShow");if(q=k.node("closeNotifications"))this._cancelMsg?(q.classList.add("cancelButton"),q.classList.remove("dismissButton"),q.classList.remove("core-sprite-close"),q.classList.remove("imageSprite"),q.innerHTML=this._cancelMsg):(q.innerHTML="",q.classList.remove("cancelButton"),q.classList.add("dismissButton"),q.classList.add("core-sprite-close"),
q.classList.add("imageSprite"))},showWhile:function(b,e){var a=this;if(e){a.setProgressMessage(e);var c=function(){e===a.currentMessage&&a.setProgressMessage("")};b.then(c,c)}return b},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,e){return new l(this,++this._lastProgressId,b,e)},_renderOngoingMonitors:function(){if(0<this._progressMonitors.length){var b="",e=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(e||(b+=", "),b+=this._progressMonitors[a].status,
e=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};c.prototype.constructor=
c;l=function(b,e,a,c){this.statusService=b;this.progressId=e;if(a){this.deferred=a;this.begin(c);var d=this;a.then(function(a,b){d.done.bind(d)()},function(a,b){d.done.bind(d)()})}};l.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};l.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};l.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};l.prototype.constructor=l;return{StatusReportingService:c,
ProgressMonitor:l}});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,k,f,d){function c(){}c.prototype={_initialize:function(c,b,e,a,m){this._tooltip=new d.Tooltip({node:c,hideDelay:m||0,afterShowing:this._afterShowingFunction(b).bind(this),afterHiding:e,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";c=document.createRange();c.selectNode(this.$parent);c=c.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(c,g);this.$parent.appendChild(c);var h=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&h.hide()},!1);this._bindElements(this.$parent);"function"===typeof this._bindToDom&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var e=c.childNodes[b];e.id&&(this["$"+e.id]=e);this._bindElements(e)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var b=
f.firstTabbable(this.$parent);b&&b.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};c.prototype.constructor=c;return{PopupDialog:c}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,k,f,d){var c={};(function(){var l=!1;c.updateNavTools=function(b,e,a,c,d,n){var p=f.node(c);if(p)e.destroy(p);else throw g["could not find toolbar "]+c;e.renderCommands(c,p,n,a,"button");if(d&&(c=f.node(d)))e.destroy(c),e.renderCommands(d,c,null,a,"button");l||(l=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",function(b){var c=f.node(d);
c&&(e.destroy(c),e.renderCommands(d,c,b.selections,a,"button"))}))};c.createOperationsCommands=function(b,e,a){function c(a){return!a.operation||!a.operation.type?!1:"loadstart"===a.operation.type||"progress"===a.operation.type}var h=new d.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(b){a.removeCompletedOperations().then(function(a){e.loadOperations.bind(e)()})},visibleWhen:function(a){return!0}});b.addCommand(h);
h=new d.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(b){b=Array.isArray(b.items)?b.items:[b.items];for(var c=0;c<b.length;c++){var d=b[c];a.removeOperation.bind(a)(d.Location).then(function(){e.loadOperations.bind(e)()},function(){e.loadOperations.bind(e)()})}},visibleWhen:function(a){if(!Array.isArray(a)||0===a.length)return!c(a);for(var b in a)if(c(a[b]))return!1;return!0}});b.addCommand(h);
h=new d.Command({name:g.Cancel,tooltip:g["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){a=Array.isArray(a.items)?a.items:[a.items];for(var b=0;b<a.length;b++){var e=a[b];e.deferred&&e.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||0===a.length)return c(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!c(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});b.addCommand(h)}})();
return c});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,k,f,d,c){function l(b){this._options=b}l.prototype=new d.PopupDialog;l.prototype.TEMPLATE='\x3ctable style\x3d"width: 360px;"\x3e\x3ctr\x3e\x3ctd\x3e\x3ch2\x3eRecent operations\x3c/h2\x3e\x3c/td\x3e\x3ctd style\x3d"text-align: right;"\x3e\x3ca id\x3d"allOperationsLink" class\x3d"navlinkonpage"\x3eAll Operations\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cdiv id\x3d"operationsExist"\x3e\x3cdiv style\x3d"padding-left: 7px" id\x3d"myOperationsListEmpty"\x3eNo operations running on this page.\x3c/div\x3e\x3ctable id\x3d"myOperationsList" style\x3d"display: none;"\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv style\x3d"padding-left: 7px" id\x3d"operationsDontExist"\x3eNo operations running.\x3c/div\x3e';l.prototype._init=
function(b){this._myOperations=[];this._operationsDeferreds=[];this._commandService=b.commandRegistry;c.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(b.triggerNode)};l.prototype._bindToDom=function(b){this.$allOperationsLink.href=k.toUrl("operations/list.html");this._setOperationsVisibility()};l.prototype.setOperations=function(b,e){this._myOperations||this._init(this._options);
this._myOperations=[];this._operationsDeferreds=[];if(b)for(var a in b)this._myOperations.push(b[a]),this._operationsDeferreds.push(e[a]);this._renderOperations()};l.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(e){}var a={Message:b.Message||b,Severity:b.Severity};b.DetailedMessage&&b.DetailedMessage!==a.Message&&(a.DetailedMessage=b.DetailedMessage);return a};l.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};l.prototype._renderOperationsTable=function(b,e,a){f.empty(b);for(var c=0;c<e.length;c++){var d=e[c],n=document.createElement("tr"),p=document.createElement("td");p.style.paddingLeft="5px";p.style.paddingRight="5px";p.textContent=d.Name;n.appendChild(p);var l=document.createElement("div");p.appendChild(l);p=document.createElement("span");p.style.paddingRight="5px";p.classList.add("imageSprite");switch(d.type){case "Warning":p.classList.add("core-sprite-warning");
p.setAttribute("aria-label",g["Operation resulted in a warning."]);break;case "error":p.classList.add("core-sprite-error");p.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":p.classList.add("core-sprite-start");p.setAttribute("aria-label",g["Operation is running."]);break;case "abort":p.classList.add("core-sprite-stop");p.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":p.classList.add("core-sprite-ok"),p.setAttribute("aria-label",
"Operation ok.")}l.appendChild(p);p=document.createElement("span");p.classList.add("operationStatus");p.textContent=d.Name;l.appendChild(p);if(d.error){var k=d.error.Message||d.error;d.error.DetailedMessage&&""!==d.error.DetailedMessage&&(k+=": "+d.error.DetailedMessage);p.textContent=k;p.classList.remove("operationStatus");p.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",l,{operation:d,deferred:a[c]},this,"tool");b.appendChild(n)}this._setOperationsVisibility()};
l.prototype._setOperationsVisibility=function(){this.$myOperationsList.style.display=0<this._myOperations.length?"":"none";this.$myOperationsListEmpty.style.display=0<this._myOperations.length?"none":"";this.$operationsDontExist.style.display=0<this._myOperations.length?"none":"";this.$operationsExist.style.display=0<this._myOperations.length?"":"none"};l.prototype.constructor=l;return{OperationsDialog:l}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,k,f,d,c){function l(b,a){if(!this._progressPane){this._progressPane=d.node(b);this._operationsDialog=new c.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var f=this;this._progressPane.addEventListener("keydown",function(a){(" "===a.charOrCode||a.keyCode===d.KEY.ENTER)&&f._operationsDialog.show()});this._progressPane.addEventListener("click",
function(a){f._operationsDialog.show()});this._operationsDialog.setOperations(null,null)}}function b(b,a,c,d){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}l.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);
this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var c={},d;for(d in b)b[d].progressMonitor||(c[d]=b[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var f="";for(d in c){var l=c[d];if(l.type&&("loadstart"===l.type||"progress"===l.type)){f=
"running";break}}""===f&&null!=this._lastOperation&&this._lastOperation.type&&"error"===this._lastOperation.type&&"error"==f;switch(f){case "running":this._progressPane.title=g["Operations running"];this._progressPane.alt=g["Operations running"];this._progressPane.setAttribute("aria-valuetext",g["Operations running"]);this._switchIconTo("running");break;case "warning":this._progressPane.title=g["Some operations finished with warning"];this._progressPane.alt=g["Some operations finished with warning"];
this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with warning"]);this._switchIconTo("warning");break;case "error":this._progressPane.title=g["Some operations finished with error"];this._progressPane.alt=g["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with error"]);this._switchIconTo("error");break;default:this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&
this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_empty")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};l.prototype.constructor=l;b.prototype={init:function(b){this._progressMonitorClass||(this._progressMonitorTool=new l(b,this._commandRegistry))},progress:function(b,a,c){var d=this,f=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(g){d._operations[f]&&
(g=d._operations[f],a&&(g.Name=a),d._lastOperation=g,g.type="loadend",c&&(g.progressMonitor=c),d.writeOperation.bind(d)(f,g,b),g.Location||d._removeOperationFromTheList.bind(d)(f))},function(g){if(d._operations[f]){var l=d._operations[f];a&&(l.Name=a);c&&(l.progressMonitor=c);d._lastOperation=l;l.type=g.canceled?"abort":"error";l.error=g;d.writeOperation.bind(d)(f,l,b);l.Location||d._removeOperationFromTheList.bind(d)(f)}},function(g){a&&(g.Name=a);c&&(g.progressMonitor=c);d.writeOperation.bind(d)(f,
g,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},
removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];a.type&&"loadstart"!==a.type&&"progress"!==a.type&&((a=this._operations[b].progressMonitor)&&a.done(),delete this._operations[b],delete this._operationDeferrds[b])}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(b){this._serviceRegistry.getService("orion.page.message").setProgressResult(b)},showWhile:function(b,a,c){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);
var d=this;b.then(function(a){d._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c?d._serviceRegistry.getService("orion.page.message").setProgressMessage(""):d.setProgressResult.bind(d)(a);return a});return this.progress(b,a)},writeOperation:function(b,a,c){this._operations[b]=a;this._operationDeferrds[b]=c;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});
a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};b.prototype.constructor=b;return{ProgressService:b}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,k){function f(b,e,a){return b[e].apply(b,a)}function d(b){this._location=b}function c(){var b=new k;b.reject(g["No Matching OperationService for location:"]+this._location);return b}function l(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var e=b.getServiceReferences("orion.core.operation"),
a=0;a<e.length;a++){var c=b.getService(e[a]);this._services[a]=c;c=e[a].getProperty("pattern")||".*";"^"!==c[0]&&(c="^"+c);this._patterns[a]=RegExp(c)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];this._operations.remove(a);return new d(a)}}d.prototype={getOperation:c,getOperations:c,removeCompletedOperations:c,removeOperation:c,cancelOperation:c};d.prototype.constructor=d;l.prototype={getOperations:function(){var b=
new k;if(this._operations)return b.resolve(this._operations),b;var e=this;this._preferenceService.getPreferences("/operations").then(function(a){e._operations=a;b.resolve(e._operations)});return b},getOperation:function(b){return f(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],e=this,a=0;a<this._services.length;a++){var c=this._patterns[a],d=new k;b[a]=d.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(b){Array.isArray(b)&&
e.getOperations.bind(e)().then(function(e){for(var d=e.keys(),f=0;f<d.length;f++){var h=d[f];c.test(h)&&0>b.indexOf(h)&&e.remove(h)}a.resolve()})}}(d),function(a){return function(b){a.reject(b)}}(d))}return k.all(b)},removeOperation:function(b){var e=this;return f(this._getService(b),"removeOperation",arguments).then(function(a){e.getOperations.bind(e)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};l.prototype.constructor=l;return{OperationsClient:l}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Next:"Next",Previous:"Previous",Replace:"Replace","Replace All":"Replace All",
"Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","\x3c Previous Page":"\x3c Previous Page","Show previous page of search result":"Show previous page of search result","Next Page \x3e":"Next Page \x3e","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results",
"Collapse all results":"Collapse all results","Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.","Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","${0} is already saved":"${0} is already saved","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",
Save:"Save","Type a name for the search":"Type a name for the search","Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search","Open in Search page for this directory":"Open the Search page for this folder.","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term","${0} matches":"${0} matches","Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.":"Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.",
"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.":"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.",root:"root",Scope:"Scope"});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,k){function f(d){this._init(d)}f.prototype={_init:function(d){var c=d.parent,f=this,c=k.node(c);if(!c)throw g["no parent"];if(!d.model)throw g["no tree model"];if(!d.renderer)throw g["no renderer"];this._parent=c;this._treeModel=d.model;this._onComplete=d.onComplete;this._renderer=d.renderer;this._showRoot=void 0===d.showRoot?!1:d.showRoot;this._indent=void 0===d.indent?16:d.indent;this._onCollapse=d.onCollapse;
this._labelColumnIndex=void 0===d.labelColumnIndex?0:d.labelColumnIndex;this._id=void 0===d.id?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){f._showRoot?(b._depth=0,f._generate([b],0)):f._treeModel.getChildren(b,function(b){f.destroyed||f._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(d,
c){k.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var b=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(b);b.id=this._id;this._tableStyle&&b.classList.add(this._tableStyle);this._renderer.initTable(b,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";0===d.length?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(d,c);b.appendChild(this._bodyElement);f.appendChild(b);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(d,c,f){for(var b=0;b<d.length;b++){var e=document.createElement(this._tableRowElement);e.id=this._treeModel.getId(d[b]);e._depth=c;e._item=d[b];this._renderer.render(d[b],e);e.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*c+"px";this._renderer.rowCallback&&this._renderer.rowCallback(e,d[b]);f?(this._bodyElement.insertBefore(e,f.nextSibling),f&&(f=e)):this._bodyElement.appendChild(e)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,c,f){var b=this._treeModel.getId(d),e;if(b===this._id)this._removeChildRows(b),this._generateChildren(c,0),this._rowsChanged();else{var a=k.node(b);a?(a._item=d,
a&&(f||a._expanded)?(this._removeChildRows(b),c?(a._expanded=!0,this._renderer.updateExpandVisuals(a,!0),this._generateChildren(c,a._depth+1,a),this._rowsChanged()):(e=this,this._renderer.updateExpandVisuals(a,"progress"),c=this._treeModel.getChildren(a._item,function(b){e.destroyed||(e._renderer.updateExpandVisuals(a,!0),a._expanded||(a._expanded=!0,e._generateChildren(b,a._depth+1,a),e._rowsChanged()))}))):this._renderer.updateExpandVisuals(a,!1)):console.log(g["could not find table row "]+b)}},
getItem:function(d){var c=k.node(d);return c&&c._item?c._item:d},toggle:function(d){var c=k.node(d);c&&(c._expanded?this.collapse(d):this.expand(d))},isExpanded:function(d){d="string"===typeof d?d:this._treeModel.getId(d);return(d=k.node(d))?d._expanded:!1},expand:function(d,c,f){d="string"===typeof d?d:this._treeModel.getId(d);var b=k.node(d);if(b){var e=this;b._expanded?c&&c.apply(e,f):(this._renderer.updateExpandVisuals(b,"progress"),this._treeModel.getChildren(b._item,function(a){e.destroyed||
(e._renderer.updateExpandVisuals(b,!0),b._expanded||(b._expanded=!0,e._generateChildren(a,b._depth+1,b),e._rowsChanged()),c&&c.apply(e,f))}))}},_removeChildRows:function(d){for(var c=d===this._id,f=!1,b=-1,e=[],a=k.$$array(".treeTableRow",this._parent),g=0;g<a.length;g++){var h=a[g];if(f)break;c?h._depth>b?e.push(h):f=!0:h.id===d&&(c=!0,b=h._depth)}for(d=0;d<e.length;d++)c=e[d],c.parentNode.removeChild(c)},collapse:function(d){d="string"===typeof d?d:this._treeModel.getId(d);var c=k.node(d);if(c){if(!c._expanded)return;
c._expanded=!1;this._renderer.updateExpandVisuals(c,!1);this._removeChildRows(d);this._rowsChanged()}this._onCollapse&&this._onCollapse(c._item)},getIndent:function(){return this._indent}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/treeModelIterator",[],function(){var g={};g.TreeModelIterator=function(){function g(f,d){this.firstLevelChildren=f;this.reset();this._init(d)}g.prototype={_init:function(f){f&&(this.isExpanded=f.isExpanded,this.isExpandable=f.isExpandable,this.forceExpandFunc=f.forceExpandFunc,this.getChildrenFunc=f.getChildrenFunc)},topLevel:function(f){return f.parent?f.parent===this.root:!0},_getChildren:function(f){return"function"===typeof this.getChildrenFunc?this.getChildrenFunc(f):f?f.children:
null},_expanded:function(f){if(!f)return!0;var d=this._getChildren(f),d=d&&0<d.length;this.isExpanded&&d&&(d=this.isExpanded(f));return d},_expandable:function(f){return!f?!0:this.isExpandable?this.isExpandable(f):!1},_diveIn:function(f){return this._expanded(f)?(f=this._getChildren(f),this.setCursor(f[0]),this.cursor()):null},_drillToLast:function(f){return this._expanded(f)?(f=this._getChildren(f),this._drillToLast(f[f.length-1])):f},_forward:function(f){if(!this._cursor)return null;var d=this._diveIn(this._cursor);
if(!d){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var c=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&c.setCursor(d)})}(d=this._findSibling(this._cursor,!0))&&this.setCursor(d)}return d},_backward:function(f){if(!this._cursor)return null;var d=this._findSibling(this._cursor,!1);d&&d!==this._cursor.parent&&(d=this._drillToLast(d));if(f&&d&&this._expandable(d)&&this.forceExpandFunc&&d!==this._cursor.parent){var c=this;return this.forceExpandFunc(d,"last",function(d){d&&
c.setCursor(d)})}d&&this.setCursor(d);return d},_findSibling:function(f,d){for(var c=this.topLevel(f),g=this._getChildren(f.parent),g=c?this.firstLevelChildren:g,b=0;b<g.length;b++)if(g[b]===f)return 0===b&&!d?c?null:f.parent:b===g.length-1&&d?c?null:this._findSibling(f.parent,d):d?g[b+1]:g[b-1];return null},_inParentChain:function(f,d){for(var c=f.parent;c;){if(c===d)return!0;c=c.parent}return!1},_getTopLevelParent:function(f){if(this.topLevel(f))return f;for(f=f.parent;f;){if(this.topLevel(f))return f;
f=f.parent}return null},_onCollapse:function(f){return this._expanded(f.parent)?f:this._onCollapse(f.parent)},_scan:function(f,d,c){this.setCursor(d);var g=[];for(g.push(d);;){if(this.iterate(f))g.push(this.cursor());else break;if(c===this.cursor())return g}return null},setCursor:function(f){this._prevCursor=this._cursor;this._cursor=f},setTree:function(f){this.firstLevelChildren=f;0<this.firstLevelChildren.length&&(this.root=this.firstLevelChildren[0].parent)},scan:function(f,d){var c=this.cursor(),
g=this._scan(!0,f,d);g||(g=this._scan(!1,f,d));this.setCursor(c);return g},iterate:function(f,d){return f?this._forward(d):this._backward(d)},iterateOnTop:function(f,d){var c=this._findSibling(this._getTopLevelParent(this.cursor()),f);c?this.setCursor(c):d&&0<this.firstLevelChildren.length&&this.setCursor(f?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(f){return!this._cursor?null:this._inParentChain(this._cursor,f)?(this.setCursor(f),this._cursor):
null},reset:function(){this.root=this._prevCursor=this._cursor=null;0<this.firstLevelChildren.length&&(this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent)},cursorMoved:function(){return this._cursor!==this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return g}();return g});
define("orion/explorers/explorerNavHandler",["orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(g,k,f){var d={},c=-1!==navigator.userAgent.indexOf("iPad"),l=-1!==window.navigator.platform.indexOf("Mac");d.ExplorerNavHandler=function(){function b(b,a,c){this.explorer=b;this.model=this.explorer.model;this._navDict=a;this._listeners=[];this._selections=[];this._currentColumn=0;b=this._getEventListeningDiv();b.tabIndex=0;b.classList.add("selectionModelContainer");var d=this;this._modelIterator=
new k.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:c.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return d.explorer.renderer.isExpandable(a)}:function(a){return d.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,e){return d.explorer.forceExpandFunc(a,b,e)}:void 0});this._init(c);(!c||!1!==c.setFocus)&&b.focus();c=function(a){if(f.isFormElement(a.target)||d.explorer.preventDefaultFunc&&d.explorer.preventDefaultFunc(a,
d._modelIterator.cursor()))return!0;if(a.keyCode===g.KEY.DOWN)return d.onDownArrow(a);if(a.keyCode===g.KEY.UP)return d.onUpArrow(a);if(a.keyCode===g.KEY.RIGHT)return d.onRightArrow(a);if(a.keyCode===g.KEY.LEFT)return d.onLeftArrow(a);if(a.keyCode===g.KEY.SPACE)return d.onSpace(a);if(a.keyCode===g.KEY.ENTER)return d.onEnter(a)};b.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(a){if(d.explorer.onFocus)d.explorer.onFocus(!1);else d.toggleCursor(null,!1)};
b.addEventListener("blur",c,!1);this._listeners.push({type:"blur",listener:c});c=function(a){if(d.explorer.onFocus)d.explorer.onFocus(!0);else d.toggleCursor(null,!0)};b.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=b}b.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(b){this._linearGridMove=!1;b&&(this._selectionPolicy=b.selectionPolicy,this.gridClickSelectionPolicy=b.gridClickSelectionPolicy||
"none",this.preventDefaultFunc=b.preventDefaultFunc,this.postDefaultFunc=b.postDefaultFunc)},_ctrlKeyOn:function(b){return l?b.metaKey:b.ctrlKey},removeListeners:function(){if(this._listeners)for(var b=0;b<this._listeners.length;b++)this._parentDiv.removeEventListener(this._listeners[b].type,this._listeners[b].listener,!1)},focus:function(){var b=this._getEventListeningDiv();b&&b.focus()},_getEventListeningDiv:function(b){return this.explorer.keyEventListeningDiv&&"function"===typeof this.explorer.keyEventListeningDiv?
this.explorer.keyEventListeningDiv(b):g.node(this.explorer._parentId)},isExpandable:function(b){return!b?!1:g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)))?!0:!1},isExpanded:function(b){return!b?!1:this.explorer.myTree.isExpanded(this.model.getId(b))},refreshSelection:function(b,a){var c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(d){c._clearSelection(a);for(var f=0;f<d.length;f++)c._selections.push(d[f]);0<c._selections.length?c.cursorOn(c._selections[0],
!0,!1,b):c.cursorOn(null,!1,!1,b);c._shiftSelectionAnchor&&0<=c._inSelection(c._shiftSelectionAnchor)||(c._shiftSelectionAnchor=null)})},refreshModel:function(b,a,c,d){this._currentColumn=0;this.topIterationNodes=[];this.model=a;this._navDict=b;this.model.getTopIterationNodes?this.topIterationNodes=this.model.getTopIterationNodes():c&&(this.topIterationNodes=c);this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),!1),this._modelIterator.reset());
this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(b){b=this.model.getId(b);for(var a=0;a<this._selections.length;a++)if(b===this.model.getId(this._selections[a]))return a;return-1},_clearSelection:function(b){if(b)for(b=0;b<this._selections.length;b++)this._checkRow(this._selections[b],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(b){this._selectionPolicy!==
b&&(("readonlySelection"===this._selectionPolicy||"readonlySelection"===b)&&this._toggleSelectionClass("disabledRow","readonlySelection"===b),this._selectionPolicy=b,"cursorOnly"===this._selectionPolicy&&this._clearSelection(!0))},setSelection:function(b,a,c){"readonlySelection"!==this._selectionPolicy&&("cursorOnly"===this._selectionPolicy?a&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0):this._isRowSelectable(b)&&(!a||"singleSelection"===this._selectionPolicy?(this._clearSelection(!0),
this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b):(a=this._inSelection(b),0<=a?(this._checkRow(b,!0),this._selections.splice(a,1)):(this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b)),c&&(this._shiftSelectionAnchor=this._lastSelection),this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))))},moveColumn:function(b,a){b||(b=this.currentModel());var c=this._getGridChildren(b);if(c&&1<c.length||
0===a&&c){0!==a&&this.toggleCursor(b,!1);var d=this._currentColumn,f=!0,d=d+a;0>d?(this._linearGridMove&&0!==a&&(this._modelIterator.iterate(!1)?b=this.currentModel():f=!1),d=f?c.length-1:this._currentColumn):d>=c.length&&(this._linearGridMove&&0!==a&&(this._modelIterator.iterate(!0)?b=this.currentModel():f=!1),d=f?0:this._currentColumn);this._currentColumn=d;0!==a&&this.toggleCursor(b,!0);return!0}return!1},_getGridChildren:function(b){return this._navDict?this._navDict.getGridNavHolder(b):null},
getCurrentGrid:function(b){b||(b=this.currentModel());return(b=this._getGridChildren(b))&&0<b.length?b[this._currentColumn]:null},getAriaContainerElement:function(b){for(var a=this._parentDiv,c;b&&b!==a&&"grid"!==(c=b.getAttribute("role"))&&"tree"!==c&&"treegrid"!==c;)b=b.parentNode;return b===a?null:b},toggleCursor:function(b,a){var c=this.getRowDiv(b),d=this.getCurrentGrid(b);d?(c&&(a?c.classList.add("treeIterationCursorRow"):c.classList.remove("treeIterationCursorRow")),d.domNode&&(c=this.getAriaContainerElement(d.domNode),
a?(d.domNode.classList.add("treeIterationCursor"),c&&c.setAttribute("aria-activedescendant",d.domNode.id)):d.domNode.classList.remove("treeIterationCursor"))):c&&(a?c.classList.add("treeIterationCursorRow_Dotted"):c.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(b,a,c,d){var f,g;if(b||a){if(g===this._modelIterator.cursor())return;f=this._modelIterator.cursor();g=b;this._modelIterator.setCursor(g)}else f=this._modelIterator.prevCursor(),
g=this._modelIterator.cursor();if(f!==g||a)if(this.toggleCursor(f,!1),!a||g){this.moveColumn(null,0);this.toggleCursor(g,!0);if((b=this.getRowDiv())&&!d){d=b.parentNode;for(a=document.documentElement;d&&d!==a;){var k=window.getComputedStyle(d,null);if(!k)break;k=k.getPropertyValue("overflow-y");if("auto"===k||"scroll"===k)break;d=d.parentNode}d&&(a=!0,b.offsetTop<=d.scrollTop?(a=!1,void 0===c&&(c=!1)):b.offsetTop+b.offsetHeight>=d.scrollTop+d.clientHeight&&(a=!1,void 0===c&&(c=!0)),a||b.scrollIntoView(!c))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(f,
g)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=[],a=0;a<this._selections.length;a++)b.push(this.model.getId(this._selections[a]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;b=this.model.getId(b);var a=this._navDict.getValue(b);return a&&a.rowDomNode?a.rowDomNode:g.node(b)},iterate:function(b,a,c,d){var f=null;if(this.topIterationNodes&&0!==this.topIterationNodes.length)if(d){d=this.currentModel();for((f=this._modelIterator.iterate(b,
a))&&this._setCursorOnItem(b,c);f&&f.isNotSelectable;)(f=this._modelIterator.iterate(b,a))&&this._setCursorOnItem(b,c);f||(this.cursorOn(d,!0,!1,!0),this._setCursorOnItem(b,c))}else this._modelIterator.iterate(b,a)&&this._setCursorOnItem(b,c)},_toggleSelectionClass:function(b,a){this._selections.forEach(function(c){(c=this.getRowDiv(c))&&(a?c.classList.add(b):c.classList.remove(b))}.bind(this))},_setCursorOnItem:function(b,a){this.cursorOn(null,!1,b);if(a){var c=this._inSelection(this._modelIterator.prevCursor()),
d=this._inSelection(this._modelIterator.cursor());0<=c&&0<=d?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(b,a){if(this.explorer.renderer._useCheckboxSelection&&"singleSelection"!==this._selectionPolicy){var c=this.getRowDiv(b);if(c){var d=g.node(this.explorer.renderer.getCheckBoxId(c.id)),f=a?!d.checked:!0;if(f!==d.checked)this.explorer.renderer.onCheck(c,d,f,!0)}}else this._select(b,a)},_select:function(b,a){b||(b=this._modelIterator.cursor());
var c=this.getRowDiv(b);c&&(0>this._inSelection(b)?c.classList.add("checkedRow"):c.classList.remove("checkedRow"))},_onModelGrid:function(b,a){var c=this._getGridChildren(b);if(c)for(var d=0;d<c.length;d++)if(a.target===c[d].domNode)return!0;return!1},onClick:function(b,a){if("readonlySelection"===this._selectionPolicy||this.isDisabled(this.getRowDiv(b)))g.stop(a);else{var d=g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));if(a.target!==d&&!("none"===this.gridClickSelectionPolicy&&
this._onModelGrid(b,a)))if(this.cursorOn(b,!0,!1,!0),c)this.setSelection(b,!0);else if(this._ctrlKeyOn(a))this.setSelection(b,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(d=this._modelIterator.scan(this._shiftSelectionAnchor,b)){this._clearSelection(!0);for(var f=0;f<d.length;f++)this.setSelection(d[f],!0)}}else this.setSelection(b,!1,!0)}},onCollapse:function(b){this._modelIterator.collapse(b)&&this.cursorOn()},onUpArrow:function(b){this.iterate(!1,!1,b.shiftKey,!0);!this._ctrlKeyOn(b)&&
!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey,!0);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},_shouldMoveColumn:function(b){var a=this.currentModel(),c=this._getGridChildren(a);return c&&1<c.length?this.isExpandable(a)?this._ctrlKeyOn(b):!0:!1},onLeftArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,-1),b.preventDefault(),
!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&this.isExpanded(a))return this.explorer.myTree.collapse(a),b.preventDefault(),!0;this._modelIterator.topLevel(a)?this.explorer.scopeUp&&"function"===typeof this.explorer.scopeUp&&this.explorer.scopeUp():(this.cursorOn(a.parent),this.setSelection(a.parent,!1,!0))},onRightArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,1),b.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&
!this.isExpanded(a))return this.explorer.myTree.expand(a),this.explorer.postUserExpand&&this.explorer.postUserExpand(this.model.getId(a)),b.preventDefault(),!1},_isRowSelectable:function(b){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(b):!0},onSpace:function(b){this.setSelection(this.currentModel(),!0,!0);b.preventDefault()},onEnter:function(b){var a=this.getCurrentGrid(this._modelIterator.cursor());if(a)if(a.widget)if("function"===typeof a.onClick)a.onClick();else"function"===
typeof a.widget.focus&&a.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(b),!1,!1,!1,0,null);a.domNode.dispatchEvent(c)}else if(a=this._modelIterator.cursor())if(this.explorer.renderer.getRowActionElement&&(c=this.explorer.renderer.getRowActionElement(this.model.getId(a)),c.href&&(this._ctrlKeyOn(b)?window.open(c.href):window.location.href=c.href)),this.explorer.renderer.performRowAction)return this.explorer.renderer.performRowAction(b,
a),b.preventDefault(),!1},setIsNotSelectable:function(b,a){b.isNotSelectable=a},disableItem:function(b){var a=this.getRowDiv(b);this.isExpandable(b)&&this.isExpanded(b)&&(this._modelIterator.collapse(b),this.explorer.myTree.toggle(a.id));a.classList.remove("checkedRow");a.classList.add("disabledNavRow");this.setIsNotSelectable(b,!0)},isDisabled:function(b){return b.classList.contains("disabledNavRow")},enableItem:function(b){var a=this.getRowDiv(b);a&&(a.classList.remove("disabledNavRow"),this.setIsNotSelectable(b,
!1))}};return b}();d.ExplorerNavDict=function(){function b(b){this._dict={};this._model=b}b.prototype={addRow:function(b,a){var c=this._model.getId(b);this._dict[c]={model:b,rowDomNode:a}},getValue:function(b){return this._dict[b]},getGridNavHolder:function(b,a){if(!b)return null;var c=this._model.getId(b);return this._dict[c]?(!this._dict[c].gridChildren&&a&&(this._dict[c].gridChildren=[]),this._dict[c].gridChildren):null},initGridNavHolder:function(b){if(!b)return null;b=this._model.getId(b);this._dict[b]&&
(this._dict[b].gridChildren=null)}};return b}();return d});
define("orion/explorers/explorer","i18n!orion/nls/messages require orion/webui/littlelib orion/webui/treetable orion/explorers/explorerNavHandler orion/commands".split(" "),function(g,k,f,d,c,l){var b={};b.Explorer=function(){function b(a,c,d,e){this.registry=a;this.renderer=d;this.selection=c;this.commandService=e;this.renderer&&(this.renderer.explorer=this);this.myTree=null}b.prototype={destroy:function(){this._navHandler&&this._navHandler.destroy();this.model&&this.model.destroy();this.myTree&&
this.myTree.destroy();this.destroyed=!0},changedItem:function(a,b){this.myTree&&this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},makeNewItemPlaceHolder:function(a,b,c,d){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),d=document.createElement("span"),d.id=b+"placeHolderRow",a.appendChild(d),{tempNode:d,refNode:d};if(a){var e=document.createElement("tr");
e.id=b+"placeHolderRow";c=document.createElement("td");c.id=b+"placeHolderCol";e.appendChild(c);d?(a.parentNode.insertBefore(e,a.nextSibling),a=parseInt(a.firstChild.style.paddingLeft),c.style.paddingLeft=this.myTree.getIndent()+a+"px"):a.appendChild(e);d=f.node(b+"placeHolderRow");a=f.node(b+"placeHolderCol");if(d&&a)return{tempNode:d,refNode:a}}return null},getRow:function(a){if(a=this.model.getId(a))return f.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},
expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler){a=this._navHandler.getTopLevelNodes();for(var b=0;b<a.length;b++)this._expandRecursively(a[b])}},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(void 0===a||null===a))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,e){a="string"===typeof a?a:a.id||a;this.selection&&
this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",k=f.node(g);k&&f.empty(k);b&&(b.rootId=g);this.model=b;this._parentId=a;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new c.ExplorerNavDict(this.model);this.myTree=new d.TableTree({id:g,model:b,parent:a,onComplete:e?e.onComplete:void 0,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:e?!!e.showRoot:
!1,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,navHandlerFactory:e?e.navHandlerFactory:void 0,tableElement:e?e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.tableRowElement:void 0});this.renderer._initializeUIState();"cursorOnly"===this.selectionPolicy&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];
if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){this.getNavHandler()||(this._navHandler=a&&a.navHandlerFactory&&"function"===typeof a.navHandlerFactory.createNavHandler?
a.navHandlerFactory.createNavHandler(this,this._navDict,a):new c.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null}));var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,
checkbox:!1};return b}();b.createExplorerCommands=function(b,a){function c(b){return"function"===typeof b.getItemCount&&0<b.getItemCount()?a?a(b):!0:!1}var d=new l.Command({tooltip:g["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),f=new l.Command({tooltip:g["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",
visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(d);b.addCommand(f)};b.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}b.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):
b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;a=a.Location.replace(/[\\\/]/g,"");for(var b=this.idPrefix,c=0;c<a.length;c++)b=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?b+a.charCodeAt(c):b+a[c];return b}};return b}();b.ExplorerFlatModel=function(){function c(a,b,d){this.rootPath=a;this.fetchItems=b;this.root=d}c.prototype=new b.ExplorerModel;c.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;
a(c)})}};c.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return c}();b.ExplorerRenderer=function(){function b(a,c){this.explorer=c;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite"}b.prototype={_init:function(a){a&&(this._useCheckboxSelection=void 0===a.checkbox?!1:a.checkbox,this.selectionPolicy=a.singleSelection?"singleSelection":
"",this._cachePrefix=a.cachePrefix,this.getCheckedFunc=a.getCheckedFunc,this.onCheckedFunc=a.onCheckedFunc,this._highlightSelection=!0,this._treeTableClass=a.treeTableClass||"treetable",!1===a.highlightSelection&&(this._highlightSelection=!1),this.actionScopeId||(this.actionScopeId=a.actionScopeId),this.commandService||(this.commandService=a.commandService))},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;this.tableNode=a;f.empty(a);this._treeTableClass&&
a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){c=c||"tool";var f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return f},initCheckboxColumn:function(a){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;this.getCheckedFunc&&(d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on")));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(b.checked=c)?b.classList.add("core-sprite-check_on"):b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d);this.explorer.getNavHandler()&&e&&
this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){var b=this.explorer.getNavDict(),c=this.explorer.getNavHandler();if(c&&b&&"cursorOnly"!==c.getSelectionPolicy()&&(a=window.sessionStorage[a+
"selection"],"string"===typeof a&&(a=0<a.length?JSON.parse(a):null),a)){for(var d=[],c=0;c<a.length;c++){var e=b.getValue(a[c]);if(e&&e.rowDomNode&&e.model&&(d.push(e.model),this._highlightSelection&&e.rowDomNode.classList.add("checkedRow"),e=f.node(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,e.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(d),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+
"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=!1,c=window.sessionStorage[a+"expanded"];"string"===typeof c&&(c=0<c.length?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(f.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return a=a.replace(/[^\.\:\-\_0-9A-Za-z]/g,""),
"/"+this._cachePrefix+"/"+a+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(a,b){var c=f.node(this.expandCollapseImageId(a.id));c&&(c.classList.remove(this._expandImageClass),c.classList.remove(this._collapseImageClass),c.classList.remove(this._progressImageClass),c.classList.add("progress"===b?this._progressImageClass:b?this._expandImageClass:this._collapseImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");
e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=this;e.onclick=function(b){if(!g.explorer.getNavHandler().isDisabled(a)){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id),g.explorer.postUserExpand&&g.explorer.postUserExpand(a.id);else for(var c in g._expanded)if(g._expanded[c]===
a.id){g._expanded.splice(c,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&g._storeExpansions(b)}};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){"cursorOnly"!==this.explorer.selectionPolicy&&(this.explorer.refreshSelection(),this.explorer.initNavHandler());(f.$(".sectionTreeTable",this.tableNode.parentNode)||f.$(".treetable",this.tableNode.parentNode))&&f.$$array(".treeTableRow",this.tableNode).forEach(function(a,b){var c=!(b%
2)?"darkSectionTreeTableRow":"lightSectionTreeTableRow",d="darkSectionTreeTableRow"===c?"lightSectionTreeTableRow":"darkSectionTreeTableRow";a.classList.add(c);a.classList.remove(d)})},updateCommands:function(){if(this.commandService)for(var a=f.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=f.node(c.id+"actionswrapper");this.commandService.destroy(d);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,d,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=
[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();b.SelectionRenderer=function(){function c(a,b){this._init(a);this.explorer=b}c.prototype=new b.ExplorerRenderer;c.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)0<
e.innerHTML.length&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);0<d&&a.appendChild(b)};c.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");"cursorOnly"!==this.explorer.selectionPolicy&&b.classList.add("selectableNavRow");var c=this.explorer.getNavDict();if(c){c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,
b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),0===c?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle(a)):e.classList.add("navColumn"):this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};c.prototype.getCellHeaderElement=function(a){};c.prototype.getCellElement=function(a,b,c){};return c}();b.SimpleFlatModel=function(){function c(a,
b,d){this.items=a;this.getKey=d;this.idPrefix=b;this.root={children:a}}c.prototype=new b.ExplorerModel;c.prototype.getRoot=function(a){a(this.root)};c.prototype.getId=function(a){a=this.getKey(a).replace(/[\\\/]/g,"");for(var b="",c=0;c<a.length;c++)b=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?b+a.charCodeAt(c):b+a[c];return this.idPrefix+b};c.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return c}();return b});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages orion/Deferred orion/explorers/explorer orion/explorers/navigationUtils orion/extensionCommands orion/objects orion/URITemplate orion/webui/littlelib".split(" "),function(g,k,f,d,c,l,b,e){function a(a){switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":return!0}return!1}function m(d,e,f,g,h,m,w,F,D){e=l.clone(e);var x;if(e.Directory)x=document.createElement("a"),
x.className="navlinkonpage",x.href=!d?n:(new b(d+"#{,resource,params*}")).expand({resource:e.ChildrenLocation}),e.Name&&x.appendChild(document.createTextNode(e.Name));else{h||(h=c.getOpenWithCommands(f));x=document.createElement("a");x.className="navlink targetSelector";m&&"object"===typeof m&&Object.keys(m).forEach(function(a){x[a]=m[a]});var E=null,C=null;if(E=F?F.holderDom:x)C=document.createElement("span"),C.className="core-sprite-file modelDecorationSprite thumbnail",E.appendChild(C);e.Name&&
x.appendChild(document.createTextNode(e.Name));var J=e.Location;w&&"object"===typeof w&&(e.params={},l.mixin(e.params,w));(d=c.getOpenWithCommand(f,e,h))&&(J=d.hrefCallback({items:e}));k.when(g.getFileContentType(e),function(b){if(E){var c=E,d=C;if(b){var f,g=b.imageClass,h=b.image;g?(f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail")):h&&(f=document.createElement("img"),f.src=h,f.classList.add("thumbnail"));f&&c.replaceChild(f,d)}}x.href=J;D&&"function"===typeof D.updateFileNode&&
D.updateFileNode(e,x,a(b))})}x.addEventListener("click",function(){p=e}.bind(this),!1);return x}function h(a,b,c,d){this.explorer=b;this.commandService=c;this.contentTypeService=d;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}var n=new b("#{,resource,params*}"),p;h.prototype=new f.SelectionRenderer;h.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};h.prototype.tableCallback=function(a){a.setAttribute("aria-label",g.Navigator);a.setAttribute("role",
"presentation")};h.prototype.rowCallback=function(a,b){a.setAttribute("role","treeitem")};h.prototype.emptyCallback=function(a){var b=document.createElement("tr"),c=document.createElement("td");c.colSpan=this.oneColumn?1:3;var d=document.createElement("div");d.classList.add("noFile");d.textContent=g.NoFile;var f=document.createElement("span");f.appendChild(document.createTextNode(g.File));e.processDOMNodes(d,[f]);c.appendChild(d);b.appendChild(c);a.appendChild(b)};h.prototype.getCellHeaderElement=
function(a){if(this.oneColumn&&0!==a)return null;switch(a){case 0:case 1:case 2:document.createElement("th").style.height="8px"}};h.prototype.setTarget=function(a){this.target=a};h.prototype.getFolderImage=function(a){if(!this.showFolderImage)return null;a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};h.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=m(this.folderLink||"",a,this.commandService,this.contentTypeService),(a=this.getFolderImage(a))&&
b.insertBefore(a,b.firstChild)):(b=document.createElement("span"),b.textContent=a.Name);return b};h.prototype.updateFileNode=function(a,b,c){};h.prototype.showFolderLinks=!0;h.prototype.getCellElement=function(a,b,e){switch(a){case 0:a=document.createElement("td");var f=document.createElement("span");f.id=e.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var g;b.Directory?(this.getExpandImage(e,f),g=this.createFolderNode(b),
f.appendChild(g),this.explorer._makeDropTarget(b,g),this.explorer._makeDropTarget(b,e)):(this.openWithCommands||(this.openWithCommands=c.getOpenWithCommands(this.commandService)),g=m("",b,this.commandService,this.contentTypeService,this.openWithCommands,{target:this.target},null,null,this),f.appendChild(g));g&&(g.id=e.id+"NameLink",1===g.nodeType&&(d.addNavGrid(this.explorer.getNavDict(),b,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1")));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,
f,b,this.explorer,"tool",null,!0);return a;case 1:if(this.oneColumn)return null;e=document.createElement("td");b.LocalTimeStamp&&(e.textContent=(new Date(b.LocalTimeStamp)).toLocaleString());return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");!b.Directory&&"number"===typeof b.Length&&(b=parseInt(b.Length,10)/1024,e.textContent=Math.ceil(b).toLocaleString()+" KB");e.style.textAlign="right";return e}};h.prototype.constructor=h;return{NavigatorRenderer:h,isImage:a,getClickedItem:function(){return p},
createLink:m}});
define("orion/searchClient","i18n!orion/search/nls/messages require orion/webui/littlelib orion/i18nUtil orion/searchUtils orion/crawler/searchCrawler orion/explorers/navigatorRenderer orion/extensionCommands orion/Deferred".split(" "),function(g,k,f,d,c,l,b,e,a){function m(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function h(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new m(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}m.prototype.makeRenderFunction=function(h,l,m,s,q){var r=this.serviceRegistry,t=this.commandRegistry;this.openWithCommands=this.openWithCommands||e.createOpenWithCommands(r,h,t);var v=this;return function(e,r,D,x){a.when(v.openWithCommands,function(a){if(D)f.empty(l),a=document.createElement("div"),a.appendChild(document.createTextNode(g["Search failed."])),l.appendChild(a),"function"===typeof s&&s(l);else{var v=
function(){function a(b,c){var d=c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];"function"===typeof f&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),J=!1;f.empty(l);if(e&&0<e.length){var G=document.createElement("table");G.setAttribute("role","presentation");for(var y=0;y<e.length;y++){var A=
e[y],H;J||(J=!0,m&&(H=G.insertRow(0).insertCell(0),H.textContent=m));H=G.insertRow(-1).insertCell(0);H.colspan=2;q&&q(H);var z={Name:A.name,Directory:A.directory,Location:A.path||A.location},B=null;"number"===typeof A.LineNumber&&(B={},B.line=A.LineNumber);if(x&&x.keyword&&!x.nameSearch){var K=c.generateSearchHelper(x),B=B||{};B.find=K.inFileQuery.searchStr;B.regEx=K.inFileQuery.wildCard?!0:void 0}z=b.createLink(k.toUrl("edit/edit.html"),z,t,h,a,{"aria-describedby":(A.folderName?A.folderName:A.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},B);A.LineNumber&&z.appendChild(document.createTextNode(" (Line "+A.LineNumber+")"));H.appendChild(z);v(H,A)}l.appendChild(G);"function"===typeof s&&s(l)}!J&&r&&(a=d.formatMessage(g["No matches found for ${0}"],r),f.empty(l),l.appendChild(document.createTextNode(a)),"function"===typeof s&&s(l))}})}};h.prototype={search:function(a,b,d){var e=function(a){for(var d=[],e=0;e<a.response.docs.length;e++){var f=a.response.docs[e],g=f.Location,h=c.path2FolderName(f.Path?
f.Path:f.Location,f.Name),k=h?h:g;(b?0<=k.indexOf(b):1)&&d.push({name:f.Name,path:g,folderName:h,directory:f.Directory,lineNumber:f.LineNumber})}return d};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){d(e(b),a.keyword,null,a)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var c=a.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(b),c,null,a)},function(a){d(null,
null,a,null)})}catch(f){"string"===typeof f&&-1<f.indexOf("search")&&this._crawler?this._crawler.searchName(a,function(b){d(e(b),null,null,a)}):"string"===typeof f&&-1<f.indexOf("search")&&!a.nameSearch?(new l.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(b){d(e(b),null,null,a)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=
a},handleError:function(a,b){console.error(a);f.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&0<a.Parents.length?e="last"===b.index?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(e=a);e?(this.setLocationbyURL(e.Location),c=e.Name,this._childrenLocation=e.ChildrenLocation):a&&(this.setLocationbyURL(this._searchRootLocation),
c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation);e=f.node("search");c||(c="");if(e&&e.placeholder){e.value="";var h=d.formatMessage(g["Search ${0}"],c);e.placeholder=30<h.length?h.substring(0,27)+"...":d.formatMessage(g["Search ${0}"],c)}e&&e.title&&(e.title=g["Type a keyword or wild card to search in "]+c)},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=
a},getSearchLocation:function(){return this._searchLocation?this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",
rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(g,k){var f;f=g.toUrl?(new URL(g.toUrl("workspace"),window.location.href)).href:(new URL("/",window.location.href)).href;return{makeRelative:function(d){if(!d)return d;var c=window.location.protocol+"//"+window.location.host;return 0===d.indexOf(c)?d.substring(c.length):d},isAtRoot:function(d){return!d?!1:"/workspace"===d?!0:0===(new URL(d,window.location.href)).href.indexOf(f)}}});
define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(g,k,f){return{generateEditSiteHref:function(d){var c=g.toUrl("sites/site.html");return(new f(c+"#{,resource,params*}")).expand({resource:k.makeRelative(d.Location)})}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",
Save:"Save","Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026",ConvertToSelfHostingTitle:"Locate Required Folders",SelectRequiredFoldersSingle:"Locate the following required folder in your workspace.",SelectRequiredFolders:"Locate the following required folders in your workspace.",LocateFolderTitle:"Locate ${0}",FolderPrompt:"${0} (${1}):",orionClientLabel:"Orion client repository","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration",
"There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?","There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",
ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at ${0}",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",
URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",
Stopped:"Stopped",Sites:"Sites",Mappings:"Mappings","SitesExplorer.NoSitesText":"You have no sites. Click ${0} to create a site."});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(d){"undefined"===typeof f[d]&&(f[d]=g[d])});return f});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(g,k,f,d){function c(a,b,c){var d=a[b],e=new f;if("function"!==typeof d)throw g["Service method missing: "]+b;d.apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function l(a,b){return new d.FileClient(a,function(a){return(a=a.getProperty("top"))&&0===a.indexOf(b)})}function b(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
this._selfHostConfig=c.getProperty("selfHostingConfig");this._sitePattern=c.getProperty("sitePattern");this._filePattern=c.getProperty("filePattern");this._name=c.getProperty("name");this._id=c.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return l(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function e(a,b){a[b]=function(){return c(this._getService(),
b,Array.prototype.slice.call(arguments))}}function a(a,c,d){for(var e=a.getServiceReferences("orion.site"),f=[],k=[],l=[],r=0;r<e.length;r++){var t=e[r].getProperty(c),t="^"!==t[0]?"^"+t:t;f.push(e[r]);k.push(RegExp(t));l.push(a.getService(e[r]))}a:if("/"===d)c=-1;else if(!d||d.length&&0===d.length)c=0;else{for(e=0;e<k.length;e++)if(k[e].test(d)){c=e;break a}throw g["No Matching SiteService for "]+c+": "+d;}return new b(a,l[c],f[c])}b.prototype={getSelfHostingConfig:function(){return this._selfHostConfig},
isFileMapped:function(a,b){if(!a){var c=new f;c.resolve(!1);return c}return this.getURLOnSite(a,b).then(function(a){return null!==a})},mapOnSiteAndStart:function(a,b,c){function d(c,g,k){return e.isFileMapped(a,b).then(function(a){a||k.push({Source:c,Target:g,FriendlyPath:c});a=new f;a.resolve();return a})}var e=this,g="/"+b.Name,k;if(a)"started"===a.HostingStatus.Status&&(a.HostingStatus.Status="stopped"),k=e.toInternalForm(b.Location).then(function(b){return d(g,b,a.Mappings).then(function(){return e.updateSiteConfiguration(a.Location,
a).then(function(a){return e.updateSiteConfiguration(a.Location,{HostingStatus:{Status:"started"}})})})});else{var l=b.Name+" site";k=e.toInternalForm(b.Location).then(function(a){var b=[];return d(g,a,b).then(function(){return e.createSiteConfiguration(l,c,b,null,{Status:"started"}).then(function(a){return a})})})}return k.then(function(a){return e.getURLOnSite(a,b)})}};"createSiteConfiguration getSiteConfigurations deleteSiteConfiguration loadSiteConfiguration updateSiteConfiguration toFileLocation toInternalForm getMappingObject getMappingProposals updateMappingsDisplayStrings parseInternalForm isSelfHostingSite convertToSelfHosting getURLOnSite".split(" ").forEach(function(a){e(b.prototype,
a)});b.prototype.constructor=b;return{forLocation:function(b,c){return a(b,"pattern",c)},forFileLocation:function(b,c){return a(b,"filePattern",c)},getFileClient:l,SiteClient:b}});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages require orion/commandRegistry orion/commands orion/sites/siteUtils orion/sites/siteClient orion/Deferred orion/i18nUtil".split(" "),function(g,k,f,d,c,l,b,e){function a(a){return a instanceof Array?a:[a]}function m(a){return function(b){if(b instanceof Array&&1===b.length&&!(a instanceof Array))return b[0]}}var h=d.Command,n=e.formatMessage;return{createSiteServiceCommands:function(a,b,e){e=e||{};var h=new d.Command({name:g.Create,tooltip:g["Create a new site configuration"],
id:"orion.site.create",parameters:new f.ParametersDescription([new f.CommandParameter("name","text",g.Name)]),visibleWhen:function(a){return!0},callback:function(b){var d=b.items,f=a.getService(d),d=l.getFileClient(a,d.getProperty("filePattern")),g=b.parameters&&b.parameters.valueFor("name");b=a.getService("orion.page.progress");(b?b.progress(d.loadWorkspaces(),"Loading workspaces"):d.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&g&&f.createSiteConfiguration(g,a).then(function(a){e.createCallback(c.generateEditSiteHref(a),
a)},e.errorCallback)})}});b.addCommand(h)},createSiteCommands:function(d,e){var f=d.getService("orion.page.dialog"),k=d.getService("orion.page.progress"),r=new h({name:g.Edit,tooltip:g["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&1===a.length&&(a=a[0]);return a.HostingStatus},hrefCallback:function(a){return c.generateEditSiteHref(a.items instanceof Array?a.items[0]:a.items)}});e.addCommand(r);r=new h({name:g.Start,tooltip:g["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&"stopped"===a.HostingStatus.Status})},callback:function(c){var e=a(c.items),f=c.userData;if(f.site&&1<e.length)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var b=f.site||{};b.HostingStatus={Status:"started"};a=a.Location;return l.forLocation(d,a).updateSiteConfiguration(a,b)});k.showWhile(b.all(e)).then(m(c.items)).then(f.startCallback,
f.errorCallback)}});e.addCommand(r);var t=function(a,b){var c=a?b:{};c.HostingStatus={Status:"stopped"};var e=b.Location;return l.forLocation(d,e).updateSiteConfiguration(e,c)},r=new h({name:g.Stop,tooltip:g["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&"started"===a.HostingStatus.Status})},callback:function(c){var d=a(c.items),e=c.userData;if(e.site&&1<d.length)throw Error("userData.site requires a single site configuration to act upon");
d=d||[e.site];d=d.map(t.bind(null,!!e.site));k.showWhile(b.all(d)).then(m(c.items)).then(e.stopCallback,e.errorCallback)}});e.addCommand(r);r=new h({name:g.Delete,tooltip:g["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(b){return 0<a(b).length},callback:function(c){var e=a(c.items),h=c.userData,k=1===e.length?n(g.ConfirmDeleteSingle,e[0].Name):n(g.ConfirmDeleteMultiple,e.length);f.confirm(k,function(a){a&&(a=e.map(function(a){var c=a.HostingStatus&&
"stopped"!==a.HostingStatus.Status?t(!1,a):a;return b.when(c).then(function(){var b=a.Location;return l.forLocation(d,b).deleteSiteConfiguration(b)})}),b.all(a).then(m(c.items)).then(h.deleteCallback,h.errorCallback))})}});e.addCommand(r)},createViewOnSiteCommands:function(a,b,c){var d=a.getService("orion.core.file");b.addCommand(new h({name:g["Add to site"],tooltip:g["Add the file to this site"],id:"orion.site.add-to",imageClass:"core-sprite-add",visibleWhen:function(a){return!a.IsFileRunningOn},
callback:function(b){var c=b.userData.file,e=b.items.SiteConfiguration,f=a.getService("orion.page.progress");return(f?f.progress(d.loadWorkspaces(),"Loading workspaces"):d.loadWorkspaces()).then(function(b){return l.forFileLocation(a,c.Location).mapOnSiteAndStart(e,c,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new h({name:g.View,tooltip:g["View the file on the site"],id:"orion.site.view-on-link",visibleWhen:function(a){return a.IsFileRunningOn},hrefCallback:function(b){var c=
b.userData.file;b=b.items.SiteConfiguration;return l.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(g,k){function f(d,c){c||(c="orion.page.selection");this._serviceRegistry=d;g.attach(this);this._serviceRegistration=d.registerService(c,this);this._selections=null}f.prototype={getSelection:function(d){var c=this._getSingleSelection();"function"===typeof d&&d(c);return c},getSelections:function(d){var c=Array.isArray(this._selections)?this._selections.slice():[];"function"===typeof d&&d(c);return c},_getSingleSelection:function(){return this._selections&&
0<this._selections.length?this._selections[0]:null},setSelections:function(d){var c=this._selections;Array.isArray(d)?this._selections=0<d.length?d.slice():null:this._selections=d?[d]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};f.prototype.constructor=f;return{Selection:f}});
define("orion/sites/viewOnSiteTree","i18n!orion/sites/nls/messages orion/i18nUtil orion/Deferred orion/commandRegistry orion/globalCommands orion/selection orion/sites/siteUtils orion/sites/siteClient orion/sites/siteCommands orion/webui/treetable orion/webui/littlelib".split(" "),function(g,k,f,d,c,l,b,e,a,m,h){var n=k.formatMessage,p=m.TableTree,u=function(){function a(b,c){this._siteService=b;this._root={};this._id=c}a.prototype={getRoot:function(a){a(this._root)},getChildren:function(a,b){if(a.children)b(a.children);
else if(a===this._root)this._siteService.getSiteConfigurations().then(function(c){a.children=c;b(c)});else return b([])},getId:function(a){return a===this._root||a===this._id?this._id:a.Id}};return a}(),s=function(){function a(b){this._commandService=b.commandRegistry;this._options=b}a.prototype={initTable:function(a,b){a.classList.add("treetable")},render:function(a,c){c.className+="treeTableRow addsitesTableRow";var d=document.createElement("td");d.id=c.id+"col1";var e=document.createElement("td");
e.id=c.id+"col4";var f=b.generateEditSiteHref(a),h=document.createElement("a");h.href=f;d.appendChild(h);h.textContent=a.Name;f=document.createElement("span");f.style.padding="0 10px 0 10px";d.appendChild(f);h=a.HostingStatus;"object"===typeof h?"started"===h.Status?(f.appendChild(document.createTextNode(g.Started)),f=document.createElement("a"),f.href=h.URL,f.textContent=h.URL,d.appendChild(f)):(h=h.Status.substring(0,1).toUpperCase()+h.Status.substring(1),f.appendChild(document.createTextNode(h))):
f.appendChild(document.createTextNode(g.Unknown));f=document.createElement("span");f.id=c.id+"actionswrapper";f.classList.add("sectionTableItemActions");e.appendChild(f);var k=this._options;this._commandService.renderCommands(k.actionScopeId,f,a,null,"tool",{startCallback:k.startCallback,stopCallback:k.stopCallback,deleteCallback:k.deleteCallback,errorCallback:function(a){k.serviceRegistry.getService("orion.page.message").setProgressResult(a)}});c.appendChild(d);c.appendChild(e)},rowsChanged:function(){h.$$array(".treeTableRow").forEach(function(a,
b){var c=b%2?"darkTreeTableRow":"lightTreeTableRow",d="darkTreeTableRow"===c?"lightTreeTableRow":"darkTreeTableRow";a.classList.add(c);a.classList.remove(d)})},labelColumnIndex:0};return a}(),q=function(){function a(b,c){function d(a,b){this.SiteConfiguration=a;this.Id="ViewOnSite"+a.Id;this.IsFileRunningOn=b}var e=[];e.push({Id:"newsite",Placeholder:!0});for(var f=0;f<b.length;f++)e.push(new d(b[f],c[f]));return e}function b(a,c,d){return a.isFileMapped(c,d).then(function(a){var b=c.HostingStatus&&
"started"===c.HostingStatus.Status;return c&&d&&b&&a})}function c(a,b,d){u.call(this,a,b);this._file=d}c.prototype={getRoot:u.prototype.getRoot,getId:u.prototype.getId,getChildren:function(a,b){a.children?b(a.children):a===this._root?c.createViewOnSiteModelItems(this._siteService,this._file).then(function(c){a.children=c;b(c)}):b([])}};c.createViewOnSiteModelItems=function(c,d){return c.getSiteConfigurations().then(function(e){return f.all(e.map(function(a){return b(c,a,d)})).then(function(b){return a(e,
b)})})};return c}(),r=function(){function a(b){s.apply(this,Array.prototype.slice.call(arguments));this.serviceRegistry=b.serviceRegistry;this._commandService=b.commandRegistry;this.file=b.file;this.addToCallback=b.addToCallback;this.errorCallback=b.errorCallback}a.prototype={initTable:function(a,b){this.tableTree=b;a.classList.add("treetable");a.classList.add("viewOnSiteTable");var c=document.createElement("thead"),d=document.createElement("th");c.appendChild(d);var e=document.createElement("th");
c.appendChild(e);d.textContent=g.Name;e.textContent=g.Actions;a.appendChild(c)},render:function(a,b){var c=a.SiteConfiguration;b.classList.add("treeTableRow");b.classList.add("sitesTableRow");a.Placeholder&&b.classList.add("newSiteRow");var d=document.createElement("td");d.id=b.id+"col1";a.Placeholder&&d.classList.add("newSiteCol");var e=document.createElement("td");e.id=b.id+"col2";d.textContent=a.Placeholder?g["New Site"]:c.Name;c=document.createElement("span");c.id=b.id+"actionswrapper";e.appendChild(c);
this._commandService.renderCommands("viewOnSiteScope",c,a,null,"button",{file:this.file,addToCallback:this.addToCallback,errorCallback:this.errorCallback});b.appendChild(d);b.appendChild(e)},rowsChanged:s.prototype.rowsChanged,labelColumnIndex:0};return a}();return function(){function a(b){var d=b.serviceRegistry,f=b.commandRegistry,h=d.getService("orion.page.progress"),k=this.siteService=e.forFileLocation(d,b.fileLocation),l=b.fileClient.read(b.fileLocation,!0);h&&h.progress(l,"Reading file metadata "+
b.fileLocation);l.then(function(a){b.siteService=k;b.model=new q(k,b.id,a);b.file=this.file=a;f.registerCommandContribution("viewOnSiteScope","orion.site.add-to",10);f.registerCommandContribution("viewOnSiteScope","orion.site.view-on-link",20);c.setPageTarget({task:g.ViewOnSiteTitle,target:a,serviceRegistry:d,commandService:f});var e=this;b.addToCallback=function(){e.refresh()};b.errorCallback=function(a){b.serviceRegistry.getService("orion.page.message").setErrorMessage(a)};b.renderer=new r(b);b.label&&
(document.getElementById(b.label).textContent=n(g.ViewOnSiteCaption,a.Name));a=this.model=b.model||new u(k,b.id);this.treeWidget=new p({id:b.id,parent:b.parent,model:a,showRoot:!1,renderer:b.renderer||new s(b)})}.bind(this))}a.prototype={refresh:function(){var a=this;q.createViewOnSiteModelItems(a.siteService,a.file).then(function(b){a.treeWidget.refresh(a.model._id,b,!0)})}};return a}()});
define("built-view.js","orion/bootstrap orion/status orion/progress orion/commandRegistry orion/fileClient orion/operationsClient orion/searchClient orion/globalCommands orion/sites/siteUtils orion/sites/siteCommands orion/sites/viewOnSiteTree orion/PageUtil orion/webui/littlelib".split(" "),function(g,k,f,d,c,l,b,e,a,m,h,n,p){g.startup().then(function(a){function g(){var a=n.matchResourceParameters().file;a&&(w&&p.empty(document.getElementById("table")),w=new h({id:"view-on-site-table",parent:"table",
label:"viewOnSiteCaption",serviceRegistry:q,commandRegistry:t,fileClient:v,fileLocation:a}),m.createViewOnSiteCommands(q,t))}var q=a.serviceRegistry;a=a.preferences;var r=new l.OperationsClient(q);new k.StatusReportingService(q,r,"statusPane","notifications","notificationArea");var t=new d.CommandRegistry({});new f.ProgressService(q,r,t);var v=new c.FileClient(q),r=new b.Searcher({serviceRegistry:q,commandService:t,fileService:v}),w;window.addEventListener("hashchange",g());g();e.generateBanner("orion-viewSites",
q,t,a,r)})});
//@ sourceMappingURL=built-view.js.map