ide-orion.editorBuild.code_edit.built-codeEdit.min.js Maven / Gradle / Ivy
!function(e,t){"function"==typeof define&&define.amd?define([],t):(e.orion=e.orion||{},e.orion.codeEdit=t())}(this,function(){var e,t,n;!function(i){function r(e,t){return C.call(e,t)}function o(e,t){var n,i,r,o,s,a,l,d,c,h,u=t&&t.split("/"),f=_.map,p=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(u=u.slice(0,u.length-1),e=u.concat(e.split("/")),d=0;d0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((u||p)&&f){for(n=e.split("/"),d=n.length;d>0;d-=1){if(i=n.slice(0,d).join("/"),u)for(c=u.length;c>0;c-=1)if(r=f[u.slice(0,c).join("/")],r&&(r=r[i])){o=r,s=d;break}if(o)break;!a&&p&&p[i]&&(a=p[i],l=d)}!o&&a&&(o=a,s=l),o&&(n.splice(0,s,o),e=n.join("/"))}return e}function s(e,t){return function(){return f.apply(i,w.call(arguments,0).concat([e,t]))}}function a(e){return function(t){return o(t,e)}}function l(e){return function(t){v[e]=t}}function d(e){if(r(m,e)){var t=m[e];delete m[e],y[e]=!0,u.apply(i,t)}if(!r(v,e)&&!r(y,e))throw new Error("No "+e);return v[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function h(e){return function(){return _&&_.config&&_.config[e]||{}}}var u,f,p,g,v={},m={},_={},y={},C=Object.prototype.hasOwnProperty,w=[].slice;p=function(e,t){var n,i=c(e),r=i[0];return e=i[1],r&&(r=o(r,t),n=d(r)),r?e=n&&n.normalize?n.normalize(e,a(t)):o(e,t):(e=o(e,t),i=c(e),r=i[0],e=i[1],r&&(n=d(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},g={require:function(e){return s(e)},exports:function(e){var t=v[e];return"undefined"!=typeof t?t:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:h(e)}}},u=function(e,t,n,o){var a,c,h,u,f,_,C=[];if(o=o||e,"function"==typeof n){for(t=!t.length&&n.length?["require","exports","module"]:t,f=0;f-1&&i[e];e--)o=i[e],n=t[o],(n===!0||1===n)&&(n=s(f+o+"/"+g)),r(_,n);a(_)})})}}})}(),n("orion/nls/messages",["module"],function(e){var t=e.config();return t&&t.root?t:{root:!0}}),n("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell","Get Plugins":"Get Plug-ins",Global:"Global",Editor:"Editor",EditorRelatedLink:"Show Current Folder",EditorRelatedLinkParent:"Show Enclosing Folder",EditorLinkWorkspace:"Edit",EditorRelatedLinkProj:"Show Project",sidebar:"Sidebar",toolbar:"Toolbar","Filter bindings:":"Filter bindings:","Filter bindings":"Type characters to filter by name or key combination",BindingPrompt:"Enter the new binding",NoBinding:"---",orionClientLabel:"Orion client repository","Orion Editor":"Text Editor","Orion Image Viewer":"Image Viewer","Orion Markdown Editor":"Markdown Editor","Orion Markdown Viewer":"Markdown Viewer","Orion JSON Editor":"JSON Editor","Orion System Editor":"System 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.",ShowAllKeyBindings:"Show a list of all the keybindings on this page","Show Keys":"Show Keys",HideShowBannerFooter:"Hide or show the page banner and footer","Toggle Banner and Footer":"Toggle Banner and Footer",ChooseFileOpenEditor:"Choose a file by name and open an editor on it",FindFile:"Open File...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","System Editor Tooltip":"Open this file type in the desktop's default manner","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",NoSearchAvailableErr:"Can't search: no search service is available",Related:"Related",Options:"Options","LOG: ":"LOG: ",View:"View",SplashTitle:"Setting up Workspace",SplashTitleSettings:"Loading Settings",SplashTitleGit:"Loading Git Repositories",LoadingPage:"Loading Page",LoadingPlugins:"Loading Plugins",AuthenticatingUser:"Authenticating user...",AuthenticatedUser:"Authenticated user",LoadingResources:"Loading Resources",plugin_started:'"${0}" started',"plugin_lazy activation":'"${0}" lazily activated',plugin_starting:'"${0}" starting',"no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ",Operations:"Operations","Operations running":"Operations running",SomeOpWarning:"Some operations finished with warning",SomeOpErr:"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","Recent searches":"Recent searches","Regular expression":"Regular expression","Search options":"Search options","Global search":"Global search","Orion Home":"Home","Close notification":"Close notification","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 Plug-in","Generate a sample plugin for integrating with Orion.":"Generate a sample plug-in for integrating with Orion.",Browser:"Web Browser",OutlineProgress:"Getting outline for ${0} from ${1}",FormatProgress:"Formatting ${0} from ${1}",outlineTimeout:"Outline service timed out. Try reloading the page and opening the outline again.",UnknownError:"An unknown error occurred.","Filter outline:":"Filter outline:",Filter:"Type characters (* = any string, ? = any character)",TemplateExplorerLabel:"Templates",OpenTemplateExplorer:"Open Template Explorer",Edit:"Edit",CentralNavTooltip:"Toggle Navigation Menu","Wrote: ${0}":"Wrote: ${0}",GenerateHTML:"Generate HTML file",GenerateHTMLTooltip:"Write an HTML file generated from the current Markdown editor content","alt text":"alt text",blockquote:"blockquote",code:"code","code (block)":"code (block)","code (span)":"code (span)",emphasis:"emphasis","fenced code (${0})":"fenced code (${0})","header (${0})":"header (${0})","horizontal rule":"horizontal rule",label:"label","link (auto)":"link (auto)","link (image)":"link (image)","link (inline)":"link (inline)","link label":"link label","link label (optional)":"link label (optional)","link (ref)":"link (ref)","list item (bullet)":"list item (bullet)","list item (numbered)":"list item (numbered)","strikethrough (${0})":"strikethrough (${0})",strong:"strong","table (${0})":"table (${0})",text:"text","title (optional)":"title (optional)",url:"url",workedProgress:"${0} (${1}/${2})",ConfirmLogout:"Do you want to logout?",VerticalPaneOrientation:"Vertical pane orientation",TogglePaneOrientationTooltip:"Toggle split pane orientation",WarningDuplicateLinkId:"Duplicate link ID: ${0} (link IDs are not case-sensitive)",WarningHeaderTooDeep:"Header level cannot exceed 6",WarningLinkHasNoText:"Link has no text",WarningLinkHasNoURL:"Link has no URL",WarningOrderedListItem:"Ordered list item within unordered list",WarningOrderedListShouldStartAt1:"The first item in an ordered list should have index 1",WarningUndefinedLinkId:"Undefined link ID: ${0}",WarningUnorderedListItem:"Unordered list item within ordered list",PageTitleFormat:"${0} - ${1}",KeyCTRL:"Ctrl",KeySHIFT:"Shift",KeyALT:"Alt",KeyBKSPC:"Backspace",KeyDEL:"Del",KeyEND:"End",KeyENTER:"Enter",KeyESCAPE:"Esc",KeyHOME:"Home",KeyINSERT:"Ins",KeyPAGEDOWN:"Page Down",KeyPAGEUP:"Page Up",KeySPACE:"Space",KeyTAB:"Tab","a year":"a year",years:"${0} years","a month":"a month",months:"${0} months","a day":"a day",days:"${0} days","an hour":"an hour",hours:"${0} hours","a minute":"a minute",minutes:"${0} minutes",timeAgo:"${0} ago",justNow:"just now",fixAll:"Fix all",nextSplitter:"Next Splitter",nextSplitterTooltip:"Move focus through the available splitters",Confirm:"Confirm"}),n("orion/i18nUtil",[],function(){function e(e){var t=/\$\{([^\}]+)\}/g,n=arguments;return 2===n.length&&n[1]&&"object"==typeof n[1]?e.replace(t,function(e,t){return n[1][t]}):e.replace(t,function(e,t){return n[(t<<0)+1]})}return{formatMessage:e}}),n("orion/util",[],function(){function e(e){var t=arguments;return e.replace(/\$\{([^\}]+)\}/g,function(e,n){return t[(n<<0)+1]})}function t(e,t){return e.createElementNS?e.createElementNS(C,t):e.createElement(t)}function n(e,t){t.addEventListener("keydown",function(t){9!==t.keyCode||t.shiftKey||(t.preventDefault(),e.focus())}),e.addEventListener("keydown",function(e){9===e.keyCode&&e.shiftKey&&(e.preventDefault(),t.focus())})}var i=navigator.userAgent,r=-1!==i.indexOf("MSIE")||-1!==i.indexOf("Trident")?document.documentMode:void 0,o=parseFloat(i.split("Firefox/")[1]||i.split("Minefield/")[1])||void 0,s=-1!==i.indexOf("Opera")?parseFloat(i.split("Version/")[1]):void 0,a=parseFloat(i.split("Chrome/")[1])||void 0,l=-1!==i.indexOf("Safari")&&!a,d=parseFloat(i.split("WebKit/")[1])||void 0,c=-1!==i.indexOf("Android"),h=-1!==i.indexOf("iPad"),u=-1!==i.indexOf("iPhone"),f=h||u,p=-1!==i.indexOf("Electron"),g=-1!==navigator.platform.indexOf("Mac"),v=-1!==navigator.platform.indexOf("Win"),m=-1!==navigator.platform.indexOf("Linux"),_="undefined"!=typeof document&&"ontouchstart"in document.createElement("input"),y=v?"\r\n":"\n",C="http://www.w3.org/1999/xhtml";return{formatMessage:e,createElement:t,confineDialogTab:n,isIE:r,isFirefox:o,isOpera:s,isChrome:a,isSafari:l,isWebkit:d,isAndroid:c,isIPad:h,isIPhone:u,isIOS:f,isElectron:p,isMac:g,isWindows:v,isLinux:m,isTouch:_,platformDelimiter:y}}),n("orion/webui/littlelib",["orion/util"],function(e){function t(e,t){return t||(t=document),t.querySelector(e)}function n(e,t){return t||(t=document),t.querySelectorAll(e)}function i(e,t){return Array.prototype.slice.call(n(e,t))}function r(e){var t=e;return"string"==typeof e&&(t=document.getElementById(e)),t}function o(e,t){if(!e||!t)return!1;if(e===t)return!0;var n=e.compareDocumentPosition(t);return Boolean(16&n)}function s(e){var t=e.getBoundingClientRect(),n=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),i=Math.max(document.documentElement.scrollTop,document.body.scrollTop);return{left:t.left+n,top:t.top+i,width:t.width,height:t.height}}function a(e){for(;e.hasChildNodes();){var t=e.firstChild;e.removeChild(t)}}function l(t){var n=t.tabIndex;if(0===n&&e.isIE){var i={a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0};i[t.nodeName.toLowerCase()]||t.attributes.tabIndex||(n=-1)}return n}function d(e){if(l(e)>=0&&!e.disabled&&e.offsetParent)return e;if(e.hasChildNodes())for(var t=0;t=0;t--){var n=c(e.childNodes[t]);if(n)return n}return l(e)>=0&&!e.disabled&&e.offsetParent?e:null}function h(){e.isMac&&document.addEventListener("keydown",function(e){if(121===e.keyCode&&e.shiftKey){var t,n,i,r=document.activeElement;if("true"===r.contentEditable){var o=window.getSelection(),a=o.getRangeAt(0);t=a.getBoundingClientRect(),n=t.left,i=t.top+t.height}else t=s(r),n=t.left+t.width/2,i=t.top+t.height/2;var l=r.ownerDocument.createEvent("MouseEvents");return l.initMouseEvent("contextmenu",!0,!0,r.ownerDocument.defaultView,1,0,0,n,i,!1,!1,!1,!1,2,null),!r.dispatchEvent(l)}},!0)}function u(e){e.tabTrapInstalled||(e.addEventListener("keydown",function(t){if(t.keyCode===E.TAB){var n=d(e),i=c(e);n&&i&&(t.target!==i||t.shiftKey?t.target===n&&t.shiftKey&&(i.focus(),w(t)):(n.focus(),w(t)))}},!0),e.tabTrapInstalled=!0)}function f(e,t){if(3===e.nodeType){var n=A.exec(e.nodeValue);n&&n.length>1&&t(e,n)}else 1===e.nodeType&&(p(e,t,"alt"),p(e,t,"aria-label"));if(e.hasChildNodes())for(var i=0;i1&&t(e,r,n)}}function g(e,t){if(!e||!t)return 0;var n=e.ownerDocument,i=n.defaultView||n.parentWindow;if(i.getComputedStyle){var r=i.getComputedStyle(e,null),o=r.getPropertyValue(t);if(o.length>2&&-1!==o.indexOf("px",o.length-2)){o=o.slice(0,-2);var s=parseInt(o,10);return s!==s?0:s}}return 0}function v(e,t){f(e,function(e,n,i){var r=t[n[1]]||n[1];3===e.nodeType?e.parentNode.replaceChild(document.createTextNode(r),e):1===e.nodeType&&i&&e.setAttribute(i,r)})}function m(e,t){f(e,function(e,n){var i=t[n[1]];if(i){var r=document.createRange(),o=n.index;r.setStart(e,o),r.setEnd(e,o+n[0].length),r.deleteContents(),r.insertNode(i)}})}function _(t,n){function i(e){L.forEach(function(t){var n=!1,i=t.excludeNodes.some(function(t){return document.body.contains(t)?(n=!0,t.contains(e.target)):!1});if(n&&!i)try{t.dismiss(e)}catch(r){"undefined"!=typeof console&&console&&console.error(r&&r.message)}}),L=L.filter(function(e){return e.excludeNodes.some(function(e){return document.body.contains(e)})})}null===L&&(L=[],document.addEventListener("click",i,!0),e.isIOS&&document.addEventListener("touchend",function(e){function t(){e.target.removeEventListener("click",t)}0===e.touches.length&&e.target.addEventListener("click",t)},!1)),L.push({excludeNodes:t,dismiss:n})}function y(e){L=L.filter(function(t){return e!==t.dismiss})}function C(e){for(var t=e.parentNode,n=document.documentElement;t&&t!==n;){var i=window.getComputedStyle(t,null);if(!i)break;var r=i.getPropertyValue("overflow-y");if("auto"===r||"scroll"===r)break;t=t.parentNode}return t}function w(e){window.document.all&&(e.keyCode=0),e.preventDefault&&(e.preventDefault(),e.stopPropagation())}function x(e){for(var t=document.getElementsByTagName("iframe"),n=0;n1?n.children:n.firstChild}var E={BKSPC:8,TAB:9,ENTER:13,SHIFT:16,CONTROL:17,ALT:18,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46,COMMAND:91};h();var A=/\$\{([^\}]+)\}/,L=null,k=Object.create(null);return Object.keys(E).forEach(function(e){k[E[e]]=e}),{$:t,$$:n,$$array:i,node:r,contains:o,bounds:s,empty:a,firstTabbable:d,lastTabbable:c,trapTabs:u,pixelValueOf:g,stop:w,processTextNodes:v,processDOMNodes:m,addAutoDismiss:_,setFramesEnabled:x,validId:b,getOffsetParent:C,removeAutoDismiss:y,keyName:S,KEY:E,createNodes:T}}),n("orion/commandsProxy",["orion/util","orion/webui/littlelib"],function(e,t){function n(t,n){function i(t){if(e.isMac){if(t.metaKey&&!t.altKey)return t.shiftKey||t.ctrlKey||65!==t.keyCode&&67!==t.keyCode&&86!==t.keyCode&&88!==t.keyCode&&90!==t.keyCode?!1:!0;if(t.ctrlKey)return!1}else{if(t.ctrlKey&&!t.altKey)return t.shiftKey||65!==t.keyCode&&67!==t.keyCode&&86!==t.keyCode&&88!==t.keyCode&&90!==t.keyCode?!1:!0;if(t.altKey&&!t.ctrlKey)return!1;if(t.ctrlKey&&t.altKey)return!1}if(t["char"])return t["char"].length>0;if(t.charCode||t.keyCode){var n=t.charCode||t.keyCode;switch(n){case 8:case 9:case 13:case 46:return!0;default:return n>=32&&112>n||n>123}}return!1}if(t=t||window.event,i(t)){if("true"===t.target.contentEditable)return;var r=t.target.nodeName.toLowerCase();if("input"===r){var o=t.target.type.toLowerCase();switch(o){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"===r)return}n(t)}function i(){this._init()}return i.prototype={destroy:function(){this._listener&&(document.removeEventListener("keydown",this._listener),this._listener=null)},setProxy:function(e){this.proxy=e},setKeyBindings:function(e){this.bindings=e},_init:function(){var e=this;document.addEventListener("keydown",this._listener=function(i){return n(i,function(n){var i=e.proxy,r=e.bindings;if(r&&i)for(var o=0;o0?"block":"none",this._bottomScrollButton.style.display=this._dropdownNode.scrollHeight>this._dropdownNode.scrollTop+this._dropdownNode.offsetHeight?"block":"none")}function l(){this._topScrollButton.style.width=this._dropdownNode.clientWidth+1+"px",this._bottomScrollButton.style.width=this._dropdownNode.clientWidth+1+"px",this._topScrollButton.style.top=this._dropdownNode.style.top,this._topScrollButton.style.left=this._topScrollButton.parentNode.clientWidth+"px",this._bottomScrollButton.style.top=Number(this._dropdownNode.style.top.replace("px",""))+(this._dropdownNode.clientHeight-this._bottomScrollButton.clientHeight+1)+"px",this._bottomScrollButton.style.left=this._bottomScrollButton.parentNode.clientWidth+"px"}return n.prototype={_init:function(t){if(this._dropdownNode=e.node(t.dropdown),!this._dropdownNode)throw"no dom node for dropdown found";if(t.name&&this._dropdownNode.setAttribute("aria-label",t.name),this._populate=t.populate,this._selectionClass=t.selectionClass,this._parentDropdown=t.parentDropdown,this._positioningNode=t.positioningNode,!this._parentDropdown)for(var n=this._dropdownNode.parentNode;n&&document!==n;){if(n.classList&&n.classList.contains("dropdownMenu")){this._parentDropdown=n.dropdown;break}n=n.parentNode}if(this._dropdownNode.tabIndex=-1,this._triggerNode=t.triggerNode?t.triggerNode:e.$(".dropdownTrigger",this._dropdownNode.parentNode),!this._triggerNode)throw"no dom node for dropdown trigger found";var i=function(t){var n=!1;n=this._triggerNode.classList.contains("dropdownMenuItem")?this.open(t):this.toggle(t),n&&e.stop(t)}.bind(this);t.skipTriggerEventListeners||(this._triggerNode.addEventListener("click",i,!1),"span"===this._triggerNode.tagName.toLowerCase()?this._triggerNode.addEventListener("keydown",function(t){(t.keyCode===e.KEY.ENTER||t.keyCode===e.KEY.SPACE)&&i(t)}.bind(this),!1):this._triggerNode.addEventListener("keydown",function(t){t.keyCode===e.KEY.DOWN&&i(t)}.bind(this),!1));var r=this;this._dropdownNode.addEventListener("mouseover",function(t){if(t.target!==t.currentTarget){for(var n=t.target;n!==t.currentTarget&&"li"!==n.tagName.toLowerCase();)n=n.parentNode;var i="menubar"===n.parentNode.getAttribute("role");if(n=n.childNodes[0])if(i){for(var o=null,s=n.parentNode.parentNode,a=s.dropdown.getItems(),l=0;l0){e.setFramesEnabled(!1),this._boundAutoDismiss&&e.removeAutoDismiss(this._boundAutoDismiss),this._boundAutoDismiss=this._autoDismiss.bind(this),this._triggerNode.classList.add("dropdownTriggerOpen"),this._triggerNode.setAttribute("aria-expanded","true"),this._selectionClass&&this._triggerNode.classList.add(this._selectionClass),this._dropdownNode.classList.add("dropdownMenuOpen"),this._isVisible=!0,this._dropdownNode.scrollHeight>this._dropdownNode.offsetHeight&&(this._buttonsAdded=s.call(this));var r=e.$$array(".dropdownSubMenu",this._dropdownNode),o=[this._triggerNode].concat(r);this._buttonsAdded&&(o.push(this._topScrollButton),o.push(this._bottomScrollButton)),e.addAutoDismiss(o,this._boundAutoDismiss),this._positionDropdown(t),this._buttonsAdded&&l.call(this),this._focusDropdownNode(),n=!0,this._parentDropdown&&this._parentDropdown.submenuOpen(this)}}return n},_focusDropdownNode:function(){this._dropdownNode.focus()},_autoDismiss:function(e){if(this.close(!1)&&this._dropdownNode.contains(e.target))for(var t=this._parentDropdown;t;)t.close(!1),t=t._parentDropdown},_positionDropdown:function(){if(this._dropdownNode.style.left="",this._dropdownNode.style.top="",this._positioningNode)return void(this._dropdownNode.style.left=this._positioningNode.offsetLeft+"px");var t=e.bounds(this._dropdownNode),n=e.bounds(document.body);if(t.left+t.width>n.left+n.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-t.width+"px";else{var i=e.bounds(this._boundingNode(this._triggerNode)),r=e.bounds(this._triggerNode);this._dropdownNode.style.left=r.left-i.left-t.width+r.width+"px"}var o=t.top+t.height-(n.top+n.height);o>0&&(this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-o)+"px")},_boundingNode:function(e){var t=window.getComputedStyle(e,null);if(null===t)return e;var n=t.getPropertyValue("position");return"absolute"!==n&&e.parentNode&&e!==document.body?this._boundingNode(e.parentNode):e},close:function(t){var n=!1;return this.isVisible()&&(this._triggerNode.classList.remove("dropdownTriggerOpen"),this._triggerNode.setAttribute("aria-expanded","false"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),e.setFramesEnabled(!0),t&&this._triggerNode.focus(),this._isVisible=!1,this._selectedItem&&(this._selectedItem.classList.remove("dropdownMenuItemSelected"),this._selectedItem=null),this._boundAutoDismiss&&(e.removeAutoDismiss(this._boundAutoDismiss),this._boundAutoDismiss=null),a.call(this,!0),n=!0),n},getItems:function(){var t=e.$$array("li:not(.dropdownSeparator) [role^='menuitem']",this._dropdownNode,!0),n=[],i=this;return t.forEach(function(e){var t=e;"label"===t.parentNode.tagName.toLowerCase()&&(t=e.parentNode),t.parentNode.parentNode===i._dropdownNode&&n.push(t)}),n},empty:function(){var t=e.$$array("li",this._dropdownNode),n=this;t.forEach(function(e){e.parentNode===n._dropdownNode&&e.parentNode.removeChild(e)})},_dropdownKeyDown:function(t){if(t.keyCode!==e.KEY.TAB)if(t.keyCode===e.KEY.UP||t.keyCode===e.KEY.DOWN||t.keyCode===e.KEY.RIGHT||t.keyCode===e.KEY.LEFT||t.keyCode===e.KEY.ENTER||t.keyCode===e.KEY.SPACE){var n=this.getItems(),i="menubar"===this._dropdownNode.getAttribute("role");if(n.length&&n.length>0){if(this._selectedItem){var r=n.indexOf(this._selectedItem);if(0>r&&(r=n.indexOf(this._selectedItem.parentNode)),r>=0)if(t.keyCode===e.KEY.UP)if(i){if(this._selectedItem.classList.contains("dropdownTrigger")&&this._selectedItem.dropdown){var o=this._selectedItem.dropdown;o.open();var s=o.getItems();o._selectItem(s[s.length-1])}}else this._selectItem(n[r>0?r-1:n.length-1]);else t.keyCode===e.KEY.DOWN?i?this._selectedItem.classList.contains("dropdownTrigger")&&this._selectedItem.dropdown&&(this._selectedItem.dropdown.open(),this._selectedItem.dropdown._selectItem()):this._selectItem(n[r0?r-1:n.length-1]):this._parentDropdown?(this.close(!0),this._parentDropdown._dropdownNode.focus()):this._closeThenOpen(this._selectedItem,t.keyCode,!0):(t.keyCode===e.KEY.ENTER||t.keyCode===e.KEY.SPACE)&&(this._selectedItem.classList.contains("dropdownTrigger")&&this._selectedItem.dropdown?(this._selectedItem.dropdown.open(),this._selectedItem.dropdown._selectItem()):(this._selectedItem.click(),this._triggerNode.focus()))}else t.keyCode===e.KEY.UP?this._selectItem(n[n.length-1]):t.keyCode===e.KEY.RIGHT||t.keyCode===e.KEY.LEFT?this._closeThenOpen(this._triggerNode,t.keyCode,!1):this._selectItem(n[0]);e.stop(t)}}else t.keyCode===e.KEY.ESCAPE&&(this.close(!0),this._parentDropdown&&this._parentDropdown._dropdownNode.focus(),e.stop(t));else if(this._selectedItem||this._isVisible)for(var a=!0;a;)a=this.close(!0),this._parentDropdown&&a&&this._parentDropdown._dropdownNode.focus()},_closeThenOpen:function(t,n,i){for(;t.parentNode&&document!==t.parentNode&&"menubar"!==t.parentNode.getAttribute("role");)t=t.parentNode;if(t.parentNode&&document!==t.parentNode){for(var r=t.childNodes[0],o=t.parentNode,s=o.dropdown.getItems(),a=null,l=0;l0?s[l-1]:s[s.length-1]:li.bottom&&(this._selectedItem.scrollIntoView(!1),this._dropdownNode.scrollHeight-this._dropdownNode.scrollTop-this._dropdownNode.clientHeight<5&&(this._dropdownNode.scrollTop=this._dropdownNode.scrollHeight-this._dropdownNode.clientHeight)),a.call(this)}},submenuOpen:function(e){e!==this._selectedSubmenu&&(this._closeSelectedSubmenu(),this._selectedSubmenu=e)},_closeSelectedSubmenu:function(){for(var e=this._selectedSubmenu;e;)e.close(),e=e._selectedSubmenu},destroy:function(){this.empty(),this._boundAutoDismiss&&(e.removeAutoDismiss(this._boundAutoDismiss),this._boundAutoDismiss=null)},appendMenuItem:function(e,t){var n=i(e,t);return this._dropdownNode.appendChild(n),n},appendSeparator:function(){var e=r();return this._dropdownNode.appendChild(e),e}},n.prototype.constructor=n,{Dropdown:n,appendKeyBindingString:o,createMenuItem:i,createSeparator:r}}),n("text",["module"],function(e){"use strict";
function n(e,t){return void 0===e||""===e?t:e}function i(e,t,i,r){if(t===r)return!0;if(e===i){if("http"===e)return n(t,"80")===n(r,"80");if("https"===e)return n(t,"443")===n(r,"443")}return!1}var r,o,s,a,l,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,h=/]*>\s*([\s\S]+)\s*<\/body>/im,u="undefined"!=typeof location&&location.href,f=u&&location.protocol&&location.protocol.replace(/\:/,""),p=u&&location.hostname,g=u&&(location.port||void 0),v={},m=e.config&&e.config()||{};return r={version:"2.0.15",strip:function(e){if(e){e=e.replace(c,"");var t=e.match(h);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.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:m.createXhr||function(){var e,t,n;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(t=0;3>t;t+=1){n=d[t];try{e=new ActiveXObject(n)}catch(i){}if(e){d=[n];break}}return e},parseName:function(e){var t,n,i,r=!1,o=e.lastIndexOf("."),s=0===e.indexOf("./")||0===e.indexOf("../");return-1!==o&&(!s||o>1)?(t=e.substring(0,o),n=e.substring(o+1)):t=e,i=n||t,o=i.indexOf("!"),-1!==o&&(r="strip"===i.substring(o+1),i=i.substring(0,o),n?n=i:t=i),{moduleName:t,ext:n,strip:r}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,t,n,o){var s,a,l,d=r.xdRegExp.exec(e);return d?(s=d[2],a=d[3],a=a.split(":"),l=a[1],a=a[0],!(s&&s!==t||a&&a.toLowerCase()!==n.toLowerCase()||(l||a)&&!i(s,l,t,o))):!0},finishLoad:function(e,t,n,i){n=t?r.strip(n):n,m.isBuild&&(v[e]=n),i(n)},load:function(e,t,n,i){if(i&&i.isBuild&&!i.inlineText)return void n();m.isBuild=i&&i.isBuild;var o=r.parseName(e),s=o.moduleName+(o.ext?"."+o.ext:""),a=t.toUrl(s),l=m.useXhr||r.useXhr;return 0===a.indexOf("empty:")?void n():void(!u||l(a,f,p,g)?r.get(a,function(t){r.finishLoad(e,o.strip,t,n)},function(e){n.error&&n.error(e)}):t([s],function(e){r.finishLoad(o.moduleName+"."+o.ext,o.strip,e,n)}))},write:function(e,t,n){if(v.hasOwnProperty(t)){var i=r.jsEscape(v[t]);n.asModule(e+"!"+t,"define(function () { return '"+i+"';});\n")}},writeFile:function(e,t,n,i,o){var s=r.parseName(t),a=s.ext?"."+s.ext:"",l=s.moduleName+a,d=n.toUrl(s.moduleName+a)+".js";r.load(l,n,function(){var t=function(e){return i(d,e)};t.asModule=function(e,t){return i.asModule(e,d,t)},r.write(e,l,t,o)},o)}},"node"===m.env||!m.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]&&!process.versions["atom-shell"]?(o=t.nodeRequire("fs"),r.get=function(e,t,n){try{var i=o.readFileSync(e,"utf8");""===i[0]&&(i=i.substring(1)),t(i)}catch(r){n&&n(r)}}):"xhr"===m.env||!m.env&&r.createXhr()?r.get=function(e,t,n,i){var o,s=r.createXhr();if(s.open("GET",e,!0),i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);m.onXhr&&m.onXhr(s,e),s.onreadystatechange=function(){var i,r;4===s.readyState&&(i=s.status||0,i>399&&600>i?(r=new Error(e+" HTTP status: "+i),r.xhr=s,n&&n(r)):t(s.responseText),m.onXhrComplete&&m.onXhrComplete(s,e))},s.send(null)}:"rhino"===m.env||!m.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?r.get=function(e,t){var n,i,r="utf-8",o=new java.io.File(e),s=java.lang.System.getProperty("line.separator"),a=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(o),r)),l="";try{for(n=new java.lang.StringBuffer,i=a.readLine(),i&&i.length()&&65279===i.charAt(0)&&(i=i.substring(1)),null!==i&&n.append(i);null!==(i=a.readLine());)n.append(s),n.append(i);l=String(n.toString())}finally{a.close()}t(l)}:("xpconnect"===m.env||!m.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(s=Components.classes,a=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),l="@mozilla.org/windows-registry-key;1"in s,r.get=function(e,t){var n,i,r,o={};l&&(e=e.replace(/\//g,"\\")),r=new FileUtils.File(e);try{n=s["@mozilla.org/network/file-input-stream;1"].createInstance(a.nsIFileInputStream),n.init(r,1,0,!1),i=s["@mozilla.org/intl/converter-input-stream;1"].createInstance(a.nsIConverterInputStream),i.init(n,"utf-8",n.available(),a.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),i.readString(n.available(),o),i.close(),n.close(),t(o.value)}catch(d){throw new Error((r&&r.path||"")+": "+d)}}),r}),n("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'
'}),n("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'
'}),n("text!orion/webui/checkedmenuitem.html",[],function(){return''}),n("orion/webui/tooltip",["orion/webui/littlelib"],function(e){function t(e){this._init(e)}return t.prototype={_init:function(t){if(this._node=e.node(t.node),!this._node)throw"no dom node for tooltip found";this._position=t.position||["right","above","below","left"],this._text=t.text,this._hideDelay=void 0===t.hideDelay?200:t.hideDelay,this._tailSize=t.tailSize||10,this._trigger=t.trigger||"mouseover",this._afterShowing=t.afterShowing,this._afterHiding=t.afterHiding;var n=this;if("click"===this._trigger)this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(t){t.target===n._node&&(n.show(),e.stop(t))},!1);else if("mouseover"===this._trigger){this._showDelay=void 0===t.showDelay?500:t.showDelay;var i=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(t){e.contains(n._node,t.target)&&n.show()},!1),this._leaveHandler=function(t){e.contains(n._node,t.target)&&n.hide()};for(var r=0;rg){if(!i&&(!n||"left"!==t&&"right"!==t))return!1;s=g-l.height-1,d=!0}if(a+l.width>p){if(!i&&(!n||"above"!==t&&"below"!==t))return!1;a=p-l.width-1,d=!0}if(u>a){if(!i)return!1;a=u+4,d=!0}if(f>s){if(!i)return!1;s=f+4,d=!0}return this._tail&&(this._tail.previousPosition!==t||d)&&(this._tip.removeChild(this._tail),this._tail=null),this._tail||(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+t),"above"===t||"left"===t?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),d?("above"===t||"below"===t?this._tail.style.left=r.left-a+this._tailSize+"px":this._tail.style.top=r.top-s+this._tailSize+"px",this._tail.previousPosition=null):this._tail.previousPosition=t),this._tip.style.top=s+"px",this._tip.style.left=a+"px",!0},contentContainer:function(){return this._makeTipNode(),this._tipInner},isShowing:function(){return this._tip&&this._tip.classList.contains("tooltipShowing")},turnOff:function(){this.isTurnedOff=!0},turnOn:function(){this.isTurnedOff=!1},show:function(){this.isTurnedOff||this.isShowing()||(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 t=!1,n=0;!t&&n"+i.name),i.callback.call(i,t)}.bind(this),!1),s.addEventListener("keydown",function(e){(e.keyCode===n.KEY.ENTER||e.keyCode===n.KEY.SPACE)&&(d.logEvent("command","invoke",this.id+">"+i.name),i.callback.call(i,t))}.bind(this),!1)}else o._generateMenuSeparator(e)}.bind(this))},getChoices:function(e,t,n){return this.choiceCallback?this.choiceCallback.call(t,e,n):null},makeChoiceCallback:function(e,t){return function(n){e.callback&&e.callback.call(e,t,n)}},hasImage:function(){return this.imageClass||this.image!==T}},S.prototype.constructor=S,{Command:S,CommandInvocation:b,createDropdownMenu:m,createCheckedMenuItem:_,createQuickfixItem:y,createCommandItem:C,createCommandMenuItem:x,executeBinding:u,setKeyBindingProvider:h,localKeyBindings:A,getKeyBindings:p,processKey:g,NO_IMAGE:T,_testMethodProcessKey:f}}),n("orion/keyBinding",["orion/util"],function(e){function t(e,t,n,i,r,o){this.type=o||"keydown",this.keyCode="string"==typeof e&&"keydown"===this.type?e.toUpperCase().charCodeAt(0):e,this.mod1=void 0!==t&&null!==t?t:!1,this.mod2=void 0!==n&&null!==n?n:!1,this.mod3=void 0!==i&&null!==i?i:!1,this.mod4=void 0!==r&&null!==r?r:!1}function n(e){this.keys=e}return t.prototype={getKeys:function(){return[this]},match:function(t,n){if(void 0!==n){if(0!==n)return!1}else if(t instanceof Array){if(t.length>1)return!1;t=t[0]}if(t.type!==this.type)return!1;if(this.keyCode===t.keyCode||this.keyCode===String.fromCharCode(e.isOpera?t.which:void 0!==t.charCode?t.charCode:t.keyCode)){var i=e.isMac?t.metaKey:t.ctrlKey;return this.mod1!==i?!1:"keydown"===this.type&&this.mod2!==t.shiftKey?!1:this.mod3!==t.altKey?!1:e.isMac&&this.mod4!==t.ctrlKey?!1:!0}return!1},equals:function(e){return e?this.keyCode!==e.keyCode?!1:this.mod1!==e.mod1?!1:this.mod2!==e.mod2?!1:this.mod3!==e.mod3?!1:this.mod4!==e.mod4?!1:this.type!==e.type?!1:!0:!1}},n.prototype={getKeys:function(){return this.keys.slice(0)},match:function(e,t){var n=this.keys;if(void 0!==t)return t>n.length?!1:n[t].match(e)?t===n.length-1?!0:t+1:!1;if(e instanceof Array||(e=[e]),e.length>n.length)return!1;var i;for(i=0;i=0||t.indexOf("Trident")>=0||t.indexOf("Edge")>=0)return!1;var n=document.createElement(e.tagName);n.contentEditable=!0;var i="oninput"in n;return i||(n.setAttribute("oninput","return;"),i="function"==typeof n.oninput),n=null,i}function n(e,n,r,o,s){if(!e||1!=e.nodeType)return!1;C||(C=document.createEvent("Event"),C.initEvent("TF",!0,!0)),e.setAttribute("data-tf-type",n);var l="undefined"===r?"{}":JSON.stringify(Array.isArray(r)?r[0]:r);e.setAttribute("data-tf-args",l);var d="ltr";if("undefined"===o&&(e.dir?d=e.dir:e.style&&e.style.direction&&(d=e.style.direction),o="rtl"===d.toLowerCase()),e.setAttribute("data-tf-dir",o),e.setAttribute("data-tf-locale",a.getLocaleDetails(s).lang),t(e)){{e.oninput}e.oninput=function(e){i(e.target)}}else e.onkeyup=function(t){i(t.target),e.dispatchEvent(C)},e.onmouseup=function(t){i(t.target),e.dispatchEvent(C)};return i(e),!0}function i(t){var n=t.textContent||"",i=document.getSelection();if(0===n.length||!i||i.rangeCount<=0)return void t.dispatchEvent(C);var r,o,s=i.getRangeAt(0),a=s.cloneRange();r=s.startContainer,o=s.startOffset;var l=0;3===r.nodeType&&(l+=o),a.setStart(t,0),a.setEndBefore(r);var d=document.createElement("div");d.appendChild(a.cloneContents()),l+=d.textContent.length,t.innerHTML=e(t.getAttribute("data-tf-type")).format(n,JSON.parse(t.getAttribute("data-tf-args")),"true"===t.getAttribute("data-tf-dir")?!0:!1,!0,t.getAttribute("data-tf-locale"));var c=t,h=t,u=0,f=!1;for(i.removeAllRanges(),s.setStart(t,0),s.setEnd(t,0);h;){if(3===h.nodeType){if(u+h.nodeValue.length>=l){s.setStart(h,l-u);break}u+=h.nodeValue.length,h=h.nextSibling}else{if(h.hasChildNodes()){c=h,h=c.firstChild;continue}h=h.nextSibling}for(;!h;){if(c===t){f=!0;break}h=c.nextSibling,c=c.parentNode}if(f)break}i.addRange(s),t.dispatchEvent(C)}var r=function(){var e=function(e){this.content="",this.actual="",this.textDirection="",this.localGui="",this.isVisible=!0,this.isSeparator=!1,this.isParsed=!1,this.keep=!1,this.inBounds=!1,this.inPoints=!1;var t="";for(t in e)e.hasOwnProperty(t)&&(this[t]=e[t])};return e}(),o=function(){function e(e){if(!e)return!1;"undefined"==typeof e.start&&(e.start=""),"undefined"==typeof e.end&&(e.end=""),"undefined"!=typeof e.startAfter?(e.start=e.startAfter,e.after=!0):e.after=!1,"undefined"!=typeof e.endBefore?(e.end=e.endBefore,e.before=!0):e.before=!1;var t=parseInt(e.startPos,10);e.usePos=isNaN(t)?!1:!0;var n=parseInt(e.length,10);return e.useLength=isNaN(n)?!1:!0,e.loops="undefined"!=typeof e.loops?!!e.loops:!0,!0}function t(e,t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);var r=e.content,o=n.usePos&&n.startPos0?r.indexOf(n.start):0;var s=n.useLength&&n.length>0&&n.bStart+n.length0?r.indexOf(n.end,n.bStart+n.start.length)+1:r.length,n.after||(n.start=""),n.before||(n.end=""),n}return{handleSubcontents:function(e,t,n){if(!n.content||"string"!=typeof n.content||0===n.content.length)return e;var i=!0;"undefined"!=typeof n.loops&&(i=!!n.loops);for(var o=0;!0&&!(o>=e.length);o++)if(!(e[o].isParsed||e.keep||e[o].isSeparator)){var s=e[o].content,a=s.indexOf(n.content);if(!(0>a)){var l,d=0;if(n.continued){do d++,l=s.indexOf(n.content,a+d*n.content.length);while(0===l)}else d=1;if(l=a+d*n.content.length,e.splice(o,1),a>0&&(e.splice(o,0,new r({content:s.substring(0,a),localGui:t.dir,keep:!0})),o++),e.splice(o,0,new r({content:s.substring(a,l),textDirection:n.subDir,localGui:t.dir})),l=n.length);a++)if(!(n[a].isParsed||n[a].inBounds||n.keep||n[a].isSeparator)){var l=t(n[a],o[s]),d=l.bStart,c=l.bEnd;if(!(0>d||0>c)){var h=n[a].content;if(n.splice(a,1),d>0&&(n.splice(a,0,new r({content:h.substring(0,d),localGui:i.dir,keep:!0})),a++),l.start&&(n.splice(a,0,new r({content:l.start,localGui:i.dir,isSeparator:!0})),a++),n.splice(a,0,new r({content:h.substring(d+l.start.length,c-l.end.length),textDirection:l.subDir,localGui:i.dir,inBounds:!0})),l.end&&(a++,n.splice(a,0,new r({content:l.end,localGui:i.dir,isSeparator:!0}))),c+l.end.length=e.length);o++)if(!(e[o].isParsed||e[o].keep||e[o].isSeparator)){var s=e[o].content,a=s.indexOf(n[i]);a>=0&&(e.splice(o,1),a>0&&(e.splice(o,0,new r({content:s.substring(0,a),textDirection:t.subDir,localGui:t.dir,inPoints:!0})),o++),e.splice(o,0,new r({content:n[i],localGui:t.dir,isSeparator:!0})),a+n[i].length+1<=s.length&&e.splice(o+1,0,new r({content:s.substring(a+n[i].length),textDirection:t.subDir,localGui:t.dir,inPoints:!0})))}for(i=0;i/g,""):e},getDirection:function(e,t,n,i){if("auto"!==t&&/^(rtl|ltr)$/i.test(t))return t;n=/^(rtl|ltr)$/i.test(n)?n:"ltr";var r=i?e.split("").reverse().join(""):e,o=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(r);return o?o[0]<="z"?"ltr":"rtl":n},hasArabicChar:function(e){var t=/[\u0600-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(e);return!!t},showMarks:function(e,l){for(var d="",c=0;c";break;case o:d+="";break;case t:d+="";break;case n:d+="";break;case s:d+="";break;case a:d+="";break;case i:d+="";break;default:d+=h}}var u="undefined"!=typeof l&&/^(rtl|ltr)$/i.test(l)?"rtl"===l?a:s:"";return u+d+(""===u?"":i)},hideMarks:function(e){var t=e.replace(//g,this.LRM).replace(//g,this.RLM).replace(//g,this.LRE);return t.replace(//g,this.RLE).replace(//g,this.LRO).replace(//g,this.RLO).replace(//g,this.PDF)},showTags:function(e){return""+e+" "},hideTags:function(e){return e.replace(//g,"").replace(/<\/xmp>/g,"")}}}(),l=function(){function e(e,t,r,o){return e&&t?i(n(e,t,o),t,r):e}function t(e,t){var n=Array.isArray(e)?e[0]:e;return n.guiDir||(n.guiDir="ltr"),n.dir||(n.dir=n.guiDir),t?("undefined"==typeof n.points&&(n.points=[]),n.cases||(n.cases=[]),n.bounds||(n.bounds=[]),n.commonHandler=s,n):n}function n(e,n,i){if(!e||!n)return new r({content:""});var o=t(n,!0),a=[new r({content:e,actual:e,localGui:o.dir})],l=s.handle;return o.handler&&"function"==typeof o.handler&&(l=o.handler.handle),l(e,a,o,i),a}function i(e,n,i){var r=t(n,!1);return i?l(e,r):o(e,r)}function o(e,t){for(var n="",i="",r="",o=!1,s=0;s":""===r||""!==l&&l===r&&!stop||(n+=""+(o==e.length-1&&""!==l?"":""),""!==l&&(n+="")),"auto"===s&&(s=a.getDirection(e[o].content,s,t.guiDir)),/^(rtl|ltr)$/i.test(s)?(n+=""+e[o].content+"",i=s):(n+=e[o].content,i=a.getDirection(e[o].content,s,t.guiDir,!0)),o"}else""!==r&&(n+=" ");r=l,stop=!1}else stop=!0;var c="auto"===t.dir?a.getDirection(e[0].actual,t.dir,t.guiDir):t.dir;return c!==t.guiDir&&(n=""+n+""),n}function d(e){return e}var c={};return c.parseAndDisplayStructure=e,c.parseStructure=n,c.displayStructure=i,c.restore=d,c}(),d=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:t.dir?t.dir:n?"rtl":"ltr",subs:{content:">",continued:!0,subDir:n?"rtl":"ltr"},cases:[{args:{subs:{content:"<",continued:!0,subDir:n?"ltr":"rtl"}}}]};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),c=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:","};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),h=function(){function e(e,t){if("ar"!==a.getLocaleDetails(t).lang)return"ltr";var n=e.indexOf("@");return n>0&&n.:,;@",cases:[{handler:s,args:{bounds:[{startAfter:'"',endBefore:'"'},{startAfter:"(",endBefore:")"}],points:""}}]};return a?l.parseStructure(t,d,!!r,o):l.parseAndDisplayStructure(t,d,!!r,o)}}}(),u=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:"ltr",subDir:t.subDir,points:"/\\:.&<>"};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),f=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:" /%^&[]<>=!?~:.,|()+-*{}"};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),p=function(){return{format:function(e,t,n,i,r,o){var a={guiDir:n?"rtl":"ltr",dir:"ltr",points:" !#%&()*+,-./:;<=>?|[]{}",cases:[{handler:s,args:{bounds:[{startAfter:"/*",endBefore:"*/"},{startAfter:"--",end:"\n"},{startAfter:"--"}]}},{handler:s,args:{subs:{content:" ",continued:!0}}},{handler:s,args:{bounds:[{startAfter:"'",endBefore:"'"},{startAfter:'"',endBefore:'"'}]}}]};return o?l.parseStructure(e,a,!!i,r):l.parseAndDisplayStructure(e,a,!!i,r)}}}(),g=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:"_"};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),v=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:"ltr",points:":?#/@.[]=&<>"};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),m=function(){return{format:function(e,t,n,i,r,o){var s={guiDir:n?"rtl":"ltr",dir:t.dir?t.dir:n?"rtl":"ltr",points:" ,.!?;:"};return o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),_=function(){return{format:function(e,t,n,i,r,o){var a={guiDir:n?"rtl":"ltr",dir:"ltr",points:" /[]<>=!:@.|()+-*",cases:[{handler:s,args:{bounds:[{startAfter:'"',endBefore:'"'},{startAfter:"'",endBefore:"'"}],points:""}}]};return o?l.parseStructure(e,a,!!i,r):l.parseAndDisplayStructure(e,a,!!i,r)}}}(),y=function(){return{format:function(e,t,n,i,r,o){var s={},a="",d=Array.isArray(t)?t[0]:t;for(a in d)d.hasOwnProperty(a)&&(s[a]=d[a]);return s.guiDir=n?"rtl":"ltr",s.dir=s.dir?s.dir:s.guiDir,o?l.parseStructure(e,s,!!i,r):l.parseAndDisplayStructure(e,s,!!i,r)}}}(),C=(function(){function t(e){return"he"===e||"iw"===e||"ar"===e?"rtl":"ltr"}function n(e){0===e.msgDir.length&&(e.msgDir=t(e.msgLang)),e.msgDir="ltr"!==e.msgDir&&"rtl"!==e.msgDir&&"auto"!=e.msgDir?"ltr":e.msgDir,0===e.guiDir.length&&(e.guiDir=e.msgDir),e.guiDir="rtl"!==e.guiDir?"ltr":"rtl",0===e.phDir.length&&(e.phDir=0===e.phLang.length?e.msgDir:t(e.phLang)),e.phDir="ltr"!==e.phDir&&"rtl"!==e.phDir&&"auto"!=e.phDir?"ltr":e.phDir,"string"==typeof e.phPacking&&(e.phPacking=e.phPacking.split("")),e.phPacking.length<2&&(e.phPacking=["{","}"])}var i={msgLang:"en",msgDir:"",phLang:"",phDir:"",phPacking:["{","}"],phStt:{type:"none",args:{}},guiDir:""},o=!1;return{setDefaults:function(e){for(var t in e)i.hasOwnProperty(t)&&(i[t]=e[t]);n(i),o=!0},format:function(t){o||(n(i),o=!0);var s=!1,a=!1,d=i.phPacking[0].length,c=i.phPacking[1].length;if(arguments.length>0){var h=arguments[arguments.length-1];"boolean"==typeof h&&(s=h,a=!0)}for(var u,f=new RegExp(i.phPacking[0]+"\\d+"+i.phPacking[1]),p=[],g=0,v=t;null!=(u=f.exec(v));){var m=v.indexOf(u[0])+u[0].length;m>u[0].length&&p.push({text:v.substring(0,m-u[0].length),ph:!1}),p.push({text:u[0],ph:!0}),g+=m,v=v.substring(m,v.length)}g=_.length){S.push(new r({content:T.text,textDirection:i.msgDir}));continue}var A="none";if(_[E].stt||(_[E].stt=i.phStt),_[E].stt&&("string"==typeof _[E].stt?A=_[E].stt:_[E].stt.hasOwnProperty("type")&&(A=_[E].stt.type)),"none"!==A.toLowerCase()){for(var L=e(A).format(_[E].text,_[E].stt.args||{},"rtl"===i.msgDir,!1,i.msgLang,!0),k=0;k0)for(var s=0;s":".";break;case 191:l=n.mod2?"?":"/";break;case 192:l=n.mod2?"~":"`";break;case 219:l=n.mod2?"{":"[";break;case 220:l=n.mod2?"|":"\\";break;case 221:l=n.mod2?"}":"]";break;case 222:l=n.mod2?'"':"'"}return l?i+l:n.keyCode>=112&&n.keyCode<=123?i+"F"+(n.keyCode-111):i+String.fromCharCode(n.keyCode)}function s(e){for(var t="",n=e.getKeys(),i=0;i0)if(e.createTextRange){var r=e.createTextRange();r.collapse(!0),r.moveStart("character",0),r.moveEnd("character",i),r.select()}else e.setSelectionRange?e.setSelectionRange(0,i):void 0!==e.selectionStart&&(e.selectionStart=0,e.selectionEnd=i);else e.select()}},0)}function l(e){var t=-1!==window.navigator.platform.indexOf("Mac");return t&&e.metaKey||!t&&e.ctrlKey}function d(e,t){t&&l(t)?window.open(r(e)):window.location=r(e)}function c(e,n){var i=document.createElement("button");return i.className="orionButton commandButton commandMargins",i.addEventListener("click",function(e){n(),t.stop(e)},!1),e&&i.appendChild(document.createTextNode(e)),i}function h(){}function u(e,t){if(!e||!e.tagName)return!1;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 e.parentNode===t?!1:e.parentNode&&u(e.parentNode,t)}function f(e,t){var n=e.split("/");return n.splice(n.length-1,1),t?n.join("/")+"/":n.join("/")}function p(e){var t=new Date(e),n=Date.now()-t.getTime(),i=Math.floor(n/1e3/60/60/24/365);n-=1e3*i*60*60*24*365;var r=Math.floor(n/1e3/60/60/24/30);n-=1e3*r*60*60*24*30;var o=Math.floor(n/1e3/60/60/24);n-=1e3*o*60*60*24;var s=Math.floor(n/1e3/60/60);n-=1e3*s*60*60;var a=Math.floor(n/1e3/60);n-=1e3*a*60;var l=Math.floor(n/1e3);return{year:i,month:r,day:o,hour:s,minute:a,second:l}}function g(t,i,r){return t>0?1===t?e[i]:n.formatMessage(e[r],t):""}function v(e){var t=p(e),n=g(t.year,"a year","years"),i=g(t.month,"a month","months"),r=g(t.day,"a day","days"),o=g(t.hour,"an hour","hours"),s=g(t.minute,"a minute","minutes"),a="";return n?a=t.year>0?n:n+i:i?a=t.month>0?i:i+r:r?a=t.day>0?r:r+o:o?a=t.hour>0?o:o+s:s&&(a=s),a}function m(t){var i=v(t);return i?n.formatMessage(e.timeAgo,i):e.justNow}function _(e){var t=e.split(" ");return t.length>=2?(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase():e.substr(0,2)}var y=-1!==navigator.platform.indexOf("Mac"),C=Object.create(null);return C[t.KEY.DOWN]="↓",C[t.KEY.UP]="↑",C[t.KEY.RIGHT]="→",C[t.KEY.LEFT]="←",y&&(C[t.KEY.BKSPC]="⌫",C[t.KEY.DEL]="⌦",C[t.KEY.END]="⇲",C[t.KEY.ENTER]="⏎",C[t.KEY.ESCAPE]="⎋",C[t.KEY.HOME]="⇱",C[t.KEY.PAGEDOWN]="⇟",C[t.KEY.PAGEUP]="⇞",C[t.KEY.SPACE]="␣",C[t.KEY.TAB]="⇥"),{getUserKeyString:s,getUserText:a,openInNewWindow:l,followLink:d,createButton:c,createDropdownButton:h,isFormElement:u,path2FolderName:f,timeElapsed:v,displayableTimeElapsed:m,getNameInitial:_}}),n("text!orion/webui/submenutriggerbutton.html",[],function(){return'${ButtonText}
'}),function(e,t){"function"==typeof n&&n.amd?n("orion/Deferred",t):"object"==typeof exports?module.exports=t():(e.orion=e.orion||{},e.orion.Deferred=t())}(this,function(){function e(){for(var e;e=o.shift();)e();s=!1}function t(e){o.push(e),s||(s=!0,a())}function n(e){return function(t){e(t)}}function i(e,t,i){try{var r=e(t),o=r&&("object"==typeof r||"function"==typeof r)&&r.then;if("function"==typeof o)if(r===i.promise)i.reject(new TypeError);else{var s=r.cancel;"function"==typeof s?i._parentCancel=s.bind(r):delete i._parentCancel,o.call(r,n(i.resolve),n(i.reject),n(i.progress))}else i.resolve(r)}catch(a){i.reject(a)}}function r(){function e(){for(var e;e=d.shift();){var t=e.deferred,n="fulfilled"===l?"resolve":"reject",r=e[n];"function"==typeof r?i(r,a,t):t[n](a)}}function n(n){delete c._parentCancel,l="rejected",a=n,d.length&&t(e)}function o(i){function s(e){return function(t){l&&"assumed"!==l||e(t)}}delete c._parentCancel;try{var h=i&&("object"==typeof i||"function"==typeof i)&&i.then;if("function"==typeof h)if(i===c)n(new TypeError);else{l="assumed";var u=i&&i.cancel;if("function"!=typeof u){var f=new r;i=f.promise;try{h(f.resolve,f.reject,f.progress)}catch(p){f.reject(p)}u=i.cancel,h=i.then}a=i,h.call(i,s(o),s(n)),c._parentCancel=u.bind(i)}else l="fulfilled",a=i,d.length&&t(e)}catch(g){s(n)(g)}}function s(){var e=c._parentCancel;if(e)delete c._parentCancel,e();else if(!l){var t=new Error("Cancel");t.name="Cancel",n(t)}}var a,l,d=[],c=this;this.resolve=function(e){return l||o(e),c},this.reject=function(e){return l||n(e),c},this.progress=function(e){return l||d.forEach(function(t){if(t.progress)try{t.progress(e)}catch(n){}}),c.promise},this.cancel=function(){return c._parentCancel?setTimeout(s,0):s(),c},this.then=function(n,i,o){var s=new r;return s._parentCancel=c.promise.cancel,d.push({resolve:n,reject:i,progress:o,deferred:s}),("fulfilled"===l||"rejected"===l)&&t(e),s.promise},this.promise={then:c.then,cancel:c.cancel}}var o=[],s=!1,a=function(){if("undefined"!=typeof process&&"function"==typeof process.nextTick){var t=process.nextTick;return function(){t(e)}}if("function"==typeof MutationObserver){var n=document.createElement("div"),i=new MutationObserver(e);return i.observe(n,{attributes:!0}),function(){n.setAttribute("class","_tick")}}return function(){setTimeout(e,0)}}();return r.all=function(e,t){function n(e,t){a||(s[e]=t,0===--o&&l.resolve(s))}function i(e,i){if(!a){if(t)try{return void n(e,t(i))}catch(r){i=r}l.reject(i)}}var o=e.length,s=[],a=!1,l=new r;return l.then(void 0,function(){a=!0,e.forEach(function(e){e.cancel&&e.cancel()})}),0===o?l.resolve(s):e.forEach(function(e,t){e.then(n.bind(void 0,t),i.bind(void 0,t))}),l.promise},r.when=function(e,t,n,i){var o,s;return e&&"function"==typeof e.then?o=e:(s=new r,s.resolve(e),o=s.promise),o.then(t,n,i)},r}),n("orion/commandRegistry",["orion/commands","orion/keyBinding","orion/explorers/navigationUtils","orion/bidiUtils","orion/PageUtil","orion/uiUtils","orion/webui/littlelib","orion/webui/dropdown","orion/webui/tooltip","text!orion/webui/submenutriggerbutton.html","orion/metrics","orion/Deferred","orion/EventTarget"],function(e,t,n,i,r,o,s,a,l,d,c,h,u){function f(e){this._commandList={},this._contributionsByScopeId={},this._activeBindings={},this._urlBindings={},this._pendingBindings={},this._parameterCollector=null,this._init(e||{})}function p(e,t){this.token=e,this.parameterName=t}function g(e,t,n){this.event=e,this.handler=t,this.capture=n||!1}function v(e,t,n,i,r,o,s){this.name=e,this.type=t,this.label=n,this.value=i,this.lines=r||1,this.validator=s,this.eventListeners=Array.isArray(o)?o:o?[o]:[]}function m(e,t,n){this._storeParameters(e),this._hasOptionalParameters=t&&t.hasOptionalParameters,this._options=t,this.optionsRequested=!1,this.getParameters=n,this.clientCollect=t&&t.clientCollect,this.getParameterElement=t&&t.getParameterElement,this.getSubmitName=t&&t.getSubmitName,this.getCancelName=t&&t.getCancelName,this.message=t&&t.message}return f.prototype={_init:function(t){this._selectionService=t.selection;var n=this;e.setKeyBindingProvider(function(){return n._activeBindings}),u.attach(f.prototype),this.addEventListener("bindingChanged",function(e){this._handleBindingChanges(e)}.bind(this)),this.addEventListener=function(e,t){this._bindingOverrides&&"bindingChanged"===e&&this._updateBindingOverrides(t),f.prototype.addEventListener.call(this,e,t)}},processURL:function(e){for(var t in this._urlBindings)if(this._urlBindings[t]&&this._urlBindings[t].urlBinding&&this._urlBindings[t].command){var n=this._urlBindings[t].urlBinding.match(e);if(n){var i=this._urlBindings[t],r=i.command,o=i.invocation;if(o&&o.parameters&&r.callback){o.parameters.setValue(n.parameterName,n.parameterValue);var s=this;return void window.setTimeout(function(){s._invoke(o)},0)}}}},findCommand:function(e){return this._commandList[e]},runCommand:function(t,n,i,r,o,s){var a=this;if(n){var l=this._commandList[t],d=l&&(l.visibleWhen?l.visibleWhen(n):!0);if(d&&l.callback){var c=new e.CommandInvocation(i,n,o,l,a);return c.domParent=s,a._invoke(c,r)}}else{var h=this._urlBindings[t];if(h&&h.command&&h.command.callback)return a._invoke(h.invocation,r)}},getSelectionService:function(){return this._selectionService},setParameterCollector:function(e){this._parameterCollector=e},openParameterCollector:function(e,t,n){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(e,t,n))},confirm:function(e,t,n,i,r,o){this._popupDialog(r,"CONFIRM",e,t,[{label:n,callback:o,type:"ok"},{label:i,callback:null,type:"cancel"}])},alert:function(e,t,n,i){this._popupDialog(!1,"ALERT",e,t,[{label:n,callback:i,type:"ok"}])},_popupDialog:function(e,t,n,r,o,a,d){var c;if(this._parameterCollector&&!e){var h=this,u=function(){h._parameterCollector.close()},f=function(e,n){var l=document.createElement("span");if(l.classList.add("parameterPrompt"),l.textContent=r,e.appendChild(l),"PROMPT"===t){var d=document.createElement("input");d.setAttribute("value",a),d.classList.add("parameterInput"),i.initInputField(d),e.appendChild(d),d.addEventListener("keydown",function(e){s.KEY.ENTER===e.keyCode?(o[0].callback&&o[0].callback(d.value),u()):s.KEY.ESCAPE===e.keyCode&&(o[1].callback&&o[1].callback(""),u())},!1)}var h=Object.keys(o).map(function(e){var i=document.createElement("button");return i.addEventListener("click",function(){c="ok"===o[e].type?"PROMPT"===t?d.value:!0:"cancel"===o[e].type?"PROMPT"===t?"":!1:!0,o[e].callback&&o[e].callback(c),u()},!1),n.appendChild(i),i.appendChild(document.createTextNode(o[e].label)),i.className="dismissButton",i});return"PROMPT"===t?d:h[0]};if(this._parameterCollector.close(),!n)var p=this._parameterCollector.open(n,f,function(){});if(!p){var g=new l.Tooltip({node:n,afterHiding:function(){this.destroy()},trigger:"click",position:d?d:"PROMPT"!==t?["below","right","above","left"]:["right","above","below","left"]}),v=g.contentContainer();v.classList.add("parameterPopup");var m=window.document.activeElement;u=function(){m&&m.focus(),g.destroy()};var _=document.createElement("div");_.classList.add("parameterMessage"),v.appendChild(_);var y=document.createElement("div");v.appendChild(y),y.classList.add("layoutRight"),y.classList.add("parametersDismiss");var C=f(_,y);g.show(),C&&window.setTimeout(function(){C.focus(),C.select&&C.select()},0)}}else c=window.confirm(r),o[0].callback(c)},prompt:function(e,t,n,i,r,o,s,a){var l=null;"below"===a?l=["below","right","above","left"]:"right"===a&&(l=["right","above","below","left"]),this._popupDialog(o,"PROMPT",e,t,[{label:n,callback:s,type:"ok"},{label:i,callback:null,type:"cancel"}],r,l)},confirmWithButtons:function(e,t,n){this._popupDialog(!1,"CONFIRM",e,t,n)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(e,t){return this._collectAndInvoke(e.makeCopy(t),!1)},_collectAndInvoke:function(e,t,n){if(e){if(!(this._parameterCollector&&e.parameters&&e.parameters.hasParameters()&&(t||e.parameters.shouldCollectParameters())))return c.logEvent("command","invoke",e.command.id),e.command.callback.call(e.handler||window,e);var i=!1;if(e.parameters.updateParameters(e),e.parameters.shouldCollectParameters()&&(i=this._parameterCollector.collectParameters(e,n),!i)){var r=new l.Tooltip({node:e.domNode||e.domParent,afterHiding:function(){this.destroy(),e.domParent&&e.domParent.classList.remove("parameterPopupOpen")},trigger:"click",position:["below","right","above","left"]}),o=r.contentContainer();o.classList.add("parameterPopup");var s=window.document.activeElement,a=this._parameterCollector.getFillFunction(e,function(){s&&s.focus(),r.destroy(),e.domParent&&e.domParent.classList.remove("parameterPopupOpen")},n)(o);r.show(),e.domParent&&e.domParent.classList.add("parameterPopupOpen"),a&&window.setTimeout(function(){a.focus(),a.select&&a.select()},0),i=!0}if(!i)return c.logEvent("command","invoke",e.command.id),e.command.callback.call(e.handler||window,e)}else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(e,t){this._collectAndInvoke(e,!0,t)},showKeyBindings:function(t){function n(t){return function(){e.executeBinding(t)}}var i,r={},o=[];for(var s in this._activeBindings)i=this._activeBindings[s],i&&i.keyBinding&&i.command&&(i.command.name||i.command.tooltip)&&o.push(i);o.sort(function(e,t){var n=e.command.name||e.command.tooltip,i=t.command.name||t.command.tooltip;return n.localeCompare(i)});for(var a=0;a0&&(t.createHeader(l),r[l].forEach(function(e){t.createItem(e.keyBinding,e.command.name||e.command.tooltip,e.command.id,n(e))}))},_handleBindingChanges:function(t){var n=this.findCommand(t.id);if(n){var i=this._activeBindings[t.id];i?i.keyBinding=t.newBinding:this._addBinding(n,"key",t.newBinding)}if(this._renderedCommands&&this._renderedCommands[t.id])for(var r=this._renderedCommands[t.id],s=Object.keys(r),a=0;a=0;t--){var n=this._bindingOverrides[t];if(n.id===e)return n.newBinding}return null},addCommand:function(e){this._commandList[e.id]=e;var t=this._pendingBindings[e.id];if(t){var n=this;t.forEach(function(t){n._addBinding(e,t.type,t.binding,t.bindingOnly)}),delete this._pendingBindings[e.id]}},addCommandGroup:function(e,t,n,i,r,o,s,a,l,d,c){this._contributionsByScopeId[e]||(this._contributionsByScopeId[e]={});var h=this._contributionsByScopeId[e];r&&(h=this._createEntryForPath(h,r)),h[t]?(i&&(h[t].title=i),n&&(h[t].position=n),s&&(h[t].imageClass=s),a&&(h[t].tooltip=a),l&&(h[t].selectionClass=l),c&&(h[t].extraClass=c),d===!0?h[t].pretendDefaultActionId=!0:h[t].defaultActionId=d,h[t].emptyGroupMessage=o):(h[t]={title:i,position:n,emptyGroupMessage:o,imageClass:s,tooltip:a,selectionClass:l,defaultActionId:d===!0?null:d,pretendDefaultActionId:d===!0,children:{},extraClasses:c},h.sortedContributions=null)},_createEntryForPath:function(e,t){if(t){var n=t.split("/");n.forEach(function(t){t.length>1&&(e[t]||(e[t]={position:0,children:{}},e.sortedContributions=null),e=e[t].children)})}return e},registerSelectionService:function(e,t){this._contributionsByScopeId[e]||(this._contributionsByScopeId[e]={}),this._contributionsByScopeId[e].localSelectionService=t},setServiceRegistry:function(e){this._serviceRegistry=e,this._prefService=e.getService("orion.core.preference"),this._prefService&&(this._getBindingOverrides().then(function(e){this._bindingOverrides=e,this._updateBindingOverrides()}.bind(this)),this._prefService.addEventListener("changed",function(e){"/KeyBindings"===e.namespace&&this._getBindingOverrides().then(function(e){if(e.length>this._bindingOverrides.length)for(var t=this._bindingOverrides.length;t1){if(!i[e])return;i=i[e].children
}})}delete i[t],i.sortedContributions=null}},_addBinding:function(e,t,n,i){if(!e.id)throw new Error("No command id: "+e);"key"===t?this._activeBindings[e.id]={command:e,keyBinding:n,bindingOnly:i}:"url"===t&&(this._urlBindings[e.id]={command:e,urlBinding:n,bindingOnly:i})},_addPendingBinding:function(e,t,n,i){this._pendingBindings[e]=this._pendingBindings[e]||[],this._pendingBindings[e].push({type:t,binding:n,bindingOnly:i})},_checkForTrailingSeparator:function(e,t,n){var i;if(("tool"===t||"button"===t)&&(i=e.childNodes.length>0?e.childNodes[e.childNodes.length-1]:null,i&&i.classList.contains("commandSeparator")))return n?(e.removeChild(i),!1):!0;if("menu"===t){var r=s.$$array("li > *",e);if(r.length>0&&r[r.length-1].classList.contains("dropdownSeparator"))return i=r[r.length-1],n?(i.parentNode.parentNode.removeChild(i.parentNode),!1):!0}return!1},renderCommands:function(e,t,n,i,r,o,a){if("string"!=typeof e)throw"a scope id for rendering must be specified";if(t=s.node(t),!t)throw"no parent";var l=this._contributionsByScopeId[e];if(!n&&l){var d=l.localSelectionService||this._selectionService,c=this;return void(d&&d.getSelections(function(n){c.renderCommands(e,t,n,i,r,o)}))}l&&(this._render(e,l,t,n,i,r||"button",o,a),this._checkForTrailingSeparator(t,r,!0))},destroy:function(e){if(e=s.node(e),!e)throw"no parent";for(;e.hasChildNodes();){var t=e.firstChild;t.commandTooltip&&t.commandTooltip.destroy(),t.emptyGroupTooltip&&t.emptyGroupTooltip.destroy(),this.destroy(t),e.removeChild(t)}},_render:function(t,i,r,s,a,d,c,h){var u=i.sortedContributions;if(!u){u=[];var f=!1;for(var p in i)if(Object.prototype.hasOwnProperty.call(i,p)){var g=i[p];g&&"number"==typeof g.position&&(g.id=p,u.push(g),f=!0)}f&&(u.sort(function(e,t){return e.position-t.position}),i.sortedContributions=u)}var v=0,m=this;u.forEach(function(i){function u(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var f,p;if(i.imageClass||(i.imageClass=null),i.children&&Object.getOwnPropertyNames(i.children).length>0){var g,_=i.children;if("tool"===d||"button"===d||"menubar"===d)if(i.title){var y;if(i.defaultActionId){i.pretendDefaultActionId=i.defaultActionId===!0;var C=m._commandList[i.defaultActionId];C&&(C.visibleWhen?C.visibleWhen(s):!0)?(y=new e.CommandInvocation(a,s,c,C,m),y.domParent=r):i.pretendDefaultActionId=!0}g=m._createDropdownMenu(r,i.title,null,null,i.imageClass,i.tooltip,i.selectionClass,null,y,i.pretendDefaultActionId,i.extraClasses),h&&n.generateNavGrid(h,g.menuButton),g&&("menubar"===d&&(g.menuButton.tabIndex=1===r.childElementCount?"0":"-1",g.menuButton.addEventListener("focus",function(e){var t=e.currentTarget,n=t.parentNode.parentNode.dropdown;n._selectItem(t)},!0)),m._render(t,i.children,g.menu,s,a,"menu",c,h),m._checkForTrailingSeparator(g.menu,"menu",!0),0===g.menu.childNodes.length?i.emptyGroupMessage?g.menuButton.emptyGroupTooltip||(g.menuButton.emptyGroupTooltip=new l.Tooltip({node:g.menuButton,text:i.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})):(h&&n.removeNavGrid(h,g.menuButton),u(g.menu),u(g.menuButton),u(g.destroyButton)):g.menuButton.style.visibility="visible")}else{var w;if(r.childNodes.length>0&&!m._checkForTrailingSeparator(r,d)&&(w=m.generateSeparatorImage(r)),m._render(t,_,r,s,a,d,c,h),r.childNodes.length>0){var x=r.childNodes[r.childNodes.length-1];x!==w&&(w=m.generateSeparatorImage(r))}}else if(i.title){var b=m._createDropdownMenu(r,i.title,!0,null,null,i.imageClass);b&&(m._render(t,_,b.menu,s,a,"menu",c,h),m._checkForTrailingSeparator(b.menu,"menu",!0),0===b.menu.childNodes.length&&b.destroyButton&&r.removeChild(b.destroyButton))}else r.childNodes.length>0&&m._generateMenuSeparator(r),m._render(t,_,r,s,a,d,c,h),r.childNodes.length>0&&m._generateMenuSeparator(r)}else{var S=m._commandList[i.id],T=S?!0:!1,E=null,A=null;if(S){p=new e.CommandInvocation(i.handler||a,s,c,S,m),p.domParent=r;var L=!1;try{L=T&&(S.visibleWhen?S.visibleWhen(s,p):!0)}catch(k){throw console.log(k),k}m._activeBindings[S.id]&&m._activeBindings[S.id].keyBinding&&(E=m._activeBindings[S.id],E.invocation=L?p:null,E.bindingOnly&&(T=!1)),m._urlBindings[S.id]&&m._urlBindings[S.id].urlBinding&&(A=m._urlBindings[S.id],A.invocation=L?p:null,A.bindingOnly&&(T=!1)),T=T&&L}if(T)if(S.choiceCallback){var M,O;"tool"===d||"button"===d?(M=r,O=!1,"ul"===r.nodeName.toLowerCase()&&(M=document.createElement("li"),M.setAttribute("role","none"),r.appendChild(M))):(M=r,O=!0);var D=function(e){S.populateChoicesMenu(e,s,a,c,m)};m._createDropdownMenu(M,S.name,O,D.bind(S),S.imageClass,S.tooltip||S.title,S.selectionClass,S.positioningNode)}else{p.handler=p.handler||this,p.domParent=r;var N,I=function(){m._invoke(p)};if("menu"===d){var R=null;E&&E.keyBinding&&(R=o.getUserKeyString(E.keyBinding)),N=e.createCommandMenuItem(r,S,p,null,I,R),p.onClick=I,m._registerRenderedCommand(S.id,t,p)}else if("quickfix"===d){f=d+S.id+v,r.classList.add("quickFixList");var B="quickfixDetails",P=r.childNodes.item(B);if("ignore.in.file.fix"===S.id||"css.ignore.on-line.fix"===S.id)P||(P=document.createElement("div"),P.id=B,r.appendChild(P)),N=e.createQuickfixItem(P,S,p,I,m._prefService);else{var F=document.createElement("div");P?r.insertBefore(F,P):r.appendChild(F),N=e.createQuickfixItem(F,S,p,I,m._prefService)}}else f=d+S.id+v,N=e.createCommandItem(r,S,p,f,null,"tool"===d,I);n.generateNavGrid(h,N,null,null,!0),p.domNode=N,v++}}})},_createDropdownMenu:function(t,n,i,r,o,c,h,u,f,p,g){if(t=s.node(t),!t||!s.contains(document.body,t))return null;var v,m,_,y,C=t;if(i){var w=document.createRange();w.selectNode(t);var x=w.createContextualFragment(d);s.processTextNodes(x,{ButtonText:n}),t.appendChild(x),y=t.lastChild,m=y.lastChild,v=m.previousSibling,v.dropdown=new a.Dropdown({dropdown:m,name:n,populate:r,parentDropdown:t.dropdown}),m.dropdown=v.dropdown}else{"ul"===t.nodeName.toLowerCase()&&(C=document.createElement("li"),C.setAttribute("role","none"),t.appendChild(C),y=C);var b=null;o&&(b="dropdownButtonWithIcon",c=c||n),c=o?c||n:c;var S=e.createDropdownMenu(C,n,r,b,o,!1,h,u,f||p,g);if(_=S.dropdownArrow,v=S.menuButton,_){f&&(f.domNode=S.menuButton);var T=this;v.onclick=function(e){var t=s.bounds(_);(e.clientX>=t.left||p===!0)&&S.dropdown?S.dropdown.toggle(e):T._invoke(f)},S.dropdown&&(v.onkeydown=function(e){s.KEY.DOWN===e.keyCode&&(S.dropdown.toggle(e),s.stop(e))})}m=S.menu;var E,A=f&&f.command&&(f.command.tooltip||f.command.name);E=A?f.command.tooltip||f.command.name:c,E&&(v.commandTooltip=new l.Tooltip({node:v,text:E,position:["above","below","right","left"]}))}return{menuButton:v,menu:m,dropdown:v.dropdown,destroyButton:y,dropdownArrow:_}},_generateMenuSeparator:function(e){if(!this._checkForTrailingSeparator(e,"menu")){var t=document.createElement("li");t.classList.add("dropdownSeparator"),t.setAttribute("role","none");var n=document.createElement("span");n.classList.add("dropdownSeparator"),n.setAttribute("role","separator"),t.appendChild(n),e.appendChild(t)}},generateSeparatorImage:function(e){var t;return"ul"===e.nodeName.toLowerCase()?(t=document.createElement("li"),t.setAttribute("role","none"),e.appendChild(t)):(t=document.createElement("span"),e.appendChild(t)),t.classList.add("core-sprite-sep"),t.classList.add("imageSprite"),t.classList.add("commandSeparator"),t}},f.prototype.constructor=f,p.prototype={match:function(e){var t=r.matchResourceParameters(e);return"undefined"!=typeof t[this.token]?(this.parameterValue=t[this.token],this):null}},p.prototype.constructor=p,g.prototype.constructor=g,v.prototype={optionsRequested:function(){return this.optionsRequested}},v.prototype.constructor=v,m.prototype={_storeParameters:function(e){if(this.parameterTable=null,e){var t=this.parameterTable={};e.forEach(function(e){t[e.name]=e})}},updateParameters:function(e){"function"==typeof this.getParameters&&this._storeParameters(this.getParameters(e))},hasParameters:function(){return null!==this.parameterTable},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(e){return this.parameterTable[e]},valueFor:function(e){var t=this.parameterTable[e];return t?t.value:null},setValue:function(e,t){var n=this.parameterTable[e];n&&(n.value=t)},forEach:function(e){for(var t in this.parameterTable)this.parameterTable[t].type&&this.parameterTable[t].name&&e(this.parameterTable[t])},validate:function(e,t){var n=this.parameterTable[e];return n&&n.validator?n.validator(t):!0},makeCopy:function(){var e=[];this.forEach(function(t){var n=new v(t.name,t.type,t.label,t.value,t.lines,t.eventListeners,t.validator);e.push(n)});var t=new m(e,this._options,this.getParameters);return t.clientCollect=this.clientCollect,t.message=this.message,t},hasOptionalParameters:function(){return this._hasOptionalParameters}},m.prototype.constructor=m,{CommandRegistry:f,URLBinding:p,ParametersDescription:m,CommandParameter:v,CommandEventListener:g}}),n("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/keyBinding","orion/commands","orion/metrics","orion/uiUtils","orion/util"],function(e,t,n,i,r,o,s){function a(e){this.commandRegistry=e.commandRegistry,this.create(),this._filterString="",this._providers=[]}function l(t,r,o){var a=new i.Command({name:e["Show Keys"],tooltip:e.ShowAllKeyBindings,id:"orion.keyAssist",callback:function(){return t.isVisible()?t.hide():t.show(),!0}});return o.addCommand(a),o.registerCommandContribution(r,"orion.keyAssist",100,null,!0,new n.KeyBinding(191,!1,!0,!s.isMac,s.isMac)),a}return a.prototype={addProvider:function(e){-1===this._providers.indexOf(e)&&this._providers.push(e)},create:function(){var n=this._keyAssistDiv=document.createElement("div");n.id="keyAssist",n.style.display="none",n.classList.add("keyAssistFloat"),n.setAttribute("role","menu");var i=this._keyAssistInput=document.createElement("input");i.classList.add("keyAssistInput"),i.type="text",i.setAttribute("aria-label","Filter bindings:"),i.placeholder=e["Filter bindings"],i.setAttribute("aria-autocomplete","list"),n.appendChild(i);var r=this._keyAssistContents=document.createElement("div");r.classList.add("keyAssistContents"),(s.isIOS||s.isAndroid)&&(r.style.overflowY="auto"),n.appendChild(r);var o=this._keyAssistTable=document.createElement("table");o.tabIndex=0,o.classList.add("keyAssistList"),r.appendChild(o),document.body.appendChild(n),i.addEventListener("keydown",function(e){this._keyDown(e)}.bind(this)),o.addEventListener("keydown",function(e){this._keyDown(e)}.bind(this)),i.addEventListener("input",function(){this.filterChanged()}.bind(this)),r.addEventListener(s.isFirefox?"DOMMouseScroll":"mousewheel",function(e){this._scrollWheel(e)}.bind(this)),document.addEventListener("keydown",function(e){e.keyCode===t.KEY.ESCAPE&&this.hide()}.bind(this)),t.addAutoDismiss([n],function(){this.hide()}.bind(this)),this.commandRegistry&&this.commandRegistry.addEventListener("bindingChanged",function(e){this.handleBindingChange(e)}.bind(this))},handleBindingChange:function(e){if(this.isVisible())for(var t,n=this._keyAssistTable.querySelectorAll(".keyAssistItem"),i=0;i_?135:_,h.style.width=_+"px",u.appendChild(h),h.focus(),this._editingABinding=!0},createHeader:function(e){this._lastHeader=e;var t=this._keyAssistTable.insertRow(-1);t.classList.add("keyAssistSection");var n=t.insertCell(-1);n.colSpan=4;var i=document.createElement("h2");i.appendChild(document.createTextNode(e)),n.appendChild(i)},execute:function(){window.setTimeout(function(){this.hide();var e=this._selectedRow;this._selectedRow=null,e&&e._execute&&e._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout),this._timeout=window.setTimeout(function(){this._timeout=null;var e=this._keyAssistInput.value;this._filterString!==e&&(this._filterString=e,this.createContents())}.bind(this),100)},hide:function(){if(this.isVisible()){var e=document.activeElement,t=this._keyAssistDiv,n=t===e||0!==(16&t.compareDocumentPosition(e));t.style.display="none",n&&1!==document.compareDocumentPosition(this._previousActiveElement)&&this._previousActiveElement.focus(),this._previousActiveElement=null}},isVisible:function(){return"block"===this._keyAssistDiv.style.display},removeProvider:function(e){var t=this._providers.indexOf(e);-1!==t&&this._providers.splice(t,1)},select:function(e){var t=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(0===t.length)return void(this._selectedIndex=-1);var n=this._selectedIndex;n+=e?1:-1,n%=t.length,0>n&&(n=t.length-1),this.selectRow(n,t)},selectRow:function(e,t){if(-1!==this._selectedIndex&&(n=t[this._selectedIndex],n.classList.remove("selected"),n.childNodes[3].firstChild.classList.remove("keyAssistEditButtonVisible"),this._selectedRow=null),e>=0&&eo.bottom&&n.scrollIntoView(!1)}},show:function(){this.isVisible()||(this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(.75*this._keyAssistDiv.parentNode.clientHeight)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),this._keyAssistInput.select(),r.logEvent("KeyBinding","Panel","Opened"))},_keyDown:function(e){if(e.keyCode===t.KEY.DOWN)this.select(!0);else if(e.keyCode===t.KEY.UP)this.select(!1);else if(e.keyCode===t.KEY.ENTER)this.execute();else{if(e.keyCode!==t.KEY.SPACE||!this._selectedRow)return;this._editingABinding||this.editBinding(this._selectedRow)}e.preventDefault()},_scrollWheel:function(e){var t=0;t=s.isIE||s.isOpera?-e.wheelDelta:s.isFirefox?40*e.detail:-e.wheelDeltaY;var n=this._keyAssistContents,i=n.scrollTop;return n.scrollTop+=t,i!==n.scrollTop?(e.preventDefault&&e.preventDefault(),!1):void 0}},{KeyAssistPanel:a,createCommand:l}}),n("orion/navigate/nls/messages",{root:!0}),n("orion/navigate/nls/root/messages",{Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize strings":"Externalize strings from JavaScript files in this folder.",NotSupportFileSystem:"${0} is not supported in this file system",SrcNotSupportBinRead:"Source file service does not support binary read",TargetNotSupportBinWrite:"Target file service does not support binary write",NoFileSrv:"No matching file service for location: ${0}","Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}",EnterName:"Enter a new name for '${0}'",ChooseFolder:"Choose folder...",Rename:"Rename",Refresh:"Refresh",RenameFilesFolders:"Rename the selected files or folders",CompareEach:"Compare with each other","Compare 2 files":"Compare the selected 2 files with each other","Compare with...":"Compare With...",CompareFolders:"Compare the selected folder with a specified folder",Delete:"Delete","Unknown item":"Unknown item","delete item msg":"Are you sure you want to delete these ${0} items?",DeleteTrg:"Are you sure you want to delete '${0}'?",Zip:"Zip",ZipDL:"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file",FailedToCreateProject:"Failed to create project: ${0}",FailedToCreateFile:"Failed to create file: ${0}",CopyFailed:"Copy operation failed",MoveFailed:"Move operation failed","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",CreateEmptyMsg:"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","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file","Uploaded Content":"Uploaded Content","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository",LinkContent:"Link to existing content on the server",CreateLinkedFolder:"Create a folder that links to an existing folder on the server.","Server path:":"Server path:",NameLocationNotClear:"The name and server location were not specified.","Go Up":"Go Up",GoUpToParent:"Move up to the parent folder","Go Into":"Go Into",GoSelectedFolder:"Move into the selected folder","File or zip archive":"File or Zip Archive",ImportLcFile:"Import a file or zip archive from your local file system","SFTP from...":"SFTP",CpyFrmSftp:"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP",CpyToSftp:"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}",MvToLocation:"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Open With":"Open With","Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content","File System":"File System",Root:"Root","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:",ImportURL:"Import a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:",FolderDropNotSupported:"Did not drop ${0}. Folder drop is not supported in this browser.",CreateFolderErr:"You cannot copy files directly into the workspace. Create a folder first.","Unzip ${0}?":"Unzip ${0}?","Upload progress: ":"Upload progress: ","Uploading ":"Uploading ","Cancel upload":"Cancel upload",UploadingFileErr:"Uploading the following file failed: ","Enter project name:":"Enter project name:","Create new project":"Create new project","Creating project ${0}":"Creating project ${0}",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding.",Download:"Download",Download_tooltips:"Download the file contents as the displayed name","Downloading...":"Reading file contents...","Download not supported":"Contents download is not supported in this browser.",gettingContentFrom:"Getting content from ",confirmLaunchDelete:'Delete Launch Configuration "${0}" ?',deletingLaunchConfiguration:"Deleting launch configuration...",deployTo:"Deploy to ",deployItem:'Deploy "${0}"',deploy:"Deploy",connect:"Connect",fetchContent:"Fetch content",fetchContentOf:"Fetch content of ",disconnectFromProject:"Disconnect from project",doNotTreatThisFolder:"Do not treat this folder as a part of the project",checkStatus:"Check status",checkApplicationStatus:"Check application status",checkApplicationState:"Check application state",stop:"Stop",start:"Start",stopApplication:"Stop the App",startApplication:"Start the application",manage:"Manage",manageThisApplicationOnRemote:"Manage this application on remote server",deleteLaunchConfiguration:"Delete this launch configuration",editLaunchConfiguration:"Edit this launch configuration",deployThisApplication:"Deploy the App from the Workspace",associatedFolder:"Associated Folder",associateAFolderFromThe:"Associate a folder from the workspace with this project.",convertToProject:"Convert to project",convertThisFolderIntoA:"Convert this folder into a project",thisFolderIsAProject:"This folder is a project already.",basic:"Basic","createAnEmptyProject.":"Create an empty project.",sFTP:"SFTP",createAProjectFromAn:"Create a project from an SFTP site.",readMeCommandName:"Readme File",readMeCommandTooltip:"Create a README.md file in this project",zipArchiveCommandName:"Zip Archive",zipArchiveCommandTooltip:"Create a project from a local zip archive.","Url:":"Url:",notZip:"The following files are not zip files: ${0}. Would you like to continue the import?",notZipMultiple:"There are multiple non-zip files being uploaded. Would you like to continue the import?",Cancel:"Cancel",Ok:"Ok",missingCredentials:"Enter the ${0} authentication credentials associated with ${1} to check its status.",deploying:"deploying",starting:"restarting",stopping:"stopping",checkingStateShortMessage:"checking status"}),n("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil","orion/EventTarget"],function(e,t,n,i){function r(t,i,r){if(!t[i])throw new Error(n.formatMessage(e.NotSupportFileSystem,i));return t[i].apply(t,r)}function o(n,i,s,a){if(!n.readBlob)throw new Error(e.SrcNotSupportBinRead);if(!s.writeBlob)throw new Error(e.TargetNotSupportBinWrite);if("/"!==i[i.length-1])return r(n,"readBlob",[i]).then(function(e){return r(s,"writeBlob",[a,e])});var l=a.substring(0,a.length-1),d=decodeURIComponent(l.substring(l.lastIndexOf("/")+1)),c=l.substring(0,l.lastIndexOf("/")+1);return r(s,"createFolder",[c,d]).then(function(){},function(){}).then(function(){return r(n,"fetchChildren",[i]).then(function(e){for(var i=[],r=0;r=0){r=i;break}if(t(i.extension,s))r=i;else if("string"==typeof i.filenamePattern)try{new RegExp(i.filenamePattern,"i").test(e)&&(r=i)}catch(l){}}if(!r)for(o=s.indexOf(".");!r&&o>=0;){for(o++,s=s.substring(o),a=0;a1&&t.pop():"."!==e&&t.push(e)}),t.join("/")}function h(e){e.scheme&&(e.scheme=l(e.scheme)),e.port&&(e.port=d(e.port)),e.host&&e.path&&(e.path=c(e.path))}function u(e){return e.replace(/\s/g,function(e){return"%"+e.charCodeAt(0).toString(16)})}function f(e,t){if("string"!=typeof e)throw new TypeError;e=u(e);var n=_.exec(e);if(!n)return null;var i={};if(i.scheme=n[1]||"",i.scheme&&!w.test(i.scheme))return null;var r=n[2];if(r){var o=y.exec(r);if(i.userinfo=o[1],i.host=o[2],i.port=o[3],i.port&&!x.test(i.port))return null}return i.path=n[3],i.query=n[4],i.fragment=n[5],a(i,t),h(i),i}function p(e){var t=e.scheme?e.scheme+":":"";return e.host&&(t+="//",e.userinfo&&(t+=e.userinfo+"@"),t+=e.host,e.port&&(t+=":"+e.port)),t+=e.path,e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function g(e,t){var n;if(t){if(t=t.href||t,n=f(t),!n||!n.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:n})}var i=f(e,n);if(!i)throw new SyntaxError;Object.defineProperty(this,"_input",{value:e,writable:!0}),Object.defineProperty(this,"_url",{value:i,writable:!0});var r=new s(this);Object.defineProperty(this,"query",{get:function(){return this._url?r:null},enumerable:!0})}try{var v;if("function"==typeof self.URL&&0!==self.URL.length&&"http:"===(v=new self.URL("http://www.w3.org?q")).protocol&&v.query)return}catch(m){}var _=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,y=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,C=/^\S*$/,w=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,x=/^\d*$/,b=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,S=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,T=/^([^?#\s]*)$/,E=/^([^\s]*)$/,A=C,L=/([^:]*):?(.*)/,k="undefined"!=typeof StopIteration?StopIteration:new Error("Stop Iteration"),M={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(s.prototype,{get:{value:function(n){e(n);var r,o=t(this._url.query);return o.some(function(e){var t=i(e);return t[0]===n?(r=t[1],!0):void 0}),r},enumerable:!0},set:{value:function(o,s){e(o),e(s);var a=t(this._url.query),l=a.some(function(e,t){var n=i(e);return n[0]===o?(n[1]=s,a[t]=r(n),!0):void 0});l||a.push(r([o,s])),this._url.query=n(a)},enumerable:!0},has:{value:function(n){e(n);var r=t(this._url.query);return r.some(function(e){var t=i(e);return t[0]===n?!0:void 0})},enumerable:!0},"delete":{value:function(r){e(r);var o=t(this._url.query),s=o.filter(function(e){var t=i(e);return t[0]!==r});return s.length!==o.length?(this._url.query=n(s),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(e,t){if("function"!=typeof e)throw new TypeError;var n=o(this._url,"keys+values");try{for(;;){var i=n.next();e.call(t,i[1],i[0],this)}}catch(r){if(r!==k)throw r}},enumerable:!0},keys:{value:function(){return o(this._url,"keys")},enumerable:!0},values:{value:function(){return o(this._url,"values")},enumerable:!0},items:{value:function(){return o(this._url,"keys+values")}},size:{get:function(){return t(this._url.query).length},enumerable:!0},getAll:{value:function(n){e(n);var r=[],o=t(this._url.query);return o.forEach(function(e){var t=i(e);t[0]===n&&r.push(t[1])}),r},enumerable:!0},append:{value:function(i,o){e(i),e(o);var s=t(this._url.query);s.push(r([i,o])),this._url.query=n(s)},enumerable:!0}}),Object.defineProperties(g.prototype,{toString:{value:function(){return this.href}},href:{get:function(){return this._url?p(this._url):this._input},set:function(t){e(t),this._input=t,this._url=f(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(t){if(e(t),this._url){var n=":"===t.slice(-1)?t.substring(0,t.length-1):t;(""===n||w.test(n))&&(this._url.scheme=l(n))}},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(t){e(t),this._url&&(this._url.userinfo=t)}},username:{get:function(){if(!this._url)return"";var e=L.exec(this._userinfo),t=decodeURIComponent(e[1]||"");return t},set:function(t){if(e(t),this._url){var n=L.exec(this._userinfo),i=[encodeURIComponent(t||"")];n[2]&&i.push(n[2]),this._userinfo=i.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var e=L.exec(this._userinfo),t=decodeURIComponent(e[2]||"");return t},set:function(t){if(e(t),this._url){var n=L.exec(this._userinfo),i=[n[1]||""];t&&i.push(encodeURIComponent(t)),this._userinfo=i.join(":")}},enumerable:!0},host:{get:function(){var e="";return this._url&&this._url.host&&(e+=this._url.host,this._url.port&&(e+=":"+this._url.port)),e},set:function(t){if(e(t),this._url){var n=S.exec(t);n&&(this._url.host=n[1],this._url.port=d(n[2]))}},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(t){if(e(t),this._url){var n=b.exec(t);n&&(this._url.host=t)}},enumerable:!0},port:{get:function(){var e=this._url?this._url.port||"":"";return e&&e===M[this.protocol]&&(e=""),e},set:function(t){if(e(t),this._url){var n=x.exec(t);n&&(this._url.port=d(t))}},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(t){if(e(t),this._url){var n=T.exec(t);n&&(this._url.host&&t&&"/"!==t[0]&&(t="/"+t),this._url.path=t?c(t):"")}},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(t){if(e(t),this._url){t&&"?"===t[0]&&(t=t.substring(1));var n=E.exec(t);n&&(this._url.query=t)}},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(t){if(e(t),this._url){t&&"#"===t[0]&&(t=t.substring(1));var n=A.exec(t);n&&(this._url.fragment=t)}},enumerable:!0}});var O=self.URL||self.webkitURL;O&&O.createObjectURL&&(Object.defineProperty(g,"createObjectURL",{value:O.createObjectURL.bind(O),enumerable:!1}),Object.defineProperty(g,"revokeObjectURL",{value:O.revokeObjectURL.bind(O),enumerable:!1})),self.URL=g}(),n("orion/URL-shim",function(){}),n("orion/fileUtils",["require","orion/URL-shim"],function(e){function t(e){var t=document.createElement("a");if(t.href=e,e=t.href,o)try{if(window.location.host===parent.location.host&&window.location.protocol===parent.location.protocol)return e.substring(parent.location.href.indexOf(parent.location.host)+parent.location.host.length);o=!1}catch(n){o=!1}return e}function n(e){if(!e)return e;var t=window.location.protocol+"//"+window.location.host;return 0===e.indexOf(t)?e.substring(t.length):e}function i(e){if(!e)return!1;if("/workspace"===e)return!0;var t=new URL(e,window.location.href);return 0===t.href.indexOf(r)}var r,o=!0;return r=e.toUrl?new URL(e.toUrl("workspace"),window.location.href).href:new URL("/",window.location.href).href,{makeParentRelative:t,makeRelative:n,isAtRoot:i}}),n("orion/objects",[],function(){function e(e){for(var t=Object.prototype.hasOwnProperty,n=1,i=arguments.length;i>n;n++){var r=arguments[n];for(var o in r)t.call(r,o)&&(e[o]=r[o])}return e}return{clone:function(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var n=Object.create(Object.getPrototypeOf(t));return e(n,t),n},mixin:e,toArray:function(e){return Array.isArray(e)?e:[e]}}}),n("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(e,t){function n(e,n,i){var r=t.node(e);if(!r)throw new Error("Parent node of dropdown menu not found");this._parent=r,i=i||{},this.options=i,this.navDropDownId=this._parent.id+"_navdropdown",this.selectionClass=i.selectionClass;var o=document.createElement("div");if(o.classList.add("dropdownMenu"),o.classList.add("dropdownMenuOpen"),o.id=this.navDropDownId,o.style.display="none",this._parent.appendChild(o),this._dropdownMenu=o,n=t.node(n),!n)throw"Trigger node of dropdown menu not found";this._triggerNode=n,"hidden"===this._triggerNode.style.visibility&&(this._triggerNode.style.visibility="visible"),i.noClick||(this._triggerNode.onclick=this.click.bind(this)),this._dropdownMenu.addEventListener("keydown",function(e){e.keyCode===t.KEY.ESCAPE&&this.clearPanel()}.bind(this))}return e.mixin(n.prototype,{click:function(){"none"===this._dropdownMenu.style.display?this.updateContent(this.getContentNode(),function(){t.setFramesEnabled(!1),this._dropdownMenu.style.display="",this._positionDropdown(),this.selectionClass&&this._triggerNode.classList.add(this.selectionClass),this.handle=t.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this)),this.options.onShow&&this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){this.isVisible()&&(this._dropdownMenu.style.display="none",t.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,t){t()},_positionDropdown:function(){this._dropdownMenu.style.right="";var e=t.bounds(this._dropdownMenu),n=t.bounds(document.body);if(e.left+e.width>n.left+n.width){var i=t.bounds(this._boundingNode(this._triggerNode)),r=t.bounds(this._triggerNode);this._dropdownMenu.style.right=i.width-(r.left-i.left+r.width)+"px"}},_boundingNode:function(e){var t=window.getComputedStyle(e,null);if(null===t)return e;var n=t.getPropertyValue("position");return"absolute"!==n&&e.parentNode&&e!==document.body?this._boundingNode(e.parentNode):e},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&&(t.setFramesEnabled(!0),t.empty(this._parent),this._parent=this.select=null)}}),n}),n("orion/URITemplate",[],function(){function e(e){this._text=e}function t(e){return e.replace("%25","%")}function n(e,n){if("U"===n)return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()});if("U+R"===n)return encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(h,t);if("U+R-,"===n)return encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw new Error("Unknown allowed character set: "+n)}function i(e,t,i){for(var r=[],o=0;on?-1:n>i?1:0}function p(e,t,n){var i=document.createElement("a");return i.href=e,i.target=t,i.classList.add("targetSelector"),i.textContent=n,i}var g;return o.mixin(h.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(e){return this.categories[e]||null}}),o.mixin(u.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(e){return p(e.href,"_self",e.textContent)})},getAllLinks:function(){return this.allPageLinks}}),{getCategoriesInfo:c,getPageLinksInfo:a,getOrionHome:s}}),n("orion/extensionCommands",["orion/Deferred","orion/commands","orion/PageUtil","orion/contentTypes","orion/URITemplate","orion/i18nUtil","orion/PageLinks","i18n!orion/edit/nls/messages","orion/util","orion/URL-shim"],function(e,t,n,i,r,o,s,a,l){function d(e){var t={},n=e.getPropertyKeys();return n.forEach(function(n){t[n]=e.getProperty(n)}),t}function c(e){return e.id||e.name}var h={},u=s.getOrionHome();h._cloneItemWithoutChildren=function v(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)"children"!==n&&"Children"!==n&&"parent"!==n&&"Project"!==n&&(t[n]=v(e[n]));return t},h._getOpenWithNavCommandExtensions=function(e){function t(){for(var t=e.getServiceReferences("orion.edit.editor"),n=[],i=0;i=0){if((d=t.indexOf("]"))<0)return!1;var h,u,f=t.substring(0,l);if(!(h=e[f])||!Array.isArray(h))return!1;if(r=t.substring(l+1,d),u=parseInt(r,10),isNaN(u))return!1;0>u&&(u+=h.length),o=t.substring(d+1),t=f+":"+String(u)+o}return t.indexOf("|")>=0?(r=t.substring(0,t.indexOf("|")),o=t.substring(t.indexOf("|")+1),a(e,r,n,i)?!0:a(e,o,n,i)):t.indexOf(":")>=0?(r=t.substring(0,t.indexOf(":")),o=t.substring(t.indexOf(":")+1),e[r]?a(e[r],o,n,i):!1):s(e,t,c,n,i)}function l(t,n,r){if(r.info.validationProperties)for(var o=0;o=0?!0:!1;var d=!0,c=n?i.getFilenameContentType(t.Name||t.Location,n):null;return c=c||{id:"application/octet-stream"},r.info.excludedContentTypes&&n&&(d=r.info.excludedContentTypes.every(function(e){var t=e.replace(/([*?])/g,".$1");return-1!==c.id.search(t)?!1:!0})),d&&r.info.contentType&&n&&(d=r.info.contentType.some(function(e){var t=e.replace(/([*?])/g,".$1");return-1!==c.id.search(t)?!0:!1})),d}var d={info:e};return d.validationFunction=function(e){if("function"==typeof o&&(e=o.call(this,e)),e){if(Array.isArray(e)){if((this.info.forceSingleItem||this.info.uriTemplate)&&1!==e.length)return!1;if(e.length<1)return!1}else e=[e];for(var t=0;tr;r++)if(i[r]){var s=i[r].listener;"function"==typeof s?s.call(this,t):s.handleEvent&&"function"==typeof s.handleEvent&&s.handleEvent(t)}}finally{if(n.level--,n.compact&&0===n.level){for(var a=i.length-1;a>=0;a--)i[a]||i.splice(a,1);0===i.length&&delete this._eventTypes[e],n.compact=!1}}}},isListening:function(e){return this._eventTypes?void 0!==this._eventTypes[e]:!1},removeEventListener:function(e,t,n){if(this._eventTypes){var i=this._eventTypes[e];if(i){for(var r=i.listeners,o=0,s=r.length;s>o;o++){var a=r[o];if(a&&a.listener===t&&a.useCapture===n){0!==i.level?(r[o]=null,i.compact=!0):r.splice(o,1);break}}0===r.length&&delete this._eventTypes[e]}}}},{EventTarget:e}}),n("orion/editor/textModel",["orion/editor/eventTarget","orion/regex","orion/util"],function(e,t,n){function i(e,t){this._lastLineIndex=-1,this._text=[""],this._lineOffsets=[0],this.setText(e),this.setLineDelimiter(t)}function r(e,t){var n=e.getLineAtOffset(t.start),i=e.getLineAtOffset(t.start+t.removedCharCount);t.range={start:{line:n,character:t.start-e.getLineStart(n)},end:{line:i,character:t.start+t.removedCharCount-e.getLineStart(i)}}}return i.prototype={destroy:function(){},find:function(e){this._text.length>1&&(this._text=[this._text.join("")]);var n=e.string,i=e.regex,r=n,o="",s=e.caseInsensitive;if(r)if(i){var a=t.parse(r);a&&(r=a.pattern,o=a.flags)}else r=n.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"),s&&(r=r.replace(/[iI\u0130\u0131]/g,"[Iiİı]"));var l,d=null;if(r){var c=e.reverse,h=e.wrap,u=e.wholeWord,f=e.start||0,p=e.rangeStart,g=e.rangeEnd,v=null!==p&&void 0!==p&&null!==g&&void 0!==g;-1===o.indexOf("g")&&(o+="g"),-1===o.indexOf("m")&&(o+="m"),s&&-1===o.indexOf("i")&&(o+="i"),u&&(r="\\b"+r+"\\b");var m,_,y=this._text[0],C=0;if(v){var w=g>p?p:g,x=g>p?g:p;y=y.substring(w,x),C=w}var b=new RegExp(r,o);c?l=function(){var e=null;for(b.lastIndex=0;;){if(_=b.lastIndex,m=b.exec(y),_===b.lastIndex)return null;if(!m)break;if(m.index+C=0&&n>e))return null;var i=this._lineOffsets[e];if(n>e+1){var r=this.getText(i,this._lineOffsets[e+1]);if(t)return r;for(var o,s=r.length;10===(o=r.charCodeAt(s-1))||13===o;)s--;return r.substring(0,s)}return this.getText(i)},getLineAtOffset:function(e){var t=this.getCharCount();if(!(e>=0&&t>=e))return-1;var n=this.getLineCount();if(e===t)return n-1;var i,r,o=this._lastLineIndex;if(o>=0&&n>o&&(i=this._lineOffsets[o],r=n>o+1?this._lineOffsets[o+1]:t,e>=i&&r>e))return o;for(var s=n,a=-1;s-a>1;)if(o=Math.floor((s+a)/2),i=this._lineOffsets[o],r=n>o+1?this._lineOffsets[o+1]:t,i>=e)s=o;else{if(r>e){s=o;break}a=o}return this._lastLineIndex=s,s},getLineCount:function(){return this._lineOffsets.length},getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(e,t){var n=this.getLineCount();if(!(e>=0&&n>e))return-1;if(n>e+1){var i=this._lineOffsets[e+1];if(t)return i;for(var r,o=this.getText(Math.max(this._lineOffsets[e],i-2),i),s=o.length;10===(r=o.charCodeAt(s-1))||13===r;)s--;return i-(o.length-s)}return this.getCharCount()},getLineStart:function(e){return e>=0&&e=e));)i+=n,r++;for(var o=i,s=r;r=t));)i+=n,r++;var a=i,l=r;if(s>=this._text.length||l>=this._text.length||s>l)return"";if(s===l)return this._text[s].substring(e-o,t-a);var d=this._text[s].substring(e-o),c=this._text[l].substring(0,t-a);return d+this._text.slice(s+1,l).join("")+c},onChanging:function(e){return r(this,e),this.dispatchEvent(e)},onChanged:function(e){return r(this,e),this.dispatchEvent(e)},setLineDelimiter:function(e,t){if("auto"===e&&(e=void 0,this.getLineCount()>1&&(e=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0)))),this._lineDelimiter=e?e:n.platformDelimiter,t){var i=this.getLineCount();if(i>1){for(var r=new Array(i),o=0;i>o;o++)r[o]=this.getLine(o);this.setText(r.join(this._lineDelimiter))}}},setText:function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=0),void 0===n&&(n=this.getCharCount()),t!==n||""!==e){for(var i=this.getLineAtOffset(t),r=this.getLineAtOffset(n),o=t,s=n-t,a=r-i,l=e.length,d=0,c=this.getLineCount(),h=0,u=0,f=0,p=[];;){if(-1!==h&&f>=h&&(h=e.indexOf("\r",f)),-1!==u&&f>=u&&(u=e.indexOf("\n",f)),-1===u&&-1===h)break;f=-1!==h&&-1!==u?h+1===u?u+1:(u>h?h:u)+1:-1!==h?h+1:u+1,p.push(t+f),d++}var g={type:"Changing",text:e,start:o,removedCharCount:s,addedCharCount:l,removedLineCount:a,addedLineCount:d};this.onChanging(g);var v=e;if(0===p.length){var m,_=this.getLineStart(i);m=c>r+1?this.getLineStart(r+1):this.getCharCount(),t!==_&&(e=this.getText(_,t)+e,t=_),n!==m&&(e+=this.getText(n,m),n=m)}for(var y=l-s,C=i+a+1;c>C;C++)this._lineOffsets[C]+=y;var w,x=5e4,b=x;if(p.length=t));)E+=T,A++;for(var L=E,k=A;A=n));)E+=T,A++;var M=E,O=A,D=this._text[k],N=this._text[O],I=D.substring(0,t-L),R=N.substring(n-M),B=[k,O-k+1];I&&B.push(I),e&&B.push(e),R&&B.push(R),Array.prototype.splice.apply(this._text,B),0===this._text.length&&(this._text=[""]);var P={type:"Changed",start:o,text:v,removedCharCount:s,addedCharCount:l,removedLineCount:a,addedLineCount:d};this.onChanged(P)}}},e.EventTarget.addMixin(i.prototype),{TextModel:i}}),n("orion/searchUtils",["i18n!orion/nls/messages","orion/regex","orion/editor/textModel","orion/URITemplate"],function(e,t,n,i){function r(e,n,i){var r="";i&&(r="^");var o=n.wholeWord?"\\b"+e.searchStr+"\\b":e.searchStr,s=t.parse("/"+r+o+"/");if(s){var a=s.pattern,l=s.flags;-1!==l.indexOf("i")||n.caseSensitive||(l+="i"),e.regExp={pattern:a,flags:l},e.wildCard=!0}}var o={};return o.ALL_FILE_TYPE="*.*",o.getSearchParams=function(t,n,i,r){if(t){var s=n,a=!0;if("*"===s&&(s=""),""===s&&(a=i&&i.type!==o.ALL_FILE_TYPE),a){var l=t.createSearchParams(s,!1,!1,i,r);return l}}else window.alert(e.NoSearchAvailableErr);return null},o.generateSearchHelper=function(e,t){var n=e.keyword,i=n,s={};if(e.fileType&&e.fileType!==o.ALL_FILE_TYPE&&""===n&&(i="*."+e.fileType),e.regEx)s.searchStr=n,r(s,e,t);else{var a=n.indexOf("*")>-1,l=n.indexOf("?")>-1;a&&(n=n.split("*").join(".*")),l&&(n=n.split("?").join(".")),e.wholeWord&&(n=a||l?n.replace(/[-[\]{}()+,\\^$|#\s]/g,"\\$&"):n.replace(/[-[\]{}()+.,\\^$|#\s]/g,"\\$&")),a||l||e.nameSearch||e.wholeWord?(s.searchStr=e.caseSensitive?n:n.toLowerCase(),r(s,e,t),s.wildCard=!0):(s.searchStr=e.caseSensitive?n.split("\\").join(""):n.split("\\").join("").toLowerCase(),s.wildCard=!1)}return s.searchStrLength=s.searchStr.length,{params:e,inFileQuery:s,displayedSearchTerm:i}},o.convertSearchParams=function(e){void 0!==e.rows&&(e.rows=parseInt(e.rows,10)),void 0!==e.start&&(e.start=parseInt(e.start,10)),"string"==typeof e.regEx&&(e.regEx="true"===e.regEx.toLowerCase()),"string"==typeof e.caseSensitive&&(e.caseSensitive="true"===e.caseSensitive.toLowerCase()),"string"==typeof e.nameSearch&&(e.nameSearch="true"===e.nameSearch.toLowerCase()),void 0!==e.fileNamePatterns&&(e.fileNamePatterns=o.getFileNamePatternsArray(e.fileNamePatterns))},o.getFileNamePatternsArray=function(e){var t=void 0;if(e){var n=e.trim();n=n.replace(/^(\s*,\s*)+/g,""),n=n.replace(/([^\\]),(\s*,\s*)*/g,"$1/"),n=n.replace(/(\s*\/\s*)/g,"/"),n=n.replace(/\/\/+/g,"/"),n=n.replace(/\/+$/g,""),t=n.split("/")}return t},o.copySearchParams=function(e,t){var n={};for(var i in e)if(void 0!==e[i]&&null!==e[i]){if(!t&&"replace"===i)continue;n[i]=e[i]}return n},o.generateFindURLBinding=function(e,t,n,r,o){var s={find:t.searchStr,regEx:t.wildCard?!0:void 0,caseSensitive:e.caseSensitive?!0:void 0,wholeWord:e.wholeWord?!0:void 0,replaceWith:"string"==typeof r?r:void 0,atLine:"number"==typeof n?n:void 0};if(o)return s;var a=new i("{,params*}").expand({params:s});return","+a},o.convertFindURLBinding=function(e){"string"==typeof e.regEx&&(e.regEx="true"===e.regEx.toLowerCase()),"string"==typeof e.caseSensitive&&(e.caseSensitive="true"===e.caseSensitive.toLowerCase()),"string"==typeof e.wholeWord&&(e.wholeWord="true"===e.wholeWord.toLowerCase()),"string"==typeof e.atLine&&(e.atLine=parseInt(e.atLine,10))},o.replaceRegEx=function(e,t,n){var i=new RegExp(t.pattern,t.flags);return e.replace(i,n)},o.replaceStringLiteral=function(e,n,i){var r=t.parse("/"+n+"/gim");return o.replaceRegEx(e,r,i)},o.searchOnelineLiteral=function(e,t,n,i,r){for(var o,s=0,a=!1,l=[];;){if(o=t.indexOf(e.searchStr,s),0>o)break;if(i){var d=i.getLineStart(r)+o;l.push({startIndex:o,length:e.searchStrLength,start:d,end:d+e.searchStrLength})}else l.push({startIndex:o,length:e.searchStrLength});if(a=!0,n)break;s=o+e.searchStrLength}return a?l:null},o.findRegExp=function(e,t,n,i){if(!t)return null;n=n||"",n+=(-1===n.indexOf("g")?"g":"")+(-1===n.indexOf("m")?"m":"");var r=new RegExp(t,n),o=null;return o=r.exec(e.substring(i)),o&&{startIndex:o.index+i,length:o[0].length}},o.searchOnelineRegEx=function(e,t,n,i,r){for(var s=0,a=!1,l=[];;){var d=o.findRegExp(t,e.regExp.pattern,e.regExp.flags,s);if(!d)break;if(i){var c=i.getLineStart(r)+d.startIndex;d.start=c,d.end=c+d.length}if(l.push(d),a=!0,n)break;s=d.startIndex+d.length}return a?l:null},o.generateNewContents=function(e,t,n,i,r,s){if(i&&t){e||(n.contents=[]);for(var a=0;a0,l=i.children[g].matches,h=!0;break}}if(h){var m;if(u){var _=o.replaceCheckedMatches(c,r,l,f,s);for(m=_.replacedStr,d=0;di?(i=0,r=i+s-1):(r=n+e,r>t.length-1&&(r=t.length-1,i=r-s+1)));for(var a=i;r>=a;a++)o.push({context:t[a],current:a===n});return o},o.splitFile=function(e){for(var t=0,n=0,i=0,r=0,o=[];;){if(-1!==t&&i>=t&&(t=e.indexOf("\r",i)),-1!==n&&i>=n&&(n=e.indexOf("\n",i)),-1===n&&-1===t){o.push(e.substring(r));break}var s=1;-1!==t&&-1!==n?t+1===n?(s=2,i=n+1):i=(n>t?t:n)+1:i=-1!==t?t+1:n+1,o.push(e.substring(r,i)),r=i}return o},o.searchWithinFile=function(e,t,i,r,s,a,l){var d;(a||l)&&(d=new n.TextModel(i));var c=o.splitFile(i);if((r||a)&&(t.contents=c),t){t.children=[];for(var h=0,u=0;u0){var p,g=s?f:f.toLowerCase();if(p=e.wildCard?o.searchOnelineRegEx(e,g,!1,d,u):o.searchOnelineLiteral(e,g,!1,d,u)){var v,m=u+1;if(r)for(var _=0;_0)for(var i=t-1;i>-1;i--){var r=""===n?"":"/";n=n+r+e[i].Name}return n},o}),n("orion/editor/nls/messages",["module"],function(e){var t=e.config();return t&&t.root?t:{root:!0}}),n("orion/editor/nls/root/messages",{multipleAnnotations:"Multiple annotations:",line:"Line: ${0}",breakpoint:"Breakpoint",bookmark:"Bookmark",task:"Task",error:"Error",warning:"Warning",info:"Info",currentSearch:"Current Search",currentLine:"Current Line",matchingBracket:"Matching Bracket",currentBracket:"Current Bracket",diffAdded:"Diff Added Lines",diffDeleted:"Diff Deleted Lines",diffModified:"Diff Modified Lines",collabLineChanged:"Collab Line Changed",lineUp:"Line Up",lineDown:"Line Down",lineStart:"Line Start",lineEnd:"Line End",charPrevious:"Previous Character",charNext:"Next Character",pageUp:"Page Up",pageDown:"Page Down",scrollPageUp:"Scroll Page Up",scrollPageDown:"Scroll Page Down",scrollLineUp:"Scroll Line Up",scrollLineDown:"Scroll Line Down",wordPrevious:"Previous Word",wordNext:"Next Word",textStart:"Document Start",textEnd:"Document End",scrollTextStart:"Scroll Document Start",scrollTextEnd:"Scroll Document End",centerLine:"Center Line",selectLineUp:"Select Line Up",selectLineDown:"Select Line Down",selectWholeLineUp:" Select Whole Line Up",selectWholeLineDown:"Select Whole Line Down",selectLineStart:"Select Line Start",selectLineEnd:"Select Line End",selectCharPrevious:"Select Previous Character",selectCharNext:"Select Next Character",selectPageUp:"Select Page Up",selectPageDown:"Select Page Down",selectWordPrevious:"Select Previous Word",selectWordNext:"Select Next Word",selectTextStart:"Select Document Start",selectTextEnd:"Select Document End",deletePrevious:"Delete Previous Character",deleteNext:"Delete Next Character",deleteWordPrevious:"Delete Previous Word",deleteWordNext:"Delete Next Word",deleteLineStart:"Delete Line Start",deleteLineEnd:"Delete Line End",tab:"Insert Tab",enter:"Insert Line Delimiter",enterNoCursor:"Insert Line Delimiter",escape:"Escape",selectAll:"Select All",copy:"Copy",cut:"Cut",paste:"Paste",uppercase:"To Upper Case",lowercase:"To Lower Case",capitalize:"Capitalize",reversecase:"Reverse Case",toggleWrapMode:"Toggle Wrap Mode",toggleTabMode:"Toggle Tab Mode",toggleOverwriteMode:"Toggle Overwrite Mode",committerOnTime:"${0} on ${1}",emacs:"Emacs",exchangeMarkPoint:"Exchange Mark and Point",setMarkCommand:"Set Mark",clearMark:"Clear Mark",digitArgument:"Digit Argument ${0}",negativeArgument:"Negative Argument",Comment:"Comment","Flat outline":"Flat outline",incrementalFindStr:"Incremental find: ${0}",incrementalFindStrNotFound:"Incremental find: ${0} (not found)",incrementalFindReverseStr:"Reverse Incremental find: ${0}",incrementalFindReverseStrNotFound:"Reverse Incremental find: ${0} (not found)",findReplace:"Find/Replace",find:"Find...",undo:"Undo",redo:"Redo",cancelMode:"Cancel Current Mode",findNext:"Find Next Occurrence",findPrevious:"Find Previous Occurrence",incrementalFind:"Incremental Find",incrementalFindReverse:"Incremental Find Reverse",indentLines:"Indent Lines",unindentLines:"Unindent Lines",moveLinesUp:"Move Lines Up",moveLinesDown:"Move Lines Down",copyLinesUp:"Copy Lines Up",copyLinesDown:"Copy Lines Down",deleteLines:"Delete Lines",gotoLine:"Goto Line...",gotoLinePrompty:"Goto Line:",nextAnnotation:"Next Annotation",prevAnnotation:"Previous Annotation",expand:"Expand",collapse:"Collapse",expandAll:"Expand All",collapseAll:"Collapse All",lastEdit:"Last Edit Location",trimTrailingWhitespaces:"Trim Trailing Whitespaces",toggleLineComment:"Toggle Line Comment",addBlockComment:"Add Block Comment",removeBlockComment:"Remove Block Comment",linkedModeEntered:"Linked Mode: Enter or ESC to exit",linkedModeExited:"Linked Mode exited",syntaxError:"Syntax Error",contentAssist:"Content Assist",noProposals:"No proposals found",computingProposals:"Computing content assist proposals...",lineColumn:"Line ${0} : Column ${1}",lineColumnOffset:"Line ${0} : Column ${1} : Offset ${2}",multiSelections:"${0} selection regions",vi:"vi",vimove:"(Move)",viyank:"(Yank)",videlete:"(Delete)",vichange:"(Change)",viLeft:"${0} Left",viRight:"${0} Right",viUp:"${0} Up",viDown:"${0} Down",viw:"${0} Next Word",vib:"${0} Beginning of Word",viW:"${0} Next Word (ws stop)",viB:"${0} Beginning of Word (ws stop)",vie:"${0} End of Word",viE:"${0} End of Word (ws stop)",vi$:"${0} End of the line","vi^_":"${0} First non-blank Char Current Line","vi+":"${0} First Char Next Line","vi-":"${0} First Char Previous Line","vi|":"${0} nth Column in Line",viH:"${0} Top of Page",viM:"${0} Middle of Page",viL:"${0} Bottom of Page","vi/":"${0} Search Forward","vi?":"${0} Search Backward",vin:"${0} Next Search",viN:"${0} Previous Search",vif:"${0} Search Char Fwd",viF:"${0} Search Char Bckwd",vit:"${0} Search Before Char Fwd",viT:"${0} Search Before Char Bckwd","vi,":"${0} Repeat Reverse Char Search","vi;":"${0} Repeat Char Search",viG:"${0} Go to Line",viycd:"${0} Current Line",via:"Append After Cursor",viA:"Append to End of Line",vii:"Insert Before Cursor",viI:"Insert at Beginning of Line",viO:"Insert Line Above",vio:"Insert Line Below",viR:"Begin Overwriting Text",vis:"Substitute a Character",viS:"Substitute Entire Line",viC:"Change Text Until Line End",vip:"Paste After Char or Line",viP:"Paste Before Char or Line",viStar:"Search Word Under Cursor",next:"Next",previous:"Previous",replace:"Replace",replaceAll:"Replace All",findWith:"Find With",replaceWith:"Replace With",caseInsensitive:"Aa",selectedLines:"Sel",regex:"/.*/",wholeWord:"\\b",caseInsensitiveTooltip:"Toggle Case Insensitive",selectedLinesTooltip:"Toggle Search Scope On Selected Lines",regexTooltip:"Toggle Regular Expression",wholeWordTooltip:"Toggle Whole Word",closeTooltip:"Close",replacingAll:"Replacing all...",replacedMatches:"Replaced ${0} matches",nothingReplaced:"Nothing replaced",notFound:"Not found"}),n("orion/editor/annotations",["i18n!orion/editor/nls/messages","orion/editor/eventTarget"],function(e,t){function n(){}function i(e,t,n){this.start=e,this.end=t,this._projectionModel=n,this.html=this._expandedHTML,this.style=this._expandedStyle,this.expanded=!0}function r(t,i){var r=t.lastIndexOf("."),o=t.substring(r+1),s={title:e[o],style:{styleClass:"annotation "+o},html:"",overviewStyle:{styleClass:"annotationOverview "+o}};i?s.lineStyle={styleClass:"annotationLine "+o}:s.rangeStyle={styleClass:"annotationRange "+o},n.registerType(t,s)}function o(){}function s(e,t,n,i,r){var o;for(void 0===i&&(i=-1),void 0===r&&(r=e.length);r-i>1;)if(o=Math.floor((r+i)/2),t<=e[o].start)r=o;else{if(n&&t
"+o(u.message+"",!0)+"";throw u}}var h={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};h.bullet=/(?:[*+-]|\d+\.)/,h.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,h.item=a(h.item,"gm")(/bull/g,h.bullet)(),h.list=a(h.list)(/bull/g,h.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+h.def.source+")")(),h.blockquote=a(h.blockquote)("def",h.def)(),h._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",h.html=a(h.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/
'+(n?e:o(e,!0))+"\n
\n":""+(n?e:o(e,!0))+"\n
"},i.prototype.blockquote=function(e){return"\n"+e+"\n"},i.prototype.def=function(){return""},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){return"
\n":"
\n"},i.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+""+n+">\n"},i.prototype.listitem=function(e){return"
"+e+"
\n"},i.prototype.table=function(e,t){return""+e+"
"},i.prototype.br=function(){return this.options.xhtml?"":"
"},i.prototype.del=function(e){return"