(function(){function g(d,e,c,b,a,l){e[d]&&(c.push(d),(!0===e[d]||1===e[d])&&b.push(a+d+"/"+l))}function k(d,e,c,b,a){e=b+e+"/"+a;require._fileExists(d.toUrl(e+".js"))&&c.push(e)}function f(d,e,c){for(var b in e)e.hasOwnProperty(b)&&(!d.hasOwnProperty(b)||c)?d[b]=e[b]:"object"===typeof e[b]&&f(d[b],e[b],c)}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(d){var h=d.config?d.config():{},h=h||{};return{version:"2.0.1+",load:function(c,b,a,l){l=l||{};l.locale&&(h.locale=
l.locale);var m=e.exec(c),d=m[1],p=m[4],s=m[5],t=p.split("-"),q=[],w={},r,v="";m[5]?(d=m[1],c=d+s):(s=m[4],p=h.locale,p||(p=h.locale="undefined"===typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),t=p.split("-"));if(l.isBuild){q.push(c);k(b,"root",q,d,s);for(r=0;r<t.length;r++)l=t[r],v+=(v?"-":"")+l,k(b,v,q,d,s);b(q,function(){a()})}else b([c],function(l){var c=[],m;g("root",l,c,q,d,s);for(r=0;r<t.length;r++)m=t[r],v+=(v?"-":"")+m,g(v,l,c,q,d,s);b(q,function(){var m,
e,p;for(m=c.length-1;-1<m&&c[m];m--){p=c[m];e=l[p];if(!0===e||1===e)e=b(d+p+"/"+s);f(w,e)}a(w)})})}}})})();
define("orion/i18n",[],function(){return{load:function(g,k,f,e){e=e||{};var d=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,h=d.exec(g);if(h){if(!k.defined||k.defined(g))try{f(k(g));return}catch(c){}if(e.isBuild||e.isTest)f({});else if(k.specified&&!k.specified("orion/bootstrap"))f({});else{var b=h[1],a=h[3]?h[2]:"",l=h[3]||h[2];k(["orion/bootstrap"],function(c){c.startup().then(function(c){var m=c.serviceRegistry;c=m.getServiceReferences("orion.i18n.message");if(a)c.some(function(a){return g===a.getProperty("name")?
(m.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),!0):!1})||f({});else{var s={},t;c.forEach(function(c){var m=c.getProperty("name");if((h=d.exec(m))&&b===h[1]&&l===(h[3]||h[2]))if(a=h[3]?h[2]:""){if((c=e.locale||("undefined"!==typeof navigator?navigator.language||navigator.userLanguage:null))&&0===c.toLowerCase().indexOf(a.toLowerCase()))s[a]=!0,(!k.specified||!k.specified(m))&&define(m,["orion/i18n!"+m],function(a){return a})}else t=c});!k.specified||!k.specified(g)?t?
m.getService(t).getMessageBundle().then(function(a){Object.keys(s).forEach(function(b){"undefined"===typeof a[b]&&(a[b]=s[b])});define(g,[],a);f(a)},function(){define(g,[],s);f(s)}):(define(g,[],s),f(s)):f(s)}})})}}else f(null)}}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});return f});
(function(){function g(){for(var d=navigator.userAgent,e={browser:!1,version:!1},c=[{name:"Chrome/Chromium",regExp:/(?:chrome|crios|chromium)\/(\d+)/i,minVersion:24},{name:"Firefox",regExp:/firefox\/(\d+)/i,minVersion:17},{name:"Microsoft Internet Explorer",regExp:/msie\s(\d+)/i,minVersion:10},{name:"Microsoft Internet Explorer",regExp:/Trident\/(\d+)/i,minVersion:6},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:6}],b=0;b<c.length;b++){var a=c[b],l=d.match(a.regExp);if(l){e.browser=
!0;e.version=l[1]>=a.minVersion;e.name=a.name;break}}return e}function k(){try{return"localStorage"in window&&null!==window.localStorage}catch(d){return!1}}function f(d){alert(d);throw Error("unsupported browser");}var e=g();if(e.browser)e.version||f("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+e.name+".\n");else if(k()&&!localStorage.skipBrowserCheck)if(confirm("Sorry, your browser is not supported. The latest version of Chrome, Firefox or Safari web browser is recommended.\nContinue anyway?"))localStorage.skipBrowserCheck=
1;else throw"unsupported browser";else k()||f("Sorry, your browser is not supported.\n\nTo use Orion, the latest version of the Chrome, Firefox, or Safari web browser is recommended.\n");return{isSupportedBrowser:g,supportsLocalStorage:k,throwBrowserAlert:f}})();define("orion/browserCompatibility",function(){});
(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 b;b=d.shift();)b();h=!1}function k(b){d.push(b);h||(h=!0,c())}function f(b){return function(a){b(a)}}function e(){function b(){for(var a;a=g.shift();){var b=a.deferred,l="fulfilled"===p?"resolve":"reject";a=a[l];if("function"===typeof a)try{var c=a(d),m=c&&("object"===typeof c||"function"===typeof c)&&
c.then;if("function"===typeof m)if(c===b.promise)b.reject(new TypeError);else{var e=c.cancel;"function"===typeof e?b._parentCancel=e.bind(c):delete b._parentCancel;m.call(c,f(b.resolve),f(b.reject),f(b.progress))}else b.resolve(c)}catch(h){b.reject(h)}else b[l](d)}}function a(a){delete h._parentCancel;p="rejected";d=a;g.length&&k(b)}function l(c){function m(a){return function(b){(!p||"assumed"===p)&&a(b)}}delete h._parentCancel;try{var f=c&&("object"===typeof c||"function"===typeof c)&&c.then;if("function"===
typeof f)if(c===h)a(new TypeError);else{p="assumed";var v=c&&c.cancel;if("function"!==typeof v){var x=new e;c=x.promise;try{f(x.resolve,x.reject,x.progress)}catch(B){x.reject(B)}v=c.cancel;f=c.then}d=c;f.call(c,m(l),m(a));h._parentCancel=v.bind(c)}else p="fulfilled",d=c,g.length&&k(b)}catch(D){m(a)(D)}}function c(){var b=h._parentCancel;b?(delete h._parentCancel,b()):p||(b=Error("Cancel"),b.name="Cancel",a(b))}var d,p,g=[],h=this;this.resolve=function(a){p||l(a);return h};this.reject=function(b){p||
a(b);return h};this.progress=function(a){p||g.forEach(function(b){if(b.progress)try{b.progress(a)}catch(l){}});return h.promise};this.cancel=function(){h._parentCancel?setTimeout(c,0):c();return h};this.then=function(a,l,c){var m=new e;m._parentCancel=h.promise.cancel;g.push({resolve:a,reject:l,progress:c,deferred:m});("fulfilled"===p||"rejected"===p)&&k(b);return m.promise};this.promise={then:h.then,cancel:h.cancel}}var d=[],h=!1,c=function(){if("undefined"!==typeof process&&"function"===typeof process.nextTick){var b=
process.nextTick;return function(){b(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)}}();e.all=function(b,a){function l(a,b){f||(p[a]=b,0===--d&&g.resolve(p))}function c(b,m){if(!f){if(a)try{l(b,a(m));return}catch(d){m=d}g.reject(m)}}var d=b.length,p=[],f=!1,g=new e;g.then(void 0,function(){f=!0;b.forEach(function(a){a.cancel&&a.cancel()})});
0===d?g.resolve(p):b.forEach(function(a,b){a.then(l.bind(void 0,b),c.bind(void 0,b))});return g.promise};e.when=function(b,a,l,c){var d;b&&"function"===typeof b.then||(d=new e,d.resolve(b),b=d.promise);return b.then(a,l,c)};return e});
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(e){try{"function"===typeof e?e(g):e.handleEvent(g)}catch(d){"undefined"!==typeof console&&console.log(d)}});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 e=this._namedListeners[g];if(e)for(var d=0;d<e.length;d++)if(e[d]===f){1===e.length?delete this._namedListeners[g]:e.splice(d,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(b,a,l){this._properties=l||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function e(b,a,l){this._serviceId=b;this._serviceReference=a;this._internalRegistry=l}function d(b,a){function l(l){return function(){var c;try{if(!a())throw Error("Service was unregistered");var m=b[l].apply(b,Array.prototype.slice.call(arguments));if(m&&"function"===typeof m.then)return m;
c=new g;c.resolve(m)}catch(d){c=new g,c.reject(d)}return c.promise}}for(var c in b)"function"===typeof b[c]&&(this[c]=l(c))}function h(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new k;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var l=b._entries[a];if(!l)throw Error("Service has already been unregistered: "+a);var c=l.reference;b._serviceEventTarget.dispatchEvent(new h("unregistering",
c));b._entries[a]=null;c.getProperty("objectClass").forEach(function(a){for(var l=b._namedReferences[a],d=0;d<l.length;d++)if(l[d]===c){1===l.length?delete b._namedReferences[a]:l.splice(d,1);break}})},modifyService:function(a){var l=b._entries[a];if(!l)throw Error("Service not found while trying to send modified event: "+a);b._serviceEventTarget.dispatchEvent(new h("modified",l.reference))}}}f.prototype={getPropertyKeys:function(){var b=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&
b.push(a);return b},getProperty:function(b){return this._properties[b]}};f.prototype.constructor=f;e.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(b){var a=this._serviceReference._properties;this._serviceReference._properties=b||{};b["service.id"]=this._serviceId;
b.objectClass=a.objectClass;b["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};e.prototype.constructor=e;c.prototype={getService:function(b){var a;if("string"===typeof b)(b=this._namedReferences[b])&&b.some(function(b){a=this._entries[b.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:
[];var a=[];this._entries.forEach(function(b){b&&a.push(b.reference)});return a},registerService:function(b,a,l){if("undefined"===typeof a||null===a)throw Error("invalid service");"string"===typeof b?b=[b]:Array.isArray(b)||(b=[]);var c=this._entries.length,n=new f(c,b,l),p=this._namedReferences;b.forEach(function(a){p[a]=p[a]||[];p[a].push(n)});b=new d(a,this._internalRegistry.isRegistered.bind(null,c));this._entries.push({reference:n,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new h("registered",
n));return new e(c,n,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};c.prototype.constructor=c;return{ServiceRegistry:c}});
define("orion/xhr",["orion/Deferred"],function(g){function k(f,e,d,g){var c="undefined"!==typeof d.response?d.response:d.responseText,b;try{b=d.status}catch(a){b=0}f={args:e,response:c,responseText:"string"===typeof c?c:null,status:b,url:f,xhr:d};"undefined"!==typeof g&&(f.error=g);return f}return function(f,e,d){d=d||{};var h=3<arguments.length&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new g,b=d.headers||{},a=d.log||!1,l;"undefined"===typeof b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");
if("undefined"!==typeof d.data&&("POST"===f||"PUT"===f))l=d.data;var m=!1,n=!1;c.promise.then(void 0,function(a){m=!0;!n&&a instanceof Error&&"Cancel"===a.name&&h.abort()});h.onabort=function(){n=!0;if(!m){var a=Error("Cancel");a.name="Cancel";c.reject(a)}};h.onload=function(){var b=k(e,d,h);200<=h.status&&400>h.status?c.resolve(b):(c.reject(b),a&&"undefined"!==typeof console&&console.log(Error(h.statusText)))};h.onerror=function(){var b=k(e,d,h);c.reject(b);a&&"undefined"!==typeof console&&console.log(Error(h.statusText))};
h.onprogress=function(a){a.xhr=h;c.progress(a)};try{h.open(f,e,!0);"string"===typeof d.responseType&&(h.responseType=d.responseType);if("number"===typeof d.timeout)if("number"===typeof h.timeout)h.timeout=d.timeout,h.addEventListener("timeout",function(a){c.reject(k(e,d,h,"Timeout exceeded"))});else{var p=setTimeout(function(){c.reject(k(e,d,h,"Timeout exceeded"))},d.timeout);c.promise.then(clearTimeout.bind(null,p),clearTimeout.bind(null,p))}Object.keys(b).forEach(function(a){h.setRequestHeader(a,
b[a])});h.send(l||null)}catch(s){c.reject(k(e,d,h,s))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,k,f){function e(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function d(a,b){return{get:function(c,d){if(0===b)return null;var e=localStorage.getItem(a+c);if(null===e)return null;e=JSON.parse(e);return d||-1===b||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(c,d){if(0!==b)if(-1!==b&&(d._expires=(new Date).getTime()+
1E3*b),0===Object.keys(d).length)localStorage.removeItem(a+c);else{var e=JSON.stringify(d);localStorage.setItem(a+c,e);delete d._expires}},remove:function(b){localStorage.removeItem(a+b)}}}function h(a){this._currentPromises={};this._cache=new d("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");0<b.length&&(this._service=a.getService(b[0]))}return!!this._service}}function c(a){this._location=
a;this._currentPromise=null;this._cache=new d("/orion/preferences/default",3600)}function b(){this._cache=new d("/orion/preferences/local",-1)}function a(a,d){this._userProvider=new h(a);this._localProvider=new b;d=d||"defaults.pref";-1===d.indexOf("://")&&(d=g.toUrl(d));this._defaultsProvider=new c(d);this._serviceRegistration=a.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];-1!==this._dirty.indexOf(c)&&
a.push(this._providers[b].put(this._name,c));if(this._pendingDeletes[b]&&0<this._pendingDeletes[b].length){for(c=0;c<this._pendingDeletes[b].length;c++)a.push(this._providers[b].remove(this._name,this._pendingDeletes[b][c]));delete this._pendingDeletes[b]}}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 b=this._stores[a],c;for(c in b)b.hasOwnProperty(c)&&"undefined"===typeof this._cached[c]&&(this._cached[c]=b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(0!==this._stores.length){var c=this._stores[0];c[a]!==b&&(c[a]=b,this._cached=null,this._scheduleFlush(c))}},remove:function(a){for(var b=0;b<
this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._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,c=[],d=0;d<this._providers.length;++d)c.push(this._providers[d].get(this._name,
a).then(function(a){return function(c){b._stores[a]=c}}(d)));return k.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};h.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new k,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(null!==d)c.resolve(d);else{this._currentPromises[a]=c;var e=this;this._service.get(a).then(function(b){e._cache.set(a,b);delete e._currentPromises[a];c.resolve(b)},function(b){404===b.status?
(b={},e._cache.set(a,b),delete e._currentPromises[a],c.resolve(b)):(delete e._currentPromises[a],c.resolve(e._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)},remove:function(a,b){var c=this._cache.get(a);delete c[b];this._cache.set(a,c);return this._service.remove(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;var c=new k,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(null!==d)c.resolve(d);else{this._currentPromise=
c;var e=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);e._cache.set(a,b[a]||{});e._currentPromise=null;c.resolve(b[a]||{})},function(b){401===b.xhr.status||404===b.xhr.status?(e._cache.set(a,{}),e._currentPromise=null,c.resolve({})):(e._currentPromise=null,b=e._cache.get(a,!0),null!==b?c.resolve(b[a]||{}):c.resolve({}))})}return c},put:function(a,b){var c=new k;c.resolve();return c},remove:function(a,b){var c=this._cache.get(a);
delete c[b];this.put(a,c)}};b.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 c=new k;this._cache.set(a,b);c.resolve();return c},remove:function(a,b){var c=this._cache.get(a);delete c[b];this.put(a,c)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,c,d){if(!c||"number"!==typeof c||7<c||1>c)d=c,c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
d,!1);return 0!==(a.USER_SCOPE&c)?"/orion/preferences/user"+b:0!==(a.LOCAL_SCOPE&c)?"/orion/preferences/local"+b:"/orion/preferences/default"+b},getPreferences:function(b,c){if(!c||"number"!==typeof c||7<c||1>c)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var d=[];a.USER_SCOPE&c&&this._userProvider.available()&&d.push(this._userProvider);a.LOCAL_SCOPE&c&&d.push(this._localProvider);a.DEFAULT_SCOPE&c&&d.push(this._defaultsProvider);var p=new e(b,d);return p.sync().then(function(){return p})},getSetting:function(a,
b,c){for(var d,e=0;e<a.length;e++)if(a[e].label===b)for(var f=0;f<a[e].data.length;f++)if(a[e].data[f].label===c){d=a[e].data[f].value;break}return d}};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 e(a){var b=/([^=]*)(?:=?)(.*)/.exec(a);a=b[1]?decodeURIComponent(b[1]):"";b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function d(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="\x3d"+encodeURIComponent(a[1]));return b}function h(a,b){var c="",d=[],l=0;return{next:function(){c!==a.query&&(c=a.query,d=k(c));if(l<d.length){var m=
e(d[l++]);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 E;}}}function c(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function b(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 l(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function m(c,d){if("string"!==
typeof c)throw new TypeError;c=l(c);var e=t.exec(c);if(!e)return null;var m={};m.scheme=e[1]||"";if(m.scheme&&!w.test(m.scheme))return null;var n=e[2];if(n&&(n=q.exec(n),m.userinfo=n[1],m.host=n[2],m.port=n[3],m.port&&!r.test(m.port)))return null;m.path=e[3];m.query=e[4];m.fragment=e[5];!m.scheme&&d&&(m.scheme=d.scheme,!m.host&&d.host&&(m.userinfo=d.userinfo,m.host=d.host,m.port=d.port,m.pathRelative=!0));m.pathRelative&&(m.path?"/"!==m.path[0]&&(e=/^(.*\/)[^\/]*$/.exec(d.path)[1]||"/",m.path=e+m.path):
m.path=d.path);m.scheme&&(m.scheme=m.scheme.toLowerCase());m.port&&(m.port=b(m.port));m.host&&m.path&&(m.path=a(m.path));return m}function n(a,b){var d;if(b){b=b.href||b;d=m(b);if(!d||!d.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:d})}d=m(a,d);if(!d)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:d,writable:!0});var l=new c(this);Object.defineProperty(this,"query",{get:function(){return this._url?
l: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(s){}var t=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,q=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,w=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,r=/^\d*$/,v=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,x=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,B=/^([^?#\s]*)$/,D=/^([^\s]*)$/,y=/^\S*$/,G=/([^:]*):?(.*)/,E="undefined"!==
typeof StopIteration?StopIteration:Error("Stop Iteration"),J={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(c.prototype,{get:{value:function(a){g(a);var b;k(this._url.query).some(function(c){c=e(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,b){g(a);g(b);var c=k(this._url.query);c.some(function(l,m){var n=e(l);if(n[0]===a)return n[1]=b,c[m]=d(n),!0})||c.push(d([a,b]));this._url.query=f(c)},enumerable:!0},has:{value:function(a){g(a);
return k(this._url.query).some(function(b){if(e(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){g(a);var b=k(this._url.query),c=b.filter(function(b){return e(b)[0]!==a});return c.length!==b.length?(this._url.query=f(c),!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 c=h(this._url,"keys+values");try{for(;;){var d=c.next();a.call(b,d[1],d[0],this)}}catch(l){if(l!==E)throw l;
}},enumerable:!0},keys:{value:function(){return h(this._url,"keys")},enumerable:!0},values:{value:function(){return h(this._url,"values")},enumerable:!0},items:{value:function(){return h(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(c){c=e(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,b){g(a);g(b);var c=k(this._url.query);c.push(d([a,b]));this._url.query=
f(c)},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=m(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||w.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=G.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){g(a);if(this._url){var b=
G.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=G.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){g(a);if(this._url){var b=[G.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=x.exec(a)))this._url.host=a[1],this._url.port=b(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&&r.exec(a)&&(this._url.port=b(a))},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(b){g(b);
this._url&&B.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)),y.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 e(a,b){var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;c.sort();d.sort();for(var l=0,e=c.length;l<e;l++){var m=c[l];if(m!==d[l])return!1;var n=a[m],m=b[m];if(n!==m&&JSON.stringify(n)!==JSON.stringify(m))return!1}return!0}function d(a){if(-1===a.indexOf("://"))try{return(new URL(a,location.href)).href}catch(b){}return a}function h(a){var b=null,c={key:function(c){return(b=
b||Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,d){a[c]=d;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}};Object.defineProperty(c,"length",{get:function(){return(b=b||Object.keys(a)).length}});return c}function c(a,b){if(b&&b instanceof XMLHttpRequest){var c,d;try{c=b.status,d=b.statusText}catch(l){c=0,d=""}return{status:c||0,statusText:d}}return b}function b(a){var b=a?JSON.parse(JSON.stringify(a,
c)):a;a instanceof Error&&(b.__isError=!0,b.message=b.message||a.message,b.name=b.name||a.name);return b}function a(a,b){this.type=a;this.plugin=b}function l(a,b){this.__objectId=a;this.__methods=b}function m(c,d,m){function n(a){C&&m.postMessage(a,C)}function f(a){if(!C)return(new g).reject(Error("plugin not connected"));a.id=String(Y++);var b=new g;R[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 c=Object.prototype.toString;a.params.forEach(function(d,e){if("[object Object]"===c.call(d)&&!(d instanceof l)){var m,n;for(m in d)"[object Function]"===c.call(d[m])&&(n=n||[],n.push(m));if(n){var p=V++;T[p]=d;m=function(){delete T[p]};b.then(m,m);a.params[e]=new l(p,n)}}});m.postMessage(a,C);return b.promise}function h(a,b){a||0===a?n({id:a,result:null,error:b}):console.log(b)}function v(a,c,d,l){l.forEach(function(a,b){if(a&&"undefined"!==typeof a.__objectId){var c={};a.__methods.forEach(function(b){c[b]=
function(){return f({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});l[b]=c}});var e=void 0===typeof a?null:{id:a,result:null,error:null};try{var m=d.apply(c,l);e&&(m&&"function"===typeof m.then?(P[a]=m,m.then(function(b){delete P[a];e.result=b;n(e)},function(c){P[a]&&(delete P[a],e.error=b(c),n(e))},function(){n({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(e.result=m,n(e)))}catch(p){e&&(e.error=b(p),n(e))}}function x(a){try{if(a.method){var b=
a.method,c=a.params||[];if("serviceId"in a){var d=X[a.serviceId];d||h(a.id,"service not found");b in d?v(a.id,d,d[b],c):h(a.id,"method not found")}else if("objectId"in a){var l=T[a.objectId];l||h(a.id,"object not found");b in l?v(a.id,l,l[b],c):h(a.id,"method not found")}else if("requestId"in a){var e=P[a.requestId];e&&"cancel"===b&&e.cancel&&e.cancel.apply(e,c)}else if("responseId"in a){var n=R[a.responseId];n&&"progress"===b&&n.progress&&n.progress.apply(n,c)}else if("plugin"===a.method){var p=
a.params[0];S({headers:p.headers,services:p.services}).then(function(){L&&L.resolve(E)})}else if("timeout"===a.method)L&&L.reject(a.error);else throw Error("Bad method: "+a.method);}else{var f=R[String(a.id)];delete R[String(a.id)];if(a.error){var g=m.handleServiceError(E,a.error);f.reject(g)}else f.resolve(a.result)}}catch(q){console.log("Plugin._messageHandler "+q)}}function B(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b={serviceId:a.serviceId,method:c,params:Array.prototype.slice.call(arguments)};
return"active"===z?f(b):E.start({"transient":!0}).then(function(){return f(b)})}}),b.addEventListener&&b.removeEventListener)){var c=new k,d=V++;T[d]={handleEvent:c.dispatchEvent.bind(c)};var e=new l(d,["handleEvent"]),m=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||m(a,e);c.addEventListener(a,b)};var n=b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]||n(a,e)}}return b}function D(a){var b=JSON.parse(JSON.stringify(a.properties));
b.__plugin__=c;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);b.objectClass=a;return b}function y(a){var b=B(a),c=D(a),c=m.registerService(a.names||a.type,b,c);K[a.serviceId]={registration:c,proxy:b}}function G(){m.persist(c,{created:J,headers:H,services:u,autostart:A,lastModified:F})}var E=this;d=d||{};var J=d.created||(new Date).getTime(),H=d.headers||{},u=d.services||[],A=d.autostart,F=d.lastModified||0,z="installed",I,L,C,Q,K={},Y=0,V=0,P={},R={},T={},X={},S;this._persist=G;this._resolve=function(){z=
"resolved";m.dispatchEvent(new a("resolved",E))};this._getAutostart=function(){return A};this._getCreated=function(){return J};this.getLocation=function(){return c};this.getHeaders=function(){return JSON.parse(JSON.stringify(H))};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 F};this.getServiceReferences=function(){var a=[];Object.keys(K).forEach(function(b){a.push(K[b].registration.getReference())});
return a};this.setParent=function(a){return Q!==a?(Q=a,E.stop({"transient":!0}).then(function(){if("started"===A)return E.start({"transient":!0});if("lazy"===A)return E.start({lazy:!0,"transient":!0})})):(new g).resolve()};this.getState=function(){return z};this.start=function(b){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if(I)return I.promise.then(this.start.bind(this,b));if("active"===z)return(new g).resolve();if(!b||!b.transient){var d=b&&b.lazy?"lazy":"started";
d!==A&&(A=d,G())}d=m.getState();if("starting"!==d&&"active"!==d)return b.transient?(new g).reject(Error("start transient error")):(new g).resolve();if("installed"===z)try{this._resolve()}catch(l){return(new g).reject(l)}"resolved"===z&&u.forEach(function(a){y(a)});if(b&&b.lazy)return"starting"!==z&&(z="starting",m.dispatchEvent(new a("lazy activation",E))),(new g).resolve();var e=new g;I=e;z="starting";m.dispatchEvent(new a("starting",E));L=new g;C=m.connect(c,x,Q);L.then(function(){L=null;z="active";
m.dispatchEvent(new a("started",E));I=null;e.resolve()},function(){L=null;z="stopping";m.dispatchEvent(new a("stopping",E));Object.keys(K).forEach(function(a){K[a].registration.unregister();delete K[a]});m.disconnect(C);C=null;z="resolved";I=null;m.dispatchEvent(new a("stopped",E));e.reject(Error("plugin activation error"))});return e.promise};this.stop=function(b){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if(I)return I.promise.then(this.stop.bind(this,b));if((!b||
!b.transient)&&"stopped"!==A)A="stopped",G();if("active"!==z&&"starting"!==z)return(new g).resolve();I=b=new g;z="stopping";m.dispatchEvent(new a("stopping",E));Object.keys(K).forEach(function(a){K[a].registration.unregister();delete K[a]});C&&(m.disconnect(C),C=null);z="resolved";I=null;m.dispatchEvent(new a("stopped",E));b.resolve();return b.promise};S=function(b){if("uninstalled"===z)return(new g).reject(Error("Plugin is uninstalled"));if(!b)return 0===F&&(F=(new Date).getTime(),G()),m.loadManifest(c).then(S);
var d=H,l=u,n=A;H=b.headers||{};u=b.services||{};A=b.autostart||A;b.lastModified?F=b.lastModified:(F=(new Date).getTime(),G());if(e(H,d)&&e(u,l)&&A===n)return(new g).resolve();if("active"===z||"starting"===z){var f=[];Object.keys(u).forEach(function(a){var b=u[a];f.push(a);var c=K[a];if(c){if(e(b.methods,Object.keys(c.proxy))){a=D(b);var d=c.registration.getReference(),l={};d.getPropertyKeys().forEach(function(a){l[a]=d.getProperty(a)});e(a,l)||c.registration.setProperties(a);return}c.registration.unregister();
delete K[a]}y(b)});Object.keys(K).forEach(function(a){-1===f.indexOf(a)&&(K[a].registration.unregister(),delete K[a])})}"active"===z&&(m.disconnect(C),L=new g,C=m.connect(c,x,Q),L.then(function(){L=null},function(){L=null;z="stopping";m.dispatchEvent(new a("stopping"),E);Object.keys(K).forEach(function(a){K[a].registration.unregister();delete K[a]});m.disconnect(C);C=null;z="resolved";m.dispatchEvent(new a("stopped",E))}));return(new g).resolve()};this.update=function(b){return S(b).then(function(){m.dispatchEvent(new a("updated",
E))})};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));m.removePlugin(this);z="uninstalled";m.dispatchEvent(new a("uninstalled",E));return(new g).resolve()}}var n=/^http[s]?/i;return{Plugin:m,PluginRegistry:function(b,c){function l(a){var b=a.source;x.some(function(c){if(b===c.target){try{var d;if("undefined"===typeof c.useStructuredClone){var l=
"string"!==typeof a.data;d=l?a.data:JSON.parse(a.data);c.useStructuredClone=l}else d=c.useStructuredClone?a.data:JSON.parse(a.data);c.handler(d)}catch(e){}return!0}})}c=c||{};var e=c.storage||localStorage;e.getItem||(e=h(e));var f="installed",r,v=[],x=[],B=new k,D={},y={registerService:b.registerService.bind(b),connect:function(a,b,c,d){function l(a){a=Error(a);a.name="timeout";b({method:"timeout",error:a})}var e={handler:b,url:a},m=setTimeout(l.bind(null,"Load timeout for: "+a),d||15E3),n=document.createElement("iframe");
n.name=a+"_"+(new Date).getTime();n.src=a;n.onload=function(){clearTimeout(m);m=setTimeout(l.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;(c||r).appendChild(n);e.target=n.contentWindow;e.close=function(){clearTimeout(m);if(n){var a=n.parentNode;a&&a.removeChild(n);n=null}};x.push(e);return e},disconnect:function(a){for(var b=0;b<x.length;b++)if(a===x[b]){x.splice(b,1);try{a.close()}catch(c){}break}},
removePlugin:function(a){for(var b=0;b<v.length;b++)if(a===v[b]){v.splice(b,1);break}e.removeItem("plugin."+a.getLocation())},persist:function(a,b){e.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{B.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new g,c=y.connect(a,function(a){c&&a.method&&("manifest"===a.method||
"plugin"===a.method?(a=a.params[0],y.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(y.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return f},handleServiceError:function(a,b){if(b&&401===b.status){var c=a.getHeaders(),d=a.getName()||a.getLocation(),l=document.createElement("span");l.appendChild(document.createTextNode("Authentication required for: "+d+"."));c.login&&(l.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",
d.textContent="Login",d.href=c.login,n.test(d.href)?(l.appendChild(d),l.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+c.login));return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(l)}}if(b.__isError){var e=b;b=Error(e.message);Object.keys(e).forEach(function(a){b[a]=e[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=y.getState;this.init=function(){if(!("starting"===f||"active"===f||"stopping"===f)){addEventListener("message",l,!1);for(var a=[],b=0,n=e.length;b<n;b++)a.push(e.key(b));a.forEach(function(a){if(0===a.indexOf("plugin.")){var b=a.substring(7);a=JSON.parse(e.getItem(a));a.created&&v.push(new m(b,a,y))}});v.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});c.parent?r=c.parent:(r=document.createElement("div"),
c.visible||(r.style.display="none",r.style.visibility="hidden"),document.body.appendChild(r));c.plugins&&Object.keys(c.plugins).forEach(function(a){a=d(a);if(!this.getPlugin(a)){var b=c.plugins[a];"object"!==typeof b&&(b={});b.autostart=b.autostart||c.defaultAutostart||"lazy";v.push(new m(a,b,y))}}.bind(this));f="starting"}};this.start=function(){"starting"!==f&&this.init();if("starting"!==f)return(new g).reject("Cannot start framework. Framework is already "+f+".");var a=[],b=(new Date).getTime();
v.forEach(function(c){var d=c._getAutostart();0===c.getLastModified()?a.push(c.update().then(function(){if("started"===d)return c.start({"transient":!0});if("lazy"===d)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===d?a.push(c.start({"transient":!0})):"lazy"===d?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&c.update()):c._resolve()});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){f="active"})};this.stop=function(){if("starting"!==
f&&"active"!==f)return(new g).reject("Cannot stop registry. Registry is already "+f+".");f="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(!c.parent){var a=r.parentNode;a&&a.removeChild(r)}r=null;removeEventListener("message",l);f="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,c){b=d(b);var l=this.getPlugin(b);if(l)return(new g).resolve(l);if(D[b])return D[b];if(c)return l=new m(b,c,y),v.push(l),l._persist(),y.dispatchEvent(new a("installed",l)),(new g).resolve(l);var e=y.loadManifest(b).then(function(c){l=new m(b,c,y);v.push(l);l._persist();delete D[b];y.dispatchEvent(new a("installed",l));return l},function(a){delete D[b];throw a;});return D[b]=e};this.getPlugins=function(){return v.slice()};this.getPlugin=function(a){var b=null;a=d(a);v.some(function(c){if(a===
c.getLocation())return b=c,!0});return b};this.addEventListener=B.addEventListener.bind(B);this.removeEventListener=B.removeEventListener.bind(B);this.resolvePlugins=function(){var a=!0;v.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function g(e,d){function g(c){var d=c.getProperty("service.id"),l=this.addingService(c);l&&(b[d]=c,a[d]=l)}function c(c){var d=c.getProperty("service.id"),l=a[d];delete b[d];delete a[d];this.removedService(c,l)}this.serviceRegistry=e;var b={},a={},l=k,m,n;this.close=function(){if(l!==f)throw"Already closed";l=k;e.removeEventListener("registered",m);e.removeEventListener("unregistering",n);n=m=null;var a=this;this.getServiceReferences().forEach(function(b){c.call(a,
b)});if("function"===typeof this.onClose)this.onClose()};this.getServiceReferences=function(){var a=Object.keys(b);return!a.length?null:a.map(function(a){return b[a]})};this.open=function(){if(l!==k)throw"Already open";l=f;var a=this;m=function(b){if(-1!==b.serviceReference.getProperty("objectClass").indexOf(d)&&(g.call(a,b.serviceReference),"function"===typeof a.onServiceAdded))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};n=function(b){-1!==b.serviceReference.getProperty("objectClass").indexOf(d)&&
c.call(a,b.serviceReference)};e.addEventListener("registered",m);e.addEventListener("unregistering",n);e.getServiceReferences(d).forEach(function(b){g.call(a,b);if("function"===typeof a.onServiceAdded)return a.onServiceAdded(b,e.getService(b))});if("function"===typeof this.onOpen)this.onOpen()}}var k=0,f=1;g.prototype={addingService:function(e){return this.serviceRegistry.getService(e)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(e,d){}};return g});
define("orion/objects",[],function(){function g(g){for(var f=1;f<arguments.length;f++){var e=arguments[f],d;for(d in e)Object.prototype.hasOwnProperty.call(e,d)&&(g[d]=e[d])}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 e,d,h,c,b,a="pid";e=function(b,c,d){function l(a,b,d){b.forEach(function(l,e){try{var m=a[e].getProperty("__plugin__"),p=m&&c.getPlugin(m);(!m||p&&"active"===p.getState())&&b[e].updated(d)}catch(f){"undefined"!==typeof console&&console.log(f)}})}k.call(this,b,"orion.cm.managedservice");var e={},f={},h=function(c){var l=[];c.plugin.getServiceReferences().forEach(function(c){if(-1!==c.getProperty("objectClass").indexOf("orion.cm.managedservice")){var e=
c.getProperty(a);c=b.getService(c);e&&c&&(e=(e=d._find(e))&&e.getProperties(),l.push(c.updated(e)))}});return g.all(l)};this.addingService=function(c){var d=c.getProperty(a),l=b.getService(c);if(!d||!l)return null;e[d]||(e[d]=[]);f[d]||(f[d]=[]);e[d].push(c);f[d].push(l);return l};this.onServiceAdded=function(b,c){var e=b.getProperty(a),e=d._find(e);l([b],[c],e&&e.getProperties())};this.onOpen=function(){c.addEventListener("started",h)};this.onClose=function(){c.removeEventListener("started",h)};
this.notifyUpdated=function(a){var b=a.getPid();l(e[b]||[],f[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();l(e[a]||[],f[a]||[],null)};this.removedService=function(b,c){var d=b.getProperty(a),l=e[d],m=f[d];1<l.length?l.splice(l.indexOf(b),1):delete e[d];1<m.length?m.splice(m.indexOf(c),1):delete f[d]}};d=function(){function a(b,d,l){this.store=new h(this,l);this.configAdmin=new c(this,this.store);this.tracker=new e(b,d,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}();c=function(){function a(b,c){this.factory=b;this.store=c}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var l="/cm/configurations";
h=function(){function c(d,e){this.factory=d;this.prefsService=e;this.configs=Object.create(null);this.pref=null;var m=this;this.initPromise=this.prefsService.getPreferences(l).then(function(c){m.pref=c;c.keys().forEach(function(d){if(!m.configs[d]){var l=c.get(d);"object"===typeof l&&null!==l&&0<Object.keys(l).length&&(l[a]=d,m.configs[d]=new b(m.factory,m,l))}})})}c.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var c=this._find(a);
c||(c=new b(this.factory,this,a),this.configs[a]=c);return c},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&null!==c.getProperties()&&b.push(c)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return c}();b=function(){function b(c,d){d=f.clone(d);delete d[a];c.properties=d}function c(d,l,e){this.factory=d;this.store=l;if(null!==e&&"object"===typeof e)this.pid=e[a],b(this,
e);else if("string"===typeof e)this.pid=e,this.properties=null;else throw Error("Invalid pid/properties "+e);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(b){this._checkRemoved();var c=null;this.properties&&(c=f.clone(this.properties),b||(c[a]=this.pid));return c},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 c}();return{ConfigurationAdminFactory:d}});
define("orion/bootstrap","require orion/Deferred orion/serviceregistry orion/preferences orion/pluginregistry orion/config".split(" "),function(g,k,f,e,d,h){var c;return{startup:function(){if(c)return c;c=new k;var b=new f.ServiceRegistry,a=new e.PreferencesService(b);return a.getPreferences("/plugins").then(function(l){var e={plugins:{}};l.keys().forEach(function(a){var b=g.toUrl(a);e.plugins[b]=l[a]});var n=new d.PluginRegistry(b,e);return n.start().then(function(){if(0<b.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);n.getPlugin(a)||b.push(n.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 h.ConfigurationAdminFactory(b,n,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");if(a){var c=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)})}),d=localStorage.getItem("lastLogin");if(!d||d<(new Date).getTime()-9E5)return c}}).then(function(){var d={serviceRegistry:b,preferences:a,pluginRegistry:n};c.resolve(d);return d})})}}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});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,e=-1!==g.indexOf("Opera")?parseFloat(g.split("Version/")[1]):void 0,d=parseFloat(g.split("Chrome/")[1])||void 0,h=-1!==g.indexOf("Safari")&&!d,c=parseFloat(g.split("WebKit/")[1])||void 0,b=-1!==g.indexOf("Android"),a=-1!==g.indexOf("iPad"),g=-1!==g.indexOf("iPhone"),l=a||g,m=-1!==navigator.platform.indexOf("Mac"),
n=-1!==navigator.platform.indexOf("Win"),p=-1!==navigator.platform.indexOf("Linux"),s="ontouchstart"in document.createElement("input");return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<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:e,isChrome:d,isSafari:h,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:g,isIOS:l,isMac:m,isWindows:n,
isLinux:p,isTouch:s,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 e(a){if(0<=f(a))return a;if(a.hasChildNodes())for(var b=0;b<a.childNodes.length;b++){var c=e(a.childNodes[b]);if(c)return c}return null}function d(a){if(0<=
f(a))return a;if(a.hasChildNodes())for(var b=a.childNodes.length-1;0<=b;b--){var c=d(a.childNodes[b]);if(c)return c}return null}function h(a,b){if(3===a.nodeType){var d=c.exec(a.nodeValue);d&&1<d.length&&b(a,d)}if(a.hasChildNodes())for(d=0;d<a.childNodes.length;d++)h(a.childNodes[d],b)}var c=/\$\{([^\}]+)\}/,b=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 c=a.compareDocumentPosition(b);return Boolean(c&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:e,lastTabbable:d,stop:function(a){window.document.all&&(a.keyCode=0);a.preventDefault&&
(a.preventDefault(),a.stopPropagation())},processTextNodes:function(a,b){h(a,function(a,c){a.parentNode.replaceChild(document.createTextNode(b[c[1]]||c[1]),a)})},processDOMNodes:function(a,b){h(a,function(a,c){var d=b[c[1]];if(d){var e=document.createRange(),f=c.index;e.setStart(a,f);e.setEnd(a,f+c[0].length);e.deleteContents();e.insertNode(d)}})},addAutoDismiss:function(a,c){function d(a){b.forEach(function(b){var c=!1,d=b.excludeNodes.some(function(b){return document.body.contains(b)?(c=!0,b.contains(a.target)):
!1});if(c&&!d)try{b.dismiss(a)}catch(e){"undefined"!==typeof console&&console&&console.error(e&&e.message)}});b=b.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}null===b&&(b=[],document.addEventListener("click",d,!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));b.push({excludeNodes:a,dismiss:c})},setFramesEnabled:function(a){for(var b=
document.getElementsByTagName("iframe"),c=0;c<b.length;c++)b[c].parentNode.style.pointerEvents=a?"":"none"},removeAutoDismiss:function(a){b=b.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,e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,h=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c="undefined"!==typeof location&&location.href,b=c&&location.protocol&&location.protocol.replace(/\:/,""),a=c&&location.hostname,l=c&&(location.port||void 0),m=[],n=g.config&&g.config()||{};k={version:"2.0.5",strip:function(a){if(a){a=a.replace(d,"");var b=a.match(h);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,c;if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!==typeof ActiveXObject)for(b=0;3>b;b+=1){c=e[b];try{a=new ActiveXObject(c)}catch(d){}if(a){e=[c];break}}return a},parseName:function(a){var b,
c,d=!1,e=a.indexOf(".");b=0===a.indexOf("./")||0===a.indexOf("../");-1!==e&&(!b||1<e)?(b=a.substring(0,e),c=a.substring(e+1,a.length)):b=a;a=c||b;e=a.indexOf("!");-1!==e&&(d="strip"===a.substring(e+1),a=a.substring(0,e),c?c=a:b=a);return{moduleName:b,ext:c,strip:d}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,c,d){var e,l;e=k.xdRegExp.exec(a);if(!e)return!0;a=e[2];e=e[3];e=e.split(":");l=e[1];e=e[0];return(!a||a===b)&&(!e||e.toLowerCase()===c.toLowerCase())&&(!l&&!e||l===d)},finishLoad:function(a,
b,c,d){c=b?k.strip(c):c;n.isBuild&&(m[a]=c);d(c)},load:function(d,e,m,f){if(f.isBuild&&!f.inlineText)m();else{n.isBuild=f.isBuild;var g=k.parseName(d);f=g.moduleName+(g.ext?"."+g.ext:"");var h=e.toUrl(f),v=n.useXhr||k.useXhr;!c||v(h,b,a,l)?k.get(h,function(a){k.finishLoad(d,g.strip,a,m)},function(a){m.error&&m.error(a)}):e([f],function(a){k.finishLoad(g.moduleName+"."+g.ext,g.strip,a,m)})}},write:function(a,b,c,d){m.hasOwnProperty(b)&&(d=k.jsEscape(m[b]),c.asModule(a+"!"+b,"define(function () { return '"+
d+"';});\n"))},writeFile:function(a,b,c,d,e){b=k.parseName(b);var l=b.ext?"."+b.ext:"",m=b.moduleName+l,n=c.toUrl(b.moduleName+l)+".js";k.load(m,c,function(b){b=function(a){return d(n,a)};b.asModule=function(a,b){return d.asModule(a,n,b)};k.write(a,m,b,e)},e)}};if("node"===n.env||!n.env&&"undefined"!==typeof process&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),k.get=function(a,b){var c=f.readFileSync(a,"utf8");0===c.indexOf("\ufeff")&&(c=c.substring(1));b(c)};else if("xhr"===
n.env||!n.env&&k.createXhr())k.get=function(a,b,c,d){var e=k.createXhr(),l;e.open("GET",a,!0);if(d)for(l in d)d.hasOwnProperty(l)&&e.setRequestHeader(l.toLowerCase(),d[l]);if(n.onXhr)n.onXhr(e,a);e.onreadystatechange=function(d){4===e.readyState&&(d=e.status,399<d&&600>d?(d=Error(a+" HTTP status: "+d),d.xhr=e,c(d)):b(e.responseText))};e.send(null)};else if("rhino"===n.env||!n.env&&"undefined"!==typeof Packages&&"undefined"!==typeof java)k.get=function(a,b){var c,d,e=new java.io.File(a),l=java.lang.System.getProperty("line.separator"),
e=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(e),"utf-8")),m="";try{c=new java.lang.StringBuffer;(d=e.readLine())&&d.length()&&65279===d.charAt(0)&&(d=d.substring(1));for(null!==d&&c.append(d);null!==(d=e.readLine());)c.append(l),c.append(d);m=String(c.toString())}finally{e.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(e){var d=document.createElement("div");d.innerHTML=f;var g=k.$("#slideContainer",d);g.id=e+g.id;g=k.$("#pageCommandParameters",d);g.id=e+g.id;g=k.$("#pageCommandDismiss",d);g.id=e+g.id;return d.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(g){function k(e,d,f,c,b,a){this.type=a||"keydown";this.keyCode="string"===typeof e&&"keydown"===this.type?e.toUpperCase().charCodeAt(0):e;this.mod1=void 0!==d&&null!==d?d:!1;this.mod2=void 0!==f&&null!==f?f:!1;this.mod3=void 0!==c&&null!==c?c:!1;this.mod4=void 0!==b&&null!==b?b:!1}function f(e){this.keys=e}k.prototype={getKeys:function(){return[this]},match:function(e,d){if(void 0!==d){if(0!==d)return!1}else if(e instanceof Array){if(1<e.length)return!1;
e=e[0]}return e.type!==this.type?!1:this.keyCode===e.keyCode||this.keyCode===String.fromCharCode(g.isOpera?e.which:void 0!==e.charCode?e.charCode:e.keyCode)?this.mod1!==(g.isMac?e.metaKey:e.ctrlKey)||"keydown"===this.type&&this.mod2!==e.shiftKey||this.mod3!==e.altKey||g.isMac&&this.mod4!==e.ctrlKey?!1:!0:!1},equals:function(e){return!e||this.keyCode!==e.keyCode||this.mod1!==e.mod1||this.mod2!==e.mod2||this.mod3!==e.mod3||this.mod4!==e.mod4||this.type!==e.type?!1:!0}};f.prototype={getKeys:function(){return this.keys.slice(0)},
match:function(e,d){var f=this.keys;if(void 0!==d)return d>f.length?!1:f[d].match(e)?d===f.length-1?!0:d+1:!1;e instanceof Array||(e=[e]);if(e.length>f.length)return!1;var c;for(c=0;c<e.length;c++)if(!f[c].match(e[c]))return!1;return c===f.length?!0:c},equals:function(e){if(!e.keys||e.keys.length!==this.keys.length)return!1;for(var d=0;d<e.keys.length;d++)if(!e.keys[d].equals(this.keys[d]))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 e(c){f.attach(this);this._init(c)}function d(c,b){var a=document.createElement(void 0===b?"span":b);a.tabIndex=0;a.className="dropdownMenuItem";a.role="menuitem";var d=document.createElement("span");d.appendChild(document.createTextNode(c));d.classList.add("dropdownCommandName");a.appendChild(d);d=document.createElement("li");d.appendChild(a);return d}function h(){var c=document.createElement("li");
c.classList.add("dropdownSeparator");return c}e.prototype={_init:function(c){this._dropdownNode=k.node(c.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=c.populate;this._selectionClass=c.selectionClass;this._parentDropdown=c.parentDropdown;this._positioningNode=c.positioningNode;if(!this._parentDropdown)for(var b=this._dropdownNode.parentNode;b&&document!==b;){if(b.classList&&b.classList.contains("dropdownMenu")){this._parentDropdown=b.dropdown;break}b=b.parentNode}this._dropdownNode.tabIndex=
0;this._triggerNode=c.triggerNode?c.triggerNode:k.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!c.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(c){var b=this;c.addEventListener("click",function(a){b.toggle(a)&&k.stop(a)},!1)},toggle:function(c){return this.isVisible()?this.close():this.open(c)},isVisible:function(){return this._isVisible},open:function(c){var b=!1;this.isVisible()||(this.dispatchEvent({type:"triggered",dropdown:this,event:c}),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),b=k.$$array(".dropdownSubMenu",this._dropdownNode),k.addAutoDismiss([this._triggerNode].concat(b),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(c),this._dropdownNode.focus(),
b=!0,this._parentDropdown&&this._parentDropdown.submenuOpen(this)));return b},_autoDismiss:function(c){if(this.close(!1)&&this._dropdownNode.contains(c.target))for(c=this._parentDropdown;c;)c.close(!1),c=c._parentDropdown},_positionDropdown:function(c){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+"px";else{c=k.bounds(this._dropdownNode);var b=k.bounds(document.body);if(c.left+c.width>b.left+
b.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-c.width+"px";else{var a=k.bounds(this._boundingNode(this._triggerNode)),d=k.bounds(this._triggerNode);this._dropdownNode.style.left=d.left-a.left-c.width+d.width+"px"}c=c.top+c.height-(b.top+b.height);0<c&&(this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-c)+"px")}},_boundingNode:function(c){var b=window.getComputedStyle(c,null);return null===b||"absolute"===b.getPropertyValue("position")||
!c.parentNode||c===document.body?c:this._boundingNode(c.parentNode)},close:function(c){var b=!1;this.isVisible()&&(this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),k.setFramesEnabled(!0),c&&this._triggerNode.focus(),this._isVisible=!1,this._selectedItem&&(this._selectedItem.classList.remove("dropdownMenuItemSelected"),this._selectedItem=null),b=!0);return b},
getItems:function(){var c=[],b=this;k.$$array("li:not(.dropdownSeparator) \x3e .dropdownMenuItem",this._dropdownNode,!0).forEach(function(a){a.parentNode.parentNode===b._dropdownNode&&c.push(a)});c.forEach(function(a){a._hasDropdownMouseover||(a.addEventListener("mouseover",function(c){a.dropdown?a.dropdown.open(c):(b._closeSelectedSubmenu(),k.stop(c));b._selectItem(a)}),a._hasDropdownMouseover=!0)});return c},empty:function(){var c=this;k.$$array("li",this._dropdownNode).forEach(function(b){b.parentNode===
c._dropdownNode&&b.parentNode.removeChild(b)});this._hookedAutoDismiss=!1},_dropdownKeyDown:function(c){if(c.keyCode===k.KEY.UP||c.keyCode===k.KEY.DOWN||c.keyCode===k.KEY.RIGHT||c.keyCode===k.KEY.ENTER||c.keyCode===k.KEY.LEFT){var b=this.getItems();if(b.length&&0<b.length){if(this._selectedItem){var a=b.indexOf(this._selectedItem);0>a&&(a=b.indexOf(this._selectedItem.parentNode));0<=a&&(c.keyCode===k.KEY.UP&&0<a?(a--,this._selectItem(b[a])):c.keyCode===k.KEY.DOWN&&a<b.length-1?(a++,this._selectItem(b[a])):
c.keyCode===k.KEY.ENTER||c.keyCode===k.KEY.RIGHT?this._selectedItem.classList.contains("dropdownTrigger")&&this._selectedItem.dropdown?(this._selectedItem.dropdown.open(),this._selectedItem.dropdown._selectItem()):c.keyCode===k.KEY.ENTER&&this._selectedItem.click():c.keyCode===k.KEY.LEFT&&this._selectedItem.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&(this.close(!0),this._parentDropdown&&this._parentDropdown._dropdownNode.focus()))}else this._selectItem(b[0]);k.stop(c)}}else c.keyCode===
k.KEY.ESCAPE&&(this.close(!0),k.stop(c))},_selectItem:function(c){if(c=c||this.getItems()[0])this._selectedItem&&this._selectedItem.classList.remove("dropdownMenuItemSelected"),this._selectedItem=c,this._selectedItem.classList.add("dropdownMenuItemSelected");document.activeElement!==this._dropdownNode&&this._dropdownNode.focus()},submenuOpen:function(c){c!==this._selectedSubmenu&&(this._closeSelectedSubmenu(),this._selectedSubmenu=c)},_closeSelectedSubmenu:function(){for(var c=this._selectedSubmenu;c;)c.close(),
c=c._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&k.removeAutoDismiss(this._boundAutoDismiss)},appendMenuItem:function(c,b){var a=d(c,b);this._dropdownNode.appendChild(a);return a},appendSeparator:function(){var c=h();this._dropdownNode.appendChild(c);return c}};e.prototype.constructor=e;return{Dropdown:e,appendKeyBindingString:function(c,b){var a=document.createElement("span");a.classList.add("dropdownKeyBinding");a.appendChild(document.createTextNode(b));c.appendChild(a)},
createMenuItem:d,createSeparator:h}});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(e){this._init(e)}f.prototype={_init:function(e){this._node=k.node(e.node);if(!this._node)throw"no dom node for tooltip found";this._position=e.position||["right","above","below","left"];this._text=e.text;this._hideDelay=void 0===e.hideDelay?200:e.hideDelay;this._tailSize=e.tailSize||10;this._trigger=e.trigger||"mouseover";this._afterShowing=e.afterShowing;this._afterHiding=e.afterHiding;var d=this;if("click"===
this._trigger)this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(c){c.target===d._node&&(d.show(),k.stop(c))},!1);else if("mouseover"===this._trigger){this._showDelay=void 0===e.showDelay?500:e.showDelay;e=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(c){k.contains(d._node,c.target)&&(d.show(),k.stop(c))},!1);this._leaveHandler=function(c){k.contains(d._node,c.target)&&d.hide()};for(var f=0;f<e.length;f++)this._node.addEventListener(e[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 e=document.createTextNode(this._text);this._tipTextContent.appendChild(e)}this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var d=this;k.addAutoDismiss([this._tip,this._node],function(){d.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(e){d._timeout&&(window.clearTimeout(d._timeout),d._timeout=null);d._tip.addEventListener("mouseout",function(c){k.contains(d._tip,c.target)&&(d.hide(),k.stop(c))},
!1)},!1))}return this._tip},_positionTip:function(e,d){this._makeTipNode();"left"===e?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,c;for(c=k.bounds(f);f&&!c.width&&!c.height;f=f.parentNode)c=k.bounds(f);var f=k.bounds(this._tipInner),b;switch(e){case "above":b=c.top-f.height-this._tailSize-1;c=c.left-this._tailSize;break;case "below":b=c.top+c.height+this._tailSize+1;c=c.left-this._tailSize;break;case "left":b=c.top-this._tailSize/2;c=c.left-f.width-
this._tailSize-1;break;default:b=c.top-this._tailSize/2,c=c.left+c.width+this._tailSize+1}var a=k.bounds(document.documentElement);if(b+f.height>a.height)if(d)b=a.height-f.height-1;else return!1;if(c+f.width>a.width)if(d)c=a.width-f.width-1;else return!1;if(0>c)if(d)c=4;else return!1;if(0>b)if(d)b=4;else return!1;this._tail&&this._tail.previousPosition!==e&&(this._tip.removeChild(this._tail),this._tail=null);this._tail||(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+
e),"above"===e||"left"===e?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),"left"===e&&(this._tail.style.left=f.width+"px"),this._tail.previousPosition=e);this._tip.style.top=b+"px";this._tip.style.left=c+"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 e=!1,d=0;!e&&d<this._position.length;)e=this._positionTip(this._position[d]),d++;e||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(e){this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null);if(this._tip&&this._tip.classList.contains("tooltipShowing")){void 0===e&&(e=
this._hideDelay);var d=this;this._timeout=window.setTimeout(function(){d._tip.classList.remove("tooltipShowing");d._tip.removeAttribute("style");d._afterHiding&&d._afterHiding()},e)}},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 e=["mouseout","click"],d=0;d<e.length;d++)this._node.removeEventListener(e[d],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,e,d,h,c,b){function a(a){var b=a.invocation;if(b){var c=a.command;if(c.hrefCallback)return a=c.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(c.onClick||c.callback)return window.setTimeout(function(){(c.onClick||c.callback).call(b.handler||window,b)},0),!0}return!1}function l(b,c){for(var d in c)if(c[d]&&c[d].keyBinding&&c[d].command&&c[d].keyBinding.match(b)){var e=c[d],l=e.keyBinding;if((!l.domScope||k.contains(k.node(l.domScope),b.target))&&a(e)){k.stop(b);break}}}function m(){var a={};if(r){var b,c,d;c=Object.keys(v);for(b=0;b<c.length;b++)d=c[b],a[d]=v[d];var e=r();c=Object.keys(e);for(b=0;b<c.length;b++)d=c[b],a[d]=e[d]}else a=
v;return a}function n(a){l(a,m())}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 c=a.target.nodeName.toLowerCase();if("input"===c)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"===c)return}b?b(a):n(a)}function s(){this._init()}
function t(a,b,c){b.classList.add("commandImage");var d;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(d=document.createElement("span"),b.appendChild(d),d.classList.add(a.spriteClass),d.classList.add(a.imageClass)):(d=new Image,d.alt=a.name,d.name=c,d.id=c,d.src=a.image,b.appendChild(d));return d}function q(a,b,c,d,e){this.commandRegistry=e;this.handler=a;this.items=b;this.userData=c;this.command=d;d.parameters&&(this.parameters=d.parameters.makeCopy());this.id=d.id}function w(a){this._init(a)}
var r=null,v={};s.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 c=a.proxy,d=a.bindings;if(d&&c)for(var e=0;e<d.length;e++)d[e].match(b)&&(c.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;w.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,c,d,
e){c=this.getChoices(b,c,d);var l=c.some(function(a){return a.checked});c.forEach(function(c){if(c.name){var d=document.createElement("li");a.appendChild(d);var m=document.createElement("span");m.tabIndex=0;m.role="menuitem";m.classList.add("dropdownMenuItem");if(l){var n=document.createElement("span");n.classList.add("check");n.appendChild(document.createTextNode(c.checked?"\u25cf":""));m.appendChild(n)}n=document.createTextNode(c.name);m.appendChild(n);d.appendChild(m);m.choice=c;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 e._generateMenuSeparator(a)})},getChoices:function(a,b,c){return this.choiceCallback?this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"!==this.image}};w.prototype.constructor=w;return{Command:w,CommandInvocation:q,createDropdownMenu:function(a,b,c,l,m,n,g,p,h){a=k.node(a);if(!a)throw"no parent node was specified";var q=document.createRange();q.selectNode(a);q=h?q.createContextualFragment(d):q.createContextualFragment(e);k.processTextNodes(q,{ButtonText:b});a.appendChild(q);a=a.lastChild;
var w;h?(h=a.previousSibling,w=h.lastChild):h=a.previousSibling;l?h.classList.add(l):(h.classList.add("orionButton"),h.classList.add("commandButton"));m&&(n||(h.textContent="",h.setAttribute("aria-label",b)),t({spriteClass:"commandSprite",imageClass:m},h,b),h.classList.add("orionButton"));h.dropdown=new f.Dropdown({dropdown:a,populate:c,selectionClass:g,skipTriggerEventListeners:!!w,positioningNode:p});a.dropdown=h.dropdown;return{menuButton:h,menu:a,dropdown:h.dropdown,dropdownArrow:w}},createCheckedMenuItem:function(a,
b,d,e){a=k.node(a);if(!a)throw"no parent node was specified";var l=document.createRange();l.selectNode(a);l=l.createContextualFragment(c);k.processTextNodes(l,{ItemText:b});a.appendChild(l);a=k.$(".checkedMenuItem",a.lastChild);a.checked=d;a.addEventListener("change",e,!1);return a},createCommandItem:function(a,c,d,e,l,m,n){var f;m=m||!c.name&&c.hasImage();if(c.hrefCallback)f=document.createElement("a"),f.id=e,m&&c.hasImage()?t(c,f,e):(f.className="commandLink",f.appendChild(document.createTextNode(c.name))),
n=c.hrefCallback.call(d.handler,d),n.then?n.then(function(a){f.href=a}):f.href=n?n:"#";else{f=document.createElement("button");f.className="orionButton";m?c.hasImage()?(t(c,f,e),c.name&&f.setAttribute("aria-label",c.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),f.appendChild(document.createTextNode(c.name))):(f.classList.add("commandButton"),e=document.createTextNode(c.name),f.appendChild(e));var g=n||c.callback;g&&(c.onClick=g,f.addEventListener("click",function(a){g.call(d.handler,
d)},!1))}"ul"===a.nodeName.toLowerCase()?(n=document.createElement("li"),a.appendChild(n),a=n):f.classList.add("commandMargins");a.appendChild(f);c.tooltip&&(f.commandTooltip=new b.Tooltip({node:f,text:c.tooltip,position:["above","below","right","left"]}));l&&(v[c.id]={keyBinding:l,command:c,invocation:d});return f},createCommandMenuItem:function(a,c,d,e,l,m){var n,g,p=a.dropdown;if(c.hrefCallback)g=f.createMenuItem(c.name,"a"),n=g.firstElementChild,l=c.hrefCallback.call(d.handler,d),l.then?l.then(function(a){n.href=
a}):n.href=l?l:"#",n.addEventListener("keydown",function(a){(a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.SPACE)&&n.click()},!1);else{g=f.createMenuItem(c.name);n=g.firstElementChild;var h=l||c.callback;h&&(c.onClick=h,n.addEventListener("click",function(a){p.close(!0);h.call(d.handler,d)},!1),n.addEventListener("keydown",function(a){if(a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.SPACE)a.preventDefault(),n.click()},!1))}c.tooltip&&(n.commandTooltip=new b.Tooltip({node:n,text:c.tooltip,position:["above",
"below","right","left"]}));m&&f.appendKeyBindingString(n,m);a.appendChild(g);e&&(v[c.id]={keyBinding:e,command:c,invocation:d});return n},executeBinding:a,setKeyBindingProvider:function(a){r=a},localKeyBindings:v,CommandsProxy:s,getKeyBindings:m,processKey:n,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:l}});
define("orion/explorers/navigationUtils",[],function(){function g(f,e,d,g){!k&&f&&(f.push({domNode:e}),e.tabIndex=-1,e.style.outline="none")}var k=-1!==navigator.userAgent.indexOf("iPad");return{addNavGrid:function(f,e,d){f&&(f=f.getGridNavHolder(e,!0))&&g(f,d)},generateNavGrid:g,removeNavGrid:function(f,e){if(f)for(var d=0;d<f.length;d++)if(f[d].domNode===e){f.splice(d,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:""},e=g.indexOf("#");if(-1!==e&&(g=g.substring(e+1),0!==g.length)){g=g.split(",");f.resource=decodeURIComponent(g[0]);for(e=1;e<g.length;e++){var d=/([^=]*)(=?)(.*)/.exec(g[e]),h=decodeURIComponent(d[1]||""),d=decodeURIComponent(d[3]||"");""!==h&&"resource"!==h&&(f[h]=d)}}return f},
validateURLScheme:function(k,f){var e=k;if(-1===k.indexOf("://")){var d=document.createElement("a");d.href=k;e=d.href}d=!1;if(d=f?f.some(function(d){return RegExp("^"+d+":","i").test(e)}):g.test(e))return k;console.log("Illegal URL Scheme: '"+k+"'");return""}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(g){function k(e){var d="",f=-1!==navigator.platform.indexOf("Mac");f?(e.mod4&&(d+="\u2303"),e.mod3&&(d+="\u2325"),e.mod2&&(d+="\u21e7"),e.mod1&&(d+="\u2318")):(e.mod1&&(d+="Ctrl+"),e.mod2&&(d+="Shift+"),e.mod3&&(d+="Alt+"));if(e.alphaKey)return d+e.alphaKey;if("keypress"===e.type)return d+e.keyCode;for(var c in g.KEY)if(typeof("number"===g.KEY[c])&&g.KEY[c]===e.keyCode){if(f)switch(g.KEY[c]){case g.KEY.BKSPC:c="\u232b";break;case g.KEY.TAB:c=
"\u21e5";break;case g.KEY.ENTER:c="\u23ce";break;case g.KEY.ESCAPE:c="\u238b";break;case g.KEY.SPACE:c="\u2423";break;case g.KEY.PAGEUP:c="\u21de";break;case g.KEY.PAGEDOWN:c="\u21df";break;case g.KEY.END:c="\u21f2";break;case g.KEY.HOME:c="\u21f1";break;case g.KEY.DEL:c="\u2326"}switch(g.KEY[c]){case g.KEY.DOWN:c="\u2193";break;case g.KEY.UP:c="\u2191";break;case g.KEY.RIGHT:c="\u2192";break;case g.KEY.LEFT:c="\u2190"}return d+c}var b;switch(e.keyCode){case 59:b=e.mod2?":":";";break;case 61:b=e.mod2?
"+":"\x3d";break;case 188:b=e.mod2?"\x3c":",";break;case 190:b=e.mod2?"\x3e":".";break;case 191:b=e.mod2?"?":"/";break;case 192:b=e.mod2?"~":"`";break;case 219:b=e.mod2?"{":"[";break;case 220:b=e.mod2?"|":"\\";break;case 221:b=e.mod2?"}":"]";break;case 222:b=e.mod2?'"':"'"}return b?d+b:112<=e.keyCode&&123>=e.keyCode?d+"F"+(e.keyCode-111):d+String.fromCharCode(e.keyCode)}function f(e){var d=-1!==window.navigator.platform.indexOf("Mac");return d&&e.metaKey||!d&&e.ctrlKey}return{getUserKeyString:function(e){var d=
"";e=e.getKeys();for(var f=0;f<e.length;f++)0!==f&&(d+=" "),d+=k(e[f]);return d},getUserText:function(e){var d=e.id,f=e.refNode,c=e.hideRefNode,b=e.initialText,a=e.onComplete,l=e.onEditDestroy,m=e.selectTo,n=e.isInitialValid;e=e.insertAsChild;var p=!1,k=function(e){return function(m){if(!p){var k=g.node(d),v=k.value;k&&(e&&m.keyCode===g.KEY.ESCAPE?(c&&(f.style.display="inline"),p=!0,k.parentNode.removeChild(k),l&&l()):e&&m.keyCode!==g.KEY.ENTER||(0===v.length||!n&&v===b?c&&(f.style.display="inline"):
(a(v),c&&f.parentNode&&(f.style.display="inline")),p=!0,k.parentNode&&k.parentNode.removeChild(k),l&&l()))}}},t=document.createElement("input");t.id=d;t.value=b||"";e?f.appendChild(t):f.parentNode.insertBefore(t,f.nextSibling);t.classList.add("userEditBoxPrompt");c&&(f.style.display="none");t.addEventListener("keydown",k(!0),!1);t.addEventListener("blur",k(!1),!1);window.setTimeout(function(){t.focus();if(b){var a=g.node(d),c=m?b.indexOf(m):-1;0<c?a.createTextRange?(a=a.createTextRange(),a.collapse(!0),
a.moveStart("character",0),a.moveEnd("character",c),a.select()):a.setSelectionRange?a.setSelectionRange(0,c):void 0!==a.selectionStart&&(a.selectionStart=0,a.selectionEnd=c):a.select()}},0)},openInNewWindow:f,followLink:function(e,d){d&&f(d)?window.open(e):window.location=e},createButton:function(e,d){var f=document.createElement("button");f.className="orionButton commandButton commandMargins";f.addEventListener("click",function(c){d();g.stop(c)},!1);e&&f.appendChild(document.createTextNode(e));return f},
createDropdownButton:function(e,d,f){},isFormElement:function(e){switch(e.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,e,d,h,c,b,a,l){function m(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,c){this.event=a;this.handler=b;this.capture=c||!1}function s(a,b,c,d,e,l){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1;this.eventListeners=Array.isArray(l)?l:l?[l]:[]}function t(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}m.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 c=this._urlBindings[b].urlBinding.match(a);if(c){var d=this._urlBindings[b],e=d.command,l=d.invocation;if(l&&l.parameters&&e.callback){l.parameters.setValue(c.parameterName,c.parameterValue);var m=this;window.setTimeout(function(){m._invoke(l)},0);break}}}},findCommand:function(a){return this._commandList[a]},
runCommand:function(a,b,c,d){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new g.CommandInvocation(c,b,null,a,this),d):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,d)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,
b,c))},confirm:function(a,b,c,d,e,l){var m=!1;if(this._parameterCollector&&!e){var n=this;this._parameterCollector.close();if(this._parameterCollector.open(a,function(a,e){var l=document.createElement("span");l.classList.add("parameterPrompt");l.textContent=b;a.appendChild(l);l=document.createElement("button");l.addEventListener("click",function(a){m=!0;n._parameterCollector.close()},!1);e.appendChild(l);l.appendChild(document.createTextNode(c));l.className="dismissButton";var f=document.createElement("button");
f.addEventListener("click",function(a){m=!1;n._parameterCollector.close()},!1);e.appendChild(f);f.appendChild(document.createTextNode(d));f.className="dismissButton";return l},function(){l(m)}))return}m=window.confirm(b);l(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,b){if(a)if(this._parameterCollector&&
a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){var d=!1;a.parameters.updateParameters(a);if(a.parameters.shouldCollectParameters()&&(d=this._parameterCollector.collectParameters(a),!d)){var e=new c.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),d=e.contentContainer();d.classList.add("parameterPopup");var l=window.document.activeElement,m=this._parameterCollector.getFillFunction(a,
function(){l&&l.focus();e.destroy()})(d);e.show();window.setTimeout(function(){m.focus();m.select()},0);d=!0}d||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 c={},d,l,m=[],n;for(n in this._activeBindings)(l=
this._activeBindings[n])&&l.keyBinding&&l.command&&(l.command.name||l.command.tooltip)&&m.push(l);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++)l=m[n],l.keyBinding.scopeName?(c[l.keyBinding.scopeName]||(c[l.keyBinding.scopeName]=[]),c[l.keyBinding.scopeName].push(l)):(d=e.getUserKeyString(l.keyBinding),a.createItem(d,l.command.name||l.command.tooltip,b(l)));for(var f in c)c[f].length&&0<c[f].length&&(a.createHeader(f),
c[f].forEach(function(c){d=e.getUserKeyString(c.keyBinding);a.createItem(d,c.command.name||c.command.tooltip,b(c))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var c=this;b.forEach(function(b){c._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,c,d,e,l,m,n,f,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,
e));a[b]?(d&&(a[b].title=d),c&&(a[b].position=c),m&&(a[b].imageClass=m),n&&(a[b].tooltip=n),f&&(a[b].selectionClass=f),!0===g?a[b].pretendDefaultActionId=!0:a[b].defaultActionId=g,a[b].emptyGroupMessage=l):(a[b]={title:d,position:c,emptyGroupMessage:l,imageClass:m,tooltip:n,selectionClass:f,defaultActionId:!0===g?null:g,pretendDefaultActionId:!0===g,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,c,d,e,l,m){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};l&&((c=this._commandList[b])?this._addBinding(c,"key",
l,e):this._addPendingBinding(b,"key",l,e));m&&((c=this._commandList[b])?this._addBinding(c,"url",m,e):this._addPendingBinding(b,"url",m,e));a.sortedContributions=null},unregisterCommandContribution:function(a,b,c){if(this._contributionsByScopeId[a]){delete this._commandList[b];delete this._activeBindings[b];delete this._urlBindings[b];delete this._pendingBindings[b];var d=this._contributionsByScopeId[a];c&&c.split("/").forEach(function(a){1<a.length&&d[a]&&(d=d[a].children)});delete d[b];d.sortedContributions=
null}},_addBinding:function(a,b,c,d){if(!a.id)throw Error("No command id: "+a);"key"===b?this._activeBindings[a.id]={command:a,keyBinding:c,bindingOnly:d}:"url"===b&&(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:d})},_addPendingBinding:function(a,b,c,d){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:c,bindingOnly:d})},_checkForTrailingSeparator:function(a,b,c){var e;if("tool"===b||"button"===b)if((e=0<a.childNodes.length?a.childNodes[a.childNodes.length-
1]:null)&&e.classList.contains("commandSeparator"))return c?(a.removeChild(e),!1):!0;if("menu"===b&&(a=d.$$array("li \x3e *",a),0<a.length&&a[a.length-1].classList.contains("dropdownSeparator")))if(e=a[a.length-1],c)e.parentNode.parentNode.removeChild(e.parentNode);else return!0;return!1},renderCommands:function(a,b,c,e,l,m,n){if("string"!==typeof a)throw"a scope id for rendering must be specified";b=d.node(b);if(!b)throw"no parent";var f=this._contributionsByScopeId[a];if(!c&&f){c=f.localSelectionService||
this._selectionService;var g=this;c&&c.getSelections(function(c){g.renderCommands(a,b,c,e,l,m)})}else f&&(this._render(f,b,c,e,l||"button",m,n),this._checkForTrailingSeparator(b,l,!0))},destroy:function(a){a=d.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,b,d,l,m,n,f){var p=a.sortedContributions;if(!p){var p=[],h=!1,s;for(s in a)if(Object.prototype.hasOwnProperty.call(a,
s)){var t=a[s];t&&"number"===typeof t.position&&(t.id=s,p.push(t),h=!0)}h&&(p.sort(function(a,b){return a.position-b.position}),a.sortedContributions=p)}var H=0,u=this;p.forEach(function(a){var p;a.imageClass||(a.imageClass=null);if(a.children&&0<Object.getOwnPropertyNames(a.children).length){var h=a.children;if("tool"===m||"button"===m)if(a.title){var s;a.defaultActionId&&((h=u._commandList[a.defaultActionId])&&(h.visibleWhen?h.visibleWhen(d):1)?(s=new g.CommandInvocation(l,d,n,h,u),s.domParent=
b):a.pretendDefaultActionId=!0);h=u._createDropdownMenu(b,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass,null,s,a.pretendDefaultActionId);f&&k.generateNavGrid(f,h.menuButton);h&&(u._render(a.children,h.menu,d,l,"menu",n,f),u._checkForTrailingSeparator(h.menu,"menu",!0),0===h.menu.childNodes.length?a.emptyGroupMessage?h.menuButton.emptyGroupTooltip||(h.menuButton.emptyGroupTooltip=new c.Tooltip({node:h.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above",
"left"]})):(f&&k.removeNavGrid(f,h.menuButton),a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},a(h.menu),a(h.menuButton),a(h.destroyButton)):h.menuButton.style.visibility="visible")}else{var t;0<b.childNodes.length&&!u._checkForTrailingSeparator(b,m)&&(t=u.generateSeparatorImage(b));u._render(h,b,d,l,m,n,f);0<b.childNodes.length&&b.childNodes[b.childNodes.length-1]!==t&&(t=u.generateSeparatorImage(b))}else if(a.title){if(a=u._createDropdownMenu(b,a.title,!0,null,null,a.imageClass))u._render(h,
a.menu,d,l,"menu",n,f),u._checkForTrailingSeparator(a.menu,"menu",!0),0===a.menu.childNodes.length&&a.destroyButton&&b.removeChild(a.destroyButton)}else 0<b.childNodes.length&&u._generateMenuSeparator(b),u._render(h,b,d,l,m,n,f),u._generateMenuSeparator(b)}else{var q=u._commandList[a.id],h=q?!0:!1;s=a=null;if(q){p=new g.CommandInvocation(l,d,n,q,u);p.domParent=b;t=!1;try{t=h&&(q.visibleWhen?q.visibleWhen(d):!0)}catch(G){throw console.log(G),G;}u._activeBindings[q.id]&&u._activeBindings[q.id].keyBinding&&
(a=u._activeBindings[q.id],a.invocation=t?p:null,a.bindingOnly&&(h=!1));u._urlBindings[q.id]&&u._urlBindings[q.id].urlBinding&&(s=u._urlBindings[q.id],s.invocation=t?p:null,s.bindingOnly&&(h=!1));h=h&&t}h&&(q.choiceCallback?("tool"===m||"button"===m?(a=b,h=!1,"ul"===b.nodeName.toLowerCase()&&(a=document.createElement("li"),b.appendChild(a))):(a=b,h=!0),u._createDropdownMenu(a,q.name,h,function(a){q.populateChoicesMenu(a,d,l,n,u)}.bind(q),q.imageClass,q.tooltip||q.title,q.selectionClass,q.positioningNode)):
(p.handler=p.handler||this,p.domParent=b,h=function(a){u._invoke(p)},"menu"===m?(s=null,a&&a.keyBinding&&(s=e.getUserKeyString(a.keyBinding)),a=g.createCommandMenuItem(b,q,p,null,h,s)):(a=m+q.id+H,a=g.createCommandItem(b,q,p,a,null,"tool"===m,h)),k.generateNavGrid(f,a),p.domNode=a,H++))}})},_createDropdownMenu:function(a,b,e,m,n,f,p,k,s,t){a=d.node(a);if(!a||!d.contains(document.body,a))return null;var J,H,u=a;if(e)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(l),d.processTextNodes(f,
{ButtonText:b}),a.appendChild(f),H=a.lastChild,n=H.lastChild,b=n.previousSibling,b.dropdown=new h.Dropdown({dropdown:n,populate:m,parentDropdown:a.dropdown}),n.dropdown=b.dropdown;else{"ul"===a.nodeName.toLowerCase()&&(u=document.createElement("li"),a.appendChild(u),H=u);a=null;n&&(a="dropdownButtonWithIcon",f=f||b);f=n?f||b:f;var A=g.createDropdownMenu(u,b,m,a,n,!1,p,k,s||t);J=A.dropdownArrow;b=A.menuButton;if(J){s&&(s.domNode=A.menuButton);var F=this;b.onclick=function(a){var b=d.bounds(J);a.clientX>=
b.left&&A.dropdown?A.dropdown.toggle(a):F._invoke(s)};A.dropdown&&(b.onkeydown=function(a){d.KEY.DOWN===a.keyCode&&(A.dropdown.toggle(a),d.stop(a))})}n=A.menu;var z;(m=s&&s.command&&(s.command.tooltip||s.command.name))?z=s.command.tooltip||s.command.name:m&&(z=f);z&&(b.commandTooltip=new c.Tooltip({node:b,text:z,position:["above","below","right","left"]}))}return{menuButton:b,menu:n,dropdown:b.dropdown,destroyButton:H,dropdownArrow:J}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,
"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);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}};m.prototype.constructor=m;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;s.prototype={optionsRequested:function(){return this.optionsRequested}};s.prototype.constructor=s;t.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 c=this.parameterTable[a];c&&(c.value=b)},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=
[];this.forEach(function(b){b=new s(b.name,b.type,b.label,b.value,b.lines,b.eventListeners);a.push(b)});var b=new t(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};t.prototype.constructor=t;return{CommandRegistry:m,URLBinding:n,ParametersDescription:t,CommandParameter:s,CommandEventListener:p}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,k,f){function e(d,e){this._activeContainer=null;this._getElementsFunction=d;this._toolbarLayoutFunction=e}e.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(d,e,c){"string"===typeof d&&(d=f.node(d));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===d)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(d))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=c;var b=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;d=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(0===d.length){e=this._activeElements.dismissArea||
this._activeElements.parameterArea;d=document.createElement("button");d.id="closebox";d.className="imageSprite core-sprite-close dismissButton";d.title=g.Close;e.appendChild(d);var a=this;d.addEventListener("click",function(b){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);b&&(this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select&&b.select()},0));this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(d,e){f.$$array("input",e).forEach(function(c){"checkbox"===c.type?d.parameters.setValue(c.parameterName,c.checked):"button"!==c.type&&d.parameters.setValue(c.parameterName,c.value.trim())});f.$$array("textArea",e).forEach(function(c){d.parameters.setValue(c.parameterName,c.value.trim())});d.command.callback&&d.command.callback.call(d.handler,d)},collectParameters:function(d){return d.parameters?
(d.domNode&&d.domNode.classList.add("commandMarker"),this.open(d.domNode||d.domParent,this.getFillFunction(d))):!1},getFillFunction:function(d,e){var c=this;return function(b,a){var l=null,m=function(){e&&e();c.close()},n=function(a){a.keyCode===f.KEY.ENTER&&c._collectAndCall(d,b);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)m(),f.stop(a)};d.parameters.forEach(function(a){var c=null;a.label&&(c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",a.name+"parameterCollector"),
c.textContent=a.label,b.appendChild(c));var e=a.name+"parameterCollector",g,c=c||b;"text"===a.type&&"number"===typeof a.lines&&1<a.lines?(g=document.createElement("textarea"),g.rows=a.lines,g.type="textarea",g.id=e,c.appendChild(g),n=function(a){a.keyCode===f.KEY.ESCAPE&&(m(),f.stop(a))}):"boolean"===a.type?(g=document.createElement("input"),g.type="checkbox",g.id=e,c.appendChild(g),a.value&&(g.checked=!0)):(g=document.createElement("input"),g.type=a.type,g.id=e,c.appendChild(g),a.value&&(g.value=
a.value));g.classList.add("parameterInput");g.setAttribute("speech","speech");g.setAttribute("x-webkit-speech","x-webkit-speech");g.parameterName=a.name;l||(l=g);0<a.eventListeners.length&&a.eventListeners.forEach(function(a){g.addEventListener(a.event,function(b){return a.handler(b,d)},a.capture)});g.addEventListener("keydown",n,!1)});var p=a;p||(p=document.createElement("span"),p.classList.add("layoutRight"),p.classList.add("parametersDismiss"),b.appendChild(p));var k=function(a,b){var c=document.createElement("button");
b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismissButton");return c};d.parameters.hasOptionalParameters()&&(d.parameters.optionsRequested=!1,k(g.More,p).addEventListener("click",function(){d.parameters.optionsRequested=!0;c._collectAndCall(d,b);m()},!1));k(g.Submit,p).addEventListener("click",function(){c._collectAndCall(d,b);m()},!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){m()},!1);return l}}};e.prototype.constructor=e;return{CommandParameterCollector:e}});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 c=a&&a.split(".").pop(),d=null,e=0;e<b.length;e++){var f=b[e],g;g=d;var h=f,k=c,v=0<=h.filename.indexOf(a),x;x=k.toLowerCase();x=-1!==h.extension.indexOf(x);if(v||x){if(!(x=!g))v&&(k=k.toLowerCase(),v=-1!==g.extension.indexOf(k)),x=v;x&&(g=h)}g===f&&(d=f)}return d}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 e(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 d(a){var b=Object.create(null);a.map(e).forEach(function(a){Object.prototype.hasOwnProperty.call(b,a.id)||(b[a.id]=a)});return b}function h(e){if(e&&e.registerService){this.serviceRegistry=e;for(var m=e.getServiceReferences(b).concat(e.getServiceReferences(a)),n=[],f=0;f<m.length;f++)for(var g=k(m[f].getProperty("contentTypes")),h=0;h<g.length;h++)n.push(g[h]);
this.map=d(n);e.registerService(c,this)}else if(Array.isArray(e))this.serviceRegistry=null,this.map=d(e);else throw Error("Invalid parameter");}var c="orion.core.contentTypeRegistry",b="orion.core.contenttype",a="orion.file.contenttype";h.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(a[c]);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 c=a,d={};c&&(c=this.getContentType(c["extends"]));){if(c.id===b.id)return!0;if(d[c.id])throw Error("Cycle: "+c.id);d[c.id]=!0}return!1},isSomeExtensionOf:function(a,b){for(var c=0;c<b.length;c++)if(this.isExtensionOf(a,
b[c]))return!0;return!1}};return{ContentTypeRegistry:h,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(l,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 e(a,b,c){for(var d=
[],e=0;e<a.length;e++)"undefined"!==typeof a[e]&&d.push(f(a[e],b));return d.join(c)}function d(a,b,c,d){for(var e=Object.keys(a),l=[],g=0;g<e.length;g++)"undefined"!==typeof a[e[g]]&&l.push(f(e[g],b)+c+f(a[e[g]],b));return l.join(d)}function h(c){if(0===c.length)throw Error("Invalid Expression: 0 length expression");(this._operator=b[c[0]])?c=c.substring(1):this._operator=b.NUL;for(var d=[],e=c.split(","),l=0;l<e.length;l++){var f=e[l].match(a);if(null===f)throw Error("Bad VarSpec: "+c);d.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=d}function c(a){for(var b=[],c=0,d=a.indexOf("{",c);-1!==d;){b.push(new g(a.substring(c,d)));c=a.indexOf("}",d+1);if(-1===c)throw Error("Invalid template: "+a);b.push(new h(a.substring(d+1,c)));c+=1;d=a.indexOf("{",c)}b.push(new g(a.substring(c)));this._templateComponents=b}var b={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]+))?$/,l=/%25[0-9A-F][0-9A-F]/g;g.prototype={expand:function(a){return encodeURI(this._text)}};
h.prototype={expand:function(a){for(var b=[],c=0;c<this._varSpecList.length;c++){var l=this._varSpecList[c],g=l.name,h=a[g],k=typeof h;if("undefined"!==k&&null!==h){var r=0===b.length?this._operator.first:this._operator.sep;if("string"===k)this._operator.named&&(r+=f(g,"U+R"),r+=0===h.length?this._operator.ifemp:"\x3d"),-1!==l.prefix&&l.prefix<h.length&&(h=h.substring(0,l.prefix)),r+=f(h,this._operator.allow);else if(Array.isArray(h)){if(0===h.length)continue;l.explode?r+=e(h,this._operator.allow,
this._operator.sep):(l=e(h,this._operator.allow,","),this._operator.named&&(r+=f(g,"U+R"),r+=0===l.length?this._operator.ifemp:"\x3d"),r+=l)}else if("object"===k){if(0===Object.keys(h).length)continue;l.explode?r+=d(h,this._operator.allow,"\x3d",this._operator.sep):(l=d(h,this._operator.allow,",",","),this._operator.named&&(r+=f(g,"U+R"),r+=0===l.length?this._operator.ifemp:"\x3d"),r+=l)}else throw Error("bad param type: "+g+" : "+k);b.push(r)}}return b.join("")}};c.prototype={expand:function(a){for(var b=
[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));return b.join("")}};return c});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,k){function f(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var e={};return{getMessageBundle:function(d){function h(a){a?g(["i18n!"+d],function(a){if(a){var c=d;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+c,JSON.stringify(a));delete a._expires}b.resolve(a)}):c(Error(d))}function c(a){b.reject(a)}
if(e[d])return e[d];var b=new k;e[d]=b;var a=f(d);if(a)return b.resolve(a),b;try{g([d],h,c)}catch(l){g(["orion/i18n!"+d],h,c)}return b},formatMessage:function(d){var e=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(c,b){return e[(b<<0)+1]})}}});
define("orion/PageLinks","require orion/Deferred orion/PageUtil orion/URITemplate orion/i18nUtil orion/objects orion/URL-shim".split(" "),function(g,k,f,e,d,h,c){function b(){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(c){"objectClass"!==c&&"service.names"!==c&&"service.id"!==c&&"__plugin__"!==c&&(b[c]=a.getProperty(c))});return b}function l(a){return d.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 m(c,d){var m=c.getServiceReferences(d||"orion.page.link"),n=f.matchResourceParameters(window.location.href),g={OrionHome:b(),Location:n.resource},h=[];m.forEach(function(b){b=a(b);if(b.uriTemplate&&(b.nls||b.name)){var c=(new e(b.uriTemplate)).expand(g),c=f.validateURLScheme(c);b.href=c;b.nls?h.push(l(b)):(b.textContent=b.name,h.push((new k).resolve(b)))}});return k.all(h)}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(s)}function s(a,b){var c=a.textContent&&a.textContent.toLowerCase(),d=b.textContent&&b.textContent.toLowerCase();return c<d?-1:c>d?1:0}var t;h.mixin(n.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});h.mixin(p.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var b=a.href;a=
a.textContent;var c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(b){var c;return!t?(c=[],b.getServiceReferences("orion.page.link.category").forEach(function(b){b=a(b);if(b.id&&(b.name||b.nameKey))b.nls?c.push(l(b)):(b.textContent=b.name,c.push((new k).resolve(b)))}),k.all(c).then(function(a){return t=new n(a)})):(new k).resolve(t)},getPageLinksInfo:function(a,
b){return m(a,b).then(function(a){return new p(a)})},getOrionHome:b}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});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,e,d,h,c,b,a,l){function m(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});return b}var n={},p=a.getOrionHome();n._cloneItemWithoutChildren=function w(a){if(null===a||"object"!==typeof a)return a;var b=a.constructor(),c;for(c in a)"children"!==c&&"Children"!==
c&&(b[c]=w(a[c]));return b};n._getOpenWithNavCommandExtensions=function(a,b){function c(a,b){for(var d=a.getServiceReferences("orion.navigate.openWith"),e=[],l=[],m=0;m<d.length;m++){var f=d[m];if(f.getProperty("editor")===b.id){var n=f.getProperty("contentType");n instanceof Array?e=e.concat(n):e.push(n||"*/*");f=f.getProperty("excludedContentTypes");f instanceof Array?l=l.concat(f):null!==f&&"undefined"!==typeof f&&l.push(f)}}0===e.length&&(e=null);0===l.length&&(l=null);return{contentTypes:e,excludedContentTypes:l}}
for(var d=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],l=e.getProperty("id");c.push({id:l,"default":e.getProperty("default")||!1,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||e.getProperty("uriTemplate"),validationProperties:e.getProperty("validationProperties")||[]})}return c}(),e=[],l=0;l<d.length;l++){var m=d[l],f=c(a,m);e.push({properties:{name:m.name||m.id,
nameKey:m.nameKey,id:"eclipse.openWithCommand."+m.id,contentType:f.contentTypes,excludedContentTypes:f.excludedContentTypes,uriTemplate:m.uriTemplate,nls:m.nls,forceSingleItem:!0,isEditor:m["default"]?"default":"editor",validationProperties:m.validationProperties},service:{}})}return e};n._makeValidator=function(a,b,c,e){function l(a,b,c,d,e){var m=!1,f;if("!"===b.charAt(0))return"undefined"===typeof a[b.substring(1)];if("undefined"!==typeof a[b]){if("undefined"===typeof c)f=a[b],m=!0;else if("string"===
typeof c){if(!typeof("string"===a[b]))return!1;if(d.variableName){if(c=RegExp(c).exec(a[b]))m=c[0],f="before"===d.variableMatchPosition?a[b].substring(0,c.index):"after"===d.variableMatchPosition?a[b].substring(c.index+m.length):"only"===d.variableMatchPosition?m:a[b],m=!0}else return RegExp(c).test(a[b])}else a[b]===c&&(f=a[b],m=!0);b=d.variableName;d=d.replacements;if(m&&b&&(e[b]=f,e.itemCached=a,d)){if("string"!==typeof f)return window.console.log("Cannot replace "+b+", value is not a string: "+
f),m;for(a=0;a<d.length;a++){f=!1;if(d[a].pattern){c=d[a].pattern;var n=d[a].replacement||"";e[b]=e[b].replace(RegExp(c),n).replace(RegExp(c),n)}else f=!0;f&&window.console.log("Invalid replacements specified in validation property.  "+d[a])}}return m}return!1}function m(a,b,c,d){var e=c.match,f,n;if(0<=(f=b.indexOf("["))){if(0>(n=b.indexOf("]")))return!1;var g=b.substring(0,f),h;if(!(h=a[g])||!Array.isArray(h))return!1;f=b.substring(f+1,n);f=parseInt(f,10);if(isNaN(f))return!1;0>f&&(f+=h.length);
b=b.substring(n+1);b=g+":"+String(f)+b}return 0<=b.indexOf("|")?(f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),m(a,f,c,d)?!0:m(a,b,c,d)):0<=b.indexOf(":")?(f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?m(a[f],b,c,d):!1):l(a,b,e,c,d)}function f(b,c,e){if(e.info.validationProperties)for(var l=0;l<e.info.validationProperties.length;l++){var n=e.info.validationProperties[l];if("undefined"!==typeof n.source){if(!m(b,n.source,n,e))return!1}else return window.console.log("Invalid validationProperties in "+
a.id+".  No source property specified."),!1}var l=!0,g=c?d.getFilenameContentType(b.Name,c):null,g=g||{id:"application/octet-stream"};e.info.excludedContentTypes&&c&&(l=e.info.excludedContentTypes.every(function(a){a=a.replace(/([*?])/g,".$1");return-1!==g.id.search(a)?!1:!0}));l&&e.info.contentType&&c&&(l=e.info.contentType.some(function(a){a=a.replace(/([*?])/g,".$1");return-1!==g.id.search(a)?!0:!1}));return l}return{info:a,validationFunction:function(a){"function"===typeof e&&(a=e.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(!f(a[b],c,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var d=this.info.validationProperties[c];
d.source&&d.variableName&&(this.itemCached===a&&this[d.variableName]||m(a,d.source,d,this),a[d.variableName]?window.console.log("Variable name "+d.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[d.variableName]=this[d.variableName])}b.OrionHome=p;return(new h(this.info.uriTemplate)).expand(b)}return null}}};var s=l.UnnamedCommand;n._createCommandOptions=function(a,b,d,e,l,m){function f(c,g){var h=n._makeValidator(a,d,e,m);c.visibleWhen=
h.validationFunction.bind(h);if(l)if(h.generatesURI.bind(h)())c.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var p=a;c.callback=function(a){var e;if(p.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,e=n._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){e=[];for(var l=0;l<a.items.length;l++)e.push(n._cloneItemWithoutChildren(a.items[l]))}else e=n._cloneItemWithoutChildren(a.items);if(d)var m=d.getService("orion.page.progress");
b.run?m?m.progress(b.run(e),"Running command: "+c.name):b.run(e):d&&(m?m.progress(d.getService(b).run(e),"Running command: "+c.name):d.getService(b).run(e))}}g.resolve(c)}var g=new k;if(a.nls){var h=function(b){var c;b?(c=a.tooltipKey&&b[a.tooltipKey],b=a.nameKey&&b[a.nameKey]||a.name||s,c=c||a.tooltip||""):(b=a.name||a.nameKey||s,c=a.tooltip||a.tooltipKey||"");f({name:b,image:a.image,id:a.id||a.name,tooltip:c,isEditor:a.isEditor,showGlobally:a.showGlobally},g)};c.getMessageBundle(a.nls).then(h,h.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},g);return g};n.getOpenWithCommand=function(a,b,c){var d;a=c||n.getOpenWithCommands(a);for(c=0;c<a.length;c++)if(a[c].visibleWhen(b)){var e="default"===a[c].isEditor;if(!d||e)if(d=a[c],e)break}return d};n.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};var t;n.createAndPlaceFileCommandsExtension=function(a,
b,c,d,e,m){return n.createFileCommands(a,null,m?"all":void 0,!!m,b).then(function(a){e&&0<a.length&&(b.addCommandGroup(c,"eclipse.openWith",1E3,l.OpenWith,e,null,null,null,"dropdownSelection"),b.addCommandGroup(c,"eclipse.fileCommandExtensions",1E3,l.OpenRelated,e));a.forEach(function(a){var l=null;e&&(l=a.isEditor?e+"/eclipse.openWith":e+"/eclipse.fileCommandExtensions");b.registerCommandContribution(c,a.id,d,l)});return{}})};n.createFileCommands=function(a,b,c,d,e){c=void 0===c?"global":c;d=void 0===
d?!0:d;var l=[];n._cachedFileCommands||n._createCachedFileCommands(a);("all"===c||"global"===c)&&n._cachedFileCommands.forEach(function(a){var b=a.properties;("all"===c||b.forceSingleItem&&b.showGlobally)&&l.push(a)});return k.when(function(){var c=a.getService("orion.core.contentTypeRegistry")||b;return t||k.when(c.getContentTypes(),function(a){return t=a})}(),function(){d&&(n._cachedOpenWithExtensions||(n._cachedOpenWithExtensions=n._getOpenWithNavCommandExtensions(a,t)),l=l.concat(n._cachedOpenWithExtensions),
e._addedOpenWithCommands=d);var b=l.map(function(b){var c=b.properties;b=b.service;var d=e.findCommand(c.id||c.name);return d?(new k).resolve(d):n._createCommandOptions(c,b,a,t,!0).then(function(a){a=new f.Command(a);e.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 c=0;c<b.length;c++)if("orion.navigateFromMetadata"!==
b[c].getProperty("id")){var d=a.getService(b[c]),e=m(b[c]);n._cachedFileCommands.push({properties:e,service:d})}};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,c){return c&&c._addedOpenWithCommands?(new k).resolve(n.getOpenWithCommands(c)):n.createFileCommands(a,b,
"none",!0,c)};return n});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,k){function f(e){this._init(e)}f.prototype={_init:function(e){var d=k.node(e.container);if(!d)throw"no parent container";this._container=d;d.classList.remove("currentLocation");this._id=e.id||"eclipse.breadcrumbs";this._resource=e.resource||null;this._rootSegmentName=e.rootSegmentName;this._workspaceRootSegmentName=e.workspaceRootSegmentName;this._workspaceRootURL=e.workspaceRootURL;this._makeHref=e.makeHref;this._makeFinalHref=
e.makeFinalHref;this._maxLength=e.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var e;if(this._resource&&this._resource.Parents&&!this._resource.skip){e=document.createElement("a");var d=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(e,d):e.href=g.toUrl("edit/edit.html")+"#"+d}else e=document.createElement("span");k.empty(e);e.appendChild(document.createTextNode(this._workspaceRootSegmentName));
return e}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(e){var d=document.createElement("a");d.classList.add("breadcrumb");d.appendChild(document.createTextNode(e));return d},addSegmentHref:function(e,d){this._makeHref?this._makeHref(e,d.Location,d):e.href=g.toUrl("edit/edit.html")+"#"+d.ChildrenLocation},buildSegments:function(e,d){if(this._resource.Parents){var f=this._resource.Parents.slice(0),c,b;f&&(f=f.slice(0),"reverse"===d&&(f=f.reverse().slice(0)),
f.forEach(function(a){a.skip||(e?(b=e,e=null):b=a.Name,c=this.buildSegment(b),this.path+=a.Name,this.addSegmentHref(c,a),c.include=!1,this.segments.push(c))}.bind(this)))}},addDivider:function(){var e=document.createElement("span");e.appendChild(document.createTextNode(" / "));this.path+="/";e.classList.add("breadcrumbSeparator");this.append(e)},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(e){this.crumbs.appendChild(e)},addTitle:function(e,d){var f=d||document.title;0===this.crumbs.childNodes.length&&(e=document.createElement("span"),e.appendChild(document.createTextNode(f)),
e.classList.add("breadcrumb"),e.classList.add("currentLocation"),this.append(e))},finalSegment:function(e,d){if(!this._resource.skip){var f;f=d?d:this._resource.Name;this._makeFinalHref?(e=this.buildSegment(f),this.addSegmentHref(e,this._resource)):(e=document.createElement("span"),e.appendChild(document.createTextNode(f)));e.classList.add("currentLocation");this.path+=this._resource.Name;this.append(e)}},firstSegment:function(e){e&&(this.append(e),this._resource&&this._resource.Parents&&!this._resource.skip?
(e.classList.add("breadcrumb"),this.addDivider()):(this._resource.skip||(e.href=""),e.classList.add("currentLocation")))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(e){!0===e.include&&(this.append(e),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var e=this.segments.slice(0).reverse();e.forEach(function(d){this.append(d);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?d.include=
!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=e.reverse()}},measure:function(){var e=this._container;e.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:e.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;d?this.addTitle(e,d):(this.finalSegment(e,d),this._resource&&this._resource.Parents&&(this.buildSegments(d,"reverse"),this.measureSegments(),this.firstSegment(e)),
this.crumbs.offsetWidth>=this.MAX_LENGTH&&(this.INCLUDE_FIRST_SECTION=!1))},render:function(){this.refresh();var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;d?this.addTitle(e,d):(!0===this.INCLUDE_FIRST_SECTION&&this.firstSegment(e),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(e,d)));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 e(d){k.attach(this);this._init(d)}e.prototype={_init:function(d){this._tracking=null;this._animationDelay=501;this._closeReversely=d.closeReversely;this.$node=f.node(d.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(d.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(d.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=d.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");d.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 d.closeByDefault&&(this._closeByDefault=d.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(d){this.addEventListener("resize",function(e){d(e.node)})},_initializeFromStoredSettings:function(){var d=localStorage.getItem(this._prefix+"/toggleState");this._closed="string"===typeof d?"closed"===d:this._closeByDefault;var d=f.bounds(this.$node.parentNode),e=f.bounds(this.$node),c;this._vertical?(c=localStorage.getItem(this._prefix+"/yPosition"))?(this._splitTop=parseInt(c,10),this._splitTop>d.top+d.height-e.height&&(this._splitTop=d.top+d.height/
2)):this._closeByDefault&&(this._initialSplit=this._getSplitPosition(),this._splitTop=0):(c=localStorage.getItem(this._prefix+"/xPosition"))?(this._splitLeft=parseInt(c,10),this._splitLeft>d.left+d.width-e.width&&(this._splitLeft=d.left+d.width/2)):this._closeByDefault&&(this._initialSplit=this._getSplitPosition(),this._splitLeft=0)},_getSplitPosition:function(){var d=f.bounds(this.$node),e=f.bounds(this.$node.parentNode);return this.vertical?d.top-e.top:d.left-e.left},_adjustToSplitPosition:function(d){var e=
f.bounds(this.$node),c=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=e.height;if(d||!this._splitTop)this._splitTop=e.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);d=this._splitTop;"relative"===this.$node.parentNode.style.position&&(d=this._splitTop-c.top);this.$sideNode.style.height=d+"px";this.$sideNode.style.display="block";this.$node.style.top=d+"px"}else{this._splitWidth=e.width;if(d||!this._splitLeft)this._splitLeft=e.left,localStorage.setItem(this._prefix+
"/xPosition",this._splitLeft);d=this._splitLeft;"relative"===this.$node.parentNode.style.position&&(d=this._splitLeft-c.left);this.$sideNode.style.width=d+"px";this.$sideNode.style.display="block";this.$node.style.left=d+"px"}this._resize()},_resize:function(d,e,c){d=d||0;var b=f.bounds(this.$node.parentNode),a=f.bounds(this.$node);this._vertical?(void 0===c&&(c=a.top-b.top),c+=a.height,this.$mainNode.style.top=c+"px"):(void 0===e&&(e=a.left-b.left),e+=a.width,this.$mainNode.style.left=e+"px");var l=
this;window.setTimeout(function(){l._notifyResizeListeners(l.$mainNode);l._notifyResizeListeners(l.$sideNode)},d)},_notifyResizeListeners:function(d){this.dispatchEvent({type:"resize",node:d})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(d,e){d||this._addAnimation();var c=this._splitTop,b=this._splitLeft;if(this._closed)this._closed=!1,!this._splitLeft&&!this._splitTop&&"number"===typeof this._initialSplit&&(c=b=this._initialSplit);
else if(this._closed=!0,this._closeReversely){var a=f.bounds(this.$node.parentNode),l=f.bounds(this.$node);this._vertical?c=a.height-l.height:b=a.width-l.width}else c=b=0;this._vertical?(this.$sideNode.style.height=c+"px",this.$node.style.top=c+"px"):(this.$sideNode.style.width=b+"px",this.$node.style.left=b+"px");this._resize(this._animationDelay,b,c);d||this._removeAnimation();e||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var m=this;window.setTimeout(function(){m._notifyToggleListeners()},
this._animationDelay)},_removeAnimation:function(){var d=this;window.setTimeout(function(){d.$sideNode.classList.remove(d._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");d.$mainNode.classList.remove(d._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");d.$node.classList.remove(d._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(d){if(d.target===this._thumb)return f.stop(d),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(d))},_mouseMove:function(d){if(this._tracking){var e=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=d.clientY;this._splitTop<e.top+5?this._splitTop=e.top+5:this._splitTop>e.top+e.height-5&&(this._splitTop=e.top+e.height-5);var c=this._splitTop,c=this._splitTop-e.top;this.$node.style.top=c+"px"}else this._splitLeft=d.clientX,this._splitLeft<e.left+5?this._splitLeft=e.left+5:this._splitLeft>e.left+e.width-
5&&(this._splitLeft=e.left+e.width-5),c=this._splitLeft-2*e.left,this.$node.style.left=c+"px";this._adjustToSplitPosition(!0);f.stop(d)}},_mouseUp:function(d){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(d))}};e.prototype.constructor=e;return{Splitter:e}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(g,k,f){function e(d){this.commandRegistry=d.commandRegistry;this.create();this._filterString="";this._providers=[]}e.prototype={addProvider:function(d){this._providers.push(d)},create:function(){var d=this._keyAssistDiv=document.createElement("div");d.id="keyAssist";d.style.display="none";d.classList.add("keyAssistFloat");d.setAttribute("role","menu");var e=this._keyAssistInput=document.createElement("input");
e.classList.add("keyAssistInput");e.type="text";e.placeholder=g["Filter bindings"];d.appendChild(e);var c=this._keyAssistContents=document.createElement("div");c.classList.add("keyAssistContents");if(f.isIOS||f.isAndroid)c.style.overflowY="auto";d.appendChild(c);var b=this._keyAssistTable=document.createElement("table");b.tabIndex=0;b.classList.add("keyAssistList");c.appendChild(b);document.body.appendChild(d);e.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("keydown",
function(a){this._keyDown(a)}.bind(this));e.addEventListener("input",function(a){this.filterChanged()}.bind(this));c.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([d],function(){this.hide()}.bind(this))},createContents:function(){k.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var d=this._idCount=
this._keyAssistContents.scrollTop=0;d<this._providers.length;d++)this._providers[d].showKeyBindings(this);this.createHeader(g.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(d,e,c){if(this._filterString){var b=this._filterString.toLowerCase(),a;b!==this._filterString?(b=this._filterString,a=function(a){return a}):a=function(a){return a.toLowerCase()};if(-1===a(e).indexOf(b)&&-1===a(d).indexOf(b)&&-1===a(this._lastHeader).indexOf(b))return}var l=this._keyAssistTable.insertRow(-1);
l.id="keyAssist-keyBinding-"+this._idCount++;l.setAttribute("role","menuitem");l._execute=c;l.classList.add("keyAssistItem");l.addEventListener("click",function(a){this._selectedRow=l;this.execute();a.preventDefault()}.bind(this));c=l.insertCell(-1);c.classList.add("keyAssistName");c.appendChild(document.createTextNode(e));c=l.insertCell(-1);c.classList.add("keyAssistAccel");c.appendChild(document.createTextNode(d))},createHeader:function(d){this._lastHeader=d;var e=this._keyAssistTable.insertRow(-1);
e.classList.add("keyAssistSection");var e=e.insertCell(-1),c=document.createElement("h2");c.appendChild(document.createTextNode(d));e.appendChild(c)},execute:function(){window.setTimeout(function(){this.hide();var d=this._selectedRow;this._selectedRow=null;d&&d._execute&&d._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var d=this._keyAssistInput.value;this._filterString!==d&&(this._filterString=
d,this.createContents())}.bind(this),100)},hide:function(){if(this.isVisible()){var d=document.activeElement,e=this._keyAssistDiv,d=e===d||0!==(e.compareDocumentPosition(d)&16);e.style.display="none";d&&1!==document.compareDocumentPosition(this._previousActiveElement)&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return"block"===this._keyAssistDiv.style.display},removeProvider:function(d){d=this._providers.indexOf(d);-1!==d&&this._providers.splice(d,
1)},select:function(d){var e=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(0===e.length)this._selectedIndex=-1;else{var c=this._selectedIndex,c=(c+(d?1:-1))%e.length;0>c&&(c=e.length-1);-1!==this._selectedIndex&&(d=e[this._selectedIndex],d.classList.remove("selected"),this._selectedRow=null);this._selectedIndex=c;if(-1!==this._selectedIndex){this._selectedRow=d=e[this._selectedIndex];d.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",d.id);this._keyAssistTable.focus();
var e=d.getBoundingClientRect(),b=this._keyAssistContents,a=b.getBoundingClientRect();d.offsetTop<b.scrollTop?0===c?b.scrollTop=0:d.scrollIntoView(!0):e.bottom>a.bottom&&d.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(d){if(40===d.keyCode)this.select(!0);else if(38===d.keyCode)this.select(!1);else if(13===d.keyCode)this.execute();else return;d.preventDefault()},_scrollWheel:function(d){var e=0,e=f.isIE||f.isOpera?-d.wheelDelta:f.isFirefox?40*d.detail:-d.wheelDeltaY,c=this._keyAssistContents,b=c.scrollTop;c.scrollTop+=e;if(b!==c.scrollTop)return d.preventDefault&&d.preventDefault(),!1}};return{KeyAssistPanel:e}});
define("orion/widgets/themes/ThemePreferences",[],function(){function g(g,f){this._preferences=g;this._themeData=f;var e=f.getThemeStorageInfo();this._themeVersion=e.version;var d=g.listenForChangedSettings(e.storage,2,function(e){e.key===d&&this.apply()}.bind(this))}g.prototype={_initialize:function(g,f,e){var d,h;void 0===this._themeVersion||e.get("version")===this._themeVersion?(d=e.get(g.styleset),(h=e.get("selected"))&&(h=JSON.parse(h))):h=d=null;d||(d=f.getStyles(),e.put(g.styleset,JSON.stringify(d)));
if(!h||void 0===h[g.selectedKey])h=h||{},h[g.selectedKey]=g.defaultTheme,e.put("selected",JSON.stringify(h));e.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(g){var f=this._themeData,e=f.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,f,d);var h=JSON.parse(d.get("selected"));d=JSON.parse(d.get(e.styleset));var c;if(d)for(var b=0;b<d.length;b++)if(d[b].name===h[e.selectedKey]){c=d[b];break}g({style:c,styles:d})}.bind(this))},
setTheme:function(g,f){var e=this._themeData,d=e.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(h){this._initialize(d,e,h);var c=JSON.parse(h.get("selected"));g||(g=c[d.selectedKey]);c[d.selectedKey]=g;h.put("selected",JSON.stringify(c));f?h.put(d.styleset,JSON.stringify(f)):f=JSON.parse(h.get(d.styleset));for(var b=0;b<f.length;b++)if(f[b].name===c[d.selectedKey]){e.processSettings(f[b]);break}h.put("version",this._themeVersion)}.bind(this))},setFontSize:function(g){var f=
this._themeData,e=f.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,f,d);var h=JSON.parse(d.get("selected")),c=JSON.parse(d.get(e.styleset)),b;if(c)for(var a=0;a<c.length;a++)c[a].fontSize=g,c[a].name===h[e.selectedKey]&&(b=c[a]);d.put(e.styleset,JSON.stringify(c));f.processSettings(b)}.bind(this))}};return{ThemePreferences:g}});
define("orion/editor/eventTarget",[],function(){function g(){}g.addMixin=function(k){var f=g.prototype,e;for(e in f)f.hasOwnProperty(e)&&(k[e]=f[e])};g.prototype={addEventListener:function(g,f,e){this._eventTypes||(this._eventTypes={});var d=this._eventTypes[g];d||(d=this._eventTypes[g]={level:0,listeners:[]});d.listeners.push({listener:f,useCapture:e})},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 e=this._eventTypes?this._eventTypes[g]:null;if(e){var d=e.listeners;try{if(e.level++,d)for(var h=0,c=d.length;h<c;h++)if(d[h]){var b=d[h].listener;"function"===typeof b?b.call(this,f):b.handleEvent&&"function"===typeof b.handleEvent&&b.handleEvent(f)}}finally{if(e.level--,e.compact&&0===e.level){for(h=d.length-1;0<=h;h--)d[h]||d.splice(h,1);0===d.length&&delete this._eventTypes[g];e.compact=!1}}}},isListening:function(g){return!this._eventTypes?!1:void 0!==this._eventTypes[g]},removeEventListener:function(g,
f,e){if(this._eventTypes){var d=this._eventTypes[g];if(d){for(var h=d.listeners,c=0,b=h.length;c<b;c++){var a=h[c];if(a&&a.listener===f&&a.useCapture===e){0!==d.level?(h[c]=null,d.compact=!0):h.splice(c,1);break}}0===h.length&&delete this._eventTypes[g]}}}};return{EventTarget:g}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(g,k,f){function e(d){d=d||{};this._document=d.document||document}var d={};e.getTheme=function(f){f=f||"default";var c=d[f];c||(c=d[f]=new e);return c};e.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(d,c){var b=this,a=b._themeClass;b._themeClass=d;this._load(d,c,function(){b.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:b.getThemeClass()})})},onThemeChanged:function(d){return this.dispatchEvent(d)},
buildStyleSheet:function(d,c){function b(b,c,e){c&&(a.push("."+d+" ."+b+" {"),a.push("\t"+(e?"background-color":"color")+": "+c+";"),a.push("}"))}var a=[];a.push("");a.push("."+d+" {");c.fontFamily&&a.push("\tfont-family: "+c.fontFamily+";");c.fontSize&&a.push("\tfont-size: "+c.fontSize+";");c.fontSize&&a.push("\tcolor: "+c.text+";");a.push("}");a.push("."+d+".textview {");c.background&&a.push("\tbackground-color: "+c.background+";");a.push("}");b("ruler.annotations",c.annotationRuler,!0);b("ruler.lines",
c.annotationRuler,!0);b("ruler.folding",c.annotationRuler,!0);b("ruler.overview",c.overviewRuler,!0);b("rulerLines",c.lineNumber,!1);b("rulerLines.even",c.lineNumberEven,!1);b("rulerLines.odd",c.lineNumberOdd,!1);b("annotationLine.currentLine",c.currentLine,!0);b("entity-name-tag",c.keyword,!1);b("entity-other-attribute-name",c.attribute,!1);b("string-quoted",c.string,!1);b("meta.annotation.currentLine",c.currentLine,!0);b("keyword",c.keyword,!1);b("string",c.string,!1);b("comment",c.comment,!1);
b("comment.block.documentation",c.comment,!1);b("keyword.other.documentation.markup",c.comment,!1);return a.join("\n")},_createStyle:function(d,c,b,a){var e=this._document;d="orion-theme-"+d;var m=e.getElementById(d);if(m){if(a||m.firstChild.data===c)return;m.removeChild(m.firstChild);m.appendChild(e.createTextNode(c))}else a?(m=f.createElement(e,"link"),m.rel="stylesheet",m.type="text/css",m.href=c,m.addEventListener("load",function(){b()})):(m=f.createElement(e,"style"),m.appendChild(e.createTextNode(c))),
m.id=d,(e.getElementsByTagName("head")[0]||e.documentElement).appendChild(m);a||b()},_load:function(d,c,b){if(d)if("string"===typeof c)this._createStyle(d,c,b);else if(c=c.href,".css"!==c.substring(c.length-4)&&(c+=".css"),/^\//.test(c)||/[a-zA-Z0-9]+:\/\//i.test(c)||!g.toUrl)this._createStyle(d,c,b,!0);else{var a=this;g(["text!"+c],function(c){a._createStyle(d,c,b,!1)})}else b()}};k.EventTarget.addMixin(e.prototype);return{TextTheme:e}});
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="",e=[],d=new g.ThemeClass("orionPage");
d.style.backgroundColor="#fdfdfd";d.style.width="100%";d.style.height="100%";e.push(d);d=new g.ThemeClass("topRowBanner");d.style.margin="0";d.style.border="0";d.style.backgroundColor=this.navbar;d.style.height="16px";d.style.padding="10px";d.style.paddingLeft="6px";d.style.paddingRight="2px";d.style.borderBottom="none";d.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";d.style.zIndex="100";e.push(d);d=new g.ThemeClass("a");d.style.textDecoration="none";d.style.color=
this.content;e.push(d);d=new g.ThemeClass("navlink");d.style.display="inline-block";d.style.padding="2px";d.style.color=this.content;d.style.verticalAlign="bottom";e.push(d);d=new g.ThemeClass("primaryNav");d.style.color=this.navtext;d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.paddingTop="0";d.style.verticalAlign="baseline";e.push(d);d=new g.ThemeClass("primaryNav a");d.style.fontSize="8pt";d.style.color=this.navtext;d.style.marginRight="6px";d.style.marginLeft="6px";d.style.verticalAlign=
"baseline";d.style.textDecoration="none";e.push(d);d=new g.ThemeClass("primaryNav a:hover");d.style.color="#bfbfbf";d.style.cursor="hand";d.style.color="white";d.style.fontWeight="normal";e.push(d);for(var h in e)f+=e[h].toString();return f};k.prototype.writeLocationStyle=function(){var f="",e=[],d=new g.ThemeClass("titleArea");d.style.margin="0";d.style.paddingTop="5px";d.style.border="0";d.style.background=this.location;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";d.style.borderBottom="1px solid "+this.location;d.style.minHeight="20px";e.push(d);d=new g.ThemeClass("breadcrumb");d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color="#f1f1f2;";d.style.paddingTop="2px";e.push(d);d=new g.ThemeClass("a.breadcrumb:hover");d.style.textDecoration="none";d.style.borderBottom="1px dotted";d.style.color="#F58B0F";d.style.cursor="pointer";e.push(d);d=new g.ThemeClass("breadcrumbSeparator");d.style.fontSize=
"8pt";d.style.textDecoration="none";d.style.color=this.separator;d.style.fontWeight="bold";e.push(d);d=new g.ThemeClass("currentLocation");d.style.fontWeight="bold";d.style.fontSize="8pt";d.style.color=this.breadcrumb;d.style.textDecoration="none";d.style.textWrap="normal";d.style.lineHeight="10pt";e.push(d);d=new g.ThemeClass("a.currentLocation:hover");d.style.fontWeight="bold";d.style.fontSize="10pt";d.style.color="#666666";d.style.textDecoration="none";d.style.borderBottom="0";e.push(d);d=new g.ThemeClass("navlinkonpage");
d.style.color=this.content;d.style.verticalAlign="middle";e.push(d);this.bannerProgress&&(d=new g.ThemeClass("topRowBanner .progressPane_running"),d.style.borderColor=this.bannerProgress,e.push(d));for(var h in e)f+=e[h].toString();return f};k.prototype.writeButtonStyle=function(){var f="",e=[],d=new g.ThemeClass("commandButton");d.style.color="#666";d.style.border="1px solid #dedede";d.style.backgroundColor="#ddd";d.style.textAlign="center";d.style.verticalAlign="middle";d.style.cursor="pointer";
d.style.display="inline-block";d.style.padding="4px 6px";d.style.borderRadius="3px";d.style.lineHeight="12px";d.style.fontSize="9pt";d.style.userSelect="none";e.push(d);d=new g.ThemeClass("commandButton:over");d.style.backgroundColor="#e6e6e6";d.style.border="1px solid #808080";e.push(d);d=new g.ThemeClass("commandMenu");d.style.color="#222";d.style.display="inline-block";d.style.verticalAlign="baseline";d.style.margin="0";d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.border="1px solid #dedede";
d.style.backgroundColor="#efefef";d.style.cursor="pointer";d.style.borderRadius="1px";e.push(d);d=new g.ThemeClass("commandMenuItem");d.style.border="0";d.style.padding="0";d.style.margin="0";e.push(d);for(var h in e)f+=e[h].toString();return f};k.prototype.writeMainStyle=function(){var f="",e=[],d=new g.ThemeClass("searchbox");d.style.backgroundImage="url(../images/core_sprites.png)";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="4px -297px";d.style.width="12px";d.style.height=
"12px";d.style.backgroundColor=this.search;d.style.border="1px solid "+this.search;d.style.fontSize="11px";d.style.width="15em";d.style.height="16px";d.style.borderRadius="10px";d.style.color="#999";d.style.padding="0";d.style.paddingLeft="20px";d.style.marginLeft="5px";d.style.marginTop="6px !important";d.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";e.push(d);d=new g.ThemeClass("searchbox:focus");d.style.color="white";d.style.outline=
"none";e.push(d);d=new g.ThemeClass("checkedRow");d.style.cssText="background-color:"+this.selection+" !important;";e.push(d);d=new g.ThemeClass("navbar-item-selected");d.style.background=this.selection;d.style.color=this.content;e.push(d);d=new g.ThemeClass("auxpane");d.style.border="0";d.style.background=this.sidepanel;e.push(d);d=new g.ThemeClass("mainpane");d.style.background=this.mainpanel;d.style.border=0;e.push(d);d=new g.ThemeClass("mainToolbar");d.style.background=this.toolpanel;e.push(d);
for(var h in e)f+=e[h].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 e(){}function d(){this.styles=[];var c=new e;c.name="Orion";c.navbar="white";c.button="#EFEFEF";c.location="#efefef";c.selection="FEC";c.sidepanel="#FBFBFB";c.mainpanel="white";c.toolpanel="white";c.navtext="#bfbfbf";c.content="#3087B3";c.search="#444";c.breadcrumb="#3087B3";c.separator="#333";c.bannerProgress="whitesmoke";
this.styles.push(c);c=new e;c.name="Orion2014";c.navbar="white";c.button="#EFEFEF";c.location="#EFEFEF";c.selection="FEC";c.sidepanel="#EEEEEE";c.mainpanel="#EEEEEE";c.toolpanel="#EEEEEE";c.navtext="#BFBFBF";c.content="#333333";c.search="#444444";c.breadcrumb="#333333";c.separator="#333333";c.bannerProgress="orange";this.styles.push(c);c=new e;c.name="Green Zone";c.navbar="seagreen";c.button="lavender";c.location="darkseagreen";c.selection="moccasin";c.sidepanel="aliceblue";c.mainpanel="white";c.toolpanel=
"white";c.navtext="#FBFBFB";c.content="darkgreen";c.search="darkgreen";c.breadcrumb="#3087B3";c.separator="seagreen";c.bannerProgress="#F2F2F2";this.styles.push(c);c=new e;c.name="Pretty In Pink";c.navbar="plum";c.button="lavender";c.location="pink";c.selection="lavender";c.sidepanel="seashell";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="mediumorchid";c.search="violet";c.breadcrumb="#3087B3";c.separator="plum";c.bannerProgress="#F2F2F2";this.styles.push(c);c=new e;c.name=
"Blue Monday";c.navbar="cornflowerblue";c.button="lavender";c.location="skyblue";c.selection="lavender";c.sidepanel="aliceblue";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="royalblue";c.search="royalblue";c.breadcrumb="#3087B3";c.separator="cornflowerblue";c.bannerProgress="#F2F2F2";this.styles.push(c);c=new e;c.name="Vanilla Skies";c.navbar="sandybrown";c.button="lemmonchiffon";c.location="cornsilk";c.selection="lemonchiffon";c.sidepanel="white";c.mainpanel="white";c.toolpanel=
"white";c.navtext="lemonchiffon";c.content="chocolate";c.search="moccasin";c.breadcrumb="#3087B3";c.separator="sandybrown";c.bannerProgress="#F2F2F2";this.styles.push(c);c=new e;c.name="Beetlejuice";c.navbar="indigo";c.button="slateblue";c.location="darkslateblue";c.selection="silver";c.sidepanel="lavender";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="mediumslateblue";c.search="#444";c.breadcrumb="#3087B3";c.separator="indigo";c.bannerProgress="#F2F2F2";this.styles.push(c);
c=new e;c.name="Red";c.navbar="#CD2127";c.button="#777777";c.location="#D85F56";c.selection="lightcoral";c.sidepanel="#EFDAB2";c.mainpanel="#FDFADD";c.toolpanel="#FDFADD";c.navtext="#FBFBFB";c.content="darkred";c.search="#D85F56";c.breadcrumb="darkred";c.separator="#CD2127";c.bannerProgress="#F2F2F2";this.styles.push(c)}function h(){return this.styles}e.prototype.name="Orion";e.prototype.navbar="#404648";e.prototype.button="#EFEFEF";e.prototype.location="#333";e.prototype.breadcrumb="#3087B3";e.prototype.separator=
"#333";e.prototype.selection="FEC";e.prototype.sidepanel="#FBFBFB";e.prototype.mainpanel="white";e.prototype.toolpanel="white";e.prototype.navtext="#bfbfbf";e.prototype.content="#3087B3";e.prototype.search="#444";e.prototype.bannerProgress="white";d.prototype.styles=[];d.prototype.getStyles=h;d.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};d.prototype.getViewData=function(){var c={top:10,left:10,
width:350,height:350};c.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 b=0;3>b;b++)c.shapes.push({type:"TEXT",name:g.Content,label:"org.eclipse.orion.content",x:170,y:127+20*b,fill:"#3087B3",family:"content"});for(b=0;3>b;b++)c.shapes.push({type:"TEXT",name:g.Content,label:"Item",x:25,y:115+20*b,fill:"#3087B3",family:"content"});for(b=0;3>b;b++)c.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+20*b,x2:165,y2:124+20*b,x3:160,y3:127+20*b,family:"navbar",fill:"#333"});c.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return c};d.prototype.processSettings=function(c){var b=new f.ThemeSheetWriter;(new k.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",b.getSheet(c))};return{ThemeData:d,getStyles:h}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});return f});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(g){function k(f,e,d){this.elements=d;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===e?(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 e=document.createElement("span");e.className="UAContainer-icon";e.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";e.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;
document.getElementById(f.label+"LabelNode").className="UALabel-live";e.className="UAContainer-icon-live"};e.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";e.className="UAContainer-icon"};var d=this;e.onclick=function(){d.showMedia(f)};this.elementNode.appendChild(e)};k.prototype.clearElements=function(){this.elementNode.innerHTML=""};k.prototype.showMedia=function(f){this.clearElements();this.addElement(f);
var e=document.createElement("span");e.className="UAContainer-media";e.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(e);setTimeout(function(){e.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 e;e=f?f.label+"switch":"indexSwitch";var d=document.createElement("span");d.className="workingSpan";d.innerHTML='\x3cdiv class\x3d"circle" id \x3d"'+e+'"\x3e\x3c/div\x3e';var g=this;d.onclick=f?function(){g.showMedia(f)}:function(){g.initialize();g.chosenSwitch.firstChild.className="circle";g.chosenSwitch=d;g.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(d);return this.radioButtons[this.radioButtons.length]=d};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,e){function d(){}var h=null;d.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 c=
document.body;this.$frameParent=c;this.$$modalExclusions=this.$$modalExclusions||[];var b=document.createRange();b.selectNode(c);b=b.createContextualFragment(this.CONTAINERTEMPLATE);c.appendChild(b);this.$frame=c.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);b=document.createRange();b.selectNode(this.$parent);
c=b.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(c,this.messages);this.$parent.appendChild(c);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 c=this;this.buttons.forEach(function(b){var a=e.createButton(b.text,b.callback);b.id&&(a.id=b.id,c["$"+a.id]=a);b.isDefault&&(c._defaultCallback=b.callback,c._defaultButton=a);c.$buttonContainer.appendChild(a)})}},_makeModal:function(c){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var c=!f.contains(b.$frame,a.target);if(c)for(var d=0;d<
b.$$modalExclusions.length;d++)if(f.contains(b.$$modalExclusions[d],a.target)){c=!1;break}c&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$parent).focus()},0),f.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);c=this.$frameParent.childNodes;var a=!1;this._addedBackdrop=[];for(var d=0;d<c.length;d++){for(var e=0;e<this.$$modalExclusions.length;e++)if(f.contains(this.$$modalExclusions[e],c[d])){a=
!0;break}!a&&c[d]!==b.$frame&&c[d].classList&&!c[d].classList.contains("tooltipContainer")&&(e=c[d],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(c=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var c=b._getFirstFocusField();c&&c!==a.target&&c.focus();f.stop(a)}},!1)},_addChildDialog:function(c){this.$$modalExclusions.push(c.$frame||c.$parent)},_inModalExclusion:function(c){return this.$$modalExclusions.some(function(b){return c.$frame===
b||c.$parent===b})},_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var a=c.childNodes[b];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(c){!c&&h===this&&(h=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 b=this;this.keepAlive||window.setTimeout(function(){b.destroy()},0)},show:function(c){if(this.modal)if(h){if(!h._inModalExclusion(this)){this.hide(!0);return}}else h=this;"function"===typeof this._beforeShowing&&this._beforeShowing();f.setFramesEnabled(!1);var b=f.bounds(this.$frame),a=f.bounds(document.documentElement),d;c?(d=f.bounds(c),c=d.top+d.height+4,d=d.left+4,c+b.height>a.height&&(c=Math.max(0,a.height-b.height-4)),d+b.width>a.width&&(d=Math.max(0,
a.width-b.width-4))):(d=Math.max(0,(a.width-b.width)/2),c=Math.max(0,(a.height-b.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=c+"px";this.$frame.style.left=d+"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&&(h===this&&(h=null),f.setFramesEnabled(!0),this._addedBackdrop&&0<this._addedBackdrop.length&&this._addedBackdrop.forEach(function(c){c.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)}};d.prototype.constructor=d;return{Dialog:d}});
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,e,d,h,c){function b(a){this._displaySignOut=!0;this._init(a)}b.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,c;for(c in a)a.hasOwnProperty(c)&&b++;
return b},_makeMenuItem:function(a,b){var d=c.createMenuItem(a).firstElementChild;"string"===typeof this._dropDownItemClass&&""!==this._dropDownItemClass&&d.classList.add(this._dropDownItemClass);d.addEventListener("click",b,!1);d.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&b()},!1);return d},_renderAuthenticatedService:function(a,b){var c=this,d=this.authenticatedServices[a].authService;if(d&&d.logout&&this._displaySignOut){var e=this._makeMenuItem(g["Sign Out"],
function(){d.logout().then(function(){c.addUserItem(a,d,c.authenticatedServices[a].label);localStorage.removeItem(a);localStorage.removeItem("lastLogin");for(var b=localStorage.length-1;0<=b;b--){var e=localStorage.key(b);e&&0===e.indexOf("/orion/preferences/user")&&localStorage.removeItem(e)}d.getAuthForm(window.location.href).then(function(a){window.location=a})})});this._dropdownNode.appendChild(e.parentNode)}},renderServices:function(){function a(a){d[a]||(d[a]=b.createDocumentFragment());return d[a]}
var b=document,d=[],n=this._serviceRegistry;e.getPageLinksInfo(n,"orion.page.link.user").then(function(e){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);e.getAllLinks().forEach(function(c){var d,e;if(c.category&&(e=/user\.(\d+)/.exec(c.category)))d=parseInt(e[1],10);if("number"!==typeof d||isNaN(d))d=1;d=a(d);e=b.createElement("li");var m=b.createElement("a");m.role="menuitem";"string"===typeof this._dropDownItemClass?""!==this._dropDownItemClass&&m.classList.add(this._dropDownItemClass):
m.classList.add("dropdownMenuItem");m.href=c.href;m.textContent=c.textContent;e.appendChild(m);d.appendChild(e);m.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&m.click()},!1)}.bind(this));this.keyAssistFunction&&(e=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction),"string"===typeof this._keyAssistClass?""!==this._keyAssistClass&&e.classList.add(this._keyAssistClass):e.classList.add("key-assist-menuitem"),e=e.parentNode,a(0).appendChild(e));
if(e=n.getServiceReferences("orion.page.getstarted")[0])e=e.getProperty("data"),e=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,e)).parentNode,a(0).appendChild(e);var h=this;d.sort(function(a,b){return a-b}).forEach(function(a,b){if(b<d.length-1&&!this._noSeparator){var e=c.createSeparator();a.appendChild(e)}h._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var k in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(k)&&this._renderAuthenticatedService(k,
0)}.bind(this))},getStartedDialog:function(a){new d(null,!0,a)},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(a,b,c,d){d?(this.unauthenticatedServices[a]&&delete this.unauthenticatedServices[a],this.authenticatedServices[a]={authService:b,label:c,data:d}):(this.authenticatedServices[a]&&delete this.authenticatedServices[a],this.unauthenticatedServices[a]=this.unauthenticatedServices[a]?{authService:b,label:c,pending:this.unauthenticatedServices[a].pending}:
{authService:b,label:c});this.renderServices()}};b.prototype.constructor=b;return{UserMenu:b}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});return f});
define("orion/searchUtils","i18n!orion/nls/messages require orion/regex orion/commandRegistry orion/PageUtil orion/URITemplate".split(" "),function(g,k,f,e,d,h){function c(a,b,c){var d="";c&&(d="^");if(d=f.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,-1===d.indexOf("i")&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var b={ALL_FILE_TYPE:"*.*",doSearch:function(a,c,d,e){if(a){var f=!0;"*"===d&&(d="");""===d&&(f=e&&e.type!==b.ALL_FILE_TYPE);f&&(""!==d&&b.addRecentSearch(c,
d,e?e.regEx:!1),a=a.createSearchParams(d,!1,!1,e),a=b.generateSearchHref(a),window.location=a)}else window.alert(g["Can't search: no search service is available"])},generateSearchHelper:function(a,d){var e=a.keyword,f=e,g={};a.fileType&&a.fileType!==b.ALL_FILE_TYPE&&""===e&&(f="*."+a.fileType);if(a.regEx)g.searchStr=e,c(g,a,d);else{var h=-1<e.indexOf("*"),k=-1<e.indexOf("?");h&&(e=e.split("*").join(".*"));k&&(e=e.split("?").join("."));!h&&!k&&!a.nameSearch?(g.searchStr=a.caseSensitive?e.split("\\").join(""):
e.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?e:e.toLowerCase(),c(g,a,d),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 c={},d;for(d in a)if(void 0!==a[d]&&null!==a[d]&&(b||"replace"!==d))c[d]=a[d];return c},generateSearchHref:function(a){var c=k.toUrl("search/search.html");a=b.copySearchParams(a,!0);var d=a.resource;a.resource=void 0;return"undefined"!==typeof a.keyword?(new h(c+"#{,resource,params*}")).expand({resource:d,params:a}):(new h(c+"#{,resource}")).expand({resource:d})},generateFindURLBinding:function(a,
b,c,d,e){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:"string"===typeof d?d:void 0,atLine:"number"===typeof c?c:void 0};return e?a:","+(new h("{,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,c){return a.replace(RegExp(b.pattern,b.flags),c)},replaceStringLiteral:function(a,c,d){c=f.parse("/"+c+"/gim");return b.replaceRegEx(a,c,d)},searchOnelineLiteral:function(a,b,c){var d;d=0;for(var e=!1,f=[];!(d=b.indexOf(a.searchStr,d),0>d);){f.push({startIndex:d,length:a.searchStrLength});e=!0;if(c)break;d+=a.searchStrLength}return e?f:null},findRegExp:function(a,b,c,d){if(!b)return null;c=c||"";c+=(-1===c.indexOf("g")?"g":"")+(-1===c.indexOf("m")?"m":"");var e=null;return(e=RegExp(b,c).exec(a.substring(d)))&&
{startIndex:e.index+d,length:e[0].length}},searchOnelineRegEx:function(a,c,d){for(var e=0,f=!1,g=[];;)if(e=b.findRegExp(c,a.regExp.pattern,a.regExp.flags,e)){g.push(e);f=!0;if(d)break;e=e.startIndex+e.length}else break;return f?g:null},generateNewContents:function(a,c,d,e,f,g){if(e&&c){a||(d.contents=[]);for(var h=0;h<c.length;h++){for(var k=c[h],w=!1,r=!1,v=[],x,B=0,D=0;D<e.children.length;D++)if(e.children[D].lineNumber-1===h){B=D;for(w=0;w<e.children[D].matches.length;w++)!1!==e.children[D+w].checked&&
v.push(w);r=0<v.length;x=e.children[D].matches;w=!0;break}if(w){if(r){v=b.replaceCheckedMatches(k,f,x,v,g);k=v.replacedStr;for(w=0;w<e.children[B].matches.length;w++)e.children[B+w].newMatches=v.newMatches}else for(w=0;w<e.children[B].matches.length;w++)e.children[B+w].newMatches=e.children[B+w].matches;a?d.contents[h]=k:d.contents.push(k)}else a||d.contents.push(k)}}},generateMatchContext:function(a,b,c){var d=[],e=2*a+1,f;b.length<=e?(f=0,a=b.length-1):(f=c-a,0>f?(f=0,a=f+e-1):(a=c+a,a>b.length-
1&&(a=b.length-1,f=a-e+1)));for(e=f;e<=a;e++)d.push({context:b[e],current:e===c});return d},splitFile:function(a){for(var b=0,c=0,d=0,e=0,f=[];;){-1!==b&&b<=d&&(b=a.indexOf("\r",d));-1!==c&&c<=d&&(c=a.indexOf("\n",d));if(-1===c&&-1===b){f.push(a.substring(e));break}var g=1;-1!==b&&-1!==c?b+1===c?(g=2,d=c+1):d=(b<c?b:c)+1:d=-1!==b?b+1:c+1;f.push(a.substring(e,d-g));e=d}return f},searchWithinFile:function(a,c,d,e,f,g){d=b.splitFile(d);f&&(c.contents=d);if(c){c.children=[];for(var h=e=0;h<d.length;h++){var k=
d[h];if(k&&0<k.length){var w=g?k:k.toLowerCase();if(w=a.wildCard?b.searchOnelineRegEx(a,w):b.searchOnelineLiteral(a,w)){var r,v=h+1;if(f)for(var x=0;x<w.length;x++)r=x+1,r={parent:c,checked:c.checked,type:"detail",matches:w,lineNumber:v,matchNumber:r,name:k,location:c.location+"-"+v+"-"+r},c.children.push(r);else r={parent:c,context:b.generateMatchContext(2,d,h),checked:c.checked,type:"detail",matches:w,lineNumber:v,name:k,location:c.location+"-"+v},c.children.push(r);e+=w.length}}}c.totalMatches=
e}},replaceCheckedMatches:function(a,b,c,d,e){for(var f=0,g="",h=[],k=0;k<c.length;k++){f!==c[k].startIndex&&(g+=a.substring(f,c[k].startIndex));c[k].length&&(e=c[k].length);for(var f=!1,r=0;r<d.length;r++)if(d[r]===k){f=!0;break}f?(h.push({startIndex:g.length,length:b.length}),g+=b):(h.push({startIndex:g.length,length:e}),g+=a.substring(c[k].startIndex,c[k].startIndex+e));f=c[k].startIndex+e}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:h}},fullPathNameByMeta:function(a){var b=
a.length,c="";if(0<b)for(b-=1;-1<b;b--)c=c+(""===c?"":"/")+a[b].Name;return c},path2FolderName:function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))},_storeRecentSearch:function(a,b,c,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);c&&window.setTimeout(function(){c.dispatchEvent({type:"inputDataListChanged",deleting:d})}.bind(this),20)})},addRecentSearch:function(a,c,d){"string"===typeof c&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f;
e=e.get("recentSearch");"string"===typeof e&&(e=JSON.parse(e));if(e){for(f in e)if(e[f].name===c)return;20<=e.length&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:c,regEx:d});b._storeRecentSearch(a,e)})},removeRecentSearch:function(a,c,d){"string"===typeof c&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f;e=e.get("recentSearch");"string"===typeof e&&(e=JSON.parse(e));if(e)for(f in e)if(e[f].name===c){e.splice(f,1);b._storeRecentSearch(a,
e,d,!0);break}})},getSearches:function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);"string"===typeof a&&(a=JSON.parse(a));a&&c&&c(a)})},getMixedSearches:function(a,c,d,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");"string"===typeof f&&(f=JSON.parse(f));c&&(a=a.get("search"),"string"===typeof a&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var c=b.parseQueryStr(a.query);
f.some(function(a){return c.searchStrTitle===a.name})||f.push({name:c.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&e&&e(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 b});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages require orion/i18nUtil orion/searchUtils orion/contentTypes orion/Deferred".split(" "),function(g,k,f,e,d,h){function c(b,a,c,d){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=d&&d.searchOnName;this._buildSkeletonOnly=d&&d.buildSkeletonOnly;this._fetchChildrenCallBack=d&&d.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:e.generateSearchHelper(c);this._location=d&&d.location;this._childrenLocation=d&&d.childrenLocation?d.childrenLocation:this._location;this._reportOnCancel=d&&d.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))}c.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))};c.prototype.searchName=function(b,a){b&&(this._searchParams=
b,this.searchHelper=e.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 d=0;d<this.fileSkeleton.length;d++){var f=this.fileSkeleton[d].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(c.push(this.fileSkeleton[d]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,
docs:c}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};c.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()})})};c.prototype._sort=function(b){b.sort(function(a,
b){var c,d;if("Path asc"===this._searchParams.sort){c=a.Location&&a.Location.toLowerCase();c=e.path2FolderName(c,a.Name&&a.Name.toLowerCase(),!0);d=b.Location&&b.Location.toLowerCase();d=e.path2FolderName(d,b.Name&&b.Name.toLowerCase(),!0);if(c<d)return-1;if(c>d)return 1}return this._sortOnNameSingle(a,b)}.bind(this))};c.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"}))};c.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}})};c.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};c.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===e.ALL_FILE_TYPE?!0:0<=b.extension.indexOf(this.searchHelper.params.fileType):
!0};c.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);return(c._progressService?this._progressService.progress(c.fileClient.fetchChildren(b),"Crawling search for children of "+b):c.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(c._searchOnName)a.push(c._buildSingleSkeleton(b[e]));else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[e]));else{if(!c._cancelled){var f=
d.getFilenameContentType(b[e].Name,c.contentTypesCache);if(f&&("text/plain"===f["extends"]||"text/plain"===f.id)&&c._onFileType(f))f=c._sniffSearch(b[e]),a.push(f),c._deferredArray.push(f)}}else if(b[e].Location)if(c._cancelled)break;else f=c._visitRecursively(b[e].ChildrenLocation),a.push(f),c._deferredArray.push(f);return h.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,
b,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};c.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))};c.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(b){b.cancel()})};c.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)})};c.prototype._buildSingleSkeleton=function(b){this._totalCounter++;this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&0===this._totalCounter%100&&this.searchName();b=new h;b.resolve(this._totalCounter);return b};c.prototype.constructor=c;return{SearchCrawler:c}});
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,e,d,h,c){function b(a){this._init(a)}b.prototype=new c.Dialog;b.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"'+
e.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';b.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()};b.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===d.KEY.ENTER){var c=d.$("a",b.$results);c&&(d.stop(a),(h.isMac?a.metaKey:a.ctrlKey)?window.open(c.href):(window.location.href=c.href,b.hide()))}},!1);a.addEventListener("keydown",function(a){var c,e,f;if(a.keyCode===d.KEY.DOWN||a.keyCode===d.KEY.UP)c=d.$$array("a",b.$results),e=document.activeElement,f=c.indexOf(e),a.keyCode===d.KEY.DOWN?0<=f?(e.classList.remove("treeIterationCursor"),
c=f<c.length-1?c[f+1]:c[0],c.focus(),c.classList.add("treeIterationCursor")):0<c.length&&(c=c[0],c.focus(),c.classList.add("treeIterationCursor")):0<=f?(e.classList.remove("treeIterationCursor"),e=b.$fileName,c=0<f?c[f-1]:e,c.focus(),0<f&&c.classList.add("treeIterationCursor")):0<c.length&&(c[c.length-1].focus(),c[c.length-1].classList.add("treeIterationCursor")),d.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())};b.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)};b.prototype._detectFolderKeyword=function(a){var b,c=a,d=null;if(this._nameSearch&&(b=/(\S+)\s*(.*)/,(a=b.exec(a))&&3===a.length))a[1]&&
(c=a[1]),a[2]&&(d=a[2]);return{keyword:c,folderKeyword:d}};b.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._detectFolderKeyword(a),c=this._searcher.createSearchParams(b.keyword,this._nameSearch,this._searchOnRoot),e=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=e;var f=document.createElement("div");f.appendChild(document.createTextNode(this._nameSearch?g["Searching..."]:h.formatMessage(g["Searching for occurrences of"],
a)));d.empty(this.$results);this.$results.appendChild(f);this._searcher.search(c,b.folderKeyword,function(){e===this.currentSearch&&e.apply(null,arguments)}.bind(this))}};b.prototype.decorateResult=function(a){function b(a){0===a.button&&!a.ctrlKey&&!a.metaKey&&c.hide()}var c=this;a=d.$$array("a",a);for(var e=0;e<a.length;e++)a[e].addEventListener("click",b,!1)};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype._afterHiding=function(){this._onHide&&this._onHide()};b.prototype.constructor=
b;return{OpenResourceDialog:b}});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(e,d,f){if(e=k.node(e))this._parent=e;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;e=document.createElement("div");e.classList.add("dropdownMenu");e.classList.add("dropdownMenuOpen");e.id=this.navDropDownId;e.style.display="none";this._parent.appendChild(e);this._dropdownMenu=
e;if(d=k.node(d))this._triggerNode=d;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(c){c.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(e){this._dropdownMenu.innerHTML=e},getContentNode:function(){return this._dropdownMenu},updateContent:function(e,d){d()},_positionDropdown:function(){this._dropdownMenu.style.right="";var e=k.bounds(this._dropdownMenu),d=k.bounds(document.body);e.left+e.width>d.left+d.width&&(e=k.bounds(this._boundingNode(this._triggerNode)),d=k.bounds(this._triggerNode),this._dropdownMenu.style.right=e.width-(d.left-e.left+d.width)+"px")},_boundingNode:function(e){var d=window.getComputedStyle(e,
null);return null===d||"absolute"===d.getPropertyValue("position")||!e.parentNode||e===document.body?e:this._boundingNode(e.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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,k,f){function e(c,b,a){if(!c[b])throw b+g[" is not supported in this file system"];return c[b].apply(c,a)}function d(c,b,a,f){if(!c.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("/"!==b[b.length-1])return e(c,"readBlob",[b]).then(function(b){return e(a,"writeBlob",[f,b])});var m=f.substring(0,
f.length-1),n=decodeURIComponent(m.substring(m.lastIndexOf("/")+1)),m=m.substring(0,m.lastIndexOf("/")+1);return e(a,"createFolder",[m,n]).then(function(){},function(){}).then(function(){return e(c,"fetchChildren",[b]).then(function(b){for(var e=[],g=0;g<b.length;++g){var m=b[g].Location,n=m;b[g].Directory&&(n=m.substring(0,m.length-1));n=decodeURIComponent(n.substring(n.lastIndexOf("/")+1));n=f+encodeURIComponent(n);b[g].Directory&&(n+="/");e[g]=d(c,m,a,n)}return k.all(e)})})}function h(c,b){function a(a){var b=
new k;b.reject(g["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),e=d;if(b)for(var e=[],n=0;n<d.length;++n)b(d[n])&&e.push(d[n]);for(var h=[],s=[],t=[],q=[],w={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},d=0;d<e.length;++d)q[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[d].getProperty("top"),ChildrenLocation:e[d].getProperty("top"),Name:e[d].getProperty("Name")},n=e[d].getProperty("pattern")||e[d].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"^"!==n[0]&&(n=
"^"+n),h[d]=RegExp(n),s[d]=c.getService(e[d]),t[d]=e[d].getProperty("Name"),e[d].getProperty("NameKey")&&e[d].getProperty("nls")&&f.getMessageBundle(e[d].getProperty("nls")).then(function(a,b){q[a].Name=b[e[a].getProperty("NameKey")];t[a]=b[e[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if("/"===a)return-1;if(!a||a.length&&0===a.length)return s[0]?0:-1;for(var b=0;b<h.length;++b)if(h[b].test(a))return b;throw g["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return-1===a?w:s[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return-1===a?w.Name:t[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return-1===a?w.Location:q[a].Location}}h.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return e(this._getService(c),"fetchChildren",
arguments)},createWorkspace:function(c){return e(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return e(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return e(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,d){return e(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return e(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return e(this._getService(c),"createFile",
arguments)},deleteFile:function(c){return e(this._getService(c),"deleteFile",arguments)},moveFile:function(c,b,a){var f=this._getService(c),g=this._getService(b);if(f===g)return e(f,"moveFile",arguments);var n="/"===c[c.length-1],h=b;"/"!==h[h.length-1]&&(h+="/");if(a)h+=encodeURIComponent(a);else{var k=c;n&&(k=k.substring(0,k.length-1));h+=k.substring(k.lastIndexOf("/")+1)}n&&"/"!==h[h.length-1]&&(h+="/");return d(f,c,g,h).then(function(){return e(f,"deleteFile",[c])})},copyFile:function(c,b,a){var f=
this._getService(c),g=this._getService(b);if(f===g)return e(f,"copyFile",arguments);var n="/"===c[c.length-1],h=b;"/"!==h[h.length-1]&&(h+="/");if(a)h+=encodeURIComponent(a);else{var k=c;n&&(k=k.substring(0,k.length-1));h+=k.substring(k.lastIndexOf("/")+1)}n&&"/"!==h[h.length-1]&&(h+="/");return d(f,c,g,h)},read:function(c,b){return e(this._getService(c),"read",arguments)},readBlob:function(c){return e(this._getService(c),"readBlob",arguments)},write:function(c,b,a){return e(this._getService(c),"write",
arguments)},remoteImport:function(c,b){return e(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return e(this._getService(c),"remoteExport",arguments)},search:function(c){return e(this._getService(c.resource),"search",arguments)}};h.prototype.constructor=h;return{FileClient:h}});
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,e,d,h,c,b){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 l(a){return!a.isRelatedLink}function m(a,b){var c=a.order,d=b.order;return c<d?-1:d<c?1:0}function n(a,b){var c=a.source.order,d=b.source.order,c="number"===typeof c?c:100,d="number"===typeof d?d:100;return c===d?a.textContent.localeCompare(b.textContent):
c<d?-1:1}var p=b.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,c){var d=this.anchor;a=this.createListItem(a,b);c&&a.classList.add("sideMenuItemActive");d.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 c=document.createElement("li");c.className=a;c.classList.add("sideMenuItem");c.categoryId=b;return c},setCategories:function(a){this.categories=a;this.links=Object.create(null)},setPageLinks:function(a){this.pageLinks=a;var b=this,c=a.createLinkElements();a.getAllLinks().forEach(function(a,d){var e=c[d];e.source=a;b._getLinksBin(a.category).push(e)});this._renderLinks()},setRelatedLinks:function(a,
b){this.relatedLinks=a;var c=this;Object.keys(this.links).forEach(function(a){var b=c._getLinksBin(a);c.links[a]=b.filter(l)});var d=document.createDocumentFragment();a.forEach(function(a){var b=a.relatedLink,e=c._getLinksBin(b.category);a=g.createCommandMenuItem(d,a.command,a.invocation);a.classList.remove("dropdownMenuItem");a.isRelatedLink=!0;a.source=b;e.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,c=new URL(window.location.href),f=d.matchResourceParameters();f.OrionHome=e.getOrionHome();var l=!1;this.clearMenuItems();a.getCategoryIDs().map(function(b){return a.getCategory(b)}).sort(m).forEach(function(a){var d=b._getLinksBin(a.id);d.length&&(l?b.addMenuItem(a.imageClass,a.id,!1):(d=d.some(function(a){if(!a.source.uriTemplate)return!1;a=new h(a.source.uriTemplate);a=new URL(a.expand(f),
window.location);return a.protocol===c.protocol&&a.host===c.host&&a.hostname===c.hostname&&a.port===c.port&&a.pathname===c.pathname&&a.search===c.search?l=!0:!1}),b.addMenuItem(a.imageClass,a.id,d)))})},_renderLinks:function(a){a=a||[];this._sort();this._renderCategories();var b=this,c=window.location.href;Object.keys(this.menuitems).forEach(function(d){var e=b.getMenuItem(d);if(e){for(var f=b._getLinksBin(d).slice(),f=f.filter(function(b){var d=b.source;return 0<=a.indexOf(d.id)||!d.default&&!d.force&&
b.href===c?!1:!0}),f=f.filter(function(a){a=a.source;return!(1<f.length&&a.default&&!a.force)}),l=f.length-1;0<l;l--)f[l].href===f[l-1].href&&f.splice(l,1);if(f.length){e.appendChild(b._createCategoryElement(d,e,f[0]));var g=document.createElement("ul");g.className="sideMenuSubMenu";f.forEach(function(a){var b=document.createElement("li");b.className="sideMenuSubMenuItem";var c=document.createElement("a");c.href=a;c.className="sideMenuSubMenuItemLink";var d=document.createElement("span");d.innerHTML=
a.innerHTML;d.className="sideMenuSubMenuItemSpan";c.appendChild(d);b.appendChild(c);g.appendChild(b)});e.appendChild(g)}}})},_createCategoryElement:function(a,b,c){a=this.categories.getCategory(a);var d;p?(d=document.createElement("button"),d.type="button"):(d=document.createElement("a"),d.href=c.href);d.className+=a.imageClass;d.classList.add("submenu-trigger");d.tabIndex="0";b.classList.remove(a.imageClass);return d},_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,e,d,h,c,b,a,l,m,n,p,s,t,q,w,r,v,x,B,D,y,G,E,J,H,u,A,F,z,I,L,C,Q){function K(a,b){if(a.getLabel)return a.getLabel();var c=new y;c.resolve(b.properties.name);return c}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 c=a.getServiceReferences("orion.core.auth");ba=[];var d=O.createMenuGenerator.apply(this,arguments);if(d)for(var e=0;e<
c.length;e++){var f=c[e],l=a.getService(f);K(l,f).then(function(a){l.getKey().then(function(b){ba.push(b);l.getUser().then(function(c){d.addUserItem(b,l,a,c)},function(c,e){d.addUserItem(b,l,a,e)});window.addEventListener("storage",function(c){aa[b]!==localStorage.getItem(b)&&(aa[b]=localStorage.getItem(b),l.getUser().then(function(c){d.addUserItem(b,l,a,c)},function(c){d.addUserItem(b,l,a)}))},!1)})})}}function P(a){return a}function R(b,d,e,f,l){function g(){if(B)return B;var a=b.getService("orion.core.contentTypeRegistry");
a||(a=new w.ContentTypeRegistry(b),a=b.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return B=a})}function m(a){for(var b={},c=a.getPropertyKeys(),d,e=0;e<c.length;e++)d=c[e],b[d]=a.getProperty(d);return b}function n(a,b){var c=null;a.some(function(a){return b===a.getProperty("id")?!!(c=a):!1});return c}function h(a){var b=a.command;return!b.visibleWhen||b.visibleWhen(d)?(a.invocation=new c.CommandInvocation(d,d,null,b,f),(new y).resolve(a)):"function"===
typeof l?(s||(s=l()),y.when(s,function(e){if(e&&d===ca&&(!b.visibleWhen||b.visibleWhen(e)))return a.invocation=new c.CommandInvocation(e,e,null,b,f),a})):(new y).resolve()}function k(a,b,d){return d?(new y).resolve({relatedLink:a,command:d}):b.then(function(b){return{relatedLink:a,command:new c.Command(b)}})}var p=arguments,B,s,t=b&&b.getServiceReferences("orion.page.link.related");if(t&&0!==t.length){var v=this;y.when(g(),function(){if(O.beforeGenerateRelatedLinks.apply(v,p)){var c=b.getServiceReferences("orion.navigate.command"),
d=[];t.forEach(function(e){var l=m(e);if(l.id){var g;if((l.nls&&l.nameKey||l.name)&&l.uriTemplate)g=a._createCommandOptions(l,e,b,B,!0),d.push(k(l,g,null));else if(g=n(c,l.id)){var h=m(g);e={};Q.mixin(e,h,l);(l=f.findCommand(l.id))?d.push(k(e,null,l)):(g=a._createCommandOptions(h,g,b,B,!0),d.push(k(e,g,null)))}}});y.all(d,P).then(function(a){a.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});return y.all(a.map(h),P).then(function(b){var c=[];b=b.filter(function(b,d){if(b)return!0;
c.push(a[d]);return!1});O.addRelatedLinkCommands.call(v,f,b,c,e);O.afterGenerateRelatedLinks.apply(v,p)})})}})}}function T(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 S(a){var b={},c=null;"string"===typeof a&&(a=p.node(a));a||(a=p.node("pageActions"));for(var d=a;d&&d.classList;){if(d.classList.contains("toolComposite")){c=
d;break}d=d.parentNode}a.classList.contains("commandMarker")&&(b.commandNode=a);c&&(b.slideContainer=p.$(".slideParameters",c),b.parameterArea=p.$(".parameters",c),b.dismissArea=p.$(".parametersDismiss",c),b.notifications=p.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=p.$(".toolbarTarget",c.parentNode),b.toolbarTarget&&(a=p.bounds(b.toolbarTarget),d=p.bounds(X(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-d.top,b.toolbar=c)));return b}function $(a){if(a=a.slideContainer)if(a.style.left=
"",a.style.top="",a.classList.contains("slideContainerActive")){var b=p.bounds(a),c=p.bounds(a.parentNode);a.style.left=(c.width-b.width)/2+"px";a.style.top="0"}}h=function(a){var b=document.createElement("a");b.href=a;return b.href}(k.toUrl("auth/NotifyAuthentication.html"));var aa={},N=null,O={createMenuGenerator:I.createMenuGenerator||function(a,b){if(p.node("userMenu")){var c=p.node("userDropdown"),d=new t.Dropdown({dropdown:c}),c=new G.UserMenu({dropdownNode:c,dropdown:d,serviceRegistry:a}),
d=p.node("userTrigger");new q.Tooltip({node:d,text:g.Options,position:["below","left"]});d=document.getElementById("userTrigger");d.className+=" imageSprite core-sprite-silhouette";c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:I.beforeGenerateRelatedLinks||function(a,b,c,d,e){return!0},addRelatedLinkCommands:I.addRelatedLinkCommands||function(a,b,c,d){this.sideMenu&&this.sideMenu.setRelatedLinks(b,d)},afterGenerateRelatedLinks:I.afterGenerateRelatedLinks||function(a,b,c,d,e){},afterSetPageTarget:I.afterSetPageTarget||
function(a){},generateNavigationMenu:I.generateNavigationMenu||function(a,b,c,d,e,f,l){if(a=p.node("sideMenu"))b=p.node("centralNavigation"),new q.Tooltip({node:b,text:g.CentralNavTooltip,position:["right"]}),N=this.sideMenu=new C(a,p.node("pageContent")),b.addEventListener("click",N.toggleSideMenu.bind(N)),(a=p.node("sideMenuToggle"))&&a.addEventListener("click",N.toggleSideMenu.bind(N))},afterGenerateNavigationMenu:I.afterGenerateNavigationMenu||function(a,b,c,d,e,f,l){},afterGenerateBanner:I.afterGenerateBanner||
function(a,b,c,d,e,f,l){}},ba=[],ca,Z=[],M,W=null,U=null,da=new d;return{generateBanner:function(a,d,l,m,n,h,t,x){function q(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"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new B.ThemePreferences(m,new D.ThemeData)).apply();var C=p.node(a);if(!C)throw g["could not find banner parent, id was "]+a;var r=document.createRange();
r.selectNode(C);r=r.createContextualFragment(H);p.processTextNodes(r,g);C.firstChild?C.insertBefore(r,C.firstChild):C.appendChild(r);C=p.node("home");C.href=k.toUrl("edit/edit.html");C.setAttribute("aria-label",g["Orion Home"]);p.node("progressPane").src=c.NO_IMAGE;if(C=p.node("pageToolbar"))C.classList.add("toolbarLayout"),C.innerHTML=A+f.slideoutHTMLFragment("mainToolbar");(C=p.node("closeNotifications"))&&C.setAttribute("aria-label",g["Close notification"]);if(17>=z.isFirefox&&(C=p.node("staticBanner")))C.style.width=
"100%",C.style.MozBoxSizing="border-box";if(C=p.node("footer"))C.innerHTML=u,p.processTextNodes(C,g);l.setParameterCollector(new b.CommandParameterCollector(S,$));document.addEventListener("keydown",function(a){a.keyCode===p.KEY.ESCAPE&&(a=d.getService("orion.page.message"))&&a.setProgressMessage("")},!1);O.generateNavigationMenu.apply(this,arguments);O.afterGenerateNavigationMenu.apply(this,arguments);C=E.getCategoriesInfo(d);r=E.getPageLinksInfo(d,"orion.page.link");y.all([C,r]).then(function(a){if(N){var b=
a[1];N.setCategories(a[0]);N.setPageLinks(b);N.setSideMenu()}});if(C=p.$(".split")){var r=p.$(".sidePanelLayout"),K=p.$(".mainPanelLayout");r&&K&&(W={side:r,main:K},W.splitter=new s.Splitter({node:C,sidePanel:r,mainPanel:K,toggle:!0,closeByDefault:x}),C=new c.Command({name:g["Toggle side panel"],tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){W.splitter.toggleSidePanel()}}),l.addCommand(C),l.registerCommandContribution("pageActions","orion.toggleSidePane",1,
null,!0,new e.KeyBinding("l",z.isMac?!1:!0,!0,!1,z.isMac?!0:!1)))}var w=!1,Q=function(a,b){if(!w){var c=b.getService("orion.page.progress"),d=new J.OpenResourceDialog({searcher:a,progress:c,searchRenderer:a.defaultRenderer,onHide:function(){w=!1}});window.setTimeout(function(){w=!0;d.show()},0)}},C=new c.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){Q(n,d)}});l.addCommand(C);l.registerCommandContribution("globalActions",
"orion.openResource",100,null,!0,new e.KeyBinding("f",!0,!0));C=new c.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"),c=p.node("sideMenu"),d=p.$(".content-fixedHeight"),e="hidden"===a.style.visibility;e?(a.style.visibility="visible",b.style.visibility="visible",d.classList.remove("content-fixedHeight-maximized"),c&&c.classList.remove("sideMenu-maximized")):(a.style.visibility=
"hidden",b.style.visibility="hidden",d.classList.add("content-fixedHeight-maximized"),c&&c.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!e});return!0}});l.addCommand(C);l.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.KeyBinding("m",!0,!0));C=new c.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return k.toUrl("help/about.html")}});l.addCommand(C);
l.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new e.KeyBinding(112,!0,!0));C=new c.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return k.toUrl("operations/list.html")}});l.addCommand(C);l.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new e.KeyBinding("o",!0,!0));U=new v.KeyAssistPanel({commandRegistry:l});C=new c.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}});l.addCommand(C);l.registerCommandContribution("globalActions","orion.keyAssist",100,null,!0,new e.KeyBinding(191,!1,!0));T(l);V(d,C.callback);Y(d);window.addEventListener("hashchange",function(){l.processURL(window.location.href)},!1);window.setTimeout(function(){q(d)},0);O.afterGenerateBanner.apply(this,arguments)},getToolbarElements:S,getMainSplitter:function(){return W},
getKeyAssist:function(){return U},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,setPageTarget:function(a){var b,c,d=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&!a.staticBreadcrumb&&(c=(d?d+" ":"")+a.fileService.fileServiceName(a.target.Location),d=null),b=a.name||a.target.Name,ca=a.target,R.call(this,e,a.target,Z,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=
d||a.task||a.name),b=a.name,R.call(this,e,{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:d});else{var f=e&&new L.FileClient(e),e=a.breadcrumbTarget||a.target,f=f&&e&&e.Location?f.fileServiceRootURL(e.Location):null;new n.BreadCrumbs({container:b,
resource:e,rootSegmentName:d,workspaceRootSegmentName:c,workspaceRootURL:f,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:h}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(g){return{detectValidURL:function(k){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,e=f.exec(k),d=[],h=0;e;){if(3===e.length&&0<e[2].length){var c=new URL(e[2]);":"!==c.protocol&&g.validateURLScheme(c.href)&&(e.index>h&&d.push({segmentStr:k.substring(h,e.index)}),d.push({segmentStr:0<e[1].length?e[1]:e[2],urlStr:e[2]}),h=e.index+e[0].length)}e=f.exec(k)}if(0===h)return null;h<k.length-1&&d.push({segmentStr:k.substring(h)});return d},processURLSegments:function(g,
f){f.forEach(function(e){if(e.urlStr){var d=document.createElement("a");d.href=e.urlStr;d.appendChild(document.createTextNode(e.segmentStr))}else d=document.createElement("span"),d.textContent=e.segmentStr;g.appendChild(d)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(g,k,f,e){function d(c,b,a,d,e){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=e;this.domId=a;this.progressDomId=d||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var h;d.prototype={_init:function(){var c=k.node("closeNotifications");if(c&&
!this._hookedClose){c.style.cursor="pointer";this._hookedClose=!0;var b=k.node(this.notificationContainerDomId);k.addAutoDismiss([b],function(){this._clickToDisMiss&&this.close()}.bind(this));c.addEventListener("click",function(){this.close()}.bind(this));b.addEventListener("click",function(a){a&&a.target&&"a"===a.target.nodeName.toLowerCase()&&(a=k.$$("a",b))&&a.length&&1===a.length&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var c=k.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&c?(c.innerHTML="",c.classList.remove("cancelButton"),c.classList.add("dismissButton"),c.classList.add("core-sprite-close"),c.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(c,b,a){this._init();this.currentMessage=c;var d=k.node(this.domId);
if("boolean"===typeof a){var e=d.getAttribute("aria-live");d.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){c===this.currentMessage&&(k.empty(d),d.appendChild(document.createTextNode(c)),window.setTimeout(function(){d.setAttribute("aria-live",e)},100))}.bind(this),100)}else k.empty(d),d.appendChild(document.createTextNode(c));"number"===typeof b&&window.setTimeout(function(){c===this.currentMessage&&(k.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),b)},setErrorMessage:function(c){this._clickToDisMiss=
!0;this.currentMessage=c;this._init();var b=c.responseText||c.message||c;if("string"===typeof b)try{b=JSON.parse(b)}catch(a){}c=b.Message||b;var d="red";if(b.Severity)switch(b.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}b=document.createElement("span");b.style.color=d;b.appendChild(document.createTextNode(c));c=k.node(this.domId);k.empty(c);c.appendChild(b)},setProgressMessage:function(c){this._clickToDisMiss=!1;this._init();this.currentMessage=
c;var b=document.createElement("span");b.classList.add("progressIcon");var a=k.node(this.progressDomId);k.empty(a);a.appendChild(b);a.appendChild(document.createTextNode(c));b=k.node(this.notificationContainerDomId);b.classList.remove("notificationHide");if(c&&0<c.length)b.classList.add("progressNormal"),b.classList.add("notificationShow");else{if(this._progressMonitors&&0<this._progressMonitors.length)return this._renderOngoingMonitors();b.classList.remove("notificationShow");b.classList.add("notificationHide")}},
setCancelFunction:function(c){this._cancelFunc=c},setProgressResult:function(c,b){this._clickToDisMiss=!1;this._cancelMsg=b;this.currentMessage=c;var a=c.responseText||c;if("string"===typeof a)try{a=JSON.parse(a)}catch(d){}this._init();var f=a.Message||a.toString(),n=g.UnknownError,h="core-sprite-information",s="progressNormal",t=document.createElement("span");t.classList.add("imageSprite");t.classList.add("progressIcon");var q=[];if(a.Severity)switch(a.Severity){case "Warning":n=g.UnknownWarning;
h="core-sprite-warning";s="progressWarning";q.push("progressInfo");q.push("progressError");q.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":h="core-sprite-error";s="progressError";q.push("progressWarning");q.push("progressInfo");q.push("progressNormal");this._clickToDisMiss=!0;break;default:s="progressNormal",q.push("progressWarning"),q.push("progressError"),q.push("progressNormal")}q.push("notificationHide");t.classList.add(h);var w=k.node(this.progressDomId),h=k.node(this.notificationContainerDomId);
k.empty(w);w.appendChild(t);f===Object.prototype.toString()&&(f=n);a.HTML?(a=document.createElement("span"),a.innerHTML=f,w.appendChild(a)):((n=e.detectValidURL(f))?(f=document.createDocumentFragment(),e.processURLSegments(f,n),Array.prototype.forEach.call(k.$$("a",f),function(a){a.target="_blank"})):("Warning"!==a.Severity&&"Error"!==a.Severity&&!b&&(this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3)),
f=document.createTextNode(f)),w.appendChild(f));if(s&&this.progressDomId!==this.domId){h.classList.add(s);for(s=0;s<q.length;s++)h.classList.remove(q[s])}h.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(c,b){var a=this;if(b){a.setProgressMessage(b);var d=function(){b===a.currentMessage&&a.setProgressMessage("")};c.then(d,d)}return c},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,b){return new h(this,++this._lastProgressId,c,b)},_renderOngoingMonitors:function(){if(0<this._progressMonitors.length){var c="",b=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(b||(c+=", "),c+=this._progressMonitors[a].status,
b=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};d.prototype.constructor=
d;h=function(c,b,a,d){this.statusService=c;this.progressId=b;if(a){this.deferred=a;this.begin(d);var e=this;a.then(function(a,b){e.done.bind(e)()},function(a,b){e.done.bind(e)()})}};h.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};h.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};h.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};h.prototype.constructor=h;return{StatusReportingService:d,
ProgressMonitor:h}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,k,f,e){function d(){}d.prototype={_initialize:function(d,c,b,a,l){this._tooltip=new e.Tooltip({node:d,hideDelay:l||0,afterShowing:this._afterShowingFunction(c).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";d=document.createRange();d.selectNode(this.$parent);d=d.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(d,g);this.$parent.appendChild(d);var m=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&m.hide()},!1);this._bindElements(this.$parent);"function"===typeof this._bindToDom&&this._bindToDom(this.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(d){return function(){d&&d.bind(this)();if(!this.customFocus){var c=
f.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};d.prototype.constructor=d;return{PopupDialog:d}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,k,f,e){var d={};(function(){var h=!1;d.updateNavTools=function(c,b,a,d,e,n){var k=f.node(d);if(k)b.destroy(k);else throw g["could not find toolbar "]+d;b.renderCommands(d,k,n,a,"button");if(e&&(d=f.node(e)))b.destroy(d),b.renderCommands(e,d,null,a,"button");h||(h=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",function(c){var d=f.node(e);
d&&(b.destroy(d),b.renderCommands(e,d,c.selections,a,"button"))}))};d.createOperationsCommands=function(c,b,a){function d(a){return!a.operation||!a.operation.type?!1:"loadstart"===a.operation.type||"progress"===a.operation.type}var f=new e.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(c){a.removeCompletedOperations().then(function(a){b.loadOperations.bind(b)()})},visibleWhen:function(a){return!0}});c.addCommand(f);
f=new e.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){c=Array.isArray(c.items)?c.items:[c.items];for(var d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||0===a.length)return!d(a);for(var b in a)if(d(a[b]))return!1;return!0}});c.addCommand(f);
f=new e.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 c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||0===a.length)return d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});c.addCommand(f)}})();
return d});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,k,f,e,d){function h(c){this._options=c}h.prototype=new e.PopupDialog;h.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';h.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;d.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};h.prototype._bindToDom=function(c){this.$allOperationsLink.href=k.toUrl("operations/list.html");this._setOperationsVisibility()};h.prototype.setOperations=function(c,b){this._myOperations||this._init(this._options);
this._myOperations=[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};h.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};c.DetailedMessage&&c.DetailedMessage!==a.Message&&(a.DetailedMessage=c.DetailedMessage);return a};h.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};h.prototype._renderOperationsTable=function(c,b,a){f.empty(c);for(var d=0;d<b.length;d++){var e=b[d],n=document.createElement("tr"),h=document.createElement("td");h.style.paddingLeft="5px";h.style.paddingRight="5px";h.textContent=e.Name;n.appendChild(h);var k=document.createElement("div");h.appendChild(k);h=document.createElement("span");h.style.paddingRight="5px";h.classList.add("imageSprite");switch(e.type){case "Warning":h.classList.add("core-sprite-warning");
h.setAttribute("aria-label",g["Operation resulted in a warning."]);break;case "error":h.classList.add("core-sprite-error");h.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":h.classList.add("core-sprite-start");h.setAttribute("aria-label",g["Operation is running."]);break;case "abort":h.classList.add("core-sprite-stop");h.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":h.classList.add("core-sprite-ok"),h.setAttribute("aria-label",
"Operation ok.")}k.appendChild(h);h=document.createElement("span");h.classList.add("operationStatus");h.textContent=e.Name;k.appendChild(h);if(e.error){var t=e.error.Message||e.error;e.error.DetailedMessage&&""!==e.error.DetailedMessage&&(t+=": "+e.error.DetailedMessage);h.textContent=t;h.classList.remove("operationStatus");h.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",k,{operation:e,deferred:a[d]},this,"tool");c.appendChild(n)}this._setOperationsVisibility()};
h.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"};h.prototype.constructor=h;return{OperationsDialog:h}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,k,f,e,d){function h(b,a){if(!this._progressPane){this._progressPane=e.node(b);this._operationsDialog=new d.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(" "===a.charOrCode||a.keyCode===e.KEY.ENTER)&&c._operationsDialog.show()});this._progressPane.addEventListener("click",
function(a){c._operationsDialog.show()});this._operationsDialog.setOperations(null,null)}}function c(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}h.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 e="";for(d in c){var f=c[d];if(f.type&&("loadstart"===f.type||"progress"===f.type)){e=
"running";break}}""===e&&null!=this._lastOperation&&this._lastOperation.type&&"error"===this._lastOperation.type&&"error"==e;switch(e){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}};h.prototype.constructor=h;c.prototype={init:function(b){this._progressMonitorClass||(this._progressMonitorTool=new h(b,this._commandRegistry))},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(f){d._operations[e]&&
(f=d._operations[e],a&&(f.Name=a),d._lastOperation=f,f.type="loadend",c&&(f.progressMonitor=c),d.writeOperation.bind(d)(e,f,b),f.Location||d._removeOperationFromTheList.bind(d)(e))},function(f){if(d._operations[e]){var g=d._operations[e];a&&(g.Name=a);c&&(g.progressMonitor=c);d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,b);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){a&&(f.Name=a);c&&(f.progressMonitor=c);d.writeOperation.bind(d)(e,
f,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)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/profile/usersClient",[],function(){function g(g,f){this.serviceRegistry=g}g.prototype={getUserInfo:function(g,f){return this._doServiceCall("getUserInfo",arguments)},getUsersListSubset:function(g,f,e){return this._doServiceCall("getUsersListSubset",arguments)},getUsersList:function(g){return this._doServiceCall("getUsersList",arguments)},deleteUser:function(g,f){return this._doServiceCall("deleteUser",arguments)},createUser:function(g,f,e){return this._doServiceCall("createUser",arguments)},
updateUserInfo:function(g,f,e){return this._doServiceCall("updateUserInfo",arguments)},resetUserPassword:function(g,f,e){return this._doServiceCall("resetUserPassword",arguments)},initProfile:function(g,f,e){return this._doServiceCall("initProfile",arguments)},fire:function(g,f,e){return this._doServiceCall("fire",arguments)},getDivContent:function(){return this._doServiceCall("getDivContent",arguments)},_doServiceCall:function(g,f){var e=this.serviceRegistry.getService("orion.core.user");return e[g].apply(e,
f)}};g.prototype.constructor=g;return{UsersClient:g}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,k){function f(c,b,a){return c[b].apply(c,a)}function e(c){this._location=c}function d(){var c=new k;c.reject(g["No Matching OperationService for location:"]+this._location);return c}function h(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var d=c.getService(b[a]);this._services[a]=d;d=b[a].getProperty("pattern")||".*";"^"!==d[0]&&(d="^"+d);this._patterns[a]=RegExp(d)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];this._operations.remove(a);return new e(a)}}e.prototype={getOperation:d,getOperations:d,removeCompletedOperations:d,removeOperation:d,cancelOperation:d};e.prototype.constructor=e;h.prototype={getOperations:function(){var c=
new k;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return f(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new k;c[a]=e.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&0>c.indexOf(g)&&b.remove(g)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return k.all(c)},removeOperation:function(c){var b=this;return f(this._getService(c),"removeOperation",arguments).then(function(a){b.getOperations.bind(b)().then(function(a){a.remove(c)})},function(a){return a},function(a){return a})}};h.prototype.constructor=h;return{OperationsClient:h}});
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(e){"undefined"===typeof f[e]&&(f[e]=g[e])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,k){function f(e){this._init(e)}f.prototype={_init:function(e){var d=e.parent,f=this,d=k.node(d);if(!d)throw g["no parent"];if(!e.model)throw g["no tree model"];if(!e.renderer)throw g["no renderer"];this._parent=d;this._treeModel=e.model;this._onComplete=e.onComplete;this._renderer=e.renderer;this._showRoot=void 0===e.showRoot?!1:e.showRoot;this._indent=void 0===e.indent?16:e.indent;this._onCollapse=e.onCollapse;
this._labelColumnIndex=void 0===e.labelColumnIndex?0:e.labelColumnIndex;this._id=void 0===e.id?"treetable":e.id;this._tableStyle=e.tableStyle;this._tableElement=e.tableElement||"table";this._tableBodyElement=e.tableBodyElement||"tbody";this._tableRowElement=e.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(c){f._showRoot?(c._depth=0,f._generate([c],0)):f._treeModel.getChildren(c,function(b){f.destroyed||f._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(e,
d){k.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var c=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(c);c.id=this._id;this._tableStyle&&c.classList.add(this._tableStyle);this._renderer.initTable(c,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";0===e.length?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(e,d);c.appendChild(this._bodyElement);f.appendChild(c);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(e,d,f){for(var c=0;c<e.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(e[c]);b._depth=d;b._item=e[c];this._renderer.render(e[c],b);b.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*d+"px";this._renderer.rowCallback&&this._renderer.rowCallback(b,e[c]);f?(this._bodyElement.insertBefore(b,f.nextSibling),f&&(f=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(e,d,f){var c=this._treeModel.getId(e),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(d,0),this._rowsChanged();else{var a=k.node(c);a?(a._item=e,
a&&(f||a._expanded)?(this._removeChildRows(c),d?(a._expanded=!0,this._renderer.updateExpandVisuals(a,!0),this._generateChildren(d,a._depth+1,a),this._rowsChanged()):(b=this,this._renderer.updateExpandVisuals(a,"progress"),d=this._treeModel.getChildren(a._item,function(c){b.destroyed||(b._renderer.updateExpandVisuals(a,!0),a._expanded||(a._expanded=!0,b._generateChildren(c,a._depth+1,a),b._rowsChanged()))}))):this._renderer.updateExpandVisuals(a,!1)):console.log(g["could not find table row "]+c)}},
getItem:function(e){var d=k.node(e);return d&&d._item?d._item:e},toggle:function(e){var d=k.node(e);d&&(d._expanded?this.collapse(e):this.expand(e))},isExpanded:function(e){e="string"===typeof e?e:this._treeModel.getId(e);return(e=k.node(e))?e._expanded:!1},expand:function(e,d,f){e="string"===typeof e?e:this._treeModel.getId(e);var c=k.node(e);if(c){var b=this;c._expanded?d&&d.apply(b,f):(this._renderer.updateExpandVisuals(c,"progress"),this._treeModel.getChildren(c._item,function(a){b.destroyed||
(b._renderer.updateExpandVisuals(c,!0),c._expanded||(c._expanded=!0,b._generateChildren(a,c._depth+1,c),b._rowsChanged()),d&&d.apply(b,f))}))}},_removeChildRows:function(e){for(var d=e===this._id,f=!1,c=-1,b=[],a=k.$$array(".treeTableRow",this._parent),g=0;g<a.length;g++){var m=a[g];if(f)break;d?m._depth>c?b.push(m):f=!0:m.id===e&&(d=!0,c=m._depth)}for(e=0;e<b.length;e++)d=b[e],d.parentNode.removeChild(d)},collapse:function(e){e="string"===typeof e?e:this._treeModel.getId(e);var d=k.node(e);if(d){if(!d._expanded)return;
d._expanded=!1;this._renderer.updateExpandVisuals(d,!1);this._removeChildRows(e);this._rowsChanged()}this._onCollapse&&this._onCollapse(d._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,e){this.firstLevelChildren=f;this.reset();this._init(e)}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 e=this._getChildren(f),e=e&&0<e.length;this.isExpanded&&e&&(e=this.isExpanded(f));return e},_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 e=this._diveIn(this._cursor);
if(!e){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var d=this;return this.forceExpandFunc(this._cursor,"first",function(e){e&&d.setCursor(e)})}(e=this._findSibling(this._cursor,!0))&&this.setCursor(e)}return e},_backward:function(f){if(!this._cursor)return null;var e=this._findSibling(this._cursor,!1);e&&e!==this._cursor.parent&&(e=this._drillToLast(e));if(f&&e&&this._expandable(e)&&this.forceExpandFunc&&e!==this._cursor.parent){var d=this;return this.forceExpandFunc(e,"last",function(e){e&&
d.setCursor(e)})}e&&this.setCursor(e);return e},_findSibling:function(f,e){for(var d=this.topLevel(f),g=this._getChildren(f.parent),g=d?this.firstLevelChildren:g,c=0;c<g.length;c++)if(g[c]===f)return 0===c&&!e?d?null:f.parent:c===g.length-1&&e?d?null:this._findSibling(f.parent,e):e?g[c+1]:g[c-1];return null},_inParentChain:function(f,e){for(var d=f.parent;d;){if(d===e)return!0;d=d.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,e,d){this.setCursor(e);var g=[];for(g.push(e);;){if(this.iterate(f))g.push(this.cursor());else break;if(d===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,e){var d=this.cursor(),
g=this._scan(!0,f,e);g||(g=this._scan(!1,f,e));this.setCursor(d);return g},iterate:function(f,e){return f?this._forward(e):this._backward(e)},iterateOnTop:function(f,e){var d=this._findSibling(this._getTopLevelParent(this.cursor()),f);d?this.setCursor(d):e&&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 e={},d=-1!==navigator.userAgent.indexOf("iPad"),h=-1!==window.navigator.platform.indexOf("Mac");e.ExplorerNavHandler=function(){function c(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,c){return d.explorer.forceExpandFunc(a,b,c)}: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}c.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 h?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 e=0;e<d.length;e++)c._selections.push(d[e]);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,e=!0,d=d+a;0>d?(this._linearGridMove&&0!==a&&(this._modelIterator.iterate(!1)?b=this.currentModel():e=!1),d=e?c.length-1:this._currentColumn):d>=c.length&&(this._linearGridMove&&0!==a&&(this._modelIterator.iterate(!0)?b=this.currentModel():e=!1),d=e?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 e,f;if(b||a){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=b;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),
f=this._modelIterator.cursor();if(e!==f||a)if(this.toggleCursor(e,!1),!a||f){this.moveColumn(null,0);this.toggleCursor(f,!0);if((b=this.getRowDiv())&&!d){d=b.parentNode;for(a=document.documentElement;d&&d!==a;){var g=window.getComputedStyle(d,null);if(!g)break;g=g.getPropertyValue("overflow-y");if("auto"===g||"scroll"===g)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(e,
f)}},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 e=null;if(this.topIterationNodes&&0!==this.topIterationNodes.length)if(d){d=this.currentModel();for((e=this._modelIterator.iterate(b,
a))&&this._setCursorOnItem(b,c);e&&e.isNotSelectable;)(e=this._modelIterator.iterate(b,a))&&this._setCursorOnItem(b,c);e||(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)),e=a?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(c,d,e,!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 c=g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));if(a.target!==c&&!("none"===this.gridClickSelectionPolicy&&
this._onModelGrid(b,a)))if(this.cursorOn(b,!0,!1,!0),d)this.setSelection(b,!0);else if(this._ctrlKeyOn(a))this.setSelection(b,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(c=this._modelIterator.scan(this._shiftSelectionAnchor,b)){this._clearSelection(!0);for(var e=0;e<c.length;e++)this.setSelection(c[e],!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 c}();e.ExplorerNavDict=function(){function c(b){this._dict={};this._model=b}c.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 c}();return e});
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,e,d,h){var c={};c.Explorer=function(){function b(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;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,c){a="string"===typeof a?a:a.id||a;this.selection&&
this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",h=f.node(g);h&&f.empty(h);b&&(b.rootId=g);this.model=b;this._parentId=a;this._treeOptions=c;if(!c||c&&!c.noSelection)this.selectionPolicy=c?c.selectionPolicy:"",this._navDict=new d.ExplorerNavDict(this.model);this.myTree=new e.TableTree({id:g,model:b,parent:a,onComplete:c?c.onComplete:void 0,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:c?!!c.showRoot:
!1,indent:c?c.indent:void 0,onCollapse:c?c.onCollapse:void 0,navHandlerFactory:c?c.navHandlerFactory:void 0,tableElement:c?c.tableElement:void 0,tableBodyElement:c?c.tableBodyElement:void 0,tableRowElement:c?c.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 d.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}();c.createExplorerCommands=function(b,a){function c(b){return"function"===typeof b.getItemCount&&0<b.getItemCount()?a?a(b):!0:!1}var d=new h.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()}}),e=new h.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(e)};c.ExplorerModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}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}();c.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new c.ExplorerModel;b.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)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();c.ExplorerRenderer=function(){function b(a,b){this.explorer=b;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}();c.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new c.ExplorerRenderer;b.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)};b.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)};b.prototype.getCellHeaderElement=function(a){};b.prototype.getCellElement=function(a,b,c){};return b}();c.SimpleFlatModel=function(){function b(a,
b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.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};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return c});
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,e,d,h,c,b){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 l(b,e,f,g,l,m,x,B,D){e=h.clone(e);var y;if(e.Directory)y=document.createElement("a"),
y.className="navlinkonpage",y.href=!b?n:(new c(b+"#{,resource,params*}")).expand({resource:e.ChildrenLocation}),e.Name&&y.appendChild(document.createTextNode(e.Name));else{l||(l=d.getOpenWithCommands(f));y=document.createElement("a");y.className="navlink targetSelector";m&&"object"===typeof m&&Object.keys(m).forEach(function(a){y[a]=m[a]});var G=null,E=null;if(G=B?B.holderDom:y)E=document.createElement("span"),E.className="core-sprite-file modelDecorationSprite thumbnail",G.appendChild(E);e.Name&&
y.appendChild(document.createTextNode(e.Name));var J=e.Location;x&&"object"===typeof x&&(e.params={},h.mixin(e.params,x));(b=d.getOpenWithCommand(f,e,l))&&(J=b.hrefCallback({items:e}));k.when(g.getFileContentType(e),function(b){if(G){var c=G,d=E;if(b){var f,g=b.imageClass,l=b.image;g?(f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail")):l&&(f=document.createElement("img"),f.src=l,f.classList.add("thumbnail"));f&&c.replaceChild(f,d)}}y.href=J;D&&"function"===typeof D.updateFileNode&&
D.updateFileNode(e,y,a(b))})}y.addEventListener("click",function(){p=e}.bind(this),!1);return y}function m(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 c("#{,resource,params*}"),p;m.prototype=new f.SelectionRenderer;m.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};m.prototype.tableCallback=function(a){a.setAttribute("aria-label",g.Navigator);a.setAttribute("role",
"presentation")};m.prototype.rowCallback=function(a,b){a.setAttribute("role","treeitem")};m.prototype.emptyCallback=function(a){var c=document.createElement("tr"),d=document.createElement("td");d.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=g.NoFile;var f=document.createElement("span");f.appendChild(document.createTextNode(g.File));b.processDOMNodes(e,[f]);d.appendChild(e);c.appendChild(d);a.appendChild(c)};m.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"}};m.prototype.setTarget=function(a){this.target=a};m.prototype.getFolderImage=function(a){if(!this.showFolderImage)return null;a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};m.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=l(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};m.prototype.updateFileNode=function(a,b,c){};m.prototype.showFolderLinks=!0;m.prototype.getCellElement=function(a,b,c){switch(a){case 0:a=document.createElement("td");var f=document.createElement("span");f.id=c.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var g;b.Directory?(this.getExpandImage(c,f),g=this.createFolderNode(b),
f.appendChild(g),this.explorer._makeDropTarget(b,g),this.explorer._makeDropTarget(b,c)):(this.openWithCommands||(this.openWithCommands=d.getOpenWithCommands(this.commandService)),g=l("",b,this.commandService,this.contentTypeService,this.openWithCommands,{target:this.target},null,null,this),f.appendChild(g));g&&(g.id=c.id+"NameLink",1===g.nodeType&&(e.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;c=document.createElement("td");b.LocalTimeStamp&&(c.textContent=(new Date(b.LocalTimeStamp)).toLocaleString());return c;case 2:if(this.oneColumn)return null;c=document.createElement("td");!b.Directory&&"number"===typeof b.Length&&(b=parseInt(b.Length,10)/1024,c.textContent=Math.ceil(b).toLocaleString()+" KB");c.style.textAlign="right";return c}};m.prototype.constructor=m;return{NavigatorRenderer:m,isImage:a,getClickedItem:function(){return p},
createLink:l}});
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,e,d,h,c,b,a){function l(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function m(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new l(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}l.prototype.makeRenderFunction=function(l,h,m,t,q){var w=this.serviceRegistry,r=this.commandRegistry;this.openWithCommands=this.openWithCommands||b.createOpenWithCommands(w,l,r);var v=this;return function(b,B,D,y){a.when(v.openWithCommands,function(a){if(D)f.empty(h),a=document.createElement("div"),a.appendChild(document.createTextNode(g["Search failed."])),h.appendChild(a),"function"===typeof t&&t(h);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)}}}(),w=!1;f.empty(h);if(b&&0<b.length){var H=document.createElement("table");H.setAttribute("role","presentation");for(var u=0;u<b.length;u++){var A=
b[u],F;w||(w=!0,m&&(F=H.insertRow(0).insertCell(0),F.textContent=m));F=H.insertRow(-1).insertCell(0);F.colspan=2;q&&q(F);var z={Name:A.name,Directory:A.directory,Location:A.path||A.location},I=null;"number"===typeof A.LineNumber&&(I={},I.line=A.LineNumber);if(y&&y.keyword&&!y.nameSearch){var L=d.generateSearchHelper(y),I=I||{};I.find=L.inFileQuery.searchStr;I.regEx=L.inFileQuery.wildCard?!0:void 0}z=c.createLink(k.toUrl("edit/edit.html"),z,r,l,a,{"aria-describedby":(A.folderName?A.folderName:A.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},I);A.LineNumber&&z.appendChild(document.createTextNode(" (Line "+A.LineNumber+")"));F.appendChild(z);v(F,A)}h.appendChild(H);"function"===typeof t&&t(h)}!w&&B&&(a=e.formatMessage(g["No matches found for ${0}"],B),f.empty(h),h.appendChild(document.createTextNode(a)),"function"===typeof t&&t(h))}})}};m.prototype={search:function(a,b,c){var e=function(a){for(var c=[],e=0;e<a.response.docs.length;e++){var f=a.response.docs[e],g=f.Location,l=d.path2FolderName(f.Path?
f.Path:f.Location,f.Name),h=l?l:g;(b?0<=h.indexOf(b):1)&&c.push({name:f.Name,path:g,folderName:l,directory:f.Directory,lineNumber:f.LineNumber})}return c};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){c(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 d=a.keyword,d=d.substring(d.indexOf("}")+1),d=d.substring(d.indexOf(":")+1);c(e(b),d,null,a)},function(a){c(null,
null,a,null)})}catch(f){"string"===typeof f&&-1<f.indexOf("search")&&this._crawler?this._crawler.searchName(a,function(b){c(e(b),null,null,a)}):"string"===typeof f&&-1<f.indexOf("search")&&!a.nameSearch?(new h.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(b){c(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="",d=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&0<a.Parents.length?d="last"===b.index?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(d=a);d?(this.setLocationbyURL(d.Location),c=d.Name,this._childrenLocation=d.ChildrenLocation):a&&(this.setLocationbyURL(this._searchRootLocation),
c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation);d=f.node("search");c||(c="");if(d&&d.placeholder){d.value="";var l=e.formatMessage(g["Search ${0}"],c);d.placeholder=30<l.length?l.substring(0,27)+"...":e.formatMessage(g["Search ${0}"],c)}d&&d.title&&(d.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}}};m.prototype.constructor=m;return{Searcher:m}});
define("orion/dialogs",[],function(){function g(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.page.dialog",this)}g.prototype={confirm:function(g,f){f(window.confirm(g))},openFiles:function(g){}};g.prototype.constructor=g;return{DialogService:g}});
define("orion/metatype",["orion/serviceTracker"],function(g){function k(b){function a(a,b,c){a=a.getProperty(b);a instanceof Array&&a.forEach(c)}var l=new g(b,d),h=this.ocdsMap={},k=this.pidsMap={};l.addingService=function(d){a(d,f,function(a){a=new c(a);h[a.getId()]=a});a(d,e,function(a){var b=a.pid;a=a.classId;b&&a&&(k[b]=h[a])});return b.getService(d)};l.removedService=function(b,c){a(b,f,function(a){delete h[a.id]});a(b,e,function(a){delete k[a.pid]})};l.open()}var f="classes",e="designates",
d="orion.cm.metatype",h,c;k.prototype={getObjectClassDefinitionForPid:function(b){return this.pidsMap[b]||null},getObjectClassDefinition:function(b){return this.ocdsMap[b]||null}};c=function(b){this.id=b.id;this.name=b.name||null;this.nameKey=b.nameKey||null;this.nls=b.nls||null;var a=b.properties;if(!this.id)throw'Missing "id" property: '+JSON.stringify(b);if(!(a instanceof Array)||!a.length)throw'"properties" property is missing or empty: '+JSON.stringify(b);this.props=[];for(b=0;b<a.length;b++)this.props.push(new h(a[b]))};
c.prototype={getAttributeDefinitions:function(){return this.props},getId:function(){return this.id},getName:function(){return this.name},getNameKey:function(){return this.nameKey},getNls:function(){return this.nls}};h=function(b){this.id=b.id;this.name=b.name||null;this.nameKey=b.nameKey||null;this.options=b.options||null;this.type=b.type||"string";this.defaultValue="undefined"!==typeof b.defaultValue?b.defaultValue:null;if(!this.id)throw'Missing "id" property: '+JSON.stringify(b);a:{switch(this.type){case "boolean":case "number":case "string":b=
!0;break a}b=void 0}if(!b)throw'Invalid "type": '+this.type;this.options&&this.options.forEach(function(a){if("undefined"===typeof a.value)throw"Missing option value: "+JSON.stringify(a);})};h.prototype={getId:function(){return this.id},getName:function(){return this._nlsName||this.name},getNameKey:function(){return this.nameKey},getOptionLabels:function(){return this.options&&this.options.map(function(b){return b._nlsLabel||b.label})},getOptionLabelKeys:function(){return this.options&&this.options.map(function(b){return b.labelKey})},
getOptionValues:function(){return this.options&&this.options.map(function(b){return b.value})},getType:function(){return this.type},getDefaultValue:function(){return this.defaultValue},_setNlsName:function(b){this._nlsName=b},_setNlsOptionLabels:function(b){this.options&&this.options.forEach(function(a,c){a._nlsLabel=b[c]})}};return{MetaTypeRegistry:k}});
define("orion/settings/settingsRegistry",["orion/Deferred","orion/i18nUtil","orion/serviceTracker"],function(g,k,f){function e(a,b){return"string"===typeof a[b]?a[b]:null}function d(a){this.pid=a.pid;this.classId=(this.isRef=e(a,"classId"))?a.classId:this.pid+".type";this.name=e(a,"name");this.nameKey=e(a,"nameKey");this.nls=e(a,"nls");this.properties=null;this.category=a.category||null;this.categoryKey=a.categoryKey||null;this.tags=a.tags;if(!this.pid)throw Error('Missing "pid" property');}function h(c,
e,g,h){var k={};f.call(this,c,a);this.addingService=function(a){var r=a.getProperty(l);if(!r||!r.length)return null;for(var v=0;v<r.length;v++){var x=r[v],B=new d(x),D=B.getObjectClassDefinitionId(),y={designates:[{pid:B.getPid(),classId:D}]};!B.isRef&&!e.getObjectClassDefinition(D)&&(y.classes=[{id:D,nameKey:B.getNameKey(),nls:B.getNls(),properties:x.properties}]);k[B.getPid()]=c.registerService(b,{},y);x=e.getObjectClassDefinition(D);B.properties=x.getAttributeDefinitions();g[B.getPid()]=B;x=B.getCategory()||
m;Object.prototype.hasOwnProperty.call(h,x)||(h[x]=[]);h[x].push(B.getPid())}return f.prototype.addingService.call(this,a)};this.removedService=function(a,b){for(var c=a.getProperty(l),d=0;d<c.length;d++){var e=c[d].pid,f=c[d].category;k[e].unregister();delete k[e];delete g[e];var n=h[f||m];n.splice(n.indexOf(e),1);n.length||delete h[f]}}}function c(a,b){this.settingsMap=Object.create(null);this.categories=Object.create(null);this.categoryLabels=Object.create(null);(new h(a,b,this.settingsMap,this.categories)).open()}
var b="orion.cm.metatype",a="orion.core.setting",l="settings",m="unsorted";d.prototype={getName:function(){return this._nlsName||this.name},getNameKey:function(){return this.nameKey},getNls:function(){return this.nls},getPid:function(){return this.pid},getObjectClassDefinitionId:function(){return this.classId},getAttributeDefinitions:function(){return this.properties},getCategory:function(){return this.category},getCategoryLabel:function(){return this._nlsCategoryLabel},getCategoryKey:function(){return this.categoryKey},
getTags:function(){return this.tags||[]},isDefaults:function(a){return this.getAttributeDefinitions().every(function(b){var c=a[b.getId()],d=b.getDefaultValue(),e=c===d;"string"===b.getType()&&(e=e||""===c&&null===d);return e})},_setNlsName:function(a){this._nlsName=a},_setNlsCategory:function(a){this._nlsCategoryLabel=a}};c.prototype={getSettings:function(a){var b=this.settingsMap;a="string"===typeof a?this.categories[a]:Object.keys(b);return!a?[]:a.map(function(a){return b[a]})},getCategories:function(){return Object.keys(this.categories)},
getCategoryLabel:function(a){return this.categoryLabels[a]||null},loadI18n:function(){function a(b,c){c._setNlsName(b[c.getNameKey()]);c._setNlsCategory(b[c.getCategoryKey()]);c.getAttributeDefinitions().forEach(function(a){a._setNlsName(b[a.getNameKey()]);var c=a.getOptionLabelKeys();c&&(c=c.map(function(a){return b[a]}),a._setNlsOptionLabels(c))})}var b=Object.create(null),c=Object.create(null),d=[];this.getSettings().forEach(function(a){var e=a.getNls();e&&(d.push(k.getMessageBundle(e).then(function(a){c[e]=
a})),b[e]=b[e]||[],b[e].push(a))});var e=this;return g.all(d,function(a){return null}).then(function(){Object.keys(c).forEach(function(d){b[d].forEach(a.bind(null,c[d]))});e.getCategories().forEach(function(a){e.getSettings(a).some(function(b){b=b.getCategoryLabel();if(!b)return!1;e.categoryLabels[a]=b;return!0})})})}};return c});
define("orion/widgets/themes/ThemeComponent",[],function(){function g(){}function k(f,e,d,h,c,b,a,l,k){var n=new g;n.type="ELLIPSE";n.fill=k;n.width=l;n.x=e;n.y=d;n.radius=h;n.startangle=c;n.endangle=b;n.direction=a;n.render(f);return n}g.prototype.type=null;g.prototype.fill=null;g.prototype.stroke=null;g.prototype.width=0;g.prototype.height=0;g.prototype.font=null;g.prototype.text=null;g.prototype.radius=null;g.prototype.x=0;g.prototype.y=0;g.prototype.x2=0;g.prototype.y2=0;g.prototype.x3=0;g.prototype.y3=
0;g.prototype.context=null;g.prototype.description=null;g.prototype.over=!1;g.prototype.family=null;g.prototype.render=function(f){f&&(this.context=f);switch(this.type){case "TEXT":this.context.beginPath();this.context.font=this.font;this.context.fillStyle=this.fill;this.context.fillText(this.text,this.x+0.5,this.y+0.5);this.context.closePath();break;case "LINE":this.context.beginPath();this.context.strokeStyle=this.stroke;this.context.moveTo(this.x+0.5,this.y+0.5);this.context.lineTo(this.x2+0.5,
this.y2+0.5);this.context.lineWidth=this.width;this.context.stroke();this.context.closePath();break;case "RECTANGLE":this.context.beginPath();this.context.strokeStyle=this.stroke;this.fill&&(this.context.fillStyle=this.fill);this.context.rect(this.x+0.5,this.y+0.5,this.width,this.height);this.fill&&this.context.fill();this.stroke&&this.context.stroke();this.context.closePath();break;case "ROUNDRECTANGLE":this.context.beginPath();this.context.fillStyle=this.fill;this.context.strokeStyle=this.stroke;
this.context.moveTo(this.x+this.radius,this.y);this.context.lineTo(this.x+this.width-this.radius,this.y);this.context.quadraticCurveTo(this.x+this.width,this.y,this.x+this.width,this.y+this.radius);this.context.lineTo(this.x+this.width,this.y+this.height-this.radius);this.context.quadraticCurveTo(this.x+this.width,this.y+this.height,this.x+this.width-this.radius,this.y+this.height);this.context.lineTo(this.x+this.radius,this.y+this.height);this.context.quadraticCurveTo(this.x,this.y+this.height,this.x,
this.y+this.height-this.radius);this.context.lineTo(this.x,this.y+this.radius);this.context.quadraticCurveTo(this.x,this.y,this.x+this.radius,this.y);this.context.closePath();this.stroke&&this.context.stroke();this.fill&&this.context.fill();break;case "TRIANGLE":this.context.beginPath();this.context.moveTo(this.x+0.5,this.y+0.5);this.context.lineTo(this.x2+0.5,this.y2+0.5);this.context.lineTo(this.x3+0.5,this.y3+0.5);this.context.lineTo(this.x+0.5,this.y+0.5);this.context.fillStyle=this.fill;this.context.fill();
this.context.closePath();break;case "ELLIPSE":this.context.beginPath(),this.context.arc(this.x+0.5,this.y+0.5,this.radius,this.startangle,this.endangle,this.direction),this.context.fillStyle=this.fill,this.context.fill(),this.context.closePath()}};g.prototype.mouseOver=function(f,e){this.over=!1;switch(this.type){case "RECTANGLE":case "ROUNDRECTANGLE":f>this.x&&f<this.x+this.width&&e>this.y&&e<this.y+this.height&&(this.over=!0);break;case "TEXT":f>this.x&&f<this.x+this.width&&e>this.y-16&&e<this.y-
16+this.height&&(this.over=!0);break;case "ELLIPSE":f>this.x-5-this.radius&&f<this.x-5+this.radius&&e>this.y-5-this.radius&&e<this.y-5+this.radius&&(this.over=!0)}return this.over};g.prototype.glow=function(f,e){var d=Math.floor(this.y-6+(this.height+12)/2);switch(this.type){case "TEXT":d-=8}var g=this.x-6+0.5*(this.width+12);this.context.beginPath();this.context.moveTo(g+0.5,d+0.5);this.context.lineTo(f+30+0.5,d+0.5);this.context.lineTo(f+30+0.5,e+7+0.5);this.context.lineTo(f+45+0.5,e+7+0.5);this.context.strokeStyle=
"#cc0000";this.context.lineWidth=1;this.context.stroke();k(this.context,g,d,3,0,2*Math.PI,!1,null,"#cc0000");this.context.closePath()};return{Component:g,drawArc:k,drawLine:function(f,e,d,h,c,b,a){var l=new g;l.type="LINE";l.stroke=a;l.width=b;l.x=e;l.y=d;l.x2=h;l.y2=c;l.render(f);return l},drawText:function(f,e,d,h,c,b){var a=new g;a.type="TEXT";a.font=c;a.fill=b;a.text=e;a.x=d;a.y=h;a.render(f);a.width=f.measureText(e).width;a.height=15;return a},drawRectangle:function(f,e,d,h,c,b,a){var l=new g;
l.type="RECTANGLE";l.fill=b;l.stroke=a;l.x=e;l.y=d;l.width=h;l.height=c;l.render(f);return l},drawTriangle:function(f,e,d,h,c,b,a,l,k){var n=new g;n.type="TRIANGLE";n.fill=l;n.stroke=k;n.x=e;n.y=d;n.x2=h;n.y2=c;n.x3=b;n.y3=a;n.render(f);return n},roundRect:function(f,e,d,h,c,b,a,l){var k=new g;k.type="ROUNDRECTANGLE";k.fill=a;k.stroke=l;k.x=e;k.y=d;k.width=h;k.height=c;k.radius=b;k.render(f);return k}}});
define("orion/widgets/themes/editor/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme"],function(g,k){function f(){}function e(){this.styles=[];var b=new f;b.name="Eclipse";b.annotationRuler="white";b.background="white";b.comment="green";b.keyword="#7f0055";b.text="darkSlateGray";b.string="blue";b.overviewRuler="white";b.lineNumberOdd="#444";b.lineNumberEven="#444";b.lineNumber="#444";b.currentLine="#EAF2FE";b.tag="darkorange";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=
c;this.styles.push(b);b=new f;b.name="Prospecto";b.annotationRuler="white";b.background="white";b.comment="#3C802C";b.keyword="#CC4C07";b.text="#333";b.string="#446FBD";b.overviewRuler="white";b.lineNumberOdd="silver";b.lineNumberEven="silver";b.lineNumber="silver";b.currentLine="#EAF2FE";b.tag="#CC4C07";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=c;this.styles.push(b);b=new f;b.name="Blue";b.annotationRuler="lavender";b.background="aliceBlue";b.comment="indigo";b.keyword="cornFlowerBlue";b.text=
"navy";b.string="cornFlowerBlue";b.overviewRuler="lavender";b.lineNumberOdd="darkSlateGray";b.lineNumberEven="darkSlateGray";b.lineNumber="darkSlateGray";b.currentLine="white";b.tag="cornFlowerBlue";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=c;this.styles.push(b);b=new f;b.name="Ambience";b.annotationRuler="#3D3D3D";b.background="#202020";b.comment="mediumslateblue";b.keyword="cornFlowerBlue";b.text="darkseagreen";b.string="lightcoral";b.overviewRuler="white";b.lineNumberOdd="black";b.lineNumberEven=
"black";b.lineNumber="black";b.currentLine="lightcyan";b.tag="cornFlowerBlue";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=c;this.styles.push(b);b=new f;b.name="Tierra";b.annotationRuler="moccasin";b.background="lemonchiffon";b.comment="darkseagreen";b.keyword="darkred";b.text="#555555";b.string="orangered";b.overviewRuler="moccasin";b.lineNumberOdd="chocolate";b.lineNumberEven="chocolate";b.lineNumber="chocolate";b.currentLine="#baa289";b.tag="darkred";b.attribute="cadetBlue";b.fontFamily=h;
b.fontSize=c;this.styles.push(b);b=new f;b.name="Nimbus";b.annotationRuler="#444";b.background="dimgray";b.comment="darkseagreen";b.keyword="darkorange";b.text="white";b.string="cornflowerblue";b.overviewRuler="#444";b.lineNumberOdd="#aaa";b.lineNumberEven="#aaa";b.lineNumber="#aaa";b.currentLine="#aabfbb";b.tag="darkorange";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=c;this.styles.push(b);b=new f;b.name="Adelante";b.annotationRuler="#E2D2B2";b.background="#F1E7C8";b.comment="#5D774E";b.keyword=
"#AF473B";b.text="dimgray";b.string="#DE5D3B";b.overviewRuler="#E2D2B2";b.lineNumberOdd="#AF473B";b.lineNumberEven="#AF473B";b.lineNumber="#AF473B";b.currentLine="#9e937b";b.tag="#AF473B";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=c;this.styles.push(b);b=new f;b.name="Raspberry Pi";b.annotationRuler="seashell";b.background="seashell";b.comment="#66B32F";b.keyword="#E73E36";b.text="dimgray";b.string="darkorange";b.overviewRuler="seashell";b.lineNumberOdd="#E73E36";b.lineNumberEven="#E73E36";
b.lineNumber="#E73E36";b.currentLine="#F5B1AE";b.tag="#E73E36";b.attribute="cadetBlue";b.fontFamily=h;b.fontSize=c;this.styles.push(b)}function d(){return this.styles}var h='"Consolas", "Monaco", "Vera Mono", "monospace"',c="10pt";e.prototype.styles=[];e.prototype.getStyles=d;e.prototype.fontSettable=!0;e.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"editorstyles",defaultTheme:"Prospecto",selectedKey:"editorSelected",version:"5.0"}};e.prototype.parseToXML=function(b){try{var a=
null;if(window.DOMParser){var a=(new DOMParser).parseFromString(b,"text/xml"),c=a.getElementsByTagName("parsererror");return!c||!c.length||!c[0].childNodes.length?a:null}a=new ActiveXObject("Microsoft.XMLDOM");a.async=!1;a.loadXML(b);return a}catch(d){}};e.prototype.selectFontSize=function(b){console.log("fontsize: "+b)};e.prototype.importTheme=function(b){console.log("import theme");console.log(b);var a=b.parameters.valueFor("name"),a=this.parseToXML(a),c=new f;c.name=a.getElementsByTagName("colorTheme")[0].attributes[1].value;
c.annotationRuler=a.getElementsByTagName("background")[0].attributes[0].value;c.background=a.getElementsByTagName("background")[0].attributes[0].value;c.comment=a.getElementsByTagName("singleLineComment")[0].attributes[0].value;c.keyword=a.getElementsByTagName("keyword")[0].attributes[0].value;c.text=a.getElementsByTagName("foreground")[0].attributes[0].value;c.string=a.getElementsByTagName("string")[0].attributes[0].value;c.overviewRuler=a.getElementsByTagName("background")[0].attributes[0].value;
c.lineNumberOdd=a.getElementsByTagName("lineNumber")[0].attributes[0].value;c.lineNumberEven=a.getElementsByTagName("lineNumber")[0].attributes[0].value;c.lineNumber=a.getElementsByTagName("lineNumber")[0].attributes[0].value;c.currentLine=a.getElementsByTagName("selectionBackground")[0].attributes[0].value;b.items.addTheme(c)};e.prototype.processSettings=function(b,a){var c=k.TextTheme.getTheme();c.setThemeClass("editorTheme",c.buildStyleSheet("editorTheme",b))};e.prototype.getViewData=function(){var b=
{top:10,left:10,width:400,height:350},a=b.left,c=b.top;b.shapes=[{type:"TEXT",name:g["Line Numbers"],label:"1",x:a+20,y:c+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"},{type:"RECTANGLE",name:g.Background,x:a+46,y:c,width:290,height:b.height,family:"background",fill:"white"},{type:"TEXT",name:g.Strings,label:"'text/javascript'",x:a+134,y:c+20,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"\x3d",x:a+124,y:c+20,fill:"darkSlateGray",
family:"text",font:"9pt sans-serif"},{type:"RECTANGLE",name:g["Current Line"],x:a+46,y:c+87,width:290,height:18,family:"currentLine",fill:"#eaf2fd"},{type:"TEXT",name:g["HTML Attribute"],label:"type",x:a+98,y:c+20,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"RECTANGLE",name:g["Overview Ruler"],x:a+336,y:c,width:14,height:b.height,family:"overviewRuler",fill:"white"},{type:"TEXT",name:g.Comments,label:"/* comment */",x:a+75,y:c+40,fill:"darkSeaGreen",family:"comment",font:"9pt sans-serif"},
{type:"TEXT",name:g["HTML Tag"],label:"\x3cscript",x:a+55,y:c+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:"\x3e",x:a+213,y:c+20,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Strings,label:"'Result'",x:a+164,y:c+80,fill:"cornflowerBlue",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"multiply(a,b){",x:a+120,y:c+60,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",
name:g.Keywords,label:"function",x:a+75,y:c+60,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"var",x:a+95,y:c+80,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"output \x3d ",x:a+115,y:c+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:";",x:a+205,y:c+80,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"var",x:a+
95,y:c+100,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"result \x3d a*b;",x:a+115,y:c+100,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Keywords,label:"return",x:a+95,y:c+120,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"output + result;",x:a+135,y:c+120,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"}",x:a+75,y:c+140,
fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:"\x3c/script\x3e",x:a+55,y:c+160,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:"\x3cstyle",x:a+55,y:c+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Attribute"],label:"type",x:a+95,y:c+200,fill:"darkGray",family:"attribute",font:"9pt sans-serif"},{type:"TEXT",name:g.Foreground,label:"\x3d",x:a+121,y:c+200,fill:"darkSlateGray",
family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g.Strings,label:"'text/css'",x:a+131,y:c+200,fill:"darkorange",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g["HTML Tag"],label:"\x3e",x:a+180,y:c+200,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Class Name"],label:".some-class",x:a+75,y:c+220,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Class Name"],label:"{",x:a+145,y:c+220,fill:"darkSlateGray",family:"text",
font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Attribute"],label:"color:",x:a+95,y:c+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Value"],label:"#123456",x:a+130,y:c+240,fill:"darkSlateGray",family:"string",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Text"],label:";",x:a+180,y:c+240,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},{type:"TEXT",name:g["CSS Class Name"],label:"}",x:a+75,y:c+260,fill:"darkSlateGray",family:"text",font:"9pt sans-serif"},
{type:"TEXT",name:g["HTML Tag"],label:"\x3c/style\x3e",x:a+55,y:c+280,fill:"darkorange",family:"keyword",font:"9pt sans-serif"},{type:"RECTANGLE",name:g["Annotation Ruler"],x:a,y:c,width:46,height:b.height,family:"annotationRuler",fill:"white"}];for(var d=0;16>d;d++)b.shapes.push({type:"TEXT",name:g["Line Numbers"],label:d+1,x:a+20,y:c+20*d+20,fill:"darkSlateGray",family:"lineNumber",font:"9pt sans-serif"});return b};return{ThemeData:e,getStyles:d}});
define("orion/widgets/input/Select",["orion/objects","orion/webui/littlelib"],function(g,k){function f(e,d){g.mixin(this,e);this.node=d||document.createElement("div");this.node.innerHTML=this.templateString;this.select=k.$(".setting-control",this.node)}g.mixin(f.prototype,{templateString:'\x3cselect class\x3d"setting-control" id\x3d"selection"\x3e\x3c/select\x3e',addOptions:function(e,d,f){d=document.createElement("option");d.value=e.value;d.appendChild(document.createTextNode("string"===typeof e.label?
e.label:e.value));e.selected&&(d.selected="selected");this.select.appendChild(d)},show:function(){this.postCreate()},postCreate:function(){this.options.forEach(this.addOptions.bind(this));this.select.addEventListener("change",this.change.bind(this))},destroy:function(){this.node&&(k.empty(this.node),this.node=this.select=null)},setStorageItem:function(){},getSelected:function(){return this.select.value},getSelectedIndex:function(){return this.select.selectedIndex},setSelectedIndex:function(e){this.select.selectedIndex=
e},getSelection:function(){return this.getSelected()},setSelection:function(e){for(var d=0;d<this.options.length;d++)if(this.options[d].value===e){this.setSelectedIndex(d);return}this.setSelectedIndex(0)},change:function(){var e=this.select.value;this.category?this.setStorageItem(this.category,this.item,this.element,e,this.ui):this.setStorageItem(e)}});return f});
define("orion/widgets/input/TextField",["orion/objects","orion/webui/littlelib"],function(g,k){function f(e,d){g.mixin(this,e);this.node=d||document.createElement("div");this.node.innerHTML=this.templateString;this.textfield=k.$(".setting-control",this.node)}g.mixin(f.prototype,{templateString:'\x3cinput type\x3d"text" class\x3d"setting-control" name\x3d"myname"/\x3e',category:null,item:null,element:null,ui:null,show:function(){this.textfield.addEventListener("change",this.change.bind(this));this.postCreate()},
destroy:function(){this.node&&(k.empty(this.node),this.textfield=this.node=null)},setStorageItem:function(){},width:function(e){this.textfield.style.width=e},getValue:function(){return"integer"===this.inputType?parseInt(this.textfield.value,10):this.textfield.value},setValue:function(e){this.textfield.value=e},getSelection:function(){return this.getValue()},setSelection:function(e){this.setValue(e)},postCreate:function(){this.inputType&&"password"===this.inputType&&(this.textfield.type="password");
this.editmode&&"readonly"===this.editmode&&this.textfield.setAttribute("readonly","true")},change:function(){var e;this.selection&&this.selection.value&&(e=this.selection.value);this.setStorageItem(this.category,this.item,this.element,e,this.ui)}});return f});
define("orion/widgets/themes/ThemeBuilder","i18n!orion/settings/nls/messages orion/commands orion/commandRegistry orion/globalCommands orion/PageUtil orion/webui/littlelib orion/widgets/themes/ThemeComponent orion/widgets/themes/editor/ThemeData orion/widgets/input/Select orion/widgets/input/TextField".split(" "),function(g,k,f,e,d,h,c,b,a,l){function m(){y=null;H=E=!0;u=[];z=F=A=null}function n(a,b){this.name=a;this.value=b}function p(a){this.settings=[];this.themeData=a.themeData;this.toolbarId=
a.toolbarId;m();document.getElementById("pageActions").innerHTML='\x3cdiv id\x3d"commandButtons"\x3e\x3cdiv id\x3d"revertCommands" class\x3d"layoutRight sectionActions"\x3e\x3c/div\x3e\x3cdiv id\x3d"userCommands" class\x3d"layoutRight sectionActions"\x3e\x3c/div\x3e\x3c/div\x3e';this.commandService=a.commandService;this.preferences=a.preferences;a=new k.Command({name:g.Cancel,tooltip:g["Revert Theme"],id:"orion.reverttheme",callback:function(a){this.revert(a.items)}.bind(this)});var b=new k.Command({name:g.Update,
tooltip:g["Update Theme"],id:"orion.applytheme",callback:function(a){this.apply(a.items)}.bind(this)}),c=new k.Command({name:g["Show Guide"],tooltip:g["Check Guide"],id:"orion.checkGuide",callback:function(a){this.guide(a.items)}.bind(this)}),d=new k.Command({name:g.Export,tooltip:g["Export a theme"],id:"orion.exportTheme",parameters:I,callback:function(a){var b;b=a.parameters&&a.parameters.valueFor("name")?a.parameters.valueFor("name"):"yourTheme";this.exportTheme(a.items,b)}.bind(this)});this.commandService.addCommand(c);
this.commandService.registerCommandContribution("themeCommands","orion.checkGuide",1);this.commandService.addCommand(a);this.commandService.registerCommandContribution("themeCommands","orion.reverttheme",2);this.commandService.addCommand(b);this.commandService.registerCommandContribution("themeCommands","orion.applytheme",3);this.commandService.addCommand(d);this.commandService.registerCommandContribution("themeCommands","orion.exportTheme",5)}function s(){if(F){F.clearRect(0,0,A.width,A.height);
var a=A.height;A.width=A.width;A.height=a}}function t(a){var b=A.getBoundingClientRect();return{x:a.clientX-b.left,y:a.clientY-b.top}}function q(a){var b=t(a);a=b.x;b=b.y;z=[];for(var c=0;c<u.length;c++)if(u[c].mouseOver(a,b)){A.style.cursor="crosshair";u[c].id=c;z.push(u[c]);break}else A.style.cursor=""}function w(a){A.style.cursor=""}function r(a,b){var c=!1;if(b)for(var d in a)if(a[d]===b){c=!0;break}return c}function v(a,b){for(var d=D+40,e=[],f=0,l=0,h=0;h<b.length;h++){var k=b[h];if(!1===r(e,
k.family)&&k.description){var f=x+10+28*l,m=Math.floor(k.x-6+(k.width+12)/2),n=Math.floor(k.y-6+(k.height+12)/2);switch(k.family){case "background":a.beginPath();a.moveTo(m+70+0.5,f-4+0.5);a.lineTo(D+50+0.5,f-4+0.5);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=1;a.stroke();c.drawArc(a,m+70,f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;case "Side":a.beginPath();a.moveTo(m+30+0.5,f-4+0.5);a.lineTo(D+50+0.5,f-4+0.5);a.strokeStyle="rgba(187,0,0,0.7)";a.lineWidth=1;a.stroke();c.drawArc(a,m+30,
f-4,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)");break;default:a.moveTo(m+0.5,n+0.5),a.lineTo(m+0.5,f-4+0.5),a.lineTo(D+50+0.5,f-4+0.5),a.strokeStyle="rgba(187,0,0,0.7)",a.lineWidth=1,a.stroke(),c.drawArc(a,m,n,3,0,2*Math.PI,!1,null,"rgba(187,0,0,0.7)")}a.globalAlpha=1;c.drawText(a,k.description,B+5+d,f,"bold 8pt sans-serif","#333");k.family&&e.push(k.family);l++}}c.drawText(a,g.clickDiagram,B+5+d,f+50,"bold 8pt sans-serif","#cc0000");c.drawText(a,g.clickUpdate,B+5+d,f+65,"bold 8pt sans-serif","#cc0000");
document.getElementById("stringcontainer").style.display="none"}var x=10,B=10,D=350,y=null,G=!0,E=!0,J=!1,H=!0,u=[],A=null,F=null,z=null;n.prototype.name=void 0;n.prototype.value=void 0;var I=new f.ParametersDescription([new f.CommandParameter("name","text",g["Theme name:"],g.yourTheme)]);p.prototype.applyColor=function(){var a=document.getElementById(this.themebuilder.colorFieldId).firstChild.value;this.themebuilder.validateHex(a)&&(u[y.id].fill=a,this.themebuilder.updateFamily(u[y.id].family,a),
G=!1,this.themebuilder.refresh(),u[y.id].glow(D,x),this.themebuilder.drawPicker(F,u[y.id]),h.node("pickercontainer").style.display="none",h.node("savecontainer").style.display="",h.node("stringcontainer").style.display="")};p.prototype.colorFieldId=void 0;p.prototype.settings=[];p.prototype.AUTONAME=!1;p.prototype.template='\x3cdiv id\x3d"themeContainer"\x3e\x3ccanvas id\x3d"orionui" width\x3d"800" height\x3d"380""\x3e\x3c/canvas\x3e\x3cdiv id\x3d"pickercontainer" style\x3d"display:block;"\x3e\x3cspan class\x3d"settingsLabel"\x3e'+
g["Theme:"]+'\x3c/span\x3e\x3cdiv id\x3d"themepicker" class\x3d"themepicker"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv id\x3d"savecontainer" style\x3d"display:none;"\x3e\x3cspan class\x3d"settingsLabel"\x3e'+g["New Theme Name:"]+'\x3c/span\x3e\x3cdiv id\x3d"themesaver" class\x3d"themesaver"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv id\x3d"sizecontainer"\x3e\x3cspan class\x3d"settingsLabel"\x3e'+g["Font Size:"]+'\x3c/span\x3e\x3cdiv id\x3d"fontsizepicker" class\x3d"fontsizepicker"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv id\x3d"stringcontainer" style\x3d"position:relative;left:400px;top:-140px;display:none;"\x3e\x3cspan\x3e'+
g["OR HEX:"]+'\x3c/span\x3e\x3cdiv id\x3d"colorstring" class\x3d"colorfield"\x3e\x3c/div\x3e\x3cbutton class\x3d"commandButton" style\x3d"padding:5px;font-size:9pt;" type\x3d"button" id\x3d"colorButton"\x3e'+g.Ok+"\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e";var L=["white seashell cornsilk lemonchiffon lightyellow palegreen paleturquoise aliceblue lavender plum".split(" "),"lightgray pink bisque moccasin khaki lightgreen lightseagreen lightcyan cornflowerblue violet".split(" "),"silver lightcoral sandybrown orange palegoldenrod chartreuse mediumturquoise skyblue mediumslateblue orchid".split(" "),
"gray red orangered darkorange yellow limegreen darkseagreen royalblue slateblue mediumorchid".split(" "),"dimgray crimson chocolate coral gold forestgreen seagreen blue blueviolet darkorchid".split(" "),"darkslategray firebrick saddlebrown sienna olive green darkcyan mediumblue darkslateblue darkmagenta".split(" "),"black darkred maroon brown darkolivegreen darkgreen midnightblue navy indigo purple".split(" ")];p.prototype.colornames=L;p.prototype.addAdditionalCommand=function(a){var b=new f.ParametersDescription([new f.CommandParameter("name",
"text",g["Commit message:"],"",4)],{hasOptionalParameters:!1}),b=new k.Command({name:a.name,tooltip:a.tip,parameters:b,id:a.id,callback:function(b){a.callback(b)}.bind(this)});this.commandService.addCommand(b);this.commandService.registerCommandContribution("themeCommands",a.id,4)};p.prototype.validateHex=function(a){var b=!0;!1===/^(#)?([0-9a-fA-F]{3})([0-9a-fA-F]{3})?$/.test(a)&&(b=!1);return b};p.prototype.clear=s;p.prototype.refresh=function(){this.clear();!0===J&&this.drawOutlineData()};p.prototype.updateFamily=
function(a,b){for(var c=0;c<u.length;c++)if(u[c].family){u[c].family===a&&(u[c].fill=b);for(var d in this.settings)if(this.settings[d].name===a){this.settings[d].value=b;break}}};p.prototype.drawPicker=function(a,b){var d=D+40;c.drawText(a,b.description,B+d,x+10,"bold 9pt sans-serif","#555");c.drawText(a,g["COLOR:"],B+d,x+50,"8pt sans-serif","#555");c.drawRectangle(a,B+d+5,x+60,40,15,b.fill,null);c.drawText(a,b.fill,B+d+5+40+5,x+70,"8pt sans-serif","#555");c.drawLine(a,B+d,x+25,B+d+190,x+25,10,"#555");
c.drawLine(a,B+d,x+85,B+d+190,x+85,5,"#555");c.drawText(a,g["NEW COLOR:"],B+d,x+115,"bold 8pt sans-serif","#555");if(!0===H){for(d=0;7>d;d++)for(var e=1;11>e;e++){var f=c.drawArc(a,B+D+20*e+25,x+90+20*d+50,7,0,2*Math.PI,!1,null,L[d][e-1]);f.paintchip=!0;u.push(f)}H=!1}else for(d=0;d<u.length;d++)u[d].paintchip&&u[d].render();d=document.getElementById("stringcontainer");d.style.display="";d.zIndex=1;d=document.getElementById(this.colorFieldId);this.colfld||(this.colfld=new l({},d),this.colfld.show(),
this.colfld.width("100px"));d=document.getElementById("colorButton");d.themebuilder=this;d.onclick=this.applyColor};p.prototype.colfld=void 0;p.prototype.mouseDown=function(a){G=!1;var b=t(a);a=b.x;for(var b=b.y,c=0;c<u.length;c++)u[c].mouseOver(a,b)&&(u[c].id=c,z=[],this.refresh(),z.push(u[c]));if(0<z.length){for(b=a=0;b<z.length;b++)z[b].width<z[a].width&&(a=b);G=0<z.length?!0:!1;switch(z[a].type){case "ELLIPSE":u[y.id].fill=z[a].fill;this.updateFamily(u[y.id].family,z[a].fill);G=!1;this.refresh();
u[y.id].glow(D,x);this.drawPicker(F,u[y.id]);h.node("pickercontainer").style.display="none";h.node("savecontainer").style.display="";!1===this.AUTONAME&&(a=this.themeSelect.getSelected(),this.themeSaver.setValue(a),this.AUTONAME=!0);break;case "RECTANGLE":case "ROUNDRECTANGLE":case "TEXT":z[a].glow(D,x),this.drawPicker(F,z[a]),y=z[a]}}};p.prototype.familyShown=r;p.prototype.overview=v;p.prototype.getCurrentSettings=function(){return this.settings};p.prototype.addData=function(a){this.settings=[];
var b;J=!0;if(a){this.dataset=a;for(var c=0;c<a.shapes.length;c++)b=a.shapes[c].fill?a.shapes[c].fill:a.shapes[c].line,this.settings[a.shapes[c].family]=new n(a.shapes[c].family,b)}};p.prototype.drawShape=function(a,b,d){var e;switch(a.type){case "RECTANGLE":e=c.drawRectangle(F,a.x,a.y,a.width,a.height,b,"#CCC");break;case "TEXT":e=c.drawText(F,a.label,a.x,a.y,a.font,b);break;case "ROUNDRECTANGLE":e=c.roundRect(F,a.x,a.y,a.width,a.height,5,b,"#CCC");break;case "LINE":c.drawLine(F,a.x1,a.y1,a.x2,a.y2,
a.linewidth,b);break;case "TRIANGLE":c.drawTriangle(F,a.x1,a.y1,a.x2,a.y2,a.x3,a.y3,b);break;case "IMAGE":var f=new Image;f.onload=function(){F.drawImage(f,a.x,a.y)};f.src=a.source}e&&(e.description=a.name,e.family=a.family,e.paintchip=!1,u.push(e))};p.prototype.drawOutlineData=function(a){a&&this.addData(a);A||(A=document.getElementById("orionui"),F=A.getContext("2d"),A.addEventListener("mousedown",this.mouseDown.bind(this),!1),A.addEventListener("mousemove",q,!1),A.addEventListener("mouseup",w,
!1));if(!0===E){for(var b in this.dataset.shapes)this.settings&&this.settings[this.dataset.shapes[b].family]&&(a=this.settings[this.dataset.shapes[b].family].value,this.dataset.shapes[b].fill?this.dataset.shapes[b].fill=a:this.dataset.shapes[b].line=a),this.drawShape(this.dataset.shapes[b],this.dataset.shapes[b].fill,this.dataset.shapes[b].line,this.dataset.shapes[b].font);E=!1}else for(var c in u)u[c].paintchip||u[c].render();G&&v(F,u)};p.prototype.apply=function(a){this.preferences.getTheme(function(a){var b=
this.settings.name;a=a.styles;var c=h.node("themesaver"),d=c.firstChild.value;if(0<d.length){b=!1;if(a)for(var e=0;e<a.length;e++)if(a[e].name===d){b=!0;break}if(!b){b={};b.name=d;for(var f in this.settings)e=this.settings[f].name,"name"!==e&&(b[e]=this.settings[f].value);a.push(b)}b=d;c.firstChild.value=""}this.preferences.setTheme(b,a);this.settings.fontSize&&this.preferences.setFontSize(this.settings.fontSize.value);h.node("savecontainer").style.display="none";h.node("pickercontainer").style.display=
"";this.updateThemePicker(b,a);this.AUTONAME=!1}.bind(this))};p.prototype.revert=function(a){this.guide();h.node("pickercontainer").style.display="";h.node("savecontainer").style.display="none";this.AUTONAME=!1};p.prototype.guide=function(a){this.refresh();G=!0;a=this.themeData.getViewData();this.drawOutlineData(a);h.node("stringcontainer").style.display="none"};p.prototype.select=function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(d.name===a){this.settings.name=a;for(var e in this.settings)"name"!==
e&&(this.settings[e].value=d[this.settings[e].name]);break}}s();m();this.refresh()};p.prototype.selectFontSize=function(a){this.settings.fontSize={value:a}};p.prototype.updateFontSizePicker=function(b){for(var c=[],d=8;19>d;d++){var e={value:d+"pt",label:d+"pt"};d===b&&(e.selected="true");c.push(e)}this.sizeSelect.destroy();b=document.createElement("div");b.id="fontsizepicker";document.getElementById("sizecontainer").appendChild(b);this.sizeSelect=new a({options:c},b);this.sizeSelect.setStorageItem=
this.selectFontSize.bind(this);this.sizeSelect.show()};p.prototype.addFontSizePicker=function(b){b=b.style.fontSize;document.getElementById("sizecontainer");for(var c=document.getElementById("fontsizepicker"),d=[],e=8;19>e;e++){var f={value:e+"pt",label:e+"pt"};f.value===b&&(f.selected="true");d.push(f)}this.sizeSelect||(this.sizeSelect=new a({options:d},c),this.sizeSelect.setStorageItem=this.selectFontSize.bind(this),this.sizeSelect.show())};p.prototype.addThemePicker=function(b){var c=[],d=b.style.name;
b=b.styles;for(var e=0;e<b.length;e++){var f={value:b[e].name,label:b[e].name};b[e].name===d&&(f.selected=!0);c.push(f)}this.select(d,b);d=document.getElementById("themepicker");this.themeSelect||(this.themeSelect=new a({options:c},d),this.themeSelect.setStorageItem=this.selectTheme.bind(this),this.themeSelect.show(),c=document.getElementById("themesaver"),this.themeSaver=new l({},c),this.themeSaver.show())};p.prototype.updateThemePicker=function(b,c){var d=[],e;for(e in c){var f={value:c[e].name,
label:c[e].name};b&&c[e].name===b&&(f.selected=!0);d.push(f);this.themeSelect.destroy();f=document.createElement("div");f.id="themepicker";for(var g=document.getElementById("themepicker"),l=g.firstChild;l;)g.removeChild(l),l=g.firstChild;g.appendChild(f);this.themeSelect=new a({options:d},f);this.themeSelect.setStorageItem=this.selectTheme.bind(this);this.themeSelect.show()}};p.prototype.renderData=function(a,b){var c=this.themeData.getViewData();b&&"INITIALIZE"===b&&(E=!0);a.innerHTML=this.template;
var d=this.themeData.getThemeStorageInfo(),e=document.getElementById("colorstring");this.colorFieldId=d.styleset+"colorField";e.id=this.colorFieldId;h.node("sizecontainer").style.display=this.themeData.fontSettable?"block":"none";this.drawOutlineData(c);this.preferences.getTheme(function(a){this.addFontSizePicker(a);this.addThemePicker(a)}.bind(this));this.commandService.renderCommands("themeCommands",document.getElementById(this.toolbarId||"revertCommands"),this,this,"button")};p.prototype.selectTheme=
function(a){this.preferences.getTheme(function(b){this.select(a,b.styles)}.bind(this))};p.prototype.addTheme=function(a){this.preferences.getTheme(function(b){var c=a.name;b.styles.push(a);this.preferences.setTheme(c,b.styles);this.select(c,b.styles);this.updateThemePicker(c,b.styles)}.bind(this))};p.prototype.destroy=function(){var a=this.themeSelect;a&&a.destroy();(a=this.themeSaver)&&a.destroy();(a=this.colfld)&&a.destroy();(a=this.fontsizepicker)&&a.destroy()};p.prototype.exportTheme=function(a,
b){var c={},d;for(d in u)if(!u[d].paintchip){console.log(u[d]);var e=u[d];"lineNumber"===e.family&&!c.hasOwnProperty("lineNumber")?c.lineNumber=e.fill:"background"===e.family&&!c.hasOwnProperty("background")?c.background=e.fill:"string"===e.family&&!c.hasOwnProperty("string")?c.string=e.fill:"text"===e.family&&!c.hasOwnProperty("text")?c.foreground=e.fill:"currentLine"===e.family&&!c.hasOwnProperty("currentLine")?c.selectionBackground=e.fill:"comment"===e.family&&!c.hasOwnProperty("comment")?c.singleLineComment=
e.fill:"keyword"===e.family&&!c.hasOwnProperty("keyword")?c.keyword=e.fill:"overviewRuler"===e.family&&!c.hasOwnProperty("overviewRuler")?c.overviewRuler=e.fill:"annotationRuler"===e.family&&!c.hasOwnProperty("annotationRuler")?c.annotationRuler=e.fill:"attribute"===e.family&&!c.hasOwnProperty("attribute")&&(c.attribute=e.fill)}c.themeName=b;d='\x3ccolorTheme id\x3d"0" name\x3d"#themeName"\x3e\x3cbackground color\x3d"#background"/\x3e\x3csingleLineComment color\x3d"#singleLineComment"/\x3e\x3ckeyword color\x3d"#keyword"/\x3e\x3cforeground color\x3d"#foreground"/\x3e\x3cstring color\x3d"#string"/\x3e\x3clineNumber color\x3d"#lineNumber"/\x3e\x3cselectionBackground color\x3d"#selectionBackground"/\x3e\x3coverviewRuler color\x3d"#overviewRuler"/\x3e\x3cannotationRuler color\x3d"#annotationRuler"/\x3e\x3cattribute color\x3d"#attribute"/\x3e\x3c/colorTheme\x3e';
for(var f in c)d=d.replace("#"+f,c[f]);window.alert(d)};return p});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(g,k){function f(e,d){d||(d="orion.page.selection");this._serviceRegistry=e;g.attach(this);this._serviceRegistration=e.registerService(d,this);this._selections=null}f.prototype={getSelection:function(e){var d=this._getSingleSelection();"function"===typeof e&&e(d);return d},getSelections:function(e){var d=Array.isArray(this._selections)?this._selections.slice():[];"function"===typeof e&&e(d);return d},_getSingleSelection:function(){return this._selections&&
0<this._selections.length?this._selections[0]:null},setSelections:function(e){var d=this._selections;Array.isArray(e)?this._selections=0<e.length?e.slice():null:this._selections=e?[e]:null;d!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};f.prototype.constructor=f;return{Selection:f}});
define("orion/section","orion/webui/littlelib orion/selection orion/commandRegistry orion/commonHTMLFragments orion/objects orion/selection".split(" "),function(g,k,f,e,d,h){function c(a,b){var c=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!b.id)throw Error("Missing required argument: id");this.id=b.id;if(!b.title)throw Error("Missing required argument: title");var d=b.useAuxStyle?["sectionWrapper",
"sectionWrapperAux","toolComposite"]:["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");a.appendChild(this.domNode);for(var f=0;f<d.length;f++)this.domNode.classList.add(d[f]);this.domNode.id=b.id;b.canHide&&(this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitleTwistie"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=
0,this.domNode.addEventListener("click",function(a){(a.target===c.titleNode||a.target===c.twistie||a.target===c.domNode)&&c._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(a){a.keyCode===g.KEY.ENTER&&(a.target===c.domNode||a.target===c.titleNode||a.target===c.twistie)&&c._changeExpandedState()},!1));if(b.iconClass){var h=document.createElement("span");h.classList.add("sectionIcon");this.domNode.appendChild(h);d=Array.isArray(b.iconClass)?b.iconClass:[b.iconClass];d.forEach(function(a){h.classList.add(a)})}b.headerClass&&
(d=Array.isArray(b.headerClass)?b.headerClass:[b.headerClass],d.forEach(function(a){this.domNode.classList.add(a)}.bind(this)));this.titleNode=document.createElement("div");this.titleNode.id=b.id+"Title";this.titleNode.classList.add("sectionAnchor");this.titleNode.classList.add("sectionTitle");this.titleNode.classList.add("layoutLeft");this.domNode.appendChild(this.titleNode);this.titleNode.textContent=b.title;"function"===typeof b.getItemCount&&(d=document.createElement("div"),d.classList.add("layoutLeft"),
d.classList.add("sectionItemCount"),this.domNode.appendChild(d),d.textContent=b.getItemCount(this));this._progressNode=document.createElement("div");this._progressNode.id=b.id+"Progress";this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);d=document.createElement("div");d.id=b.id+
"FilterSearchBox";this.domNode.appendChild(d);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=b.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("ul");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("commandList");this.actionsNode.classList.add("sectionActions");
this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("ul");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("commandList");this.selectionNode.classList.add("sectionActions");this.domNode.appendChild(this.selectionNode);b.slideout&&(d=e.slideoutHTMLFragment(b.id),f=document.createRange(),f.selectNode(this.domNode),d=f.createContextualFragment(d),this.domNode.appendChild(d));this._contentParent=
document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);a.appendChild(this._contentParent);b.content&&this.setContent(b.content);"function"===typeof b.onExpandCollapse&&(this._onExpandCollapse=b.onExpandCollapse);this._preferenceService=b.preferenceService;this._collapse();if(this._preferenceService){var k=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=
a.get(k.id);void 0===a?b.hidden||k._expand():a&&k._expand();k._updateExpandedState(!1)})}else b.hidden||this._expand(),this._updateExpandedState(!1);this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function b(a){this._section=a;this._id=++a._lastMonitor}c.prototype={setTitle:function(a){this.titleNode.textContent=a},getHeaderElement:function(a){return this.domNode},getTitleElement:function(a){return this.titleNode},getActionElement:function(a){return this._toolActionsNode},
setContent:function(a){"string"===typeof a?this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},embedExplorer:function(a,b,c){this._contentParent.innerHTML="";a.parent||(a.parent=b);this._contentParent.appendChild(a.parent);a.section=this;d.mixin(a,{createActionSections:function(){this.actionsSections&&this.actionsSections.forEach(function(a){if(!g.node(a)){var b=document.createElement("ul");
b.id=a;b.classList.add("commandList");b.classList.add("layoutRight");this.section.actionsNode.appendChild(b)}}.bind(this))},getCommandsVisible:function(){return"hidden"!==this.section.actionsNode.style.visibility},setCommandsVisible:function(a,b){this.section.actionsNode.style.visibility=a?"":"hidden";void 0===b&&(b=a?null:"cursorOnly");this.renderer.selectionPolicy=b;var c=this.getNavHandler();c&&c.setSelectionPolicy(b);a?this.updateCommands():this.actionsSections&&this.actionsSections.forEach(function(a){g.node(a)&&
this.commandRegistry.destroy(a)}.bind(this))},destroy:function(){Object.getPrototypeOf(this).destroy.call(this);var a=this;this.actionsSections&&(this.actionsSections.forEach(function(b){delete a[b]}),delete this.actionsSections)},updateCommands:function(a){this.section.actionsNode&&this.getCommandsVisible()&&(this.createActionSections(),Object.getPrototypeOf(this).updateCommands.call(this,a))},loaded:function(){var a=this;!this.selection&&!c&&(this.serviceRegistry||this.registry?(this.selection=
new h.Selection(this.serviceRegistry||this.registry,this.parent.id+"Selection"),this.selection.addEventListener("selectionChanged",function(b){a.updateCommands(b.selections)})):window.console.error("Could not create a Selection for the explorer because of lack of serviceRegistry"));var b=this.registerCommands();!b||!b.then?a.updateCommands():b.then(function(){a.updateCommands()})}});a.renderer&&(a.renderer.section=this,d.mixin(a.renderer,{getCellHeaderElement:function(a){(a=Object.getPrototypeOf(this).getCellHeaderElement.call(this,
a))&&this.section.setTitle(a.innerHTML);return null}}))},createProgressMonitor:function(){return new b(this)},_setMonitorMessage:function(a,b){this._progressNode.style.visibility="visible";this._loading[a]=b;var c="",d;for(d in this._loading)""!==c&&(c+="\n"),c+=this._loading[d];this._progressNode.title=c},_monitorDone:function(a){delete this._loading[a];a="";for(var b in this._loading)""!==a&&(a+="\n"),a+=this._loading[b];this._progressNode.title=a;""===a&&(this._progressNode.style.visibility="hidden")},
_changeExpandedState:function(){this.hidden?this._expand():this._collapse();this._updateExpandedState(!0)},_updateExpandedState:function(a){var b=!this.hidden,c=this.twistie,d=this.id;c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass));this._preferenceService&&a&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(d,b)});this._onExpandCollapse&&this._onExpandCollapse(b,this)},_expand:function(){this._contentParent.classList.remove("sectionClosed");
this.domNode.classList.remove("sectionClosed");this.hidden=!1},_collapse:function(){this.hidden=!0;this._contentParent.classList.add("sectionClosed");this.domNode.classList.add("sectionClosed")}};c.prototype.constructor=c;b.prototype={begin:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},worked:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},done:function(a){this.status=a;this._section._monitorDone(this.id)}};b.prototype.constructor=b;return{Section:c}});
define("orion/widgets/input/Checkbox",["orion/objects","orion/webui/littlelib"],function(g,k){function f(e,d){g.mixin(this,e);this.node=d||document.createElement("div");this.node.innerHTML=this.templateString;this.checkbox=k.$(".setting-control",this.node)}g.mixin(f.prototype,{templateString:'\x3clabel\x3e\x3cinput class\x3d"setting-control settingsCheckbox" type\x3d"checkbox"/\x3e\x3c/label\x3e',show:function(){this.checkbox.addEventListener("change",this.change.bind(this));this.postCreate()},destroy:function(){this.node&&
(k.empty(this.node),this.checkbox=this.node=null)},setStorageItem:function(){},isChecked:function(){return this.checkbox.checked},setChecked:function(e){this.checkbox.checked=e},getSelection:function(){return this.isChecked()},setSelection:function(e){this.setChecked(e)},change:function(){this.setStorageItem(this.checkbox.value)},postCreate:function(){this.checkbox.style.width="20px";this.editmode&&"readonly"===this.editmode&&this.checkbox.setAttribute("disabled","disabled")}});return f});
define("orion/widgets/input/LabeledCheckbox",["orion/objects","orion/webui/littlelib","orion/widgets/input/Checkbox"],function(g,k,f){function e(d,e){f.apply(this,arguments);this.mylabel=k.$(".setting-label",this.node)}g.mixin(e.prototype,f.prototype,{templateString:'\x3clabel\x3e\x3cspan class\x3d"setting-label"\x3e\x3c/span\x3e\x3cinput class\x3d"setting-control settingsCheckbox" type\x3d"checkbox"/\x3e\x3c/label\x3e',postCreate:function(){f.prototype.postCreate.call(this);this.mylabel.textContent=
this.fieldlabel+":"},destroy:function(){f.prototype.destroy.call(this);this.mylabel&&(this.mylabel=null)}});return e});
define("orion/widgets/input/LabeledTextfield",["orion/objects","orion/webui/littlelib","orion/widgets/input/TextField"],function(g,k,f){function e(d,e){f.apply(this,arguments);this.mylabel=k.$(".setting-label",this.node)}g.mixin(e.prototype,f.prototype,{templateString:'\x3cdiv class\x3d"setting-property"\x3e\x3clabel\x3e\x3cspan class\x3d"setting-label"\x3e\x3c/span\x3e\x3cinput class\x3d"setting-control" type\x3d"text" /\x3e\x3c/label\x3e\x3c/div\x3e',destroy:function(){f.prototype.destroy.call(this);
this.mylabel&&(this.mylabel=null)},postCreate:function(){f.prototype.postCreate.call(this);this.mylabel.textContent=this.fieldlabel+":"}});return e});
define("orion/widgets/input/LabeledSelect",["orion/objects","orion/webui/littlelib","orion/widgets/input/Select"],function(g,k,f){function e(d,e){f.apply(this,arguments);this.mylabel=k.$(".setting-label",this.node)}g.mixin(e.prototype,f.prototype,{templateString:'\x3cdiv class\x3d"setting-property"\x3e\x3clabel\x3e\x3cspan class\x3d"setting-label"\x3e\x3c/span\x3e\x3cselect class\x3d"setting-control"\x3e\x3c/select\x3e\x3c/label\x3e\x3c/div\x3e',postCreate:function(){f.prototype.postCreate.call(this);
this.mylabel.textContent=this.fieldlabel+":"},destroy:function(){f.prototype.destroy.call(this);this.mylabel&&(this.mylabel=null)}});return e});
define("orion/settings/ui/PluginSettings","i18n!orion/settings/nls/messages orion/explorers/explorer orion/section orion/i18nUtil orion/Deferred orion/objects orion/widgets/input/LabeledCheckbox orion/widgets/input/LabeledTextfield orion/widgets/input/LabeledSelect".split(" "),function(g,k,f,e,d,h,c,b,a){function l(a,b){this.serviceRegistry=b;this.childWidgets=[];s.call(this,{cachePrefix:"pluginSettings"},a)}function m(a,b){p.call(this,a,b,new l(this,a))}function n(a){var b=a.parent,c=a.serviceRegistry,
d=a.settings;if(!a.parent||!a.serviceRegistry||!a.settings||!a.title)throw Error("Missing required option");this.parent="string"===typeof b?document.getElementById("parent"):b;this.render(b,c,d,a.title)}var p=k.Explorer,s=k.SelectionRenderer,t=f.Section,q=function(a){h.mixin(this,a);this.fieldlabel=this.property.getName()};h.mixin(q.prototype,{postCreate:function(){var a=this.property,b=this.configuration.getProperties(),a=b&&"undefined"!==typeof b[a.getId()]?b[a.getId()]:a.getDefaultValue();"function"===
typeof this.updateField&&this.updateField(a)},changeProperty:null,updateField:null});var w=function(a){q.apply(this,arguments);b.apply(this,arguments)};h.mixin(w.prototype,b.prototype,q.prototype,{postCreate:function(){b.prototype.postCreate.apply(this,arguments);q.prototype.postCreate.apply(this,arguments);"number"===this.property.getType()?this.textfield.type="number":this.textfield.type="text"},change:function(a){this.changeProperty(this.textfield.value)},updateField:function(a){this.textfield.value=
a}});var r=function(a){q.apply(this,arguments);c.apply(this,arguments)};h.mixin(r.prototype,c.prototype,q.prototype,{change:function(a){this.changeProperty(a.target.checked)},postCreate:function(){q.prototype.postCreate.call(this);c.prototype.postCreate.call(this)},updateField:function(a){this.checkbox.checked=a}});var v=function(b){q.apply(this,arguments);a.apply(this,arguments)};h.mixin(v.prototype,a.prototype,q.prototype,{postCreate:function(){var b=this.property.getOptionValues(),c=this.property.getOptionLabels();
this.options=b.map(function(a,b){var d="string"===typeof c[b]?c[b]:a;return{value:d,label:d}});a.prototype.postCreate.apply(this,arguments);q.prototype.postCreate.apply(this,arguments)},change:function(b){a.prototype.change.apply(this,arguments);var c=this.property.getOptionValues()[this.getSelectedIndex()];"undefined"!==typeof c&&this.changeProperty(c)},updateField:function(a){a=this.property.getOptionValues().indexOf(a);-1!==a&&this.setSelectedIndex(a)}});var x=function(a,b){h.mixin(this,a);if(!b)throw"parentNode is required";
this.node=b};h.mixin(x.prototype,{createElements:function(){var a=this.serviceRegistry,b=this;this.children=[];this.configAdmin=a.getService("orion.cm.configadmin");this.initConfiguration().then(function(a){b.createChildren(a)})},startup:function(){this.createElements()},destroy:function(){this.children&&this.children.forEach(function(a){a.destroy()})},addChild:function(a){this.children.push(a);this.node.appendChild(a.node);a.show()},initConfiguration:function(){var a=this.configuration;if(a)return(new d).resolve(a);
var b=this;return this.configPromise=this.configPromise||this.configAdmin.getConfiguration(this.setting.getPid()).then(function(a){return b.configuration=a})},createChildren:function(a){var b=this;this.setting.getAttributeDefinitions().forEach(function(c){var d={property:c,configuration:a,serviceRegistry:b.serviceRegistry,changeProperty:b.changeProperty.bind(b,c)},e;if(c.getOptionValues())e=new v(d);else switch(c.getType()){case "boolean":e=new r(d);break;case "number":case "string":e=new w(d)}b.addChild(e)})},
changeProperty:function(a,b){this.initConfiguration().then(function(c){var d=this.setting,e=c.getProperties()||{};e[a.getId()]=b;d.isDefaults(e)?(c.remove(),this.configPromise=this.configuration=null):c.update(e)}.bind(this))}});l.prototype=new s;l.prototype.getCellElement=function(a,b,c){var d=b.getPid(),e=d+"header";a=document.createElement("section");a.id=d;a.className="setting-row";a.setAttribute("role","region");a.setAttribute("aria-labelledby",e);d=document.createElement("h3");d.id=e;d.className=
"setting-header";d.textContent=b.getName();e=document.createElement("div");e.className="setting-content";b=this.createPropertiesWidget(e,b);this.childWidgets.push(b);b.startup();a.appendChild(d);a.appendChild(e);c.appendChild(a)};l.prototype.createPropertiesWidget=function(a,b,c){return new x({serviceRegistry:this.serviceRegistry,setting:b},a)};l.prototype.renderTableHeader=function(a){return document.createElement("div")};l.prototype.destroy=function(){this.childWidgets&&this.childWidgets.forEach(function(a){a.destroy()});
this.childWidgets=null};m.prototype=new p;m.prototype.destroy=function(){this.renderer&&this.renderer.destroy()};n.prototype={_makeSection:function(a,b,c,d){return new t(a,{id:b,title:d,useAuxStyle:!0,getItemCount:function(){return c.length}})},destroy:function(){this.explorer.destroy()},render:function(a,b,c,d){a=this._makeSection(a,"pluginsettings-section",c,d);0<c.length&&c[0].category&&a.getContentElement().classList.add(c[0].category+"SettingsTable");this.explorer=new m(b);this.explorer.createTree(a.getContentElement().id,
new k.SimpleFlatModel(c,"setting-",function(a){return a.getPid()}),{tableElement:"div",tableBodyElement:"div",tableRowElement:"div",noSelection:!0})}};return n});
define("orion/widgets/settings/SplitSelectionLayout",["i18n!orion/settings/nls/messages","require","orion/webui/littlelib","orion/objects"],function(g,k,f,e){function d(d,c,b){e.mixin(this,d);this.selectionNode=c;this.contentNode=b;this.itemToIndexMap=null;this.toolbar=f.node(this.pageActions);this.selectionNode.innerHTML=this.categoriesTemplateString;this.contentNode.innerHTML=this.contentTemplateString;this.navbar=f.$(".navbar",this.selectionNode);this.table=f.$(".split-selection-table",this.contentNode)}
e.mixin(d.prototype,{categoriesTemplateString:'\x3cdiv id\x3d"categories" class\x3d"categories"\x3e\x3cdiv id\x3d"categoryNode" class\x3d"sidePanelMargins"\x3e\x3cul class\x3d"navbar" role\x3d"tablist" aria-labelledby\x3d"content-title"\x3e\x3c/ul\x3e\x3c/div\x3e\x3c/div\x3e',contentTemplateString:'\x3cdiv class\x3d"settings" role\x3d"tabpanel"\x3e\t\x3cdiv class\x3d"split-selection-table"\x3e\x3c/div\x3e\x3c/div\x3e',show:function(){this.itemToIndexMap={};this.drawUserInterface()},updateToolbar:function(d){this.toolbar&&
f.empty(this.toolbar)},addCategory:function(d,c){c="undefined"===typeof c?0:c;var b=document.createElement("li");b.classList.add("navbar-item");b.setAttribute("role","tab");b.setAttribute("aria-selected","false");b.tabIndex=-1;b.textContent=d.textContent;Object.keys(d).forEach(function(a){"show"===a||"onclick"===a?b.addEventListener("click",d[a]):b.setAttribute(a,d[a])});this.navbar.appendChild(b);this.itemToIndexMap[d.id]=c},selectCategory:function(d){this.selectedCategory&&(this.selectedCategory.classList.remove("navbar-item-selected"),
this.selectedCategory.setAttribute("aria-selected","false"),this.selectedCategory.tabIndex=-1);d&&(this.selectedCategory=f.node(d));this.selectedCategory.classList.add("navbar-item-selected");this.selectedCategory.setAttribute("aria-selected","true");this.contentNode.setAttribute("aria-labelledby",d);this.selectedCategory.tabIndex=0;this.selectedCategory.focus()},showSettings:function(d){this.selectCategory(d);this.updateToolbar(d)},drawUserInterface:function(){f.empty(this.navbar);var d=this,c;this.navbar.addEventListener("keydown",
function(b){if(b.keyCode===f.KEY.LEFT||b.keyCode===f.KEY.UP)d.selectedCategory.previousSibling&&(c=document.createEvent("MouseEvents"),c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),d.selectedCategory.previousSibling.dispatchEvent(c));else if((b.keyCode===f.KEY.RIGHT||b.keyCode===f.KEY.DOWN)&&d.selectedCategory.nextSibling)c=document.createEvent("MouseEvents"),c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),d.selectedCategory.nextSibling.dispatchEvent(c)})}});
return d});
define("orion/widgets/plugin/ServiceCarousel",["i18n!orion/settings/nls/messages","orion/objects","orion/webui/littlelib"],function(g,k,f){function e(d,c){var b=d.style;b.left=c.left+"px";b.top=c.top+"px";b.width=c.width+"px";b.height=c.height+"px"}function d(d,c){k.mixin(this,d);this.node=document.createElement("div");if(!this.node)throw Error("parentNode is required");c.appendChild(this.node)}k.mixin(d.prototype,{serviceState:!1,pointer:0,box:null,closedIcon:"data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAwAAAANCAYAAACdKY9CAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46FewKfYYAAAF4SURBVCjPbZEvyFNhGMV/590ciANhjNs2nC66osHiJ8b9cdVgN4uKyWbRaDGZBIvwYRB2723WBUEEy5igYeZxYQzd7t2x7IUFn/bAOec55zxK05TxeEyWZZds3wEeAXeBP8An4I3tr5PJZJemKQLIsiyxfQ6c8f95V1XVw+l0utdsNrsInEsaA5akE6Btx/3Vfr9/HiTdOIIBKMsS29gGOCU/bTQanWD7QVQry1Lz+ZzFYsFutyOEgCQkGbhg+1Zd0vRIkG2KomC5XLJarej3+3S7XUII8dJZHehIihaQxHq9ZrvdUhQFzWaTdrvNEXO1DvwCrkSjh8OBJEnodrv0ej1arVZMD/CjLumj7SexoSRJGAwGdDodarVaBFqSbH9WlmU3gS9RHSCEgG1iw8fW/gLXAvDd9gfbhBAIIThmOf4hZnux2Wx+CyDP88tVVb2XdC9mOVUHXo9Go8eSCFmWMRwOC+A+cBt4C/y0/c32S+C6pGeSyPOcfyAyt4A7QPcNAAAAAElFTkSuQmCC",openIcon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAMCAYAAAC5tzfZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wCCQ46NddkXU4AAAFuSURBVCjPXZG/q9NwFMU/5yYQOhVKoF1SDK9OOjl1URxcQl+G5/LgLeJf4K7wRjdBxMXRxcFR6TfZ3e3iUGe3DKXYQSEk10GjwbPdy+X8uEdVVVEUBVVVJcBt4MrdHwI3gG/u/lHSO3f/vNlsfoQQEEBd19O+799IunR3JAHg7gxw92Bmj4uiaLTdbifAe0nnkvDfl+IfxvMnSUUs6Q5wLom+7+m6TmMFSYrjeFjcdfd7MfBozLjb7WiaBjPD3ZlOp6zXa8VxPNh9YsCDgdTMmM/nHI9H9vs9TdOQpilRFI3cct+A7+PgWZaxXC5JkoQsy8jznP/w04Aw2JNEFEXkec5isWC1WjGZTIZvDrk+KIRwC/jyJzQAfd9zOByYzWZ/s42wNklfgZejXtzMSNMUMxsrALx1952G46qqnrr7tZklQ8EjhRZ40XXddVmWrdV1jSROp9Nz4MzdL4BX7h6A18ClpJtt2z4ry7INIfAL982ks01Z8EgAAAAASUVORK5CYII\x3d",
templateString:'\x3cdiv class\x3d"plugin-service-carousel" \x3e\x3cdiv class\x3d"serviceContainer"\x3e\x3cdiv class\x3d"serviceContainerClosed" tabindex\x3d"0" role\x3d"button" aria-pressed\x3d"false"\x3e${Services}\x3c/div\x3e\x3cdiv class\x3d"serviceCount"\x3e0\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"serviceRails serviceRailsHidden" tabindex\x3d"0" role\x3d"group"\x3e\x3cdiv class\x3d"leftButton leftButtonArea" role\x3d"presentation"\x3e\x3cspan class\x3d"leftCarousel carouselControl"\x3e\x26lt;\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d"listContainer" role\x3d"presentation"\x3e\x3cul class\x3d"serviceList"\x3e\x3c/ul\x3e\x3c/div\x3e\x3cdiv class\x3d"rightButton rightButtonArea" role\x3d"presentation"\x3e\x3cspan class\x3d"rightCarousel carouselControl"\x3e\x26gt;\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
createElements:function(){this.node.innerHTML=this.templateString;f.processTextNodes(this.node,g);var d=this.serviceLabel=f.$(".serviceContainerClosed",this.node);this.serviceCount=f.$(".serviceCount",this.node);var c=this.rails=f.$(".serviceRails",this.node);this.leftbutton=f.$(".leftButton",this.node);this.listContainer=f.$(".listContainer",this.node);this.testlist=f.$(".serviceList",this.node);this.rightbutton=f.$(".rightButton",this.node);f.$(".leftCarousel",this.node).addEventListener("click",
this.slideLeft.bind(this));f.$(".rightCarousel",this.node).addEventListener("click",this.slideRight.bind(this));d.addEventListener("click",this.showServices.bind(this));d.addEventListener("keypress",this.onServiceClick.bind(this));c.addEventListener("mouseenter",this.showButtons.bind(this));c.addEventListener("mouseleave",this.hideButtons.bind(this));c.addEventListener("focus",this.showButtons.bind(this));c.addEventListener("blur",this.hideButtons.bind(this));c.addEventListener("keypress",this.handleKeypress.bind(this));
this.postCreate()},destroy:function(){this.node&&(this.node=this.serviceLabel=this.serviceCount=this.rails=this.leftbutton=this.listContainer=this.testlist=this.rightbutton=null)},postCreate:function(){var d=f.bounds(this.node.parentNode);this.addData(this.serviceData);this.serviceLabel.textContent=g.Services;this.serviceCount.textContent=this.serviceData.length;this.node.style.width=d.width-63+"px"},show:function(){this.createElements()},expand:function(){this.rails.classList.remove("serviceRailsHidden");
this.rails.classList.add("serviceRailsVisible");this.serviceLabel.classList.remove("serviceContainerClosed");this.serviceLabel.classList.add("serviceContainerOpen");this.serviceState=!0},collapse:function(){this.serviceLabel.classList.remove("serviceContainerOpen");this.serviceLabel.classList.add("serviceContainerClosed");this.rails.classList.remove("serviceRailsVisible");this.rails.classList.add("serviceRailsHidden");this.serviceState=!1},showServices:function(){!1===this.serviceState?(this.expand(),
this.box?f.bounds(this.rails,this.box):this.box=f.bounds(this.rails)):(f.bounds(this.rails,{height:0}),this.collapse())},onServiceClick:function(d){if(d.keyCode===f.KEY.ENTER||d.charCode===f.KEY.SPACE)this.showServices(),!1===this.serviceState?d.target.setAttribute("aria-pressed","true"):d.target.setAttribute("aria-pressed","false"),d.preventDefault()},showButtons:function(){this.leftbutton.style.visibility=1<this.serviceData.length&&0<this.pointer?"visible":"hidden";this.rightbutton.style.visibility=
1<this.serviceData.length&&this.pointer<this.serviceData.length-1?"visible":"hidden";var d=f.bounds(this.rails),c=f.bounds(this.leftbutton.firstChild),d=Math.round(d.height/2)-Math.round(c.height)+"px";this.leftbutton.firstChild.style.top=d;this.rightbutton.firstChild.style.top=d},hideButtons:function(){this.leftbutton.style.visibility="hidden";this.rightbutton.style.visibility="hidden"},slideRight:function(){this.box=f.bounds(this.rails);if(this.pointer<this.serviceData.length-1){this.pointer+=1;
for(var d=0;d<this.pointer;d++)this.listContainer.childNodes[0].childNodes[d].style.display="none";e(this.rails,this.box)}this.showButtons()},slideLeft:function(){this.box=f.bounds(this.rails);0<this.pointer&&(this.pointer-=1,this.listContainer.childNodes[0].childNodes[this.pointer].style.display="");this.showButtons();e(this.rails,this.box)},consoleOutput:function(d){console.log("Service: "+d.title+" Element: "+d.item+":");console.dir(d.value)},createServiceTable:function(d,c){var b=document.createElement("li");
b.classList.add("serviceData");c.appendChild(b);var a=document.createElement("div");a.classList.add("listEntry");b.appendChild(a);b=document.createElement("div");b.classList.add("tablecontainer");a.appendChild(b);var e=document.createElement("table");b.classList.add("serviceTable");b.appendChild(e);e.innerHTML='\x3cthead\x3e\x3ctr\x3e\x3cth scope\x3d"col"\x3e${Item}\x3c/th\x3e\x3cth scope\x3d"col"\x3e${Value}\x3c/th\x3e\x3c/tr\x3e\x3c/thead\x3e';f.processTextNodes(e,g);b=document.createElement("tbody");
e.appendChild(b);for(e=0;e<d.items.length;e++){var k=document.createElement("tr"),n=document.createElement("td");n.textContent=d.items[e].item;k.appendChild(n);b.appendChild(k);var p=d.items[e].value,n=document.createElement("td");k.appendChild(n);"object"===typeof p?(k={title:d.service,item:d.items[e].item,value:p},p=document.createElement("span"),p.classList.add("objectLink"),p.title=g["click here, then check javascript console to drill down"],p.addEventListener("click",this.consoleOutput.bind(this,
k)),p.textContent=g["JavaScript Object"],n.appendChild(p)):n.textContent=p}b=document.createElement("div");b.classList.add("listTitle");b.textContent=d.service;a.appendChild(b)},addData:function(d){var c;for(c=0;c<d.length;c++)this.createServiceTable(d[c],this.testlist)},handleKeypress:function(d){d.keyCode===f.KEY.LEFT&&"hidden"!==this.leftbutton.style.visibility?this.slideLeft():d.keyCode===f.KEY.RIGHT&&"hidden"!==this.rightbutton.style.visibility&&this.slideRight()}});return d});
define("orion/widgets/plugin/PluginEntry",["i18n!orion/settings/nls/messages","orion/PageUtil","orion/objects","orion/webui/littlelib","orion/widgets/plugin/ServiceCarousel"],function(g,k,f,e,d){function h(a){var b=a.split("/"),b=b[b.length-1],b=b.split(".html")[0],b=b.replace(/([a-z])([A-Z])/,"$1 $2"),b=function(a){return a.toLowerCase().replace(/\b[a-z]/g,function(a){return a.toUpperCase()})}(b),b=b.replace("plugin",""),b=b.replace("Plugin","");""===b&&(b=a);return b}function c(a){var b=[];a.getServiceReferences().forEach(function(a){var c=
{service:a.getProperty("objectClass").join(" "),items:[]};a.getPropertyKeys().forEach(function(b){b={item:b,value:a.getProperty(b)};c.items.push(b)});b.push(c)});return b}function b(a,b){f.mixin(this,a);this.node=b||document.createElement("div")}f.mixin(b.prototype,{iconSource:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBFxMFB6T1TK0AAAfOSURBVGjevZpLbFzlGYaf9x87DnZCyLUhCSSOY9PgmdwQdxrRVqhR1aYgpVXUTbvohgqRtrQCsWjFolSqBIUKCXXRsmkFCygiUpu2QgkFWkoIGOKZQIRj5yYSUifNhdiO7TlvF/+Mb4zt8bGTszmamXP+//2+7/2u/4gZulxgAYmWWl4kWG6zVGI+5gLQjziOOeYQzmgwOar19AMkpyEsTL+v0ryUAKEMfD8PWNqBvExWLVADyAI8YgcDOEEaxB5A2if5Z2rlHQDnQdnLLIALoFZwO3cgHsTahsiAsbGkqtazbYGMQHwi/AeLp0Irp/0BaP0MCpDsBhozhMYiyX41EPxXoc3YIM0I+2yXVtLDlp8OWS5Va5GqESR5PS57B1J93HFm0I8SBAtzWLBdOd5O8hCy07VAnvkyO4G7jCwx08DHmgMhkB9SlieT9kDIJVMXwAUArnWiDqBeGuWSl1MASyX/MDtDzt8q+16lK4y7UMJyzH7J9eDxwSeG2ZtKj0z/itSUsS15a5Jnl1ohOabJBUjypXuBBZKO2CwEUZHvdoyNjbugaR/U3zVjQpTkENEKW5zXK+E6k+yfRAD1LI73hD1AZlI/nX0TzNkSgTe+Bg1fHi2EDUVPVzAbtrqdHWFdzBcVBUjeA9/8X5zX7yzW4Uk4L0HPu3BseylLBWjcDXNLAtlQ1wI3fAj1t6UWQpIUHeMpt3PL2NA6CmDyAdeR4ahQ9Q5rQ8NmaPwnQ7mh83YYPAktXaVnivBxC/R3psodZcfGdGLWOtBfDq+jKZTRv+QpZmgJPnsdujZHS9iw+i1oenfYEspAc0dqSwz5A6wm6IGRuWEIqNv5PuK5qZQEn7fE3dC4hwmzdEcW+grpLAGWLcRcxGdqhZB8VPpRejA1+PLV1wZJX0kvrhC1gKb3oSFlxLJLq+on5bwgAB+giSIdFbVS3mgiuWyoXQ5rCpCZR1V10uGvwWf/SGMJ2xwJOTe6UPIBF3nW44GvawHVTLxkzSJoOVod+LJCVv0drro5jSUkWOUC69QKwQXmSnxJY21uw7xt0HwQVvwpZlxXoEVmITS1g0J1mi//bkPTXpi1JkVsNSR6LEahJFxvq6Zi5Fn0SLzP+w6sfHkY5Eja3PAp1C6dnGZjBZegdy8MHEqTHWz5nuRDFKzki+Caiprquh362uPnq++FVa+P0PyCyPmRQk0F/IW/QOcdaROcQDUUw/UBs35czXkQDq2D3rb4ueFOWLkTZq2Elo7qHXasYi7sgiPfiM1pyqAnuwYnC4NQ9nMhb0zwpWPTsCXmfBOaOyEzn1RdmQfhxP3TL7tRRmJJQCybCD8SBEHnLdESItKGlC2lamDVaxPqrFpD2iwOmPpJCwcbMtdAXfP0Bhplvl98FWYtn1aVWirWFoeqNg1XQdN7EOak37RMt/M749bXfA9UO20hAvjSpNqc1QyZJelpUwZ/7nk4/xIMnopRbPU76SkUlzwbkLon1IIEffuh8zZwMqLG8dTA9xWg5y2Ytz3ScdFD0F+Yli8YzgXsfFXZs3cfdN0J7p+wRa4I/uIb0P04zM7F+L/gfujZC2efTz8mkBPM8WCRr0oLEvS8DUe+Du4bw8QxTpr0Db8zcBy6fw2LH4Oef8OyZ6IlMvNh8aPTiUODks4ErAJQrL552R1r+qS3RCmN1nbPW/BxI5x7EYoX4fh3YfHP4cQDsPy5SKVZzTGi9f4nFYVsGzxAxp/IeRYBx0B1U2ojr9oEq/ZAZm4ppgkuvgmH744tpIHMbFjxPJx7Aa57AQaOQjIAdY3DzeCnj8KpX8X3VX1QsPR+yHpjUJZuW8ewp9ZG9rVB560RrASXDsLhrw6XB0GRakfvg+L/4vOHNkCxGw7Mg+KFuNYXHodlvy31QK56fyX+5VA2Stq1RfKuKXuUDXVro1OefAg8wLhNkUc0agJqV0DzRxAa4jNnnoXjP4SMqok+F0LWV8cR0H4ozVu6QQtSpdhUNZEh1MfJRc2S+N3pp+HEjyYpzQ3m98rxA4AQ1g2t9xtwytJQ6d5JeuDjtcNRa+EOWPHHcR3bjicLFk+4fURBk+wGFtGAdF5yuAIz3NGWqFkaxzC1y+J33U/AyZ+Ooxy/qCzfrliROc8WrF3mssz/Jy/ybjgeu7zBM3Dw2pg0SzAcqXMWa7mCezR2sJXkgd66vxn2quJc5DJeZV0d2hCTZcfaUeDL+CV+EdYNg69YEydt1KmGs0AdV9IKI8f1GhZqaKyIXlLW28ae2oymUDsoB0leNwH7xJU51JhsCAQ6ReJV6lvSq1tPVXlCk+c+W3/mSvvD2HwLh12kNaynp+oTGneBsrwsfK8keeg044ppPWYW6zyBDaqpDH5cAdQI3gPK8YrNTZhL2IrrXn61A8J+04mX6UbOjXc+VnVjm7RRR61ex9wSj990WbQe5+gewHpSOT9SzXuT9sRuh7CRS+qvvVXB98gaiCfzM2eNEtmFnWeAJcr5EXdlYoKdrgDKlTap60etvGp7geFhxCe2cUphht6xQbxha2vIkdNGzia7QY1FwleqGtFNQ3MFbXbCM8hrhGYBmRKBS8lVpflNjO1RyQbUjzwIvESGH4e1nE6dA1ODPwC6cSiLzwetxG4BsqCsxBzwEuCSrTOCbnAbIm+HLik5omzpLzedEFanw/F/byy0oCz4lroAAAAASUVORK5CYII\x3d",
templateString:'\x3cdiv class\x3d"plugin-entry" style\x3d"overflow:hidden;"\x3e\x3cdiv class\x3d"plugin-list-item"\x3e\x3cdiv\x3e\x3cdiv class\x3d"plugin-icon"\x3e\x3c/div\x3e\x3cspan class\x3d"plugin-commands"\x3e\x3c/span\x3e\x3cdiv class\x3d"stretch"\x3e\x3cspan class\x3d"plugin-title"\x3e\x3c/span\x3e\x3cdiv\x3e\x3c/div\x3e\x3cspan class\x3d"plugin-description"\x3e\x3c/span\x3e\x3cdiv class\x3d"plugin-links" style\x3d"font-size:11px"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"plugin-service-item" \x3e\x3c/div\x3e\x3c/div\x3e',
serviceDescriptions:null,createElements:function(){this.node.innerHTML=this.templateString;this.pluginTitle=e.$(".plugin-title",this.node);this.pluginDescription=e.$(".plugin-description",this.node);this.pluginLinks=e.$(".plugin-links",this.node);this.commandSpan=e.$(".plugin-commands",this.node);this.serviceContainer=e.$(".plugin-service-item",this.node);this.postCreate()},destroy:function(){this.node&&(this.node=this.pluginTitle=this.pluginDescription=this.pluginLinks=this.commandSpan=this.serviceContainer=
null)},show:function(){this.createElements()},addPluginLink:function(a,b){if(k.validateURLScheme(b)){var c=document.createElement("a");c.classList.add("plugin-link");c.href=b;c.title=a;c.textContent=a;this.pluginLinks.appendChild(c)}else console.log("Illegal "+a+" URL: "+b)},postCreate:function(){var a=this.plugin.getHeaders(),b=this.plugin.getLocation();this.pluginTitle.textContent=a.name||h(b);this.pluginDescription.textContent=a.description||g["A plugin for Eclipse Orion"];this.addPluginLink("Plugin",
b);a.website&&this.addPluginLink("Website",a.website);a.license&&this.addPluginLink("License",a.license);a.login&&this.addPluginLink("Login",a.login);this.commandSpan.id=b;this.commandService.renderCommands("pluginCommand",this.commandSpan,b,this,"tool");this.serviceDescriptions=c(this.plugin);this.carousel=new d({serviceData:this.serviceDescriptions},this.serviceContainer);this.carousel.show()}});return b});
define("orion/widgets/plugin/PluginList","i18n!orion/settings/nls/messages require orion/Deferred orion/commands orion/commandRegistry orion/commonHTMLFragments orion/objects orion/webui/littlelib orion/widgets/plugin/PluginEntry orion/explorers/explorer orion/URITemplate orion/PageLinks".split(" "),function(g,k,f,e,d,h,c,b,a,l,m,n){function p(a){if(-1===a.indexOf("://")){var b=document.createElement("a");b.href=a;return b.href}return a}function s(a,b){w.call(this,{},b);this.commandService=a}function t(a){this.renderer=
new s(a,this)}function q(a,b){c.mixin(this,a);this.node=b||document.createElement("div")}m=l.Explorer;var w=l.SelectionRenderer,r={};if(n=localStorage.getItem("/orion/preferences/default/plugins"))n=JSON.parse(n),Object.keys(n).forEach(function(a){r[p(k.toUrl(a))]=!0});s.prototype=Object.create(w.prototype);s.prototype.getCellElement=function(b,c,d){if(0===b)return b=new a({plugin:c,commandService:this.commandService}),b.show(),b.node};t.prototype=Object.create(m.prototype);c.mixin(q.prototype,{templateString:'\x3cdiv id\x3d"pluginSectionHeader" class\x3d"pluginSectionHeader sectionWrapper toolComposite"\x3e\x3cdiv class\x3d"sectionAnchor sectionTitle layoutLeft"\x3e\x3c/div\x3e\x3cdiv class\x3d"sectionItemCount layoutLeft"\x3e0\x3c/div\x3e\x3cdiv id\x3d"pluginCommands" class\x3d"pluginCommands layoutRight sectionActions"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"displaytable layoutBlock sectionTable"\x3e\x3cdiv class\x3d"plugin-list-container"\x3e\x3cdiv class\x3d"plugin-list" id\x3d"plugin-list" style\x3d"overflow:hidden;"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',
pluginDialogState:!1,includeMaker:!1,target:"_self",createElements:function(){this.node.innerHTML=this.templateString;this.pluginSectionHeader=b.$(".pluginSectionHeader",this.node);this.pluginTitle=b.$(".sectionAnchor",this.node);this.pluginCount=b.$(".sectionItemCount",this.node);this.pluginCommands=b.$(".pluginCommands",this.node);this.pluginList=b.$(".plugin-list",this.node);this.postCreate()},destroy:function(){this.node&&(b.empty(this.node),this.node=this.pluginSectionHeader=this.pluginTitle=
this.pluginCount=this.pluginCommands=this.pluginList=null)},postCreate:function(){var a=this;if(this.pluginSectionHeader){var b=h.slideoutHTMLFragment("pluginSlideout"),c=document.createRange();c.selectNode(this.pluginSectionHeader);b=c.createContextualFragment(b);this.pluginSectionHeader.appendChild(b)}this.render();this.registry.registerService("orion.cm.managedservice",{updated:function(b){a.setTarget(b&&"undefined"!==b["links.newtab"]?b["links.newtab"]?"_blank":"_self":"_self")}.bind(this)},{pid:"nav.config"})},
updateToolbar:function(a){this.pluginCommands&&this.commandService.destroy(this.pluginCommands)},show:function(){this.createElements();this.updateToolbar();if(this.pluginsUri){var a=new e.Command({name:g["Get Plugins"],tooltip:g["Find More Orion Plugins"],id:"orion.findMorePluginsCommand",hrefCallback:function(a){return this.getPluginsLink(a.items)}.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommands","orion.findMorePluginsCommand",1)}a=new e.Command({name:g.Install,
tooltip:g["Install a plugin by specifying its URL"],id:"orion.installPlugin",parameters:new d.ParametersDescription([new d.CommandParameter("url","url",g["Plugin URL:"],"")]),callback:function(a){a.parameters&&(a=a.parameters.valueFor("url"))&&this.installHandler(a)}.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommands","orion.installPlugin",2,null,!1,null,new d.URLBinding("installPlugin","url"));a=new e.Command({name:g["Reload all"],tooltip:g["Reload all installed plugins"],
id:"orion.reloadAllPlugins",callback:this.reloadPlugins.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommands","orion.reloadAllPlugins",3);a=new e.Command({name:g.Create,tooltip:g["Create a new Orion Plugin"],id:"orion.createPlugin",callback:function(a){this.createPlugin(a.items)}.bind(this)});this.commandService.addCommand(a);!0===this.includeMaker&&this.commandService.registerCommandContribution("pluginCommands","orion.createPlugin",2);this.commandService.renderCommands("pluginCommands",
"pluginCommands",this,this,"button")},render:function(a){a=new e.Command({name:g.Reload,tooltip:g["Reload the plugin"],id:"orion.reloadPlugin",imageClass:"core-sprite-refresh",visibleWhen:function(a){return"string"===typeof a},callback:function(a){this.reloadPlugin(a.items)}.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommand","orion.reloadPlugin",1);a=new e.Command({name:g.Delete,tooltip:g["Delete this plugin from the configuration"],imageClass:"core-sprite-delete",
id:"orion.uninstallPlugin",visibleWhen:function(a){return!r[a]},callback:function(a){this.removePlugin(a.items)}.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommand","orion.uninstallPlugin",2);var b=this.settings.pluginRegistry;a=new e.Command({name:g.Disable,tooltip:g.DisableTooltip,id:"orion.disablePlugin",imageClass:"core-sprite-stop",visibleWhen:function(a){return r[a]?!1:"stopped"!==b.getPlugin(a)._getAutostart()},callback:function(a){this.disablePlugin(a.items)}.bind(this)});
this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommand","orion.disablePlugin",3);a=new e.Command({name:g.Enable,tooltip:g.EnableTooltip,id:"orion.enablePlugin",imageClass:"core-sprite-start",visibleWhen:function(a){return r[a]?!1:"stopped"===b.getPlugin(a)._getAutostart()},callback:function(a){this.enablePlugin(a.items)}.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("pluginCommand","orion.enablePlugin",4);a=
this.settings.pluginRegistry.getPlugins();this.pluginTitle.textContent=g.Plugins;this.pluginCount.textContent=a.length;this.explorer=new t(this.commandService);this.pluginListTree=this.explorer.createTree(this.pluginList.id,new l.SimpleFlatModel(a,"plugin",function(a){return a.getLocation()}),{setFocus:!1})},pluginURLFocus:function(){this.pluginUrlEntry.value="";this.pluginUrlEntry.style.color=""},pluginURLBlur:function(){""===this.pluginUrlEntry.value&&(this.pluginUrlEntry.value=g["Type a plugin url here ..."],
this.pluginUrlEntry.style.color="#AAA")},createPlugin:function(a){a=k.toUrl("settings/maker.html");window.open(a,this.target)},addPlugin:function(a){this.statusService.setMessage(g["Installed "]+a,5E3,!0);this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!0)});this.render()},getPluginsLink:function(a){return this.pluginsUri},pluginError:function(a){this.statusService.setErrorMessage(a)},installHandler:function(a){/^\S+$/.test(a.trim())&&(this.statusService.setMessage(g["Installing "]+
a+"...",null,!0),this.settings.pluginRegistry.getPlugin(a)?this.statusService.setErrorMessage(g["Already installed"]):this.settings.pluginRegistry.installPlugin(a).then(function(a){a.start({lazy:!0}).then(this.addPlugin.bind(this,a.getLocation()),this.pluginError.bind(this))}.bind(this),this.pluginError.bind(this)))},reloaded:function(){var a=this.settings.pluginRegistry.getPlugins();this.statusService.setMessage(g["Reloaded "]+a.length+g[" plugin"]+(1===a.length?"":"s")+".",5E3,!0);this.render()},
reloadPlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.update().then(this.render.bind(this)),this.statusService.setMessage(g["Reloaded "]+a,5E3,!0))},disablePlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&(b.stop(),this.statusService.setMessage("Disabled "+a,5E3,!0),this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!1);this.render(this)}.bind(this)),this.render())},enablePlugin:function(a){var b=this.settings.pluginRegistry.getPlugin(a);
b&&(b.start({lazy:!0}),this.statusService.setMessage("Enabled "+a,5E3,!0),this.settings.preferences.getPreferences("/plugins").then(function(b){b.put(a,!1);this.render(this)}.bind(this)),this.render())},setTarget:function(a){this.target=a},reloadPlugins:function(){var a=[];this.settings.pluginRegistry.getPlugins().forEach(function(b){a.push(b.update())});f.all(a,function(){}).then(this.reloaded.bind(this))},forceRemove:function(a){var b=this.settings.pluginRegistry.getPlugin(a);b&&b.uninstall().then(function(){this.statusService.setMessage(g["Uninstalled "]+
a,5E3,!0);this.settings.preferences.getPreferences("/plugins").then(function(b){b.keys().some(function(c){if(p(k.toUrl(c))===p(a))return b.remove(c),!0})}.bind(this));this.render()}.bind(this))},removePlugin:function(a){window.confirm(g["Are you sure you want to uninstall '"]+a+"'?")&&this.forceRemove(a)}});return q});
define("orion/widgets/settings/Subsection",[],function(){function g(g){var f=g.sectionName;this.parentNode=g.parentNode;this.children=g.children;g=document.createElement("section");g.classList.add("setting-row");g.setAttribute("role","region");g.setAttribute("aria-labelledby","Navigation-header");var e=document.createElement("h3");e.classList.add("setting-header");e.textContent=f;f=document.createElement("div");f.classList.add("setting-content");g.appendChild(e);g.appendChild(f);this.node=g;this.subsectionContent=
f}g.prototype.show=function(){this.parentNode&&this.parentNode.appendChild(this.node);if(this.children){var g=this;this.children.forEach(function(f){g.subsectionContent.appendChild(f.node);f.show()})}};return g});define("orion/form",[],function(){function g(g){return encodeURIComponent(g).replace(/[!'()*]/g,escape).replace("%20","+")}return{encodeFormData:function(k){k=k||{};for(var f=Object.keys(k),e=[],d=0;d<f.length;d++){var h=f[d],c=k[h];e.push(g(h)+"\x3d"+g(c))}return e.join("\x26")}}});
define("profile/UsersService",["orion/Deferred","orion/xhr","orion/EventTarget","orion/form"],function(g,k,f,e){function d(c){return""===c?null:JSON.parse(c)}function h(c){f.attach(this);c&&(this._serviceRegistry=c,this._serviceRegistration=c.registerService("orion.core.user",this))}h.prototype={getUsersListSubset:function(c,b,a){var e=new g,f=this;k("GET","../users?start\x3d"+c+"\x26rows\x3d"+b,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=d(b.response);a&&("function"===typeof a?
a(b):f.dispatchEvent({type:a,data:b}));e.resolve(b)},function(a){e.reject(a.response||a)});return e},getUsersList:function(c){var b=new g,a=this;k("GET","../users",{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(e){e=d(e.response);c&&("function"===typeof c?c(e):a.dispatchEvent({type:c,data:e}));b.resolve(e.users)},function(a){b.reject(a.response||a)});return b},deleteUser:function(c,b){var a=new g,e=this;k("DELETE",c,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(c){c=d(c.response);
b&&("function"===typeof b?b(c):e.dispatchEvent({type:b,data:c}));a.resolve(c)},function(b){a.reject(b.response||b)});return a},createUser:function(c,b,a){c=c||{};return k("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:e.encodeFormData({login:c.login,password:c.password,email:c.email})}).then(function(a){return(new g).resolve(d(a.response))},function(a){var b=a;try{b=d(a.response||a.error)}catch(c){}return(new g).reject(b)})},getUserInfo:function(c,
b){var a=new g,e=this;k("GET",c,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(c){c=d(c.response);b&&("function"===typeof b?b(c):e.dispatchEvent({type:b,data:c}));a.resolve(c)},function(b){a.reject(b.response||b)});return a},updateUserInfo:function(c,b,a){var e=new g,f=this;if(b.password!==b.passwordRetype)return e.reject({message:"Passwords do not match!"}),e;k("PUT",c,{headers:{"Content-Type":"application/json; charset\x3dUTF-8","Orion-Version":"1"},timeout:15E3,data:JSON.stringify(b)}).then(function(b){b=
d(b.response);a&&("function"===typeof a?a(b):f.dispatchEvent({type:a,data:b}));e.resolve(b)},function(a){if(409===a.status){var b=d(a.response).Message;alert(b)}e.reject(a.response||a)});return e},resetUserPassword:function(c,b,a){var f=new g,h=this;k("POST","../users",{headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},timeout:15E3,data:e.encodeFormData({reset:!0,login:c,password:b})}).then(function(b){b=d(b.response);a&&("function"===typeof a?a(b):h.dispatchEvent({type:a,
data:b}));f.resolve(b)},function(a){f.reject(a.response||a)});return f}};return h});
define("orion/widgets/input/LabeledCommand",["orion/objects","orion/webui/littlelib"],function(g,k){function f(e,d){g.mixin(this,e);this.node=d||document.createElement("div")}g.mixin(f.prototype,{templateString:'\x3cspan class\x3d"setting-repository-label"\x3e\x3c/span\x3e\x3cspan class\x3d"setting-command"\x3e\x3c/span\x3e',show:function(){this.node.innerHTML=this.templateString;this.mylabel=k.$(".setting-repository-label",this.node);this.myCommand=k.$(".setting-command",this.node);this.postCreate()},
destroy:function(){k.empty(this.node)},postCreate:function(){this.mylabel.textContent=this.fieldlabel;this.commandService.renderCommands(this.scopeId,this.myCommand,{gitUrl:this.fieldlabel,keyIndex:this.keyIndex},this,"button")}});return f});
define("orion/widgets/settings/UserSettings","i18n!orion/settings/nls/messages require orion/commands orion/section orion/webui/littlelib orion/objects orion/i18nUtil orion/widgets/settings/Subsection profile/UsersService orion/widgets/input/LabeledTextfield orion/widgets/input/LabeledCheckbox orion/widgets/input/LabeledCommand".split(" "),function(g,k,f,e,d,h,c,b,a,l,m,n){function p(a,b){h.mixin(this,a);this.node=b}h.mixin(p.prototype,{dispatch:!0,templateString:'\x3cdiv\x3e\x3cdiv class\x3d"sectionWrapper toolComposite"\x3e\x3cdiv class\x3d"sectionAnchor sectionTitle layoutLeft"\x3e${User Profile}\x3c/div\x3e\x3cdiv id\x3d"userCommands" class\x3d"layoutRight sectionActions"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"sectionTable sections"\x3e\x3c/div\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"linkedSection"\x3e\x3c/div\x3e',
createElements:function(){this.node.innerHTML=this.templateString;d.processTextNodes(this.node,g);this.sections=d.$(".sections",this.node);this.linkedSection=d.$(".linkedSection",this.node);this.createSections()},setHash:function(a,b){0<a.src.indexOf("#")?a.src=a.src.substr(0,a.src.indexOf("#"))+"#"+b:a.src=a.src+"#"+b},createSections:function(){this.accountFields=[new l({fieldlabel:g.Username,editmode:"readonly"}),new l({fieldlabel:g["Full Name"]}),new l({fieldlabel:g["Email Address"]}),new m({fieldlabel:g["Email Confirmed"],
editmode:"readonly"})];(new b({sectionName:g.Account,parentNode:this.sections,children:this.accountFields})).show();this.passwordFields=[new l({fieldlabel:g["Current Password"],inputType:"password"}),new l({fieldlabel:g["New Password"],inputType:"password"}),new l({fieldlabel:g["Verify Password"],inputType:"password"})];(new b({sectionName:g.Password,parentNode:this.sections,children:this.passwordFields})).show();var a=new f.Command({name:g.Update,tooltip:g["Update Profile Settings"],id:"orion.updateprofile",
callback:function(a){this.update(a.items)}.bind(this)});this.commandService.addCommand(a);this.commandService.registerCommandContribution("profileCommands","orion.updateprofile",3);this.commandService.renderCommands("profileCommands",d.node("userCommands"),this,this,"button");this.linkedAccountSection=new e.Section(this.linkedSection,{id:"linkedAccountSection",title:g["Linked Accounts"],content:'\x3cdiv id\x3d"iFrameContent"\x3e\x3c/div\x3e',canHide:!0,useAuxStyle:!0,hidden:!0,slideout:!0});a=this.iframe=
document.createElement("iframe");a.src="../mixloginstatic/manageOpenids.html";a.style.border="0";a.style.width="500px";d.node("iFrameContent").appendChild(a)},confirmOpenId:function(a){""!==a&&null!==a&&(this.win=window.open("../mixlogin/manageopenids/openid?openid\x3d"+encodeURIComponent(a),"openid_popup","width\x3d790,height\x3d580"))},update:function(a){var b=[];a=this.registry.getServiceReferences("orion.core.auth");var c=this.registry.getService("orion.page.message"),d=this.userService,e={};
e.login=this.accountFields[0].getValue();e.Name=this.accountFields[1].getValue();e.email=this.accountFields[2].getValue();var f=this.passwordFields[1].getValue(),h=this.passwordFields[2].getValue();0<f.length&&(f!==h?(c.setProgressResult("New password, and retyped password do not match"),this.dispatch=!1):0<this.passwordFields[0].getValue().length?(e.oldPassword=this.passwordFields[0].getValue(),e.password=f,e.passwordRetype=h,this.dispatch=!0):(c.setProgressResult("Need to type your current password"),
this.dispatch=!1));if(!0===this.dispatch)for(f=0;f<a.length;f++){var k=this.registry.getService(a[f]);k.getKey().then(function(a){b.push(a);k.getUser().then(function(a){d.updateUserInfo(a.Location,e).then(function(a){a?c.setProgressResult(a):c.setProgressResult(g["User profile data successfully updated."])},function(a){c.setProgressResult(a)})})})}},show:function(){this.createElements();this.userService=this.registry.getService("orion.core.user");for(var a=[],b=this.registry.getServiceReferences("orion.core.auth"),
c=this.userService,d=this,e=0;e<b.length;e++){var f=this.registry.getService(b[e]);f.getKey().then(function(b){a.push(b);f.getUser().then(function(a){c.getUserInfo(a.Location).then(function(a){d.accountFields[0].setValue(a.login);d.accountFields[1].setValue(a.Name);d.accountFields[2].setValue(a.email);d.accountFields[3].setChecked(a.emailConfirmed)});d.setHash(d.iframe,a.Location)})})}},destroy:function(){this.node&&(d.empty(this.node),this.node=this.sections=this.linkedSection=null)}});return p});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(g){function k(f){this._prefix="/git/credentials";this._preferenceService=f.getService("orion.core.preference")}k.prototype={put:function(f,e){var d={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};void 0!==e&&(void 0!==e.gitSshUsername&&null!==e.gitSshUsername&&(d.gitSshUsername=e.gitSshUsername),void 0!==e.gitSshPassword&&null!==e.gitSshPassword&&(d.gitSshPassword=e.gitSshPassword),void 0!==e.gitPrivateKey&&
null!==e.gitPrivateKey&&(d.gitPrivateKey=e.gitPrivateKey),void 0!==e.gitPassphrase&&null!==e.gitPassphrase&&(d.gitPassphrase=e.gitPassphrase));var h=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(c){var b=c.get("settings");void 0===b?h.reject():b.enabled?(c.put(f,d),h.resolve()):h.reject()});return h},get:function(f){var e={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},d=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(g){var c=
g.get("settings");void 0===c?d.reject():c.enabled?(g=g.get(f),void 0!==g?d.resolve(g):d.resolve(e)):d.reject()});return d},isEnabled:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e=e.get("settings");void 0===e?f.resolve(!1):f.resolve(e.enabled)});return f},enable:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(e){e.put("settings",{enabled:!0});f.resolve()});return f},disable:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,
2).then(function(e){e.put("settings",{enabled:!1});f.resolve()});return f},remove:function(f){var e=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d.remove(f);e.resolve()});return e},getRepositories:function(){var f=new g;this._preferenceService.getPreferences(this._prefix,2).then(function(e){var d=[];e=e.keys();for(var g=0;g<e.length;++g)"settings"!==e[g]&&d.push(e[g]);f.resolve(d)});return f}};return k.prototype.constructor=k});
define("orion/git/gitConfigPreference",["orion/Deferred"],function(g){function k(f){this._prefix="/git/config";this._preferenceService=f.getService("orion.core.preference")}k.prototype={getConfig:function(){var f=new g;this._preferenceService.getPreferences(this._prefix).then(function(e){e=e.get("userInfo");f.resolve(e)});return f},setConfig:function(f){var e=new g;this._preferenceService.getPreferences(this._prefix).then(function(d){d.put("userInfo",f);e.resolve()});return e}};return k.prototype.constructor=
k});
define("orion/widgets/settings/GitSettings","i18n!orion/settings/nls/messages require orion/commands orion/section orion/git/gitPreferenceStorage orion/git/gitConfigPreference orion/webui/littlelib orion/objects orion/i18nUtil orion/widgets/settings/Subsection orion/widgets/input/LabeledTextfield orion/widgets/input/LabeledCheckbox orion/widgets/input/LabeledCommand".split(" "),function(g,k,f,e,d,h,c,b,a,l,m,n,p){function s(a,c){b.mixin(this,a);this.node=c}b.mixin(s.prototype,{dispatch:!0,templateString:'\x3cdiv\x3e\x3cdiv class\x3d"sectionWrapper toolComposite"\x3e\x3cdiv class\x3d"sectionAnchor sectionTitle layoutLeft"\x3e${Git Settings}\x3c/div\x3e\x3cdiv id\x3d"userCommands" class\x3d"layoutRight sectionActions"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"sections sectionTable"\x3e\x3c/div\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv\x3e\x3cdiv class\x3d"sectionWrapper toolComposite"\x3e\x3cdiv class\x3d"sectionAnchor sectionTitle layoutLeft"\x3e${Git Credentials Storage}\x3c/div\x3e\x3cdiv id\x3d"gitCommands" class\x3d"layoutRight sectionActions"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"gitSections sectionTable"\x3e\x3c/div\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e',createElements:function(){this.node.innerHTML=
this.templateString;c.processTextNodes(this.node,g);this.sections=c.$(".sections",this.node);this.gitSections=c.$(".gitSections",this.node);this.createSections()},setHash:function(a,b){0<a.src.indexOf("#")?a.src=a.src.substr(0,a.src.indexOf("#"))+"#"+b:a.src=a.src+"#"+b},refreshGitCredentials:function(){var a=this;(new d(this.registry)).isEnabled().then(function(b){a.gitCredentialsFields[0].setChecked(b)})},createSections:function(){this.gitFields=[new m({fieldlabel:g["Git Email Address"]}),new m({fieldlabel:g["Git Username"]})];
(new l({sectionName:g["Git Config"],parentNode:this.sections,children:this.gitFields})).show();var b=new f.Command({name:g.Update,tooltip:g["Update Git User Settings"],id:"orion.updateGitUser",callback:function(a){this.update(a.items)}.bind(this)});this.commandService.addCommand(b);this.commandService.registerCommandContribution("gitUserCommands","orion.updateGitUser",3);this.commandService.renderCommands("gitUserCommands",c.node("userCommands"),this,this,"button");this.gitCredentialsFields=[new n({fieldlabel:g["Enable Storage"]})];
var e,h=this,b=new f.Command({name:g.Delete,id:"eclipse.orion.git.eraseGitCredentials",callback:function(b){var c=b.items.gitUrl,e=b.items.keyIndex,f=h.registry.getService("orion.page.message");(new d(h.registry)).remove(c).then(function(){f.setProgressResult(a.formatMessage(g["Deleted git credentials for ${0}"],[c]));h.gitCredentialsFields[e+1].destroy()})},visibleWhen:function(a){return!0}});this.commandService.addCommand(b);this.commandService.registerCommandContribution("repositoryItemCommands",
"eclipse.orion.git.eraseGitCredentials",1);(new d(this.registry)).getRepositories().then(function(a){for(var b=0;b<a.length;++b){var d=new p({keyIndex:b,fieldlabel:a[b],commandService:h.commandService,scopeId:"repositoryItemCommands"});h.gitCredentialsFields.push(d)}e=new l({sectionName:"",parentNode:h.gitSections,children:h.gitCredentialsFields});e.show();a=new f.Command({name:g.Update,tooltip:g["Update Git Credentials"],id:"orion.updateGitCredentials",callback:function(a){h.updateGitCredentials(a.items)}.bind(h)});
h.commandService.addCommand(a);h.commandService.registerCommandContribution("gitProfileCommands","orion.updateGitCredentials",2);h.commandService.renderCommands("gitProfileCommands",c.node("gitCommands"),h,h,"button")})},update:function(a){a=new h(this.registry);var b=this.registry.getService("orion.page.message");a.setConfig({GitMail:this.gitFields[0].getValue(),GitName:this.gitFields[1].getValue()}).then(function(){b.setProgressResult(g["Git user data successfully updated."])})},updateGitCredentials:function(a){var b=
this.registry.getService("orion.page.message");a=new d(this.registry);this.gitCredentialsFields[0].isChecked()?window.confirm(g["Please be aware that your credentials will be stored persistently in the browser."]+"\n"+g["Do you wish to enable the Key Storage?"])&&a.enable().then(function(){b.setProgressResult(g["Git Credentials successfully updated."])}):a.disable().then(function(){b.setProgressResult(g["Git Credentials successfully updated."])})},show:function(){this.createElements();(new h(this.registry)).getConfig().then(function(a){a&&
(a.GitMail&&this.gitFields[0].setValue(a.GitMail),a.GitName&&this.gitFields[1].setValue(a.GitName))}.bind(this));this.refreshGitCredentials()},destroy:function(){this.node&&(c.empty(this.node),this.node=this.sections=this.gitSections=null)}});return s});
define("orion/widgets/settings/EditorSettings","i18n!orion/settings/nls/messages orion/widgets/input/LabeledTextfield orion/widgets/input/LabeledCheckbox orion/widgets/input/LabeledSelect orion/section orion/widgets/settings/Subsection orion/commands orion/objects orion/webui/littlelib".split(" "),function(g,k,f,e,d,h,c,b,a){function l(b,c,d,e,f){if(!e.local){var h=document.createElement("span");h.classList.add(t);h.classList.add(f[c+"LocalVisible"]?q:w);h.title=g.localSettingsTooltip;h.addEventListener("click",
function(a){h.classList.contains(w)?(h.classList.add(q),h.classList.remove(w)):(h.classList.add(w),h.classList.remove(q))});c=a.$("label",b.node);c.parentNode.insertBefore(h,c)}return b}function m(a,b,c){return l(new f(b),a,this,b,c)}function n(a,b,c){b.inputType="integer";return l(new k(b),a,this,b,c)}function p(a,b){return!(this.min<=b[a]&&b[a]<=this.max)?g[a+"Invalid"]:""}function s(a,c){b.mixin(this,a);this.node=c}var t="setting-local-indicator",q="on",w="off",r={editorSettings:{keys:{keyBindings:{values:[{value:"",
label:g.Default},{value:"Emacs",label:"Emacs"},{value:"vi",label:"vi"}],create:function(a,b,c){var d=this.values;b.options=[];for(var f=0;f<d.length;f++){var g=d[f],h={value:g.value,label:g.label};g.value===c[a]&&(h.selected=!0);b.options.push(h)}return l(new e(b),a,this,b,c)}}},fileManagement:{autoSave:{create:m},autoSaveTimeout:{min:50,max:1E4,create:n,validate:p},autoLoad:{create:m},saveDiffs:{create:m},trimTrailingWhiteSpace:{create:m}},typing:{autoPairQuotations:{create:m},autoPairParentheses:{create:m},
autoPairBraces:{create:m},autoPairSquareBrackets:{create:m},autoPairAngleBrackets:{create:m},autoCompleteComments:{create:m},smartIndentation:{create:m}},tabs:{tabSize:{min:1,max:16,create:n,validate:p},expandTab:{create:m}},whitespaces:{showTabs:{create:m},showSpaces:{create:m}},wrapping:{wordWrap:{create:m},showMargin:{create:m},marginOffset:{min:10,max:200,create:n,validate:p}},smoothScrolling:{scrollAnimation:{create:m},scrollAnimationTimeout:{min:50,max:1E3,create:n,validate:p}},rulers:{annotationRuler:{create:m},
lineNumberRuler:{create:m},foldingRuler:{create:m},overviewRuler:{create:m}},languageTools:{showOccurrences:{create:m},contentAssistAutoTrigger:{create:m}}}};b.mixin(s.prototype,{templateString:'\x3cdiv class\x3d"sections"\x3e\x3c/div\x3e',commandTemplate:'\x3cdiv id\x3d"commandButtons"\x3e\x3cdiv id\x3d"editorCommands" class\x3d"layoutRight sectionActions"\x3e\x3c/div\x3e\x3c/div\x3e',createElements:function(){this.node.innerHTML=this.templateString;this.sections=a.$(".sections",this.node);this.createSections();
this.local?this.sections.classList.add("local"):(document.getElementById("pageActions").innerHTML=this.commandTemplate,this.createToolbar())},createSections:function(){var b=this.oldPrefs,c=[],f,k,l=this.themePreferences;if(!this.local&&this.editorThemeWidget)this.editorThemeSection=new d.Section(this.sections,{id:"editorThemeSettings",title:g.EditorThemes,canHide:!0,slideout:!0}),this.editorThemeWidget.renderData(this.editorThemeSection.getContentElement(),"INITIALIZE");else{var m=this.oldThemeStyles;
if(b.themeVisible&&(!this.local||b.themeLocalVisible)){var n=m.styles;f=[];for(var p=0;p<n.length;p++)k={value:n[p].name,label:n[p].name},n[p].name===m.style.name&&(k.selected=!0),f.push(k);c.push(f=this.themeSelect=new e({fieldlabel:g.Theme,options:f}));f.setStorageItem=function(a){l.setTheme(a)}}if(b.fontSizeVisible&&(!this.local||b.fontSizeLocalVisible)){m=m.style.fontSize;f=[];for(n=8;19>n;n++)k={value:n+"pt",label:n+"pt"},k.label===m&&(k.selected=!0),f.push(k);c.push(f=this.sizeSelect=new e({fieldlabel:g["Font Size"],
options:f}));f.setStorageItem=function(a){l.setFontSize(a)}}!this.local&&0<c.length&&(c=new h({sectionName:g.Theme,parentNode:this.editorThemeSection.getContentElement(),children:c}),c.show(),c=[])}var s,u;for(u in r)if(r.hasOwnProperty(u)){this.local||(s=new d.Section(this.sections,{id:u,title:g[u],canHide:!0,slideout:!0}),f=document.createElement("div"),f.classList.add("setting-info"),f.textContent=g.editorSettingsInfo,k=document.createElement("span"),k.classList.add(t),k.classList.add(q),m=document.createElement("span"),
m.classList.add(t),m.classList.add(w),n=document.createElement("span"),n.classList.add("core-sprite-wrench"),n.classList.add("icon-inline"),n.classList.add("imageSprite"),a.processDOMNodes(f,[k,m,n]),s.getContentElement().appendChild(f));for(var A in r[u])if(r[u].hasOwnProperty(A)){for(var F in r[u][A])if(b[F+"Visible"]&&(!this.local||b[F+"LocalVisible"]))k=r[u][A][F],f={},f.local=this.local,f.fieldlabel=g[F],c.push(k.widget=k.create(F,f,b));!this.local&&0<c.length&&(c=new h({sectionName:g[A],parentNode:s.getContentElement(),
children:c}),c.show(),c=[])}}this.local&&c.forEach(function(a){this.sections.appendChild(a.node);a.hasOwnProperty("setStorageItem")||(a.setStorageItem=this.update.bind(this));a.show()}.bind(this))},createToolbar:function(){var b=a.node("editorSettingsToolActionsArea"),d=new c.Command({name:g.Restore,tooltip:g["Restore default Editor Settings"],id:"orion.restoreeditorsettings",callback:function(a){this.restore(a.items)}.bind(this)});this.commandService.addCommand(d);this.commandService.registerCommandContribution("restoreEditorSettingCommand",
"orion.restoreeditorsettings",2);this.commandService.renderCommands("restoreEditorSettingCommand",b,this,this,"button");d=new c.Command({name:g.Update,tooltip:g["Update Editor Settings"],id:"orion.updateeditorsettings",callback:function(a){this.update(a.items)}.bind(this)});this.commandService.addCommand(d);this.commandService.registerCommandContribution("editorSettingCommand","orion.updateeditorsettings",1);this.commandService.renderCommands("editorSettingCommand",b,this,this,"button")},valueChanged:function(){var a=
{},b;for(b in this.oldPrefs)this.oldPrefs.hasOwnProperty(b)&&(a[b]=this.oldPrefs[b]);this.getValues(a);for(var c in a)if(a.hasOwnProperty(c)&&a[c]!==this.oldPrefs[c])return a},validate:function(a){var b="";this._forEach(function(c,d){return d.validate&&(b=d.validate(c,a))?!1:!0});return b},_progress:function(a,b){this.registry&&this.registry.getService("orion.page.message").setProgressResult({Message:a,Severity:b})},update:function(){var a=this.valueChanged();if(a){var b=this.validate(a);if(b){this._progress(b,
"Error");return}this.preferences.setPrefs(a,function(){this.setValues(this.oldPrefs=a);this._progress(g["Editor preferences updated"],"Normal")}.bind(this))}else this.setValues(this.oldPrefs);this.editor&&this.editor.focus()},restore:function(){this.preferences.setPrefs({},function(a){this._show(a);this._progress(g["Editor defaults restored"],"Normal")}.bind(this))},show:function(a,b){a&&(this.node=a);this.themePreferences.getTheme(function(a){this.preferences.getPrefs(function(c){this._show(c,a);
b&&b()}.bind(this))}.bind(this))},_show:function(a,b){b&&(this.oldThemeStyles=b);this.oldPrefs=a;this.createElements();this.setValues(a)},_forEach:function(a){for(var b in r)if(r.hasOwnProperty(b))for(var c in r[b])if(r[b].hasOwnProperty(c))for(var d in r[b][c])if(r[b][c].hasOwnProperty(d)){var e=r[b][c][d];if(e.widget&&!a(d,e))return}},getValues:function(b){this._forEach(function(c,d){b[c]=d.widget.getSelection();if(!this.local){var e=a.$("."+t,d.widget.node);b[c+"LocalVisible"]=e&&e.classList.contains(q)}return!0}.bind(this))},
setValues:function(b){this._forEach(function(c,d){d.widget.setSelection(b[c]);if(!this.local){var e=a.$("."+t,d.widget.node);e&&(b[c+"LocalVisible"]?(e.classList.add(q),e.classList.remove(w)):(e.classList.add(w),e.classList.remove(q)))}return!0}.bind(this))},destroy:function(){this.node&&(this.node=null);this.editorThemeWidget&&(this.editorThemeWidget.destroy(),this.editorThemeWidget=null)}});return s});
define("orion/editorPreferences",[],function(){function g(e,d){this._preferences=e;if(this._callback=d)var f=e.listenForChangedSettings(k,function(c){c.key===f&&d()}.bind(this))}var k="/editor/settings",f={autoSave:!1,autoSaveVisible:!0,autoSaveLocalVisible:!0,autoSaveTimeout:1E3,autoSaveTimeoutVisible:!0,themeVisible:!0,themeLocalVisible:!0,fontSizeVisible:!0,fontSizeLocalVisible:!0,autoLoad:!0,autoLoadVisible:!0,saveDiffs:!0,saveDiffsVisible:!0,contentAssistAutoTrigger:!0,contentAssistAutoTriggerVisible:!0,
showOccurrences:!1,showOccurrencesVisible:!0,autoPairParentheses:!0,autoPairParenthesesVisible:!0,autoPairBraces:!0,autoPairBracesVisible:!0,autoPairSquareBrackets:!0,autoPairSquareBracketsVisible:!0,autoPairAngleBrackets:!1,autoPairAngleBracketsVisible:!0,autoPairQuotations:!0,autoPairQuotationsVisible:!0,autoCompleteComments:!0,autoCompleteCommentsVisible:!0,smartIndentation:!0,smartIndentationVisible:!0,trimTrailingWhiteSpace:!1,trimTrailingWhiteSpaceVisible:!0,tabSize:4,tabSizeVisible:!0,expandTab:!1,
expandTabVisible:!0,scrollAnimation:!0,scrollAnimationVisible:!0,scrollAnimationTimeout:300,scrollAnimationTimeoutVisible:!0,annotationRuler:!0,annotationRulerVisible:!0,lineNumberRuler:!0,lineNumberRulerVisible:!0,foldingRuler:!0,foldingRulerVisible:!0,overviewRuler:!0,overviewRulerVisible:!0,showTabs:!1,showTabsVisible:!0,showSpaces:!1,showSpacesVisible:!0,wordWrap:!1,wordWrapVisible:!0,showMargin:!1,showMarginVisible:!0,marginOffset:80,marginOffsetVisible:!0,keyBindings:"Default",keyBindingsVisible:!0,
keyBindingsLocalVisible:!0};g.prototype={_initialize:function(e){e=e.get("editorSettings")||{};for(var d in f)e.hasOwnProperty(d)||(e[d]=f[d]);return e},getPrefs:function(e){this._preferences.getPreferences(k).then(function(d){d=this._initialize(d);"string"===typeof d&&(d=JSON.parse(d));e(d)}.bind(this))},setPrefs:function(e,d){this._preferences.getPreferences(k).then(function(f){f.put("editorSettings",e);e=this._initialize(f);d&&d(e);this._callback&&this._callback(e)}.bind(this))}};return{EditorPreferences:g}});
define("orion/widgets/settings/SettingsContainer","i18n!orion/settings/nls/messages orion/Deferred orion/globalCommands orion/PageUtil orion/webui/littlelib orion/objects orion/URITemplate orion/widgets/themes/ThemeBuilder orion/settings/ui/PluginSettings orion/widgets/themes/ThemePreferences orion/widgets/themes/editor/ThemeData orion/widgets/themes/container/ThemeData orion/widgets/settings/SplitSelectionLayout orion/widgets/plugin/PluginList orion/widgets/settings/UserSettings orion/widgets/settings/GitSettings orion/widgets/settings/EditorSettings orion/editorPreferences".split(" "),
function(g,k,f,e,d,h,c,b,a,l,m,n,p,s,t,q,w,r){function v(a,b){p.apply(this,arguments);var c=this.registry.getServiceReferences("orion.core.getplugins");this.pluginsUri=c[0]&&c[0].getProperty("uri");this.settingsCategories=[]}var x=p.prototype;v.prototype=Object.create(x);h.mixin(v.prototype,{loadTranslatedPluginSettings:function(){return this.settingsRegistry.loadI18n()},show:function(){var a=this;k.all([this.preferences.getPreferences("/settingsContainer"),this.loadTranslatedPluginSettings()]).then(function(b){b=
b[0];var c=b.get("categories")||{};(void 0===c.showUserSettings||c.showUserSettings)&&a.settingsCategories.push({id:"userSettings",textContent:g["User Profile"],show:a.showUserSettings});(void 0===c.showGitSettings||c.showGitSettings)&&a.settingsCategories.push({id:"gitSettings",textContent:g.Git,show:a.showGitSettings});(void 0===c.showEditorSettings||c.showEditorSettings)&&a.settingsCategories.push({id:"editorSettings",textContent:g.Editor,show:a.showEditor});(void 0===c.showThemeSettings||c.showThemeSettings)&&
a.settingsCategories.push({id:"themeBuilder",textContent:g["UI Theme"],show:a.showThemeBuilder});(void 0===c.showPluginSettings||c.showPluginSettings)&&a.settingsCategories.push({id:"plugins",textContent:g.Plugins,show:a.showPlugins});a.settingsCategories.forEach(function(b){b.show=b.show.bind(a,b.id)}.bind(a));var e=a.settingsRegistry;e.getCategories().map(function(a,b){return{category:a,label:e.getCategoryLabel(a)||g[a]||a}}).sort(function(a,b){return a.label.localeCompare(b.label)}).forEach(function(b){var c=
b.category;a.settingsCategories.push({id:c,textContent:b.label,show:a.showPluginSettings.bind(a,c)})});a.itemToIndexMap={};a.toolbar=d.node(a.pageActions);a.manageDefaultData(b);a.drawUserInterface();window.addEventListener("hashchange",a.processHash.bind(a));f.setPageTarget({task:"Settings",serviceRegistry:a.registry,commandService:a.commandService})})},processHash:function(){var a=e.matchResourceParameters(),b=this;this.preferences.getPreferences("/settingsContainer").then(function(c){c=c.get("selection");
c=a.category||c;b.selectedCategory&&b.selectedCategory.id===c||b.showByCategory(c)});window.setTimeout(function(){this.commandService.processURL(window.location.href)}.bind(this),0)},showThemeBuilder:function(a){this.selectCategory(a);this.updateToolbar(a);this.themeWidget&&this.themeWidget.destroy();a=new n.ThemeData;var c=new l.ThemePreferences(this.preferences,a);this.themeWidget=new b({commandService:this.commandService,preferences:c,themeData:a});d.empty(this.table);a=document.createElement("div");
this.table.appendChild(a);this.themeWidget.renderData(a,"INITIALIZE")},showEditor:function(a){this.selectCategory(a);d.empty(this.table);this.editorSettingWidget&&this.editorSettingWidget.destroy();this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);var c=new m.ThemeData,e=new l.ThemePreferences(this.preferences,c),f=new b({commandService:this.commandService,preferences:e,themeData:c,toolbarId:"editorThemeSettingsToolActionsArea"}),c={name:g.Import,tip:g["Import a theme"],
id:0,callback:c.importTheme.bind(c)};f.addAdditionalCommand(c);c=new r.EditorPreferences(this.preferences);this.editorSettings=new w({registry:this.registry,preferences:c,themePreferences:e,editorThemeWidget:f,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.editorSettings.show()},showUserSettings:function(a){this.selectCategory(a);d.empty(this.table);this.userWidget&&this.userWidget.destroy();
this.updateToolbar(a);a=document.createElement("div");this.table.appendChild(a);this.userWidget=new t({registry:this.registry,settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.userWidget.show()},showGitSettings:function(a){this.selectCategory(a);d.empty(this.table);this.gitWidget&&this.gitWidget.destroy();this.updateToolbar(a);a=document.createElement("div");
this.table.appendChild(a);this.gitWidget=new q({registry:this.registry,settings:this.settingsCore,preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,userClient:this.userClient},a);this.gitWidget.show()},initPlugins:function(a){d.empty(this.table);this.pluginWidget&&this.pluginWidget.destroy();a=document.createElement("div");this.table.appendChild(a);this.pluginWidget=new s({settings:this.settingsCore,
preferences:this.preferences,statusService:this.preferencesStatusService,dialogService:this.preferenceDialogService,commandService:this.commandService,registry:this.registry,pluginsUri:this.pluginsUri},a);this.pluginWidget.show()},initPluginSettings:function(b){d.empty(this.table);this.pluginSettingsWidget&&this.pluginSettingsWidget.destroy();var c=this.settingsRegistry.getSettings(b).sort(function(a,b){var c=a.getName(),d=b.getName();return"string"===typeof c&&"string"===typeof d?c.localeCompare(d):
a.getPid().localeCompare(b.getPid())});this.pluginSettingsWidget=new a({parent:this.table,serviceRegistry:this.registry,settings:c,title:g[b]||b})},showPlugins:function(a){this.selectCategory(a);this.updateToolbar(a);this.initPlugins(a)},showPluginSettings:function(a){this.selectCategory(a);this.updateToolbar(a);this.initPluginSettings(a)},selectCategory:function(a){this.preferences.getPreferences("/settingsContainer").then(function(b){b.put("selection",a)});x.selectCategory.apply(this,arguments);
var b=e.matchResourceParameters();b.category!==a&&(b.category=a,delete b.resource,window.location=(new c("#,{params*}")).expand({params:b}))},showByCategory:function(a){this.updateToolbar(a);this.settingsCategories.some(function(b){if(b.id===a)return b.show(),!0})||this.selectCategory(a)},addCategory:function(a){a["class"]=(a["class"]||"")+" navbar-item";a.role="tab";a.tabindex=-1;a["aria-selected"]="false";a.onclick=a.show;x.addCategory.apply(this,arguments)},addCategories:function(){var a=this;
this.settingsCategories.forEach(function(b,c){a.addCategory(b)})},drawUserInterface:function(a){x.drawUserInterface.apply(this,arguments);this.addCategories();this.processHash()},handleError:function(a){console.log(a)},manageDefaultData:function(a){a.get("selection")||a.put("selection","userSettings")}});return v});
define("built-settings.js","i18n!orion/settings/nls/messages orion/browserCompatibility orion/bootstrap orion/status orion/progress orion/commandRegistry orion/commands orion/keyBinding orion/profile/usersClient orion/operationsClient orion/fileClient orion/searchClient orion/dialogs orion/globalCommands orion/webui/littlelib orion/config orion/metatype orion/settings/settingsRegistry orion/widgets/settings/SettingsContainer".split(" "),function(g,k,f,e,d,h,c,b,a,l,m,n,p,s,t,q,w,r,v){f.startup().then(function(f){var k=
f.serviceRegistry,q=f.preferences,y=f.pluginRegistry,G=new l.OperationsClient(k),E=new e.StatusReportingService(k,G,"statusPane","notifications","notificationArea"),J=new h.CommandRegistry({});new d.ProgressService(k,G,J);var G=new m.FileClient(k),G=new n.Searcher({serviceRegistry:k,commandService:J,fileService:G}),y=new a.UsersClient(k,y),H=new c.Command({name:"Clear themes and editor settings",tooltip:"Clear all settings associated with editor themes and window themes",id:"orion.clearThemes",callback:function(a){q.getPreferences("/themes",
2).then(function(a){a.put("styles",null);a.put("selected",null);E.setMessage("Theme settings have been cleared.")})}});J.addCommand(H);J.registerCommandContribution("globalActions","orion.clearThemes",1,null,!0,new b.KeyBinding("t",!0,!0,!0));H=new p.DialogService(k);s.generateBanner("orion-settings",k,J,q,G);G=new r(k,new w.MetaTypeRegistry(k));E.setMessage(g["Loading..."]);(new v({preferences:q,registry:k,preferencesStatusService:E,commandService:J,preferenceDialogService:H,settingsCore:f,pageActions:"pageActions",
userClient:y,settingsRegistry:G},t.node("categoriesContainer"),t.node("settings"))).show();E.setMessage("")})});
//@ sourceMappingURL=built-settings.js.map